/* ============================================================
   Marigold — splash
   Warm, quiet, hand-drawn. The page behaves like the product.
   ============================================================ */

:root {
  --cream:       #FDEEDA;
  --cream-deep:  #F6E2C4;
  --cream-card:  #F4E3C5;

  --ink:         #2A1D10;
  --ink-soft:    rgba(42, 29, 16, 0.64);
  --ink-faint:   rgba(42, 29, 16, 0.42);
  --line:        rgba(42, 29, 16, 0.12);

  --orange:      #E07D24;
  --amber:       #F1A638;

  --sage:        #C9D5C7;
  --clay:        #E6BB92;

  --hand: "Shantell Sans", "Comic Sans MS", system-ui, cursive;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --ease-bloom: cubic-bezier(0.16, 1, 0.30, 1);
  --ease-soft:  cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.defs { position: absolute; }

body {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 450;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* sage ribbons — a fixed, viewport-sized canvas behind all content.
   Brush geometry, scroll-painting and scrub-erasing live in script.js. */
.ribbon-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 246, 230, 0.9), transparent 55%),
    radial-gradient(140% 120% at 50% 120%, rgba(224, 125, 36, 0.05), transparent 60%);
  pointer-events: none;
}

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

/* hand-lettered type for everything expressive */
.wordmark, .hero-line, .statement p, .card h2, .privacy h2,
.foot-word, .annot-text, .policy h1, .policy h2 {
  font-family: var(--hand);
  font-weight: 500;
}

/* ============================ HERO ============================ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
}

/* painterly washes */
.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.wash { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0; animation: wash-in 2.6s var(--ease-soft) forwards; }
.wash-sage  { width: 48vmax; height: 48vmax; top: -14vmax; left: -12vmax;  background: radial-gradient(circle, rgba(201,213,199,0.75), transparent 70%); animation-delay: 0.2s; }
.wash-amber { width: 42vmax; height: 42vmax; bottom: -16vmax; right: -8vmax; background: radial-gradient(circle, rgba(241,166,56,0.46), transparent 70%); animation-delay: 0.4s; }
.wash-clay  { width: 36vmax; height: 36vmax; top: 28%; right: -18vmax;       background: radial-gradient(circle, rgba(230,187,146,0.55), transparent 70%); animation-delay: 0.6s; }
@keyframes wash-in { to { opacity: 1; } }

/* faint ink studies in the corners */
.study { position: absolute; width: clamp(84px, 12vmax, 156px); fill: none; opacity: 0; filter: url(#wobble); }
.study path, .study circle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.study .ink-fill { fill: var(--ink); stroke: none; }
.study-tl { top: 11%; left: 7%; animation: study-in 1.4s ease 1.6s forwards, drift 14s ease-in-out 3s infinite; }
.study-br { bottom: 13%; right: 8%; animation: study-in 1.4s ease 1.9s forwards, drift 16s ease-in-out 3.4s infinite reverse; }
@keyframes study-in { to { opacity: 0.18; } }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

.hero-stage {
  position: relative; z-index: 1;
  width: min(62vmin, 460px); height: min(62vmin, 460px);
  display: grid; place-items: center; margin-bottom: -0.5rem;
}

.glow {
  position: absolute; inset: -20%; border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(241,166,56,0.5), rgba(224,125,36,0.1) 38%, transparent 66%);
  filter: blur(10px); opacity: 0; transform: scale(0.6);
  animation: glow-in 2.4s var(--ease-soft) 0.15s forwards;
}
@keyframes glow-in { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 0.42; transform: scale(1); } }

/* drop-shadow on the parent (not the img) so it survives the settle/breathe
   filter animations and lifts the now-transparent creature off the page */
.logo-bloom {
  position: relative; width: 100%; height: 100%; display: grid; place-items: center;
  filter: drop-shadow(0 16px 26px rgba(42, 29, 16, 0.20));
}
.logo-mask {
  width: 100%; height: 100%; display: grid; place-items: center;
  clip-path: circle(0% at 50% 48%);
  animation: bloom-open 1.9s var(--ease-bloom) 0.35s forwards;
}
@keyframes bloom-open { from { clip-path: circle(0% at 50% 48%); } to { clip-path: circle(75% at 50% 48%); } }
/* rest state = visible & sharp, so the breathe handoff can't drop it.
   `both` makes the hidden 0% keyframe apply during the delay too. */
