/* Ripple of Love Studio — "Love Letter": warm red, cream, ink and sunshine; chunky Bricolage Grotesque.
   The one big moment: the heart sticker drops into the hero and ripples spread out. Everything else is quiet.
   Motion animates transform/opacity only, and stops for people who prefer reduced motion. */

:root {
  --red: #ff4d3d;
  --cream: #fff7ec;
  --ink: #2b1810;
  --sun: #ffd84d;
  --blush: #ffd9cf;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --pop: 5px 5px 0 var(--ink);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); overflow-x: clip; }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .92; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--cream); padding: .5rem .9rem; border-radius: 99px; z-index: 10; }
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.top { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem var(--gutter); color: var(--cream); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font: 800 1.15rem var(--display); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 1.35rem; fill: var(--sun); }
.top nav { display: flex; gap: clamp(.8rem, 2.5vw, 1.8rem); font-weight: 600; font-size: .95rem; }
.top nav a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .3s var(--ease); }
.top nav a:hover { background-size: 100% 2px; }
@media (max-width: 560px) { .top nav a:not(:nth-child(2)) { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: 700 1rem/1 var(--body); padding: 1rem 1.4rem; border-radius: 99px; text-decoration: none; background: var(--sun); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: var(--pop); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 5px 5px 0 var(--sun); }
.btn-ghost:hover { box-shadow: 7px 7px 0 var(--sun); }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: 5px 5px 0 var(--red); }
.btn-ink:hover { box-shadow: 7px 7px 0 var(--red); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; min-height: min(100svh, 860px); display: grid; align-content: center; gap: 1.6rem;
  padding: 7rem var(--gutter) 5rem; background: var(--red); color: var(--cream); }
.hero-place { font-weight: 600; opacity: .9; }
.hero-title { font-size: clamp(3.4rem, 11.5vw, 10.5rem); max-width: 11ch; }
.hero-title .w { display: inline-block; animation: rise .9s var(--ease) both; animation-delay: calc(120ms + var(--i) * 90ms); }
.hero-sub { max-width: 34ch; font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-place, .hero-sub, .hero-actions { animation: rise .9s var(--ease) both; animation-delay: .75s; }

.love { position: relative; display: inline-block; }
.squiggle { position: absolute; left: -2%; right: -2%; bottom: -.08em; width: 104%; height: .22em; overflow: visible; }
.squiggle path { fill: none; stroke: var(--sun); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s var(--ease) .75s forwards; }
.hero .squiggle path { stroke-width: 9; }

/* The heart drops in; its ripples spread across the hero. */
.drop { position: absolute; z-index: -1; right: clamp(-6rem, 6vw, 8vw); top: 50%; width: clamp(8rem, 18vw, 15rem); aspect-ratio: 1; translate: 0 -50%; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sun); opacity: 0; animation: ripple 5.4s cubic-bezier(.1, .6, .3, 1) infinite; animation-delay: calc(1.25s + var(--r, 0) * 1.8s); }
.ring:nth-child(2) { --r: 1; } .ring:nth-child(3) { --r: 2; }
.sticker { position: absolute; inset: 0; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; box-shadow: var(--pop);
  animation: drop 1s var(--spring) .95s both; }
.sticker svg { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 18s linear infinite; }
.sticker text { font: 800 11.5px var(--display); letter-spacing: .06em; fill: var(--ink); }
.sticker-heart { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; color: var(--red); animation: beat 2.4s ease-in-out 2s infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(.55em) rotate(2deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-120vh) rotate(-30deg); } 70% { transform: translateY(4%) rotate(4deg); } }
@keyframes ripple { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(5.5); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(.96); } 36% { transform: scale(1.08); } }
@media (max-width: 720px) { .drop { right: 1.25rem; top: auto; bottom: 1.75rem; translate: none; width: 7.5rem; } .hero { padding-bottom: 11rem; } }

/* ---------- marquee ---------- */
.marquee { display: flex; overflow: clip; background: var(--sun); border-block: 3px solid var(--ink); font: 800 clamp(1.4rem, 3vw, 2.2rem) var(--display); letter-spacing: -.02em; }
.marquee-track { display: flex; flex: none; gap: 0; margin: 0; padding: .8rem 0; list-style: none; animation: slide 32s linear infinite; }
.marquee-track li { padding-inline: 1.2rem; white-space: nowrap; }
.marquee-track li::after { content: '♥'; color: var(--red); margin-left: 2.4rem; font-size: .7em; vertical-align: .15em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-100%); } }

/* ---------- sections ---------- */
.how, .work, .claim, .faq { padding: clamp(4.5rem, 10vw, 8rem) var(--gutter); }
.section-title { font-size: clamp(2.6rem, 7vw, 5.5rem); margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: clamp(1rem, 3vw, 2rem); margin: 0; padding: 0; list-style: none; }
.step { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 2.2rem 1.6rem 1.6rem; box-shadow: var(--pop); }
.step:nth-child(2) { rotate: -1.2deg; } .step:nth-child(3) { rotate: 1deg; }
.step-n { position: absolute; top: -1.4rem; left: 1.2rem; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--red); color: var(--cream); font: 800 1.4rem var(--display); border: 3px solid var(--ink); }
.step h3 { font-size: 1.7rem; margin-bottom: .7rem; }

