/* =========================================================================
   WhiteLake / Docusy — site styles
   Plain CSS, dark theme with a lime accent (matches the App Store screenshots).
   No build step, no dependencies.
   ========================================================================= */

:root {
  --bg:          #000000;
  --bg-soft:     #0c0d0f;
  --surface-1:   #141518;
  --surface-2:   #1c1e22;
  --text:        #ffffff;
  --muted:       rgba(255, 255, 255, 0.62);
  --muted-2:     rgba(255, 255, 255, 0.55);
  --border:      rgba(255, 255, 255, 0.10);
  --border-2:    rgba(255, 255, 255, 0.18);

  --accent:      #aee43b;          /* lime */
  --accent-2:    #c6f24a;          /* brighter lime (hover) */
  --accent-ink:  #0a0f00;          /* dark text on lime */
  --accent-glow: rgba(174, 228, 59, 0.22);

  --radius-lg:   22px;
  --radius-md:   16px;
  --radius-sm:   12px;
  --maxw:        1160px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji";
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }   /* never distort aspect ratio (e.g. screenshots) */
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.center { text-align: center; }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
.display {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 820; }
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 750; }
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  --pad-y: 14px; --pad-x: 26px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { --pad-y: 9px; --pad-x: 18px; font-size: .92rem; }

/* App Store badge — black official badge inverted to white for dark bg */
.appstore { display: inline-block; transition: transform .15s ease, filter .15s ease; }
.appstore img { width: 168px; height: auto; filter: invert(1); }
.appstore:hover { transform: translateY(-2px); }

/* ---------- focus visibility (a11y) ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible,
.btn:focus-visible, .appstore:focus-visible, .nav-burger:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
.btn:focus-visible, .appstore:focus-visible { outline-offset: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { font-size: .96rem; color: var(--muted); font-weight: 600; transition: color .15s ease; }
.site-nav a:hover { color: var(--text); }
.site-nav a.is-active { color: var(--text); }
.site-nav a.btn--primary { color: var(--accent-ink); }

.nav-toggle, .nav-burger { display: none; }

@media (max-width: 820px) {
  .nav-burger {
    display: inline-flex; flex-direction: column; gap: 5px;
    width: 42px; height: 42px; align-items: center; justify-content: center;
    border: 1px solid var(--border-2); border-radius: 11px; cursor: pointer;
  }
  .nav-burger span, .nav-burger::before, .nav-burger::after {
    content: ""; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s;
  }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 14px 22px 22px; display: none;
  }
  .site-nav a { padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .site-nav a.btn { margin-top: 12px; justify-content: center; border-bottom: none; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 540px;
  background: radial-gradient(60% 60% at 50% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__copy { max-width: 36ch; }
.hero__copy .lead { margin-top: 24px; }
.hero .display + .lead { margin-top: 24px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }
.hero__note { margin-top: 18px; font-size: .9rem; color: var(--muted-2); }
.hero__art { position: relative; display: flex; justify-content: center; }
.hero__art img { width: min(330px, 78%); border-radius: 38px; filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); }

/* ---------- showcase: center-stage carousel ---------- */
.cf { position: relative; }
.cf__stage {
  position: relative; height: clamp(440px, 56vw, 600px);
  touch-action: pan-y; cursor: grab; user-select: none;
}
.cf__stage:active { cursor: grabbing; }
.cf__slide {
  position: absolute; top: 50%; left: 50%; margin: 0;
  width: clamp(200px, 40vw, 272px);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0; z-index: 0; pointer-events: none;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1), opacity .5s ease, filter .5s ease;
  will-change: transform, opacity;
}
.cf__slide img {
  width: 100%; display: block; border-radius: 30px;
  border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.cf__slide:not(.is-active) { filter: brightness(.5) saturate(.92); cursor: pointer; }
.cf__slide.is-active img {
  box-shadow: 0 38px 90px rgba(0, 0, 0, .6), 0 0 70px -12px var(--accent-glow);
}
.cf__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 50px; height: 50px; border-radius: 999px;
  background: rgba(20, 21, 24, .68); border: 1px solid var(--border-2); color: var(--text);
  font-size: 1.7rem; line-height: 1; display: grid; place-items: center; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cf__nav:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cf__nav:active { transform: translateY(-50%) scale(.9); }
.cf__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cf__nav--prev { left: 0; }
.cf__nav--next { right: 0; }
.cf__dots { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.cf__dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .25); cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.cf__dot[aria-selected="true"] { background: var(--accent); width: 26px; }
.cf__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) {
  .cf__nav { width: 42px; height: 42px; font-size: 1.45rem; }
}