.logo-img {
  width: 112%; height: auto;
  animation: settle 1.9s var(--ease-bloom) 0.4s both;
}
/* grows IN from small + sharpens — arriving, not receding */
@keyframes settle { 0% { transform: scale(0.9); filter: blur(16px); opacity: 0; } 45% { opacity: 1; } 100% { transform: scale(1); filter: blur(0); opacity: 1; } }
.logo-bloom.breathe .logo-img { animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.016); } }

/* sparkles */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute; width: 13px; height: 13px; background: var(--amber);
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
  opacity: 0; transform: scale(0) rotate(0deg);
  animation: spark-in 2.4s var(--ease-soft) forwards, twinkle 5s ease-in-out infinite;
}
.s1 { top: 6%;  left: 60%; animation-delay: 1.6s, 2.7s; }
.s2 { top: 22%; left: 14%; width: 10px; height: 10px; animation-delay: 1.8s, 3.1s; }
.s3 { top: 70%; left: 8%;  width: 11px; height: 11px; animation-delay: 2.0s, 2.9s; background: var(--orange); }
.s4 { top: 80%; left: 78%; animation-delay: 1.7s, 3.4s; }
.s5 { top: 4%;  left: 30%; width: 9px;  height: 9px;  animation-delay: 2.2s, 3.0s; }
.s6 { top: 48%; left: 92%; width: 10px; height: 10px; animation-delay: 2.1s, 3.6s; background: var(--orange); }
@keyframes spark-in { 0% { opacity: 0; transform: scale(0) rotate(-40deg); } 60% { opacity: 1; transform: scale(1.15) rotate(8deg); } 100% { opacity: 0.9; transform: scale(1) rotate(0deg); } }
@keyframes twinkle { 0%,100% { opacity: 0.85; } 50% { opacity: 0.35; } }

/* hand-drawn underline that strokes itself under "never" */
.mark { position: relative; white-space: nowrap; color: var(--orange); }
.underline {
  position: absolute; left: -3%; bottom: -0.32em;
  width: 106%; height: 0.5em; overflow: visible; filter: url(#wobble);
}
.underline path { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; fill: none; }
.underline .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-on 0.8s var(--ease-soft) 2.8s forwards; }
@keyframes draw-on { to { stroke-dashoffset: 0; } }

/* wordmark */
.wordmark {
  position: relative; z-index: 1;
  font-weight: 600;
  font-size: clamp(2.8rem, 9.5vw, 5.4rem);
  letter-spacing: -0.02em; line-height: 1;
  margin-top: 1.4rem;
  opacity: 0; transform: translateY(18px);
  animation: fade-up 1s var(--ease-bloom) 1.95s forwards;
}
.hero-line {
  position: relative; z-index: 1;
  font-weight: 400;
  font-size: clamp(1.35rem, 3.3vw, 1.95rem);
  letter-spacing: -0.005em; color: var(--ink);
  margin-top: 1.1rem; opacity: 0;
  animation: fade-up 1s var(--ease-soft) 2.3s forwards;
}
.hero-sub {
  position: relative; z-index: 1;
  margin-top: 0.6rem; color: var(--ink-soft);
  font-family: var(--sans); font-size: 0.95rem; letter-spacing: 0.01em;
  opacity: 0; animation: fade-up 1s var(--ease-soft) 2.55s forwards;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.scroll-cue {
  position: absolute; z-index: 1; bottom: 2rem; left: 50%;
  width: 26px; height: 40px; margin-left: -13px;
  border: 1.5px solid var(--ink-faint); border-radius: 14px;
  opacity: 0; animation: fade-up 1s ease 3.2s forwards;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%; width: 3px; height: 7px; margin-left: -1.5px;
  background: var(--orange); border-radius: 2px; animation: cue 1.8s var(--ease-soft) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease-soft), transform 1s var(--ease-soft); }
.reveal.in { opacity: 1; transform: none; }

/* ============================ STATEMENT ============================ */
.statement { max-width: 50rem; margin: 0 auto; padding: clamp(7rem, 20vh, 13rem) 1.6rem; text-align: center; }
.statement p { font-weight: 400; font-size: clamp(2rem, 5.6vw, 3.6rem); line-height: 1.16; letter-spacing: -0.015em; }
.statement .accent { color: var(--orange); }