.work { background: var(--blush); }
.work-note { max-width: 46ch; margin: -1.5rem 0 3rem; }
.fan { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.4rem); }
.site { margin: 0; border: 3px solid var(--ink); border-radius: 18px; overflow: clip; box-shadow: var(--pop); background: #fff; }
.site:nth-child(1) { rotate: -3deg; } .site:nth-child(2) { rotate: 1.5deg; translate: 0 1.5rem; } .site:nth-child(3) { rotate: -1deg; }
.site-bar { display: flex; gap: .35rem; padding: .6rem .8rem; border-bottom: 3px solid var(--ink); background: var(--cream); }
.site-bar span { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ink); opacity: .25; }
.site-body { min-height: 15rem; padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.site-name { font: 800 .95rem var(--display); }
.site-head { font: 800 1.7rem/1 var(--display); letter-spacing: -.03em; flex: 1; }
.site-cta { align-self: flex-start; font-size: .8rem; font-weight: 700; padding: .5rem .9rem; border-radius: 99px; }
.site figcaption { padding: .7rem 1rem; border-top: 3px solid var(--ink); font-weight: 600; font-size: .9rem; background: var(--cream); }
.site-pizza .site-body { background: #c8302a; color: #fff3df; } .site-pizza .site-cta { background: #fff3df; color: #c8302a; }
.site-hair .site-body { background: #2d2442; color: #e8dcff; } .site-hair .site-head { font-style: italic; } .site-hair .site-cta { background: #c6b2ff; color: #2d2442; }
.site-cafe .site-body { background: #e4ecd6; color: #24391f; } .site-cafe .site-cta { background: #24391f; color: #e4ecd6; }
@media (max-width: 820px) { .fan { grid-template-columns: 1fr; max-width: 26rem; } .site:nth-child(2) { translate: none; } }

/* ---------- claim / pricing ---------- */
.claim { background: var(--ink); color: var(--cream); scroll-margin-top: 1rem; }
.claim-for { margin: -1.5rem 0 2rem; font-size: 1.15rem; padding: 1rem 1.2rem; border: 2px dashed var(--sun); border-radius: 14px; max-width: 46rem; }
.claim-for strong { color: var(--sun); }
.thanks { margin: -1rem 0 2.5rem; padding: 1.6rem; border-radius: 20px; background: var(--sun); color: var(--ink); max-width: 40rem; box-shadow: 6px 6px 0 var(--red); animation: drop .9s var(--spring) both; }
.thanks-title { font: 800 2.4rem var(--display); letter-spacing: -.03em; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); max-width: 62rem; }
.tier { background: var(--cream); color: var(--ink); border-radius: 26px; padding: 2rem; display: flex; flex-direction: column; gap: 1rem; border: 3px solid var(--cream); }
.tier-multi { background: var(--sun); border-color: var(--sun); }
.tier h3 { font-size: 2.1rem; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.price-big { font: 800 clamp(3rem, 7vw, 4.4rem)/1 var(--display); letter-spacing: -.04em; }
.price-small { font-weight: 600; }
.tier ul { margin: 0 0 .6rem; padding: 0; list-style: none; display: grid; gap: .55rem; flex: 1; }
.tier li { padding-left: 1.6rem; position: relative; }
.tier li::before { content: '♥'; position: absolute; left: 0; color: var(--red); }
.tier .btn { align-self: flex-start; }
.claim-small { margin-top: 2rem; opacity: .75; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq details { max-width: 50rem; border-bottom: 3px solid var(--ink); interpolate-size: allow-keywords; }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; cursor: pointer; list-style: none; font: 800 clamp(1.3rem, 2.6vw, 1.75rem)/1.1 var(--display); letter-spacing: -.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink);
  font: 800 1.4rem/1 var(--body); transition: transform .45s var(--spring), background-color .3s; }
.faq details[open] summary::after { content: '♥'; color: var(--red); transform: rotate(360deg) scale(1.08); }
.faq details p { padding: 0 0 1.4rem; max-width: 60ch; }
.faq details::details-content { height: 0; overflow: clip; transition: height .45s var(--ease), content-visibility .45s allow-discrete; }
.faq details[open]::details-content { height: auto; }

/* ---------- closing + footer ---------- */
.closing { display: grid; justify-items: start; gap: 2.4rem; padding: clamp(5rem, 12vw, 9rem) var(--gutter); background: var(--red); color: var(--cream); }
.closing-title { font-size: clamp(3rem, 9vw, 7.5rem); max-width: 12ch; }
.foot { display: flex; flex-wrap: wrap; gap: .4rem 2rem; padding: 2rem var(--gutter); background: var(--ink); color: var(--cream); font-size: .95rem; }
.foot-brand { font: 800 1.05rem var(--display); }

/* ---------- tilt (pointer) ---------- */
.tilt { transition: transform .25s var(--ease); transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }

/* ---------- scroll-driven motion ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .fan .site { animation: fan linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .fan .site:nth-child(1) { --from: -14deg; --x: 30%; } .fan .site:nth-child(3) { --from: 12deg; --x: -30%; }
  @media (max-width: 820px) { .fan .site { --x: 0; } }
  @keyframes fan { from { opacity: 0; transform: translateX(var(--x, 0)) translateY(18%) rotate(var(--from, 0deg)); } }
  .hero-title { animation: lift linear both; animation-timeline: scroll(); animation-range: 0 90vh; }
  @keyframes lift { to { transform: translateY(-14%); opacity: .35; } }
}
/* Fallback reveals for browsers without scroll-driven animations (claim.js adds .js-reveal and .in). */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
  .squiggle path { stroke-dashoffset: 0; }
  .ring { display: none; }
}
