/* Anvaya Edu Labs homepage.
   Layout: warm paper page in one 1080px column. The hero splits copy and the
   account panel; the dark Numeri card is the one bold element, and everything
   around it stays quiet. System fonts only, so the page makes no third-party
   requests and runs under a strict CSP (no inline styles or scripts). */

:root {
  --paper: #f8f6f1;
  --card: #ffffff;
  --ink: #17162b;
  --ink-2: #47465e;
  --muted: #6e6d80;
  --line: #e6e1d6;
  --line-strong: #d6cfbf;
  --chip: #efeadf;

  --coral: #e8573a;          /* decoration and large text */
  --coral-strong: #cf4429;   /* buttons and small text: AA on white */
  --teal: #0f8f7e;
  --teal-soft: #e0f3ef;
  --sun: #f5b83d;
  --live: #4ade80;
  --error: #b42318;
  --error-soft: #fdecea;

  --on-ink: #ffffff;
  --on-ink-2: #d6d5ea;
  --on-ink-muted: #a2a1bf;
  --on-ink-line: rgba(255, 255, 255, .16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(248, 246, 241, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand {
  display: flex; align-items: center; gap: 12px; margin-right: auto;
  text-decoration: none; font-weight: 700; letter-spacing: -.01em;
}
.mark { flex: none; width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small {
  margin-top: 2px; font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.nav-links { display: flex; gap: 26px; font-size: 15px; }
.nav-links a { color: var(--ink-2); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(23, 22, 43, .5); }
.btn-dark:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn-outline { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-coral { background: var(--coral-strong); color: var(--on-ink); padding: 14px 24px; font-size: 16px; }
.btn-coral:hover { box-shadow: 0 12px 28px -10px rgba(232, 87, 58, .7); }
.btn-coral span { display: inline-block; transition: transform .2s; }
.btn-coral:hover span { transform: translateX(4px); }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding-block: 72px 80px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-soft);
}
h1 {
  margin-block: 22px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 5.6vw, 72px); line-height: 1.03; letter-spacing: -.025em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--coral); }
.lede { max-width: 34em; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); }
.meaning {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  max-width: 34em; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.meaning b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 21px; color: var(--ink); }

/* ── Account panel ───────────────────────────────────────────────────────── */
.panel {
  padding: 32px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(23, 22, 43, .03), 0 24px 48px -28px rgba(23, 22, 43, .25);
}
.panel-state { animation: settle .25s ease-out; }
@keyframes settle { from { opacity: 0; transform: translateY(4px); } }
.panel-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 28px; line-height: 1.15; letter-spacing: -.015em;
}
.eyebrow + .panel-title { margin-top: 14px; }
.panel-sub { margin-top: 4px; font-size: 15px; color: var(--muted); }

.form { display: grid; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-link { font-size: 13px; color: var(--ink-2); text-underline-offset: 3px; }
.field input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 22, 43, .08); }
.form-error {
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--error); background: var(--error-soft);
}
.or { display: flex; align-items: center; gap: 12px; margin-block: 20px; font-size: 13px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.panel-foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.panel-foot a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.eyebrow-quiet { color: var(--muted); background: var(--paper); }
.my-apps { display: grid; gap: 10px; margin-top: 14px; }
.my-app {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--card);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.my-app:hover { border-color: var(--coral); transform: translateY(-1px); box-shadow: 0 12px 24px -16px rgba(232, 87, 58, .6); }
.my-app-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.my-app-text b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.my-app-text small { font-size: 13px; color: var(--muted); }
.my-app-go { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--coral-strong); }
.my-app-go span { display: inline-block; transition: transform .2s; }
a.my-app:hover .my-app-go span { transform: translateX(3px); }
.my-app-soon { border-style: dashed; background: transparent; }
.my-app-soon .my-app-text b { font-family: var(--sans); font-size: 15px; color: var(--ink-2); }
.signed-in-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
#signed-in-email { min-width: 0; overflow-wrap: anywhere; }

/* ── App icon ────────────────────────────────────────────────────────────── */
.app-icon {
  flex: none; display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 20px;
  background: var(--coral); box-shadow: 0 12px 28px -10px rgba(232, 87, 58, .7);
}
.app-icon-sm { width: 44px; height: 44px; border-radius: 13px; box-shadow: none; }
.app-icon-sm svg { width: 22px; height: 22px; }
.app-icon-empty {
  background: transparent; border: 1.5px dashed var(--line-strong);
  color: var(--muted); font-size: 20px; line-height: 1;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding-block: 64px; }
.section-tight { padding-block: 24px 72px; }
.sec-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 16px 40px; margin-bottom: 32px;
}
.sec-head h2, .contact h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.02em;
  text-wrap: balance;
}
.sec-head p { max-width: 26em; color: var(--ink-2); }

/* The one bold element: Numeri. */
.feature {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px;
  padding: 44px; border-radius: 28px;
  background: var(--ink); color: var(--on-ink);
}
.feature-glow {
  position: absolute; z-index: -1; right: -150px; top: -170px;
  width: 460px; height: 460px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(232, 87, 58, .55) 0%, rgba(232, 87, 58, 0) 65%);
  transition: opacity .4s;
}
.feature:hover .feature-glow { opacity: .8; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.feature-title { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.feature-title h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 4.6vw, 54px); line-height: 1; letter-spacing: -.02em;
}
.feature-sub { margin-top: 6px; font-size: 14px; color: var(--on-ink-muted); }
.feature-desc { max-width: 30em; margin-top: 20px; font-size: 18px; color: var(--on-ink-2); }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.url { font-family: var(--mono); font-size: 13px; color: var(--on-ink-muted); overflow-wrap: anywhere; }
.feature-side { align-self: end; display: grid; gap: 12px; }
.strands-label {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-ink-muted);
}
.strands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.strands li {
  padding: 12px 14px; border-radius: 14px; font-size: 15px; color: var(--on-ink);
  border: 1px solid var(--on-ink-line); background: rgba(255, 255, 255, .04);
}

.soon {
  display: flex; align-items: center; gap: 18px; margin-top: 16px;
  padding: 22px 26px; border-radius: 20px; border: 1.5px dashed var(--line-strong);
}
.soon > div { flex: 1; min-width: 0; }
.soon h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.soon p { font-size: 15px; color: var(--muted); }
.soon-tag {
  white-space: nowrap; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); background: var(--chip);
}

.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.who-card { padding: 30px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.who-for { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--coral-strong); }
.who-card h3 { margin-top: 8px; font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.15; }
.who-card p { margin-top: 10px; color: var(--ink-2); }

.contact {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 20px 40px; padding-block: 36px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.contact p { margin-top: 6px; color: var(--ink-2); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { padding-block: 8px 48px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.footer-org { display: flex; flex-direction: column; gap: 2px; }
.footer-org b { font-weight: 600; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ack { max-width: 44em; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.copy { margin-top: 10px; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.notfound { padding-block: 120px 160px; }
.notfound h1 { margin-block: 16px 14px; }
.notfound .lede { margin-bottom: 32px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 34px; }
  .who { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .hero { padding-block: 40px 56px; }
  .panel { padding: 24px; }
  .feature { padding: 26px; border-radius: 22px; }
  .feature .app-icon { width: 58px; height: 58px; border-radius: 17px; }
  .feature .app-icon svg { width: 32px; height: 32px; }
  .soon {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    align-items: start; gap: 12px 14px; padding: 20px;
  }
  .soon-tag { grid-column: 2; justify-self: start; }
  .who-card { padding: 24px; }
  .notfound { padding-block: 72px 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
