/* Pethistoric brand — cream base, mint/teal primary, sunny yellow + coral accents.
   Fonts are self-hosted. No third-party requests. */

@font-face {
  font-family: Fredoka;
  src: url("/assets/fonts/fredoka-latin-variable.woff2") format("woff2-variations"),
       url("/assets/fonts/fredoka-latin-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("/assets/fonts/nunito-latin-variable.woff2") format("woff2-variations"),
       url("/assets/fonts/nunito-latin-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --cream: #fff8ee;
  --cream-deep: #f4e6d0;
  --cream-card: #fffdf8;
  --mint: #8ec9a8;
  --teal: #2b8f8a;
  --teal-dark: #1f6f6b;
  --coral: #e96b48;
  --coral-soft: #f0896c;
  --yellow: #f5c44c;
  --sky: #d7eef6;
  --ink: #3a2f28;
  --ink-soft: #5a524a;
  --line: rgba(58, 47, 40, 0.12);
  --shadow: 0 8px 24px rgba(58, 47, 40, 0.08);
  --radius: 1.25rem;
  --radius-sm: 0.9rem;
  --space: 1.25rem;
  --max: 68rem;
  --header-h: 3.75rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: Nunito, "Segoe UI", Tahoma, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  min-width: 320px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--teal);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
}
.skip-link:focus { top: 0.75rem; }

h1, h2, h3, .brand-name {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--teal-dark);
}

/* ----- Header / nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 238, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--cream-deep);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  min-height: 44px;
}
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-name { font-size: 1.25rem; color: var(--teal-dark); }

.nav-toggle summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--teal-dark);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--sky);
}
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle[open] summary { background: var(--yellow); }
.site-nav {
  position: absolute;
  right: 1rem;
  top: calc(var(--header-h) - 0.15rem);
  background: var(--cream-card);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.6rem;
}
.site-nav a:hover { background: var(--sky); }

.site-nav-desktop { display: none; }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .site-nav-desktop {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    gap: 0.15rem;
  }
}

/* ----- Layout ----- */
.section { padding: 2.75rem 0 3rem; }
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}
.section-dinos { background: linear-gradient(180deg, var(--cream) 0%, var(--sky) 100%); }
.section-coloring { background: var(--cream); }
.section-parents { background: var(--sky); }

h2 { font-size: clamp(1.7rem, 5vw, 2.35rem); margin: 0 0 0.75rem; }
.section-intro { margin: 0 0 1.5rem; color: var(--ink-soft); max-width: 38rem; }

/* ----- Hero ----- */
.hero { padding: 1.5rem 0 2.5rem; background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--cream) 55%, #fde7c8 100%); }
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-logo {
  width: min(280px, 72vw);
  height: auto;
  margin: 0.4rem auto 1rem;
}
h1#hero-heading {
  font-size: clamp(1.85rem, 7vw, 3rem);
  margin: 0 0 0.75rem;
  max-width: 18ch;
}
.hero-sub {
  margin: 0 0 1.35rem;
  max-width: 36rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(100%, 22rem);
  margin-bottom: 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: var(--teal);
}
.btn-youtube { background: #c0392b; }
.btn-tiktok { background: #1f1f1f; }
.btn-instagram { background: #c13584; }
.btn-primary { background: var(--coral); color: #fff; width: 100%; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; filter: none; }

.hero-art {
  margin: 0;
  width: 100%;
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  background: var(--cream-deep);
}

@media (min-width: 720px) {
  .hero-logo { width: min(360px, 40vw); }
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: 44rem;
  }
  .hero-actions .btn { min-width: 13.5rem; }
  .hero-art { width: min(100%, 72rem); }
}

/* ----- Dino grid ----- */
.dino-grid,
.coloring-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.dino-card,
.coloring-card {
  background: var(--cream-card);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.65rem 0.65rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.dino-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--cream);
  border-radius: 0.9rem;
}
.dino-card h3,
.coloring-card h3 {
  margin: 0.7rem 0 0.15rem;
  font-size: 1.2rem;
}
.dino-card .species {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: none;
}
.dino-card .line {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.dino-card--pending img { background: var(--cream); }

@media (min-width: 720px) {
  .dino-grid,
  .coloring-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
}
@media (min-width: 1024px) {
  .dino-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ----- Coloring ----- */
.coloring-card--pending {
  min-height: 9rem;
  align-items: flex-start;
  justify-content: center;
  padding: 1.1rem;
  background:
    linear-gradient(180deg, var(--cream-card), #fff),
    var(--cream-card);
}
.coloring-status {
  margin: 0.25rem 0 0;
  font-weight: 700;
  color: var(--teal);
}
.coloring-note {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

/* ----- Parents / signup ----- */
.parents-inner { max-width: 36rem; }
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--cream-card);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.field input[type="email"] {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--cream-deep);
  border-radius: 0.7rem;
  padding: 0.55rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field input[type="email"]:focus { border-color: var(--teal); outline: none; }
.form-error {
  margin: 0;
  color: #9b1c1c;
  font-weight: 700;
  font-size: 0.95rem;
}
.form-hint { margin: 0.85rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.signup-success {
  margin: 0;
  background: var(--cream-card);
  border: 2px solid var(--mint);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--teal-dark);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--teal-dark);
  color: #fff8ee;
  padding: 2.25rem 0 2.5rem;
}
.footer-inner p { margin: 0 0 0.7rem; }
.footer-inner p:has(> a) { margin-bottom: 0.25rem; }
.footer-inner a {
  color: var(--yellow);
  font-weight: 700;
  /* 44x44 minimum tap target (TEE-154) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  vertical-align: middle;
}
.footer-socials a { text-decoration: underline; text-underline-offset: 2px; }
.footer-legal { margin-top: 1rem !important; font-size: 0.95rem; }

/* Privacy page */
.privacy-page { padding-top: 2rem; padding-bottom: 3.5rem; }
.privacy-page h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 0.5rem; }
.privacy-page h2 { font-size: 1.3rem; margin: 1.6rem 0 0.5rem; }
.privacy-page p, .privacy-page li { color: var(--ink-soft); }
.privacy-page ul { padding-left: 1.2rem; }
.updated { font-size: 0.9rem; color: var(--ink-soft); }

.action-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  max-width: 36rem;
  margin: 0 auto;
}