/* ============================ CARDS ============================ */
.cards {
  max-width: 64rem; margin: 0 auto;
  padding: 0 1.6rem clamp(4rem, 10vh, 8rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.card {
  border-radius: 22px; padding: 2.2rem 1.8rem 2rem;
  border: 1px solid rgba(42, 29, 16, 0.07);
  box-shadow: 0 24px 50px -34px rgba(42, 29, 16, 0.5);
}
.card.sage  { background: var(--sage); }
.card.cream { background: var(--cream-card); }
.card.clay  { background: var(--clay); }

.doodle { width: 96px; height: 96px; margin-bottom: 1.4rem; }
.doodle svg { width: 100%; height: 100%; display: block; filter: url(#wobble); }
.doodle path, .doodle circle {
  stroke: var(--ink); stroke-width: 3.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.doodle .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease-soft); }
.card.in .doodle .draw, .privacy.in .doodle .draw { stroke-dashoffset: 0; }
.doodle .dot { fill: var(--ink); stroke: none; opacity: 0; transition: opacity 0.5s ease 0.55s; }
.card.in .doodle .dot, .privacy.in .doodle .dot { opacity: 1; }

.card h2 { font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.5; }
.card.clay p { color: rgba(42, 29, 16, 0.74); }

/* ============================ PRIVACY ============================ */
.privacy {
  max-width: 56rem; margin: 0 auto;
  padding: clamp(4rem, 10vh, 8rem) 1.6rem clamp(6rem, 14vh, 11rem);
  display: grid; grid-template-columns: 150px 1fr; gap: 2.6rem; align-items: center;
}
.privacy-doodle { width: 130px; height: 130px; margin: 0 auto; }
.privacy h2 { font-weight: 500; font-size: clamp(1.9rem, 4.2vw, 2.7rem); letter-spacing: -0.01em; margin-bottom: 1rem; }
.privacy-text p { color: var(--ink-soft); font-size: 1.08rem; max-width: 34rem; }
.link {
  display: inline-block; margin-top: 1.4rem; color: var(--orange); text-decoration: none;
  font-weight: 500; font-size: 0.95rem; border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.link:hover { border-color: var(--orange); }

/* ============================ FOOTER (single block) ============================ */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(224, 125, 36, 0.05));
}
.foot-grid {
  max-width: 64rem; margin: 0 auto;
  padding: 3.6rem 1.6rem 3.4rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.foot-lockup { display: flex; align-items: center; gap: 0.65rem; }
.foot-lockup img { display: block; width: 64px; height: 64px; filter: drop-shadow(0 6px 10px rgba(42, 29, 16, 0.16)); }
.foot-word { font-family: var(--hand); font-weight: 600; font-size: 1.9rem; letter-spacing: -0.01em; }
.foot-brand p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.7rem; max-width: 20rem; }
.foot-copy { display: block; margin-top: 1.1rem; color: var(--ink-faint); font-size: 0.82rem; }

.foot-col { display: flex; flex-direction: column; gap: 0.55rem; }
.foot-col h3 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 0.3rem;
}
.foot-col a { color: var(--ink); text-decoration: none; font-size: 0.92rem; transition: color 0.25s; }
.foot-col a:hover { color: var(--orange); }

/* ============================ POLICY PAGE ============================ */
.policy { max-width: 42rem; margin: 0 auto; padding: clamp(5rem, 12vh, 9rem) 1.6rem 6rem; }
.policy .back { color: var(--orange); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.policy h1 { font-weight: 600; font-size: clamp(2.4rem, 6.5vw, 3.4rem); letter-spacing: -0.015em; margin: 1.6rem 0 0.4rem; }
.policy .stamp { color: var(--ink-faint); font-size: 0.85rem; margin-bottom: 2.6rem; }
.policy h2 { font-weight: 500; font-size: 1.5rem; letter-spacing: -0.005em; margin: 2.4rem 0 0.7rem; }
.policy p { color: var(--ink-soft); margin-bottom: 0.9rem; }
.policy strong { color: var(--ink); font-weight: 600; }
.policy em { font-style: normal; color: var(--orange); }
.policy ul { color: var(--ink-soft); margin: 0 0 0.9rem 1.1rem; }
.policy li { margin-bottom: 0.4rem; }

/* ----------------------------- responsive ----------------------------- */
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; max-width: 26rem; }
  .privacy { grid-template-columns: 1fr; text-align: center; gap: 1.6rem; }
  .privacy-text p { margin: 0 auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ----------------------------- reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .glow { opacity: 0.55; transform: scale(1); }
  .wash { opacity: 1; } .study { opacity: 0.18; }
  .logo-mask { clip-path: circle(75% at 50% 48%); }
  .logo-img { opacity: 1; filter: none; transform: none; }
  .wordmark, .hero-line, .hero-sub, .spark { opacity: 1; transform: none; }
  .underline .draw { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
  .doodle .draw { stroke-dashoffset: 0; } .doodle .dot { opacity: 1; }
}
