/* ============================================================
   ANA PlayLabs — shared stylesheet
   Restraint, with one warm hand.
   ============================================================ */

:root {
  /* Surfaces */
  --paper:        #F5EFE3;
  --paper-soft:   #FBF6EC;
  --paper-deep:   #ECE4D2;
  --surface:      #FFFFFF;

  /* Ink */
  --ink:          #1F2937;
  --ink-soft:     #4B5563;
  --ink-mute:     #6E6855;  /* meets 4.5:1 on both paper and white */

  /* Accents — strictly rationed */
  --clay:         #C2553A;
  --clay-soft:    #E89B86;
  --clay-deep:    #9C4128;
  --teal:         #4ECDC4;   /* ZigZu product mark only */
  --plum:         #A78BFA;   /* ParentMind product mark only */

  /* Functional */
  --rule:         rgba(31, 41, 55, 0.10);
  --rule-soft:    rgba(31, 41, 55, 0.06);
  --focus:        #C2553A;

  /* Type families */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale — fluid */
  --t-display-xl:  clamp(44px, 6.4vw, 72px);
  --t-display-lg:  clamp(36px, 4.6vw, 56px);
  --t-display-md:  clamp(28px, 3.2vw, 40px);
  --t-display-sm:  clamp(22px, 2.2vw, 28px);
  --t-lede:        clamp(18px, 1.6vw, 22px);
  --t-italic-lead: clamp(20px, 1.7vw, 24px);
  --t-body:        18px;
  --t-meta:        14px;
  --t-mono-kicker: 14px;
  --t-mono-meta:   14px;

  /* Space — 8pt grid */
  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;
  --s-8: 64px;  --s-9: 96px;  --s-10: 128px; --s-11: 160px;

  /* Radius */
  --r-sm: 4px; --r-md: 8px; --r-lg: 16px;

  /* Shadow — exactly one */
  --shadow-paper: 0 1px 0 rgba(31,41,55,0.04), 0 12px 32px -20px rgba(31,41,55,0.10);

  /* Motion */
  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    180ms;
  --dur-base:    280ms;
  --dur-slow:    520ms;

  /* Layout */
  --container: 1100px;
  --reading:   640px;
}

/* ============= Reset ============= */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ============= Base ============= */
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Focus ring — keyboard only */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============= Layout primitives ============= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px);
}

.reading {
  max-width: var(--reading);
}

.section {
  padding-block: var(--s-10);
}
.section--soft {
  background: var(--paper-soft);
}
.section + .section:not(.section--soft) {
  border-top: 1px solid var(--rule-soft);
}

/* ============= Section eyebrow (semantically h2) ============= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-mono-kicker);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: var(--s-7);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-mute);
  display: inline-block;
}

/* ============= Type styles ============= */
.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-lg);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.display-md {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-md);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-sm);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.lede {
  font-family: var(--font-body);
  font-size: var(--t-lede);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}
.italic-lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--t-italic-lead);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.mono-meta {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-mute);
}
.body-soft {
  color: var(--ink-soft);
}

/* ============= Prose — the reading column ============= */
.prose {
  max-width: var(--reading);
}
.prose p {
  margin-bottom: var(--s-5);
  color: var(--ink-soft);
  line-height: 1.7;
}
.prose p:last-child { margin-bottom: 0; }
.prose .italic-lead {
  color: var(--ink);
  margin-block: var(--s-6) var(--s-5);
  display: block;
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose em {
  font-style: italic;
  color: var(--clay);
}
.prose a {
  color: var(--clay);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-gentle);
}
.prose a:hover { border-bottom-color: var(--clay); }

/* ============= Essay / letter section headings (within .prose) ============= */
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
}
.prose h2:first-child { margin-top: 0; }
.prose blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--t-italic-lead);
  line-height: 1.5;
  color: var(--ink);
  margin: var(--s-7) 0;
  padding-left: var(--s-5);
  border-left: none;
}

/* ============= Inline arrow link ============= */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--clay);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-gentle);
}
.link-arrow .arrow {
  transition: transform var(--dur-base) var(--ease);
  color: var(--ink-mute);
}
.link-arrow:hover { color: var(--clay-deep); }
.link-arrow:hover .arrow { transform: translateX(4px); color: var(--clay-deep); }

