/* ============================================================
   Tell and Show — Site Base v2
   /tns/site-base-v2.css
   ----------------------------------------------------------------
   Shared bones for every v2 marketing page: tokens, reset, the
   typographic primitives (eyebrow, scribble, ai-mark), buttons,
   section + section-head, nav, footer, page grain, scroll progress,
   and reusable motion utilities (reveal, tilt, spotlight, count).

   Loads BEFORE the page-specific stylesheet, so per-page styles can
   override anything here through normal cascade.
   ============================================================ */

/* ============================================================
   FONTS — self-hosted variable WOFF2.
   Replaces the Google Fonts CDN round-trip.
   ============================================================ */
@font-face {
  font-family: "Newsreader";
  font-weight: 400 700;
  font-style: normal;
  src: url("/tns/fonts/Newsreader-VF.woff2") format("woff2-variations");
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  font-weight: 400 700;
  font-style: italic;
  src: url("/tns/fonts/Newsreader-Italic-VF.woff2") format("woff2-variations");
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  font-weight: 100 900;
  font-style: normal;
  src: url("/tns/fonts/Geist-VF.woff2") format("woff2-variations");
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  font-weight: 100 900;
  font-style: normal;
  src: url("/tns/fonts/GeistMono-VF.woff2") format("woff2-variations");
  font-display: swap;
}

:root {
  /* --- type --- */
  --f-serif: "Newsreader", "Iowan Old Style", "Palatino", Georgia, serif;
  --f-sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- marketing surface (parent-facing) --- */
  --m-bg:           #FFFFFF;
  --m-ink:          #141413;
  --m-ink-2:        #2C2A28;
  --m-ink-3:        #4A4642;
  --m-muted:        #6B6660;
  --m-line:         #E5E1D9;
  --m-line-strong:  #C9C2B5;
  --m-accent:       #1E3A6E;
  --m-accent-ink:   #15294F;

  /* --- studio surface (kid-facing inner mockups) --- */
  --s-panel:        #F8FAFC;
  --s-ink:          #141413;
  --s-line:         #E4E7EB;
  --s-muted:        #5C6470;

  /* --- track colors --- */
  --t-game:         #1F8F4E;
  --t-movie:        #FF4A1F;
  --t-story:        #E8841A;
  --t-site:         #1F5FE0;

  /* --- accent + state --- */
  --studio-accent:      #6B3FE0;
  --studio-accent-ink:  #4F2BB0;
  --ok:                 #3FA968;
  --warn:               #E5A82E;
  --err:                #C7321E;

  /* --- radius --- */
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-pill: 999px;

  /* --- motion --- */
  --d-fast:  140ms;
  --d-base:  180ms;
  --d-slow:  220ms;
  --e-out:   cubic-bezier(.22, .61, .36, 1);
  --e-snap:  cubic-bezier(.34, 1.4, .64, 1);

  /* --- show-card primitive --- */
  --show-card-bg:           #FFFDF7;
  --show-card-line:         var(--m-line-strong);
  --show-card-shadow:       0 18px 44px rgba(20, 20, 19, .08);
  --show-card-decision-bg:  #FFF8DF;
  --show-card-decision-ink: #67500B;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  font-family: var(--f-serif);
  color: var(--m-ink);
  background: var(--m-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Suppress horizontal scroll caused by intentionally-escaping decorations
     (e.g. .show-tab on the homepage hero). `clip` is preferred over `hidden`
     so .nav's `position: sticky` keeps working. */
  overflow-x: clip;
}
body {
  font-size: 16px;
  line-height: 1.5;
  background: var(--m-bg);
  color: var(--m-ink);
  font-family: var(--f-serif);
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, h2 { text-wrap: balance; }   /* nicer line breaks on display headings */
p { text-wrap: pretty; }          /* avoids ugly orphans on body copy */

/* ============================================================
   CONTAINER
   ============================================================ */

.page {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================================
   PAGE EFFECTS — grain + scroll-progress
   ============================================================ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.42 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  opacity: .032;
  mix-blend-mode: multiply;
}

.scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--m-accent);
  z-index: 99;
  transition: width 80ms linear;
}

/* ============================================================
   NAV — shared across pages
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--m-line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--m-ink);
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -.005em;
  white-space: nowrap;
  flex-shrink: 0;
}
.wordmark img { width: auto; height: 22px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--m-ink-3);
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .003em;
  flex-shrink: 0;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  transition: color var(--d-base) var(--e-out);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--m-accent); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--m-accent);
  transition: width var(--d-base) var(--e-out);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }
.nav-spacer { flex: 1; }
.nav-signin {
  color: var(--m-ink-2);
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta {
  /* WCAG 2.5.5 floor: 44px primary action on mobile is non-negotiable. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--m-ink);
  color: white;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .003em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform var(--d-base) var(--e-out), box-shadow var(--d-base) var(--e-out);
}
.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 20, 19, .14);
}

/* ============================================================
   TYPOGRAPHIC PRIMITIVES
   ============================================================ */

.eyebrow {
  color: var(--m-accent);
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scribble {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 10' preserveAspectRatio='none'><path d='M3 6 Q 24 1, 48 5 T 96 5 T 144 5 T 192 5 T 237 6' fill='none' stroke='%231E3A6E' stroke-width='2.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 10px;
  padding-bottom: 4px;
}

.keyword { color: var(--m-accent); font-style: normal; font-weight: inherit; }

/* The AI mark — used inside any word where "AI" hides (e.g. ImaginAItion).
   Ink-blue letters, subtle highlighter wash, mild rotation so it reads as
   marked-by-hand. */
.ai-mark {
  position: relative;
  display: inline-block;
  color: var(--m-accent);
  font-style: normal;
  font-weight: inherit;
  letter-spacing: -.005em;
  z-index: 0;
}
.ai-mark::before {
  content: "";
  position: absolute;
  left: -.02em;
  right: -.02em;
  top: 38%;
  bottom: 6%;
  background: color-mix(in srgb, var(--m-accent) 18%, transparent);
  border-radius: 6px;
  transform: rotate(-1.4deg);
  z-index: -1;
  pointer-events: none;
}
.ai-mark::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -.05em;
  height: .12em;
  background: var(--m-accent);
  border-radius: 999px;
  transform: rotate(.6deg);
  opacity: .85;
  pointer-events: none;
}
/* Body-text use: soften the wash, drop the underline. */
p .ai-mark::before,
.lede .ai-mark::before,
small .ai-mark::before { background: color-mix(in srgb, var(--m-accent) 14%, transparent); }
p .ai-mark::after,
.lede .ai-mark::after,
small .ai-mark::after { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  /* 48px floor (kid-confident primary action). */
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .003em;
  white-space: nowrap;
  transition: transform var(--d-base) var(--e-out),
              box-shadow var(--d-base) var(--e-out),
              border-color var(--d-base) var(--e-out),
              background var(--d-base) var(--e-out);
}
.btn-primary {
  border: 1px solid var(--m-ink);
  background: var(--m-ink);
  color: white;
}
.btn-secondary {
  border: 1px solid var(--m-line-strong);
  background: white;
  color: var(--m-ink);
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(20, 20, 19, .12);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--m-ink);
}
.btn:active { transform: translateY(0) scale(.985); }

/* ============================================================
   SECTION + SECTION-HEAD
   ============================================================ */

.section {
  padding: 104px 0;
  border-top: 1px solid var(--m-line);
}
.section-tight {
  padding: 72px 0;
}
.section-head {
  max-width: 920px;
  margin-bottom: 48px;
}
.section-head .eyebrow {
  display: block;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -.012em;
  font-weight: 520;
}
.section-head p {
  margin-top: 20px;
  max-width: 680px;
  color: var(--m-ink-2);
  font-size: 20px;
  line-height: 1.42;
}

.margin-note {
  position: relative;
  margin: 0 auto;
  padding: 14px 0 0 48px;
  max-width: 720px;
  color: var(--m-muted);
  font-family: var(--f-sans);
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}
.margin-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 23px;
  width: 32px;
  height: 1px;
  background: var(--m-line-strong);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: #0E0F11;
  color: #B7BBC1;
  font-family: var(--f-sans);
  padding: 72px 0 36px;
}
footer .page {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
footer h5 {
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer ul a { font-size: 14px; color: #B7BBC1; transition: color var(--d-base) var(--e-out); }
footer ul a:hover { color: white; }
footer .brand-col p {
  margin-top: 18px;
  color: #8A8E94;
  font-size: 13px;
  line-height: 1.55;
  max-width: 300px;
}
footer .brand-col .wordmark { color: white; }
footer .brand-col .wordmark img { filter: invert(1) brightness(1.6); }
footer .tagline {
  margin-top: 22px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 16px;
  color: #B7BBC1;
}
.foot-base {
  margin-top: 56px;
  padding: 24px 0 0;
  border-top: 1px solid #1E2024;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6E7278;
  font-size: 12px;
}
.foot-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: #8A8E94;
}

/* ============================================================
   MOTION PRIMITIVES — scroll reveal, tilt + spotlight, count-up,
   scribble draw. Page-specific motion lives in the page's own CSS.
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--e-out), transform 800ms var(--e-out);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-fast { transition: opacity 480ms var(--e-out), transform 560ms var(--e-out); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 520ms var(--e-out), transform 580ms var(--e-out);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 560ms; }

.tilt {
  transform-style: preserve-3d;
  transition: transform 280ms var(--e-out);
  will-change: transform;
}
.spotlight {
  position: relative;
  overflow: hidden;
}
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 320px at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--m-accent) 18%, transparent),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 320ms var(--e-out);
  z-index: 2;
  mix-blend-mode: soft-light;
}
.spotlight:hover::after { opacity: 1; }

.count {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.scribble-draw {
  position: relative;
  display: inline-block;
}
.scribble-draw::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: -.04em;
  height: .35em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 14' preserveAspectRatio='none'><path d='M3 9 Q 30 2, 60 7 T 120 7 T 180 7 T 217 8' fill='none' stroke='%231E3A6E' stroke-width='3' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 50%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1000ms var(--e-out);
  pointer-events: none;
}
.scribble-draw.in::after { clip-path: inset(0 0 0 0); }

/* ============================================================
   RESPONSIVE — shared bones only.
   Page-specific responsive lives in the page stylesheet.
   ============================================================ */

@media (max-width: 1180px) {
  footer .page { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Tablet band — nav-links don't fit alongside wordmark + signin + CTA below
   ~1024, so hide the link rail and surface a hamburger that opens a
   full-screen menu overlay (built in site-base-v2.js). */
@media (max-width: 1023px) {
  .page { padding: 0 32px; }
  .nav-inner { gap: 14px; }
  .nav-links { display: none; }
  /* The .nav-hamburger default is `display: none`; this rule shows it. */
  .nav-hamburger { display: inline-flex !important; }
}

/* ============================================================
   MOBILE / TABLET NAV — hamburger + full-screen overlay menu.
   The trigger button and overlay panel are injected by
   site-base-v2.js so we don't have to touch the HTML of every
   marketing page. Desktop hides the hamburger entirely.
   ============================================================ */
.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--m-line-strong);
  background: white;
  border-radius: var(--r-md);
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--d-base) var(--e-out), background var(--d-base) var(--e-out);
}
.nav-hamburger:hover,
.nav-hamburger:focus-visible {
  border-color: var(--m-accent);
  outline: 0;
}
.nav-hamburger svg { width: 20px; height: 20px; color: var(--m-ink); display: block; }

.nav-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--m-bg, #FBFAF5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--e-out);
}
.nav-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nav-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--m-line);
  min-height: 68px;
}
.nav-menu-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--m-line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 0;
}
.nav-menu-close svg { width: 18px; height: 18px; color: var(--m-ink); display: block; }
.nav-menu-list {
  list-style: none;
  margin: 0;
  padding: 16px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
}
.nav-menu-list a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--m-ink);
  letter-spacing: -.005em;
  border-bottom: 1px solid var(--m-line);
  transition: color var(--d-base) var(--e-out);
}
.nav-menu-list a:hover,
.nav-menu-list a:focus-visible { color: var(--m-accent); outline: 0; }
.nav-menu-foot {
  padding: 16px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--m-line);
}
.nav-menu-foot .nav-menu-signin {
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--m-ink-2);
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-menu-foot .nav-menu-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--m-ink);
  color: white;
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .003em;
}

/* When the menu is open, lock background scroll. */
html.menu-open, body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .nav-menu { transition: none; }
}

@media (max-width: 720px) {
  .page { padding: 0 22px; }
  .nav-inner { gap: 14px; min-height: 60px; }
  .nav-links { display: none; }
  .section { padding: 72px 0; }
  .section-tight { padding: 48px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(28px, 7vw, 38px); }
  .section-head p { font-size: 17px; }
  footer .page { grid-template-columns: 1fr; }
  .foot-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .page { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: clamp(26px, 8vw, 34px); }
  .section-head p { font-size: 16px; }
  .btn { font-size: 14px; padding: 0 18px; }
  .nav-cta { padding: 0 14px; font-size: 12px; }
  .wordmark { font-size: 17px; }
  .wordmark img { height: 20px; }
  /* On narrow phones the wordmark text + signin + CTA crowd each other; the
     colophon mark + name on the CTA carry the brand. Hide the wordmark text
     and let the logo stand alone. */
  .wordmark span { display: none; }
  footer { padding: 56px 0 28px; }
}

/* Reduced-motion guard for shared primitives. Page-specific motion
   keyframes / transitions live in the page stylesheet and carry their
   own reduced-motion clause. */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scribble-draw::after { clip-path: inset(0 0 0 0); transition: none; }
  .grain { display: none; }
}
