/*
 * Shared child-page layer derived from the homepage.
 * Page-specific CSS owns brand artwork and detail; this file owns the site rhythm.
 */

body.site-page {
  --site-ink: #000;
  --site-paper: #fff;
  --site-muted: #333;
  --site-rule: #000;
  --site-accent: #000;
  min-height: 100vh;
  color: var(--site-ink);
  background-color: var(--site-paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.brand-anli {
  --site-ink: #2b241f;
  --site-paper: #f5fbf7;
  --site-muted: #655d56;
  --site-rule: #2b241f;
  --site-accent: #ff8d77;
}

body.brand-nonogram {
  --site-ink: #f4f7ff;
  --site-paper: #050608;
  --site-muted: #a5adbb;
  --site-rule: rgba(244, 247, 255, 0.82);
  --site-accent: #aecdff;
}

body.site-page nav {
  position: sticky;
  z-index: 100;
  top: 0;
  right: auto;
  left: auto;
  padding: 0 24px;
  background: var(--site-paper);
  border: 0;
  border-bottom: 2px solid var(--site-rule);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.site-page nav::after {
  display: none;
}

body.site-page .nav-container {
  width: 100%;
  max-width: 1120px;
  height: 62px;
  margin: 0 auto;
  padding: 0;
}

body.site-page .nav-brand {
  gap: 0;
  color: var(--site-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

body.site-page .nav-brand svg {
  display: none;
}

body.site-page .nav-links {
  gap: 24px;
}

body.site-page .nav-links a {
  color: var(--site-ink);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
}

body.site-page .nav-links a:hover,
body.site-page .nav-links a.active {
  color: var(--site-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.site-page .nav-links a::after {
  display: none;
}

body.site-page :is(.eyebrow, .section-kicker, .section-label, .record-label, .feature-label, .status-line, .effective-date) {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.site-page :is(h1, h2, h3) {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

body.site-page.app-landing h1 {
  font-size: clamp(3.7rem, 8vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
}

body.site-page.app-landing :is(.section-header h2, .section-title, .privacy-callout h2, .final-copy h2, .final-cta h2) {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
}

body.site-page :is(.page-shell, .section-container, .hero-container, .footer-container, .site-footer-inner) {
  max-width: 1120px;
}

body.site-page.app-landing main {
  padding: 0 24px 48px;
}

body.site-page.app-landing .page-shell {
  gap: 0;
}

body.site-page.app-landing :is(.section-card, .panel) {
  border-width: 0 0 2px;
  border-style: solid;
  border-color: var(--site-rule);
  border-radius: 0;
  box-shadow: none;
}

body.site-page.app-landing :is(.section-header, .why-section .section-header, .how-section .section-header, .screens-section .section-header, .pricing-section .section-header, .privacy-section .section-header) {
  max-width: none;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--site-rule);
  text-align: left;
}

body.site-page.app-landing :is(.section-header p, .section-subtitle) {
  max-width: 66ch;
}

body.site-page :is(.primary-cta, .secondary-cta, .contact-cta, .secondary-link, .download-link, .footer-link, .contact-btn, .pricing-button, .nav-download-btn) {
  border-radius: 0;
}

body.site-page :is(.primary-cta, .contact-cta, .contact-btn, .nav-download-btn, .pricing-button.primary) {
  color: #07110f;
  background: var(--site-accent);
  border-color: var(--site-accent);
}

body.site-page :is(.secondary-cta, .secondary-link, .download-link, .footer-link) {
  color: var(--site-ink);
  background: transparent;
  border-color: var(--site-rule);
}

body.site-page :is(.feature-card, .promise-card, .language-card, .parent-card, .artifact-card, .loop-step, .support-card, .pricing-card, .privacy-item) {
  border-radius: 0;
  box-shadow: none;
}

body.site-page :is(a, button):focus-visible {
  outline: 3px dashed var(--site-accent);
  outline-offset: 4px;
}

/* AnLi Kids keeps its joyful palette inside a stricter editorial frame. */
body.brand-anli.app-landing main {
  padding-top: 0;
}

body.brand-anli.app-landing .hero {
  min-height: 650px;
  padding: clamp(38px, 6vw, 76px) 0;
  background-color: transparent;
}

body.brand-anli.app-landing :is(.feature-panel, .gallery-panel) {
  padding: 72px 0;
  background: transparent;
}

body.brand-anli.app-landing .feature-grid {
  gap: 0;
  border-top: 2px solid var(--site-rule);
  border-bottom: 2px solid var(--site-rule);
}

body.brand-anli.app-landing .feature-card {
  border: 0;
  border-right: 2px solid var(--site-rule);
}

body.brand-anli.app-landing .feature-card:last-child {
  border-right: 0;
}

body.brand-anli.app-landing :is(.clay-chip, .trust-pills li) {
  border-radius: 2px;
}

body.brand-anli.app-landing .gallery-card {
  border: 1px solid var(--site-rule);
  border-radius: 0;
  box-shadow: none;
}

/* Nonogram Museum mirrors the homepage system in a dark archive palette. */
body.brand-nonogram.app-landing main {
  padding-top: 0;
}

body.brand-nonogram.app-landing .hero {
  min-height: min(720px, calc(100vh - 62px));
  border-color: var(--site-rule);
}

body.brand-nonogram.app-landing .section {
  padding-top: 72px;
  padding-bottom: 72px;
}

body.brand-nonogram.app-landing :is(.feature-grid, .artifact-grid) {
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

body.brand-nonogram.app-landing :is(.feature-card, .artifact-card) {
  border-width: 0 1px 0 0;
}

body.brand-nonogram.app-landing :is(.feature-card, .artifact-card):last-child {
  border-right: 0;
}

/* Utility pages share one readable document structure. */
body.site-page.app-utility main,
body.site-page.app-utility > .container {
  width: calc(100% - 48px);
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 0;
}

body.site-page.app-utility main .container {
  width: 100%;
  max-width: 900px;
  padding: 0;
}

body.site-page.app-utility :is(.card, .content, .panel, .support-card) {
  border-radius: 0;
  box-shadow: none;
}

body.site-page.app-utility :is(.card, .content, .legal-hero, .legal-card) {
  padding-right: clamp(0px, 3vw, 32px);
  padding-left: clamp(0px, 3vw, 32px);
}

body.site-page.app-utility :is(.card, .content, .legal-hero) h1,
body.site-page.app-utility > .container > h1 {
  max-width: none;
  margin: 0 0 32px;
  padding-bottom: 28px;
  color: var(--site-ink);
  border-bottom: 2px solid var(--site-rule);
  font-size: clamp(3.2rem, 8vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
  background: none;
  -webkit-text-fill-color: currentColor;
}

body.site-page.app-utility :is(.card, .content, .legal-card) h2 {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--site-rule) 28%, transparent);
  font-size: 1.15rem;
  line-height: 1.15;
  text-transform: uppercase;
}

body.site-page.app-utility :is(.summary, .summary-box, .highlight-box, .faq-item, .support-card) {
  border-radius: 0;
  box-shadow: none;
}

body.brand-nonogram.app-utility main {
  max-width: none;
  padding: 0 24px 48px;
}

body.brand-nonogram.app-utility .legal-shell {
  max-width: 900px;
  gap: 0;
}

body.brand-nonogram.app-utility :is(.legal-hero, .legal-card, .contact-panel) {
  border-width: 0 0 2px;
  border-color: var(--site-rule);
}

body.brand-nonogram.app-utility .support-grid {
  gap: 0;
  border-bottom: 2px solid var(--site-rule);
}

body.brand-nonogram.app-utility .support-card {
  border-width: 0 1px 1px 0;
}

body.site-page :is(.site-footer, footer) {
  color: var(--site-ink);
  background: var(--site-paper);
  border-top: 2px solid var(--site-rule);
}

body.site-page :is(.site-footer-inner, .footer-container) {
  min-height: 82px;
  padding: 18px 24px;
}

body.site-page :is(.site-footer, footer, .site-footer a, footer a, .site-footer-copy, .footer-copyright) {
  color: var(--site-ink);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  body.brand-anli.app-landing .feature-grid {
    grid-template-columns: 1fr;
  }

  body.brand-anli.app-landing .feature-card {
    border-right: 0;
    border-bottom: 2px solid var(--site-rule);
  }

  body.brand-anli.app-landing .feature-card:last-child {
    border-bottom: 0;
  }

  body.brand-nonogram.app-landing :is(.feature-card, .artifact-card) {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }
}

@media (max-width: 700px) {
  body.site-page nav {
    padding: 0 20px;
  }

  body.site-page .nav-container {
    height: 58px;
  }

  body.site-page .nav-links li:first-child:not(:only-child) {
    display: none;
  }

  body.site-page.app-landing main {
    padding-right: 20px;
    padding-left: 20px;
  }

  body.site-page.app-landing h1 {
    font-size: clamp(3.5rem, 17vw, 5.2rem);
  }

  body.site-page.app-landing :is(.section-header h2, .section-title, .privacy-callout h2, .final-copy h2, .final-cta h2) {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  body.brand-anli.app-landing .hero {
    min-height: 0;
    padding-top: 52px;
    padding-bottom: 52px;
  }

  body.brand-anli.app-landing :is(.feature-panel, .gallery-panel),
  body.brand-nonogram.app-landing .section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  body.site-page.app-utility main,
  body.site-page.app-utility > .container {
    width: calc(100% - 40px);
    padding-top: 52px;
    padding-bottom: 52px;
  }

  body.brand-nonogram.app-utility main {
    width: 100%;
    padding: 0 20px 40px;
  }

  body.site-page.app-utility :is(.card, .content, .legal-hero, .legal-card) {
    padding-right: 0;
    padding-left: 0;
  }

  body.site-page.app-utility :is(.card, .content, .legal-hero) h1,
  body.site-page.app-utility > .container > h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  body.site-page :is(.site-footer-inner, .footer-container) {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.site-page *,
  body.site-page *::before,
  body.site-page *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
