/* Elpis Labs
   Layout: desktop-first company site in a 1200px container. Two-column hero with the
   product, multi-column sections, multi-column footer. Collapses to one column on phones.
   Palette taken from the IB Reps app itself: its charcoal surfaces, mint for actions,
   and amber (the app's streak colour) for highlights and the warm glow.
   Fonts are self-hosted, so no page load contacts a third party. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
}
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-display: swap; src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #101211;          /* page: the app's background */
  --surface: #1a1f1d;     /* raised panels: the app's card colour */
  --surface-2: #222826;
  --line: #2a302d;        /* borders */
  --line-hover: #3d4541;
  --text: #eef0ec;
  --muted: #a1a8a4;
  --faint: #6f7773;
  --mint: #5fcaa8;        /* actions: buttons, links, focus (the app's "Start review") */
  --mint-hover: #7ad6b8;
  --on-mint: #0b1f19;
  --amber: #eab96c;       /* highlights and glow (the app's streak numbers) */
  --glow: 234, 170, 90;   /* amber as r,g,b for soft light */

  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--mint); color: var(--bg); }

.container {
  max-width: var(--container); 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: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 8px;
  font: 600 15px/1 var(--body); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--mint); color: var(--on-mint); }
.btn-primary:hover { background: var(--mint-hover); }
.btn-secondary { border-color: var(--line); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--line-hover); background: var(--surface); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(16, 18, 17, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; height: 72px; gap: 40px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--head); letter-spacing: -0.01em; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.main-nav { display: flex; gap: 32px; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.main-nav a:hover { color: var(--text); }
.header-cta { height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(55% 85% at 78% 45%, rgba(var(--glow), 0.10), transparent 70%); }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.hero-copy { display: grid; gap: 24px; }
.hero-copy .lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 33em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 14px; margin-top: 12px; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual::before { content: ""; position: absolute; width: 520px; height: 520px; top: 50%; left: 50%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(var(--glow), 0.30), rgba(var(--glow), 0.06) 60%, transparent); pointer-events: none; }

/* Phone frame around real app screenshots */
.phone {
  position: relative; width: 300px; max-width: 100%;
  border-radius: 48px; padding: 10px; background: #1c2120;
  box-shadow: inset 0 0 0 1px #3a423e, 0 0 0 1px #050606, 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.screen-img { display: block; width: 100%; height: auto; aspect-ratio: 920 / 2000; border-radius: 39px; background: var(--bg); }
.phone.small { width: 240px; border-radius: 40px; padding: 8px; }
.phone.small .screen-img { border-radius: 33px; }

/* ---------- Sections ---------- */
.section { padding-top: 96px; padding-bottom: 96px; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: end; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 17px; max-width: 34em; }
.kicker { display: block; color: var(--amber); font-size: 14px; font-weight: 600; margin-bottom: 14px; }

/* ---------- App listing ---------- */
.app-panel { display: grid; grid-template-columns: 340px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.app-id { padding: 40px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.app-icon { width: 72px; height: 72px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(160deg, #7ad6b8, #3fae8b); color: var(--on-mint); font: 700 26px/1 var(--head); letter-spacing: -0.02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.app-id .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.app-id .actions { display: grid; gap: 10px; margin-top: auto; }
.app-id .actions .btn { width: 100%; }
.app-body { padding: 40px; display: grid; gap: 32px; align-content: start; }
.app-body .summary { font-size: 18px; line-height: 1.6; color: var(--text); max-width: 40em; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 24px 24px 0 0; display: grid; gap: 6px; }
.feature:nth-child(n+3) { padding-top: 28px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .num { font-variant-numeric: tabular-nums; }

.screens { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 72px; }
.screens::before { content: ""; position: absolute; inset: 10% 10% 20%; background: radial-gradient(closest-side, rgba(var(--glow), 0.10), transparent); pointer-events: none; }
.screens figure { position: relative; margin: 0; display: grid; justify-items: center; gap: 22px; }
.screens figcaption { text-align: center; color: var(--muted); font-size: 15px; max-width: 18em; }
.screens figcaption strong { display: block; color: var(--text); font-weight: 600; font-size: 16px; margin-bottom: 4px; }

/* ---------- Approach ---------- */
.columns-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principle { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.principle p { color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 80px; align-items: start; }
.about-copy { display: grid; gap: 20px; }
.about-copy p { color: var(--muted); font-size: 17px; max-width: 36em; }
.about-copy p.first { color: var(--text); }
.facts { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 8px 28px; }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--faint); font-size: 14px; }
.facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.facts a { text-decoration-color: rgba(95, 202, 168, 0.5); text-underline-offset: 3px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.contact-copy { display: grid; gap: 16px; }
.contact-copy p { color: var(--muted); font-size: 17px; max-width: 30em; }
.contact-list { display: grid; gap: 12px; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color .15s; }
.contact-row:hover { border-color: var(--line-hover); }
.contact-row small { display: block; color: var(--faint); font-size: 13px; margin-bottom: 4px; }
.contact-row strong { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.contact-row .arrow { color: var(--mint); flex: none; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 64px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand p { color: var(--faint); font-size: 14px; margin-top: 14px; max-width: 26em; }
.footer-col h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }

/* ---------- Privacy ---------- */
.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 80px; padding-top: 80px; padding-bottom: 112px; }
.doc-nav { position: sticky; top: 112px; align-self: start; display: grid; gap: 10px; }
.doc-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.doc-nav a:hover { color: var(--text); }
.doc-nav .label { color: var(--faint); font-size: 13px; margin-bottom: 4px; }
.doc-body { max-width: 720px; }
.doc-body .updated { color: var(--faint); font-size: 14px; margin: 14px 0 40px; }
.doc-body h2 { font-size: 22px; margin: 44px 0 12px; scroll-margin-top: 100px; }
.doc-body p, .doc-body li { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.doc-body ul { padding-left: 20px; margin: 0; }
.doc-body strong { color: var(--text); font-weight: 600; }
.doc-body a { color: var(--text); text-decoration-color: rgba(95, 202, 168, 0.5); text-underline-offset: 3px; }

/* ---------- 404 ---------- */
.notfound { padding-top: 140px; padding-bottom: 160px; display: grid; gap: 18px; justify-items: start; }
.notfound .code { color: var(--amber); font-weight: 600; }
.notfound p { color: var(--muted); font-size: 18px; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero .container { gap: 40px; }
  .app-panel { grid-template-columns: 1fr; }
  .app-id { border-right: 0; border-bottom: 1px solid var(--line); }
  .app-id .actions { grid-template-columns: repeat(2, max-content); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
/* ---------- Phone ---------- */
@media (max-width: 820px) {
  .main-nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero .container, .section-head, .about, .contact, .doc { grid-template-columns: 1fr; }
  .hero .container { padding-top: 56px; padding-bottom: 64px; }
  .hero-visual::before { width: 380px; height: 380px; }
  .phone { width: 260px; }
  .screens { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-top: 48px; gap: 20px; }
  .screens figure { scroll-snap-align: start; }
  .phone.small { width: 210px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .section-head { gap: 16px; margin-bottom: 36px; }
  .columns-3 { grid-template-columns: 1fr; gap: 28px; }
  .about, .contact { gap: 40px; }
  .doc { gap: 32px; padding-top: 48px; }
  .doc-nav { position: static; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(n+3) { padding: 20px 0 0; }
  .app-id, .app-body { padding: 28px 24px; }
  .app-id .actions { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
