/* ============================================================================
   Global Commons: marketing site styles (airy register).
   Self-contained: WCS design tokens inlined (from the design system's
   colors_and_type.css) plus the app-ad landing page and the static-doc
   (support/legal) styles. Kanit is linked in each page <head>.
   Every url() and path is relative, so the site works from any base path.
   ============================================================================ */

:root {
  /* brand spectrum (mark / celebratory only) */
  --spectrum-sky: #64b5e8;   --spectrum-blue: #6396ec;  --spectrum-indigo: #6163ba;
  --spectrum-coral: #fb4f4a; --spectrum-pink: #dd9ac4;  --spectrum-orange: #ff8964;
  --spectrum-amber: #ffae00; --spectrum-yellow: #ffd21d;--spectrum-lime: #d2d500;
  --spectrum-green: #4bbca2; --spectrum-teal: #009f9c;

  /* coral: the one hero color */
  --coral-50: #fff1f0;  --coral-100: #ffdedc; --coral-200: #ffb9b5;
  --coral-300: #fe8f8a; --coral-400: #fb6b66; --coral-500: #fb4f4a;
  --coral-600: #e63a35; --coral-700: #c22b27; --coral-800: #8f1f1c; --coral-900: #5c1413;

  /* ink / neutrals */
  --ink-50: #f9f9f9;  --ink-100: #eff1f3; --ink-200: #e2e5e9; --ink-300: #c4c8ce;
  --ink-400: #9aa0a8; --ink-500: #767b84; --ink-600: #565b63; --ink-700: #3a3e45;
  --ink-800: #25282e; --ink-900: #15171a;

  --grad-coral: linear-gradient(90deg, #fc504d, #dd9ac4);

  --font-display: "Kanit", "Libre Franklin", system-ui, sans-serif;
  --font-body: "Kanit", "Libre Franklin", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, monospace;

  --radius-xs: 6px; --radius-sm: 10px; --radius-md: 15px; --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(21,23,26,.06);
  --shadow-sm: 0 2px 6px rgba(21,23,26,.07);
  --shadow-md: 0 6px 18px rgba(21,23,26,.08);
  --shadow-lg: 0 16px 40px rgba(21,23,26,.12);
  --shadow-phone: 0 24px 60px rgba(21,23,26,.18), 0 6px 16px rgba(21,23,26,.08);
  --shadow-coral: 0 6px 18px rgba(251,79,74,.35);
  --ring: 0 0 0 3px rgba(251,79,74,.30);

  --dur-base: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink-900);
  background: #fff; font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--coral-700); text-decoration: none; transition: color var(--dur-base) var(--ease-out); }
a:hover { color: var(--coral-800); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--ink-900); padding: 10px 18px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { left: 0; }
.center { text-align: center; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(21,23,26,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-header .wrap { display: flex; align-items: center; height: 64px; gap: 20px; }
.brand-lock { display: flex; align-items: center; }
.brand-lock .logo { height: 30px; width: auto; display: block; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav .nav-link { color: rgba(255,255,255,.8); font-size: 14.5px; font-weight: 300; white-space: nowrap; }
.site-nav .nav-link:hover { color: #fff; }
@media (max-width: 640px) { .site-nav .nav-link { display: none; } }

/* ---- buttons ---- */
.pill {
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  border-radius: var(--radius-pill); padding: 12px 26px; cursor: pointer; border: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.pill svg { width: 20px; height: 20px; }
/* coral-600 keeps white text at AA contrast (coral-500 is only 3:1). */
.pill-coral { background: var(--coral-600); color: #fff; }
.pill-coral:hover { background: var(--coral-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-coral); }
.pill-sm { padding: 8px 18px; font-size: 14px; }
.pill-lg { padding: 16px 32px; font-size: 18px; }
.pill-grad-light { background: linear-gradient(#fff,#fff) padding-box, var(--grad-coral) border-box; border: 2px solid transparent; color: var(--ink-900); }
.pill-grad-light:hover { color: var(--coral-700); }

/* ---- sections & type ---- */
section { padding: 88px 0; }
.section-white { background: #fff; }
.section-light { background: var(--ink-50); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--coral-700); margin: 0 0 14px; }
h1.display { font-family: var(--font-display); font-weight: 500; font-size: 54px; line-height: 1.06; letter-spacing: -.02em; margin: 0; }
h2.title { font-family: var(--font-display); font-weight: 500; font-size: 40px; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.title-sm { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.lead { font-size: 20px; font-weight: 300; line-height: 1.55; color: var(--ink-600); }
.section-head { max-width: 640px; margin: 0 auto; }

/* ---- phone frame (drawn in CSS around the raw app captures) ---- */
.phone {
  position: relative; width: 100%; border-radius: var(--phone-r, 34px); padding: 3.2%;
  background: var(--ink-900); box-shadow: var(--shadow-phone);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 320 / 695; border-radius: calc(var(--phone-r, 34px) * .76); background: #fff; }
.fan .phone-back { --phone-r: 30px; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--ink-50) 100%); padding: 64px 0 72px; }
.hero .lines { position: absolute; top: 4%; left: -10%; width: 120%; max-width: none; opacity: .35; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.app-lock { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.app-lock img { width: 44px; height: 44px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.hero h1 { max-width: 640px; }
.hero .hl { color: var(--coral-600); }
.hero .lead { margin: 18px 0 0; }

/* fan of three phones */
.fan { position: relative; height: 600px; }
.fan .phone { position: absolute; }
.fan .phone-front { width: 270px; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; }
.fan .phone-back { width: 230px; top: 64px; opacity: .97; }
.fan .phone-back.l { left: calc(50% - 250px); }
.fan .phone-back.r { left: calc(50% + 20px); }

/* ---- get the app ---- */
.get { margin-top: 32px; }
.get-desk { display: none; align-items: center; gap: 22px; flex-wrap: wrap; }
.badges { display: flex; flex-direction: column; gap: 10px; }
.badges img { display: block; height: 50px; width: auto; }
.qr { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius-md); padding: 10px 18px 10px 10px; color: var(--ink-700); font-size: 14.5px; box-shadow: var(--shadow-sm); }
.qr img { width: 96px; height: 96px; display: block; image-rendering: pixelated; }
.qr span { max-width: 9em; line-height: 1.3; }
.get-web { margin: 18px 0 0; font-size: 14.5px; color: var(--ink-600); }
.get-web a { text-decoration: underline; text-underline-offset: 2px; }
/* On a phone the web app hands off to the store anyway, so only computers get the browser link. */
.desk-only { display: none; }
/* Computers (wide screen with a mouse) get badges + QR; phones get one button. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .get-touch { display: none; }
  .get-desk { display: flex; }
  .desk-only { display: inline; }
}

/* ---- screenshot cards ---- */
.shots { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.shots-3 { grid-template-columns: repeat(3, 1fr); max-width: 900px; margin-inline: auto; }
.shot-card { text-align: center; position: relative; }
.shot-card .phone { max-width: 240px; margin: 0 auto 26px; }
.shot-card .num {
  display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--coral-600); color: #fff;
  font-weight: 600; font-size: 15px; align-items: center; justify-content: center; margin-bottom: 10px;
}
.shot-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin: 0 0 4px; }
.shot-card p { margin: 0 auto; max-width: 15em; color: var(--ink-600); font-size: 16px; line-height: 1.45; }

/* ---- safe and free facts ---- */
.facts { list-style: none; padding: 0; margin: 48px auto 0; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li { display: flex; align-items: center; gap: 14px; background: var(--ink-50); border-radius: var(--radius-md); padding: 18px 20px; font-size: 17px; }
.facts svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--coral-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.more-link { margin: 30px 0 0; }
.more-link a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---- schools ---- */
.schools { padding: 0 0 88px; }
.schools-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius-md); padding: 30px 34px; max-width: 900px; margin: 0 auto; }
.schools-card p { margin: 0; color: var(--ink-600); }
section#more { padding-bottom: 72px; }

/* ---- final CTA ---- */
.cta-band { position: relative; overflow: hidden; background: var(--ink-900); color: #fff; text-align: center; }
.cta-band .lines { position: absolute; bottom: -10%; left: -10%; width: 120%; max-width: none; opacity: .3; pointer-events: none; }
.cta-band .wrap { position: relative; }
.cta-icon { width: 72px; height: 72px; border-radius: 17px; margin-bottom: 18px; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.8); margin: 10px 0 0; }
.get-center .get-desk { justify-content: center; }
.get-center .badges { flex-direction: row; }
.cta-band .qr { background: #fff; border-color: transparent; }

/* ---- footer ---- */
.site-footer { background: #0e1012; color: rgba(255,255,255,.66); padding: 56px 0 32px; }
.site-footer .top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .f-brand { max-width: 290px; }
.site-footer .f-brand .logo { height: 28px; width: auto; margin-bottom: 14px; display: block; }
.site-footer .f-brand p { font-size: 14px; line-height: 1.6; font-weight: 300; margin: 0; }
.site-footer .cols { display: flex; gap: 60px; flex-wrap: wrap; }
.site-footer .col h4 { color: #fff; font-weight: 500; font-size: 14px; margin: 0 0 12px; font-family: var(--font-display); }
.site-footer .col a { display: block; color: rgba(255,255,255,.7); font-size: 14px; margin-bottom: 9px; font-weight: 300; }
.site-footer .col a:hover { color: #fff; }
.site-footer .social { display: flex; gap: 11px; margin-top: 20px; }
.site-footer .social a { display: inline-flex; }
.site-footer .social img { width: 28px; height: 28px; opacity: .75; transition: opacity var(--dur-base); }
.site-footer .social a:hover img { opacity: 1; }
.site-footer .base { border-top: 1px solid rgba(255,255,255,.09); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 12px; color: rgba(255,255,255,.55); }

/* ============================================================================
   Static-doc pages (support, legal): airy register, editorial column.
   ============================================================================ */
.doc-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--ink-100);
}
.doc-header .wrap { display: flex; align-items: center; height: 68px; }
.doc-header .logo { height: 26px; }
.doc-header .spacer { margin-left: auto; }
.doc-header a.back { font-size: 14px; color: var(--ink-500); font-weight: 300; }
.doc-header a.back:hover { color: var(--coral-500); }
.doc { max-width: 760px; margin: 0 auto; padding: 56px 32px 96px; }
.doc .bar-spectrum { height: 4px; width: 80px; border-radius: var(--radius-pill); margin-bottom: 22px;
  background: linear-gradient(90deg, var(--spectrum-sky), var(--spectrum-indigo), var(--spectrum-coral), var(--spectrum-amber), var(--spectrum-green), var(--spectrum-teal)); }
.doc h1 { font-family: var(--font-display); font-weight: 500; font-size: 40px; letter-spacing: -.02em; margin: 0 0 14px; line-height: 1.08; }
.doc h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin: 44px 0 12px; }
.doc h3 { font-family: var(--font-display); font-weight: 500; font-size: 17px; margin: 28px 0 10px; }
.doc .meta { font-size: 13px; color: var(--ink-500); margin: 0 0 8px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.7; color: var(--ink-700); }
.doc .lead-p { font-size: 17px; color: var(--ink-600); font-weight: 300; }
.doc strong { font-weight: 500; color: var(--ink-900); }
.doc a { color: var(--coral-700); text-decoration: underline; text-underline-offset: 2px; }
.doc a:hover { color: var(--coral-800); }
.doc ul, .doc ol { padding-left: 22px; margin: 12px 0; }
.doc li { margin: 6px 0; }
.doc hr { border: none; border-top: 1px solid var(--ink-200); margin: 32px 0; }
.doc em { font-style: italic; color: var(--ink-500); }
.doc blockquote { margin: 0 0 28px; padding: 14px 20px; border-left: 3px solid var(--coral-400); background: var(--coral-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.doc blockquote p { margin: 0; font-size: 14px; color: var(--ink-700); }
.doc code { font-family: var(--font-mono); font-size: 13px; background: var(--ink-100); padding: 2px 6px; border-radius: var(--radius-xs); color: var(--ink-800); }
.doc pre { overflow-x: auto; border-radius: var(--radius-sm); background: var(--ink-900); padding: 18px 20px; margin: 14px 0; }
.doc pre code { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #e6e8eb; background: none; padding: 0; white-space: pre; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; text-align: left; }
.doc table td, .doc table th { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--ink-100); vertical-align: top; font-size: 14px; line-height: 1.55; color: var(--ink-700); overflow-wrap: anywhere; }
.doc table th { font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.doc .fname { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-900); }
.doc .ftype { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-500); }
.doc .req { color: var(--coral-600); font-size: 12px; }
.doc .opt { color: var(--ink-400); font-size: 12px; }
.doc .callout { border: 1px solid var(--ink-200); background: rgba(249,249,249,.7); border-radius: var(--radius-sm); padding: 16px 18px; margin: 32px 0 0; font-size: 14px; color: var(--ink-600); }
.doc-footer { border-top: 1px solid var(--ink-100); padding: 28px 32px; text-align: center; font-size: 13px; color: var(--ink-500); }
.doc-footer nav { margin-bottom: 8px; display: flex; gap: 20px; justify-content: center; }
.doc-footer nav a { color: var(--ink-500); }
.doc-footer nav a:hover { color: var(--coral-500); }

/* ============================================================================
   Responsive (mobile-first content, these rules narrow the desktop layout)
   ============================================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .app-lock { justify-content: center; }
  .hero h1, .hero .lead { margin-inline: auto; }
  .get-desk { justify-content: center; }
  .fan { height: auto; aspect-ratio: 1 / 1.25; max-width: 460px; width: 100%; margin: 0 auto; }
  .fan .phone-front { width: 56%; }
  .fan .phone-back { width: 46%; top: 9%; }
  .fan .phone-back { width: 42%; --phone-r: 22px; }
  .fan .phone-front { --phone-r: 28px; }
  .fan .phone-back.l { left: 5%; }
  .fan .phone-back.r { left: auto; right: 5%; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 48px 28px; }
  .shots-3 { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  section { padding: 60px 0; }
  .hero { padding: 36px 0 48px; }
  h1.display { font-size: 34px; }
  h2.title { font-size: 30px; }
  .lead { font-size: 18px; }
  .app-lock { font-size: 19px; margin-bottom: 18px; }
  .get-touch { width: 100%; max-width: 360px; }
  /* Screenshot rows become a swipeable strip on phones. */
  .shots, .shots-3 {
    display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 36px -16px 0; padding: 0 16px 12px; scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot-card { flex: 0 0 64%; scroll-snap-align: center; --phone-r: 28px; }
  .shot-card .phone { margin-bottom: 18px; }
  .facts { grid-template-columns: 1fr; margin-top: 32px; }
  .schools { padding-bottom: 60px; }
  .schools-card { padding: 24px 20px; }
  .site-footer .cols { gap: 40px; }
}

/* ============================================================================
   Motion preferences
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