/* ============= Navigation ============= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-soft);
}
@media (min-width: 769px) {
  .nav {
    background: rgba(245, 239, 227, 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
  }
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-4) clamp(24px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-7);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__logo img {
  height: 24px;
  width: auto;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-7);
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--dur-fast) var(--ease-gentle);
  position: relative;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-current { color: var(--ink); }
.nav__email {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
  transition: color var(--dur-fast) var(--ease-gentle);
}
.nav__email:hover { color: var(--clay); }

/* ============= Hero (homepage only) ============= */
.hero {
  position: relative;
  padding-block: var(--s-11) var(--s-10);
  overflow: hidden;
}
.hero__blob {
  position: absolute;
  width: 820px;
  height: 820px;
  top: -340px;
  right: -320px;
  background: radial-gradient(circle, rgba(194, 85, 58, 0.13) 0%, rgba(194, 85, 58, 0) 72%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 980px;
  margin-bottom: var(--s-7);
}
.hero__headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}
.hero__meta {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
  margin-bottom: var(--s-6);
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--clay);
  transition: color var(--dur-fast) var(--ease-gentle);
}
.hero__cta .arrow {
  transition: transform var(--dur-base) var(--ease);
  color: var(--ink-mute);
}
.hero__cta:hover { color: var(--clay-deep); }
.hero__cta:hover .arrow { transform: translateX(4px); color: var(--clay-deep); }

/* ============= Page header (non-hero pages) ============= */
.page-header {
  padding-block: var(--s-10) var(--s-7);
}
.page-header__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-lg);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 880px;
  margin-bottom: var(--s-6);
}
.page-header__lede {
  font-family: var(--font-body);
  font-size: var(--t-lede);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--reading);
}

/* ============= Currently in the lab (homepage) ============= */
.currently__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  max-width: 820px;
}
.currently__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--s-7);
  align-items: start;
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--rule-soft);
}
.currently__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.currently__date {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
  margin: 0;
  padding-top: 4px;
}
.currently__note {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* ============= Products (homepage) ============= */
.products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.product {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow-paper);
  transition: box-shadow var(--dur-base) var(--ease);
}
.product:hover {
  box-shadow: 0 1px 0 rgba(31,41,55,0.04), 0 20px 48px -24px rgba(31,41,55,0.18);
}
.product__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: var(--s-4);
}
.product__name {
  font-family: var(--font-display);
  font-size: var(--t-display-md);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--s-3);
}
.product__desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--s-7);
  max-width: 44ch;
}
.product__still {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  margin-bottom: var(--s-6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease);
}
.product:hover .product__still { transform: scale(1.01); }
.products__more {
  border: 1px dashed var(--ink-mute);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-7);
  color: var(--ink-mute);
  font-style: italic;
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  text-align: left;
}
.products__more::before {
  content: "⋯ ";
  color: var(--clay);
  margin-right: var(--s-2);
}

/* ============= Founder note (homepage) ============= */
.founder {
  max-width: 780px;
}
.founder__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin-bottom: var(--s-6);
}
.founder__sig {
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.founder__context {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
}
.founder__context a {
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule);
  transition: color var(--dur-fast) var(--ease-gentle), border-color var(--dur-fast) var(--ease-gentle);
}
.founder__context a:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

/* ============= For parents (homepage) ============= */
.parents__lines p {
  font-family: var(--font-display);
  font-size: var(--t-italic-lead);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: var(--s-5);
  max-width: 680px;
}
.parents__lines p:last-of-type { margin-bottom: var(--s-7); }

/* ============= Essay links (writing index + homepage From the lab) ============= */
.writing__list {
  display: grid;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}
.essay-link {
  display: block;
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--rule-soft);
  transition: border-color var(--dur-base) var(--ease-gentle);
}
.essay-link:last-child { border-bottom: none; padding-bottom: 0; }
.essay-link__meta {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
  margin-bottom: var(--s-2);
  letter-spacing: 0.01em;
}
.essay-link__title {
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--s-2);
  transition: color var(--dur-fast) var(--ease-gentle);
}
.essay-link:hover .essay-link__title { color: var(--clay); }
.essay-link__summary {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 600px;
  line-height: 1.55;
}

/* ============= Quiet close (homepage email signup) ============= */
.close__line {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-md);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 720px;
  margin-bottom: var(--s-7);
}
.close__form {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  max-width: 460px;
  border-bottom: 1px solid var(--ink-mute);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-7);
  transition: border-color var(--dur-fast) var(--ease-gentle);
}
.close__form:focus-within { border-bottom-color: var(--clay); }
.close__form input {
  flex: 1;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  background: transparent;
}
.close__form input::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}
.close__form button {
  cursor: pointer;
  color: var(--ink-mute);
  font-size: 22px;
  padding: 0 var(--s-2);
  transition: color var(--dur-fast) var(--ease-gentle), transform var(--dur-base) var(--ease);
}
.close__form button:hover {
  color: var(--clay);
  transform: translateX(3px);
}
.close__alt {
  font-size: 18px;
  color: var(--ink-soft);
}
.close__alt a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: color var(--dur-fast) var(--ease-gentle), border-color var(--dur-fast) var(--ease-gentle);
}
.close__alt a:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

/* ============= Principles list (principles page) ============= */
.principle {
  padding-block: var(--s-8);
  border-bottom: 1px solid var(--rule-soft);
  max-width: var(--reading);
}
.principle:last-of-type { border-bottom: none; }
.principle:first-of-type { padding-top: var(--s-5); }
.principle__number {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
  margin-bottom: var(--s-3);
  letter-spacing: 0.02em;
}
.principle__statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin-bottom: var(--s-4);
}
.principle__body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ============= Sign-off (principles, founder, child-safety) ============= */
.signoff {
  margin-top: var(--s-8);
  padding-top: var(--s-7);
  border-top: 1px solid var(--rule-soft);
  max-width: var(--reading);
}
.signoff p {
  font-family: var(--font-mono);
  font-size: var(--t-mono-meta);
  color: var(--ink-mute);
  font-style: normal;
}

/* ============= Footer ============= */
.footer {
  background: var(--paper-soft);
  border-top: 1px solid var(--rule-soft);
}
.footer__anchor {
  padding-block: var(--s-9) var(--s-8);
  text-align: left;
  max-width: 640px;
}
.footer__legal {
  padding-block: var(--s-6);
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-mute);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
}
.footer__legal a {
  color: var(--ink-mute);
  transition: color var(--dur-fast) var(--ease-gentle);
}
.footer__legal a:hover { color: var(--clay); }
.footer__legal .left p { margin-bottom: 2px; }
.footer__links {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.footer__brand-mark {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.footer__brand-mark img { height: 20px; }

/* ============= Mobile ============= */
@media (max-width: 768px) {
  .container { padding: 0 22px; }
  .nav__inner { padding: 14px 22px; gap: var(--s-4); }
  .nav__logo img { height: 22px; }
  .nav__links { gap: var(--s-4); }
  .nav__email { display: none; }

  .section { padding-block: var(--s-9); }
  .hero { padding-block: var(--s-9) var(--s-9); }
  .hero__headline { margin-bottom: var(--s-5); }
  .hero__blob { width: 520px; height: 520px; top: -200px; right: -260px; }

  .page-header { padding-block: var(--s-9) var(--s-6); }

  .eyebrow { margin-bottom: var(--s-6); }

  .currently__item {
    grid-template-columns: 1fr;
    gap: var(--s-3);
    padding-bottom: var(--s-5);
  }
  .currently__date {
    padding-top: 0;
  }

  .products__grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .product { padding: var(--s-6); }
  .product__desc { margin-bottom: var(--s-5); }

  .close__form input { font-size: 19px; }
  .close__line { margin-bottom: var(--s-5); }

  .principle { padding-block: var(--s-7); }

  .footer__legal {
    flex-direction: column;
    gap: var(--s-4);
  }
}

/* Tighter hero on small phones */
@media (max-width: 480px) {
  .hero { padding-block: var(--s-8) var(--s-8); }
  .hero__blob { width: 360px; height: 360px; top: -160px; right: -180px; }
}
