/* ================================================================
   DOODLOO — Paper Atlas Design System
   Used by every page. Edit here = updated site-wide.
   ================================================================ */

/* =========================
   DESIGN TOKENS
   ========================= */
:root {
  /* Paper palette */
  --paper:          #F7F1E1;
  --paper-warm:     #F1E8CF;
  --paper-cool:     #FBF7EB;
  --ink:            #1C1B17;
  --ink-soft:       #3D3A32;
  --ink-muted:      #6B6658;
  --ink-mute-soft:  #9A947F;

  /* Signature colors */
  --butter:         #F7C948;
  --butter-deep:    #D9A520;
  --butter-soft:    #FDE7A3;

  /* World colors */
  --dino:           #C4B5FB;
  --space:          #7EB0E3;
  --ocean:          #65C9CB;
  --forest:         #A3C585;
  --town:           #F4D35E;
  --robot:          #B8B8C8;
  --bakery:         #F4A6A6;
  --safari:         #E8B878;
  --truck:          #E87A5D;
  --pets:           #D996D8;
  --bugs:           #9ECC94;
  --castle:         #B599D6;

  /* Supporting */
  --pink:           #D946A0;
  --coral:          #E87A5D;
  --blue:           #5B8DEF;
  --green:          #5EA659;

  /* Typography */
  --f-display:   'Fraunces', ui-serif, Georgia, serif;
  --f-body:      'Figtree', system-ui, -apple-system, sans-serif;
  --f-hand:      'Caveat', ui-rounded, cursive;
  --f-chunky:    'Shrikhand', var(--f-display);

  /* Motion */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --wrap: min(1280px, calc(100% - 2 * clamp(20px, 4vw, 64px)));
  --gutter: clamp(20px, 4vw, 64px);
  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-xl: 42px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(28,27,23,0.06), 0 1px 2px rgba(28,27,23,0.04);
  --shadow:    0 12px 28px -10px rgba(28,27,23,0.15), 0 4px 10px -4px rgba(28,27,23,0.08);
  --shadow-lg: 0 30px 60px -20px rgba(28,27,23,0.28), 0 12px 24px -12px rgba(28,27,23,0.14);
  --shadow-xl: 0 50px 100px -30px rgba(28,27,23,0.4), 0 20px 40px -15px rgba(28,27,23,0.18);
}

/* =========================
   RESET + BASE
   ========================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}
body {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--butter); color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: -50px;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 8px;
  z-index: 999; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.wrap { width: var(--wrap); margin-inline: auto; position: relative; }

/* Paper grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================
   TYPOGRAPHY UTILITIES
   ========================= */
.eyebrow {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow__line {
  width: 36px; height: 1.5px;
  background: currentColor;
  display: inline-block;
}
.eyebrow--light { color: rgba(247, 241, 225, 0.8); }
.eyebrow--dark  { color: rgba(28, 27, 23, 0.8); }

.h-display {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 0.94;
  letter-spacing: -0.025em;
}
.h-display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* =========================
   NAV
   ========================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  padding: 18px 0;
  transition: padding 0.4s var(--ease-smooth), background 0.4s;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(247, 241, 225, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(28,27,23,0.08);
}
.nav__container {
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo img { height: 42px; width: auto; transition: transform 0.4s var(--ease-bounce); }
.nav.scrolled .nav__logo img { height: 36px; }
.nav__logo:hover img { transform: rotate(-4deg) scale(1.05); }
.nav__menu { display: flex; gap: 32px; align-items: center; }
.nav__link {
  font-size: 0.9rem; font-weight: 500;
  color: var(--ink-soft);
  position: relative; padding: 6px 0;
  transition: color 0.2s;
}
.nav__link::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--butter-deep);
  transition: width 0.3s var(--ease-out);
}
.nav__link:hover, .nav__link.active { color: var(--ink); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__link.active::after { background: var(--butter); }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: var(--paper);
  border-radius: 999px;
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.3s var(--ease-out);
}
.nav__cta:hover {
  background: var(--butter); color: var(--ink);
  transform: translateY(-2px) scale(1.03);
}
.nav__cta svg { transition: transform 0.3s; }
.nav__cta:hover svg { transform: translateX(3px); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 10px;
  background: var(--ink);
  border-radius: 10px;
}
.nav__toggle span {
  width: 18px; height: 2px;
  background: var(--paper);
  border-radius: 1px;
  transition: transform 0.3s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__menu.is-open {
    display: flex !important;
    position: fixed;
    top: 72px; left: 16px; right: 16px;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: var(--paper);
    border: 1px solid rgba(28,27,23,0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: menuOpen 0.3s var(--ease-out);
  }
  .nav__menu.is-open .nav__link {
    padding: 12px 16px;
    border-radius: 10px;
  }
}

@keyframes menuOpen {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  line-height: 1;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 25px -10px rgba(28,27,23,0.5);
}
.btn--primary:hover {
  background: var(--butter); color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -8px rgba(217, 165, 32, 0.45);
}
.btn--primary svg { transition: transform 0.3s; }
.btn--primary:hover svg { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28,27,23,0.25);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--text {
  padding: 0;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.btn--text::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--butter);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.btn--text:hover::after { transform: scaleX(1); }

.btn--amazon {
  background: #FF9900;
  color: #1C1B17;
}
.btn--amazon:hover {
  background: #1C1B17; color: #FF9900;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -8px rgba(255, 153, 0, 0.45);
}

/* =========================
   SECTION HEADERS
   ========================= */
.sec-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 72px;
}
@media (min-width: 800px) {
  .sec-head {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: end;
  }
}
.sec-head--center {
  text-align: center;
  grid-template-columns: 1fr !important;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.sec-head--center .eyebrow { justify-content: center; }
.sec-head--center .sec-head__desc { margin-left: auto; margin-right: auto; }

.sec-head__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin-top: 18px;
  color: var(--ink);
}
.sec-head__title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.sec-head__title--light { color: var(--paper); }
.sec-head__title--light em { color: var(--butter); }
.sec-head__desc {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 48ch;
}
.sec-head__desc--light { color: rgba(247, 241, 225, 0.78); }

