/* assistlyai.space shared layer: tokens, base, nav, buttons, footer, reveal.
   Page stylesheets add layout only. See landing/DESIGN.md. */

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-VariableItalic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Cool grey-green neutrals. Never pure white or black. */
  --bg: #f2f5f3;
  --surface: #fbfcfb;
  --sunk: #e7ece9;
  --ink: #0e1813;
  --ink-2: #2e3c35;
  --muted: #56655d;
  --line: #d8e0db;
  --line-strong: #bfcac4;

  /* One accent: DoctorAI green. --accent-ink is text-safe on --bg and --surface;
     --accent-fill carries white text at AA. */
  --accent: #15a35f;
  --accent-ink: #0a7543;
  --accent-fill: #0b7a46;
  --accent-fill-hover: #096a3c;
  --on-accent: #f6fbf8;
  --accent-soft: #dcefe4;
  --accent-softer: #e9f4ee;

  --shadow-sm: 0 1px 2px rgb(16 44 30 / 6%);
  --shadow-md: 0 1px 2px rgb(16 44 30 / 5%), 0 18px 40px -18px rgb(16 44 30 / 22%);
  --shadow-lg: 0 2px 4px rgb(16 44 30 / 4%), 0 32px 64px -24px rgb(16 44 30 / 30%);

  /* Shape rule: surfaces and media 20px (14px on phones), inner cards 12px,
     every interactive control is a full pill. */
  --r-surface: 20px;
  --r-inner: 12px;
  --r-pill: 999px;

  --text-xs: 0.8125rem;   /* 13 */
  --text-sm: 0.9375rem;   /* 15 */
  --text-md: 1.0625rem;   /* 17, body */
  --text-lg: 1.25rem;     /* 20 */
  --display-s: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --display-m: clamp(2.125rem, 1.3rem + 3.2vw, 3.5rem);
  --display-l: clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;

  --nav-h: 64px;
  --gutter: 24px;
  --max: 1200px;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --r-surface: 14px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b100e;
    --surface: #121916;
    --sunk: #19221e;
    --ink: #e7eee9;
    --ink-2: #c6d1cb;
    --muted: #93a39b;
    --line: #232e29;
    --line-strong: #34433c;
    --accent: #3ccf85;
    --accent-ink: #5ddb9c;
    --accent-fill: #3ccf85;
    --accent-fill-hover: #5ddb9c;
    --on-accent: #04110a;
    --accent-soft: #15301f;
    --accent-softer: #111f18;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 30%), 0 18px 40px -18px rgb(0 0 0 / 60%);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 30%), 0 32px 64px -24px rgb(0 0 0 / 70%);
  }
}
:root[data-theme="dark"] {
  --bg: #0b100e;
  --surface: #121916;
  --sunk: #19221e;
  --ink: #e7eee9;
  --ink-2: #c6d1cb;
  --muted: #93a39b;
  --line: #232e29;
  --line-strong: #34433c;
  --accent: #3ccf85;
  --accent-ink: #5ddb9c;
  --accent-fill: #3ccf85;
  --accent-fill-hover: #5ddb9c;
  --on-accent: #04110a;
  --accent-soft: #15301f;
  --accent-softer: #111f18;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 30%), 0 18px 40px -18px rgb(0 0 0 / 60%);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 30%), 0 32px 64px -24px rgb(0 0 0 / 70%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.i { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons (always pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: var(--r-pill);
  font-size: var(--text-md); font-weight: 650; letter-spacing: -0.01em; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn .i { width: 20px; height: 20px; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface); border-color: var(--ink-2); }
.btn-sm { height: 40px; padding: 0 16px; font-size: var(--text-sm); gap: 8px; }
.btn-sm .i { width: 18px; height: 18px; }
.btn .nudge { transition: transform .3s var(--ease); }
.btn:hover .nudge { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent-ink);
  text-decoration: none;
}
.link-arrow .i { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-arrow:hover .i { transform: translateX(3px); }

/* Status label. Pill radius, used only for real state (live / in development). */
.status {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: 650; letter-spacing: 0;
  background: var(--sunk); color: var(--muted);
}
.status-live { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.nav-inner { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 750; font-size: 1.1875rem; letter-spacing: -0.03em; color: var(--ink);
}
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--ink-2); font-size: var(--text-sm); font-weight: 550; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: var(--sunk); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--sunk); color: var(--ink); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .i { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .js .nav-links:not(.is-open) { display: none; }
  .nav-links a { height: 52px; font-size: var(--text-md); padding: 0 12px; border-radius: var(--r-inner); }
  .nav-links .nav-links-cta { padding-top: 12px; }
  .nav-links .nav-links-cta a { justify-content: center; background: var(--accent-fill); color: var(--on-accent); border-radius: var(--r-pill); }
}
@media (min-width: 861px) { .nav-links .nav-links-cta { display: none; } }

/* ---------- Section rhythm ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-head { max-width: 40rem; }
.section-head h2 { font-size: var(--display-m); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: var(--text-lg); line-height: 1.5; max-width: 34em; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: var(--text-sm); color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.foot-brand .brand { font-size: 1.0625rem; }
.foot-brand p { margin-top: 12px; max-width: 30em; }
.foot h2 { font-size: var(--text-sm); font-weight: 650; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; line-height: 1.4; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; transition: color .2s var(--ease); }
.foot a:hover { color: var(--ink); }
.foot-fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: var(--text-xs); line-height: 1.6; }
.foot-fine p { max-width: 80ch; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll (IntersectionObserver adds .is-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* Safety net: nothing animates under reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