/* ---------- feature rows ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px);
  align-items: center; padding-block: clamp(36px, 6vw, 72px);
}
.feature:nth-child(even) .feature__media { order: -1; }
.feature__media { display: flex; justify-content: center; }
.feature__media img { width: min(280px, 80%); border-radius: 30px; filter: drop-shadow(0 24px 48px rgba(0,0,0,.5)); }
.feature__icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-glow); color: var(--accent); font-size: 1.4rem; margin-bottom: 18px;
}

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.card .feature__icon { margin-bottom: 14px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- product showcase card (home) ---------- */
.showcase {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-1), var(--bg-soft));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
}
.showcase__head { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.showcase__head img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* ---------- privacy banner ---------- */
.banner {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.banner .feature__icon { margin-inline: auto; }

/* ---------- prose (legal / about) ---------- */
.prose { max-width: 76ch; margin-inline: auto; }
.prose h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 8px; }
.prose h2 { font-size: 1.4rem; font-weight: 750; margin-top: 40px; margin-bottom: 12px; }
.prose h3 { font-size: 1.12rem; font-weight: 700; margin-top: 26px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 14px; }
.prose > :last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { color: var(--muted-2); font-size: .92rem; margin-bottom: 28px; }

/* ---------- stories (hub cards, breadcrumb, article steps) ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted-2); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.article-meta { color: var(--muted-2); font-size: .92rem; font-weight: 600; margin-top: 14px; letter-spacing: .01em; }

.story-card { display: flex; flex-direction: column; }
.story-card .eyebrow { margin-bottom: 10px; }
.story-card h3 { margin-bottom: 10px; }
.story-card p { color: var(--muted); font-size: .98rem; }
.story-card__more { margin-top: auto; padding-top: 16px; color: var(--accent); font-weight: 700; font-size: .95rem; }
.story-card.is-soon { opacity: .62; cursor: default; }
.story-card.is-soon:hover { transform: none; border-color: var(--border); }
.tag-soon {
  display: inline-block; align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); border: 1px solid var(--border-2); border-radius: 999px;
  padding: 3px 10px; margin-bottom: 12px;
}

/* article body: one readable column so the breadcrumb, prose, headings and
   feature rows all share the same left/right edges. Feature rows stack
   (image over text) and rely on the section for vertical rhythm. */
.story .container { max-width: 760px; }
.story .feature { grid-template-columns: 1fr; gap: 24px; padding-block: 0; }
.story .feature .h3 { margin-bottom: 12px; }

/* numbered steps inside an article feature row */
.steps { counter-reset: step; display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-left: 46px; color: var(--muted); }
.steps li strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 2px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-glow); color: var(--accent);
  font-weight: 800; font-size: .98rem; display: grid; place-items: center;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 56px; background: var(--bg-soft); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__brand p { color: var(--muted); font-size: .95rem; margin-top: 12px; max-width: 34ch; }
.footer__col h4 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.footer__col a { display: block; color: var(--muted); padding: 5px 0; font-size: .96rem; }
.footer__col a:hover { color: var(--text); }
.footer__base { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: .88rem; }
.footer__base a { color: var(--muted); }
.footer__base a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero__grid, .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature__media { order: 0; }
  .hero__copy { max-width: none; }
  .hero__art { order: -1; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; }
}

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

/* ---------- keyboard-accessible mobile menu (visually-hidden but focusable) ---------- */
@media (max-width: 820px) {
  .nav-toggle {
    display: block; position: absolute; width: 1px; height: 1px;
    opacity: 0; margin: 0; pointer-events: none;
  }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--accent); outline-offset: 2px; }
}