/* =========================
   DIVIDERS
   ========================= */
.divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}
.divider--squiggle {
  padding: 20px 0;
  background: var(--paper);
}
.divider--squiggle svg {
  width: 100%; height: 40px;
  opacity: 0.25;
}
.divider--torn { margin-top: -2px; }
.divider--torn svg { width: 100%; height: 60px; display: block; }

/* =========================
   FOOTER (shared)
   ========================= */
.footer {
  padding: 88px 0 32px;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  margin-bottom: 64px;
}
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr; gap: 48px; }
}
.footer__logo img { height: 52px; width: auto; margin-bottom: 16px; }
.footer__tag {
  font-family: var(--f-hand);
  font-size: 1.5rem;
  color: var(--butter);
  margin-bottom: 20px;
  line-height: 1;
}
.footer__desc {
  color: rgba(247, 241, 225, 0.6);
  line-height: 1.6;
  max-width: 40ch;
  margin-bottom: 28px;
  font-size: 0.94rem;
}
.socials { list-style: none; display: flex; gap: 10px; }
.social {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(247, 241, 225, 0.06);
  color: var(--paper);
  transition: all 0.3s var(--ease-out);
}
.social:hover {
  background: var(--butter);
  color: var(--ink);
  transform: translateY(-3px) rotate(-4deg);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 640px) {
  .footer__cols { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}
.footer__col h5 {
  font-family: var(--f-body);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--butter);
  margin-bottom: 22px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col a {
  color: rgba(247, 241, 225, 0.7);
  font-size: 0.92rem;
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--butter); }
.footer__bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(247, 241, 225, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(247, 241, 225, 0.5);
  position: relative; z-index: 2;
}
.footer__watermark {
  position: absolute;
  left: 50%;
  bottom: -48px;
  transform: translateX(-50%);
  font-family: var(--f-chunky);
  font-size: clamp(10rem, 28vw, 28rem);
  font-weight: 400;
  color: rgba(247, 201, 72, 0.07);
  line-height: 0.9;
  letter-spacing: -0.03em;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

/* =========================
   STICKY MOBILE CTA
   ========================= */
.sticky-cta {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  z-index: 80;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 20px 40px -10px rgba(28,27,23,0.5);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s var(--ease-bounce);
  font-size: 0.9rem;
}
.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.sticky-cta__msg { font-weight: 500; flex: 1; }
.sticky-cta__btn {
  padding: 8px 16px;
  background: var(--butter);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (min-width: 720px) {
  .sticky-cta { display: none; }
}

/* =========================
   PAGE-SPECIFIC HELPERS
   ========================= */
.page-content {
  padding-top: 130px;
  padding-bottom: 100px;
}
.page-hero {
  text-align: center;
  padding: 130px 0 80px;
}
.page-hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 18px auto 24px;
  max-width: 18ch;
}
.page-hero__title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.page-hero__sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* =========================
   SCROLL REVEALS
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

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