/* ==========================================================================
   Adiram — company site
   One stylesheet shared by every page. Same visual language as the product
   sites: system fonts, CSS variables, automatic light/dark.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --fg: #14161c;
  --muted: #5b6270;
  --border: #e4e7ec;
  --card: #ffffff;

  /* Adiram parent brand — indigo. Products override --accent per card. */
  --brand: #3b5bdb;
  --brand-2: #6d8dff;
  --brand-soft: #eaefff;

  /* product accents */
  --green: #12a150;
  --green-soft: #e6f7ed;
  --teal: #0d9488;
  --teal-soft: #e0f5f2;
  --amber: #d97706;
  --amber-soft: #fff3dd;

  --shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 8px 24px rgba(20, 22, 28, .06);
  --shadow-lg: 0 2px 4px rgba(20, 22, 28, .05), 0 20px 48px rgba(59, 91, 219, .18);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --bg-soft: #141821;
    --fg: #eef0f4;
    --muted: #a0a8b8;
    --border: #262b36;
    --card: #161a23;

    --brand: #8da2fb;
    --brand-2: #b4c2ff;
    --brand-soft: #1a2140;

    --green: #4ade80;
    --green-soft: #10291b;
    --teal: #2dd4bf;
    --teal-soft: #0d2f2b;
    --amber: #fbbf4a;
    --amber-soft: #33260d;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 20px 48px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
img { max-width: 100%; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.lead { font-size: 1.14rem; color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* skip link — keyboard users land here first */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -.02em; font-size: 1.14rem;
  color: var(--fg); text-decoration: none;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #3b5bdb, #6d8dff);
  display: grid; place-items: center; overflow: hidden;
}
/* The glyph carries its own padding inside the 0–100 viewBox, so it fills the
   tile rather than being inset a second time. */
.brand .mark svg { width: 100%; height: 100%; display: block; }

nav.top { display: flex; gap: 22px; align-items: center; }
nav.top a {
  color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500;
}
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--fg); }

/* mobile nav — opened by the button in site.js */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 9px; cursor: pointer; color: var(--fg);
}
.nav-toggle svg { display: block; width: 18px; height: 18px; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  nav.top {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; display: none;
  }
  nav.top.open { display: flex; }
  nav.top a { padding: 11px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  nav.top a:last-child { border-bottom: 0; }
  nav.top .btn { margin-top: 12px; justify-content: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--card); color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0e1015; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 76px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 640px;
  background:
    radial-gradient(closest-side, rgba(59, 91, 219, .28), transparent 70%) 18% 30% / 55% 75% no-repeat,
    radial-gradient(closest-side, rgba(13, 148, 136, .20), transparent 70%) 82% 20% / 50% 70% no-repeat;
  filter: blur(6px); pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; font-size: 1.2rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; padding: 6px 14px;
  font-size: .82rem; font-weight: 600;
  margin-bottom: 20px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: 40px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

.icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 16px;
}
.icon svg { width: 20px; height: 20px; }

/* ---------- product cards ---------- */
.product {
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden; text-decoration: none; color: inherit;
}
.product::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent);
}
.product .icon { background: var(--accent-soft); color: var(--accent); }
.product .name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: .4em; }
.product .name h3 { margin: 0; }
.product .body { flex: 1; }
.product .go {
  margin-top: 18px; font-weight: 600; font-size: .92rem; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; transition: gap .12s ease;
  text-decoration: none;
}
a.go:hover { gap: 10px; }
.product .go svg { width: 14px; height: 14px; }
a.product:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
a.product:hover .go { gap: 10px; }

.pill {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- numbered steps ---------- */
.steps { counter-reset: step; }
.steps .card { position: relative; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; right: 22px;
  font-size: 2.4rem; font-weight: 800; line-height: 1;
  color: var(--border);
}
/* keep the heading clear of the number when it wraps to a second line */
.steps .card h3 { padding-right: 46px; }

/* ---------- fact lists ---------- */
.facts { display: grid; gap: 18px; margin: 0; }
.facts dt {
  font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.facts dd { margin: 0; }

/* ---------- CTA band ---------- */
.cta {
  border-radius: var(--radius); padding: 44px 36px; text-align: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: var(--shadow-lg);
}
.cta h2, .cta p { color: #fff; }
.cta p { opacity: .92; max-width: 52ch; margin-inline: auto; }
.cta .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; border-color: #fff; }
.cta .btn-row { justify-content: center; margin-top: 22px; }
@media (prefers-color-scheme: dark) {
  .cta h2, .cta p { color: #0e1015; }
  .cta .btn-ghost { background: rgba(14, 16, 21, .12); color: #0e1015; border-color: rgba(14, 16, 21, .35); }
  .cta .btn-ghost:hover { background: rgba(14, 16, 21, .2); color: #0e1015; border-color: #0e1015; }
}

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.updated {
  display: inline-block; font-size: .85rem; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 13px; margin-bottom: 10px;
}

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 52px 0 32px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px;
}
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-grid h4 {
  font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-links a { color: var(--fg); text-decoration: none; font-size: .93rem; }
.foot-links a:hover { color: var(--brand); }
.foot-about p { font-size: .93rem; color: var(--muted); max-width: 34ch; margin-top: 14px; }

.foot-bottom {
  border-top: 1px solid var(--border); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .88rem; color: var(--muted);
}
.foot-bottom a { color: var(--muted); text-decoration: none; }
.foot-bottom a:hover { color: var(--brand); }

/* ---------- app screenshots ---------- */
/* Shots are 9:16 phone captures. On a wide card they share the row evenly;
   on a narrow one the row becomes a snap-scrolling strip. */
.shots { display: flex; gap: 12px; }
.shots img {
  flex: 1 1 0; width: 100%; max-width: 138px; height: auto;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-soft); box-shadow: var(--shadow); display: block;
}
.shots.lg img { max-width: 190px; border-radius: 14px; }

@media (max-width: 600px) {
  .shots {
    overflow-x: auto; padding-bottom: 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  }
  .shots img { flex: 0 0 auto; width: 132px; max-width: none; scroll-snap-align: start; }
}

/* the real launcher icon, used in place of a generic glyph */
.app-icon {
  width: 52px; height: 52px; border-radius: 13px;
  display: block; box-shadow: var(--shadow); margin-bottom: 16px;
}

/* ---------- store badge ---------- */
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }

.play-badge { display: inline-flex; align-items: center; text-decoration: none; }
.play-badge img { display: block; height: 48px; width: auto; transition: transform .12s ease; }
a.play-badge:hover img { transform: translateY(-2px); }

/* Not on the Play Store yet — greyed out and not a link. Delete the `soon`
   class and wrap it in the store link once the listing is live. */
.play-badge.soon img { filter: grayscale(1); opacity: .5; }
.badge-note {
  font-size: .82rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.badge-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; text-align: center; }
.notfound .code { font-size: 4.5rem; font-weight: 800; color: var(--brand); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
