/* Design tokens taken from lemonade.com's public CSS variables */
:root {
  --pink: #ff0083;
  --pink-hover: #dc0073;
  --pink-pressed: #b40060;
  --pink-light: #ffe4f2;
  --pink-lighter: #fff7fb;
  --text: #4a4a4a;
  --text-2: #7b7b7b;
  --text-3: #9b9b9b;
  --line-art: #535353;
  --border: #ececec;
  --border-hover: #dadada;
  --bg-2: #f7f7f7;
  --bg-3: #f3f3f3;
  --night: #282828;
  --main-font: "Lato", "Helvetica Neue", Arial, sans-serif;
  --alt-font: "Merriweather", Georgia, serif;
  --shadow-card: 0 10px 46px -10px rgba(0, 0, 0, 0.16);
  --shadow-pink: 0 10px 40px -10px rgba(255, 0, 131, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; scroll-padding-top: 70px; }
html, body { overflow-x: hidden; }
body { font-family: var(--main-font); font-size: 1.6rem; line-height: 1.5; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1 { font-family: var(--alt-font); font-weight: 400; font-size: clamp(3.2rem, 5vw, 5.2rem); line-height: 1.25; color: var(--text); text-wrap: balance; }
h2 { font-family: var(--main-font); font-weight: 700; font-size: 2.8rem; line-height: 3.6rem; text-align: center; color: var(--text); text-wrap: balance; }
h3 { font-weight: 700; font-size: 1.8rem; color: var(--text); }
.sub { font-size: 1.8rem; color: var(--text-2); text-align: center; margin: 1rem auto 0; max-width: 56rem; text-wrap: balance; }
.eyebrow { font-size: 1.4rem; font-weight: 700; color: var(--pink); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.6rem; }

/* ---------- Buttons (Lemonade: uppercase, bold 14px, radius 5px, pink glow) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--main-font); font-weight: 700; font-size: 1.4rem; text-transform: uppercase; white-space: nowrap;
  padding: 15px 30px; border-radius: 5px; border: 1px solid transparent; cursor: pointer;
  transition: all 0.3s, transform 0.5s;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 10px 18px; font-size: 1.2rem; }
.btn-pink { background: var(--pink); color: #fff; box-shadow: var(--shadow-pink); }
.btn-pink:hover { background: var(--pink-hover); }
.btn-pink:active { background: var(--pink-pressed); }
.btn-outline { background: #fff; color: var(--pink); border-color: var(--pink); }
.btn-outline:hover { background: var(--pink-lighter); }
.ctas { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; margin-top: 3.2rem; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.6rem, 4vw, 4rem); background: #fff; transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--border); }
.logo { font-family: var(--main-font); font-weight: 900; font-size: 2.6rem; letter-spacing: -0.04em; color: var(--pink); }
.logo span { color: var(--text); }
.nav { display: flex; gap: 3.2rem; font-size: 1.4rem; font-weight: 700; color: var(--text); }
.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--pink); }

/* ---------- Line art ---------- */
.ln { fill: none; stroke: var(--line-art); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln.thin { stroke-width: 1.5; }
.pink-ln { stroke: var(--pink); }
.blob { fill: var(--bg-2); }
.fill-pink { fill: var(--pink); }
.fill-white { fill: #fff; }
.dash { stroke-dasharray: 3 7; }
.ground { stroke: var(--border); stroke-width: 2; stroke-linecap: round; }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: clamp(5rem, 9vw, 9rem) 2rem 0; overflow: hidden; }
.hero h1 { max-width: 76rem; margin: 0 auto; }
.hero-art { max-width: 760px; margin: 5rem auto 0; }
.hero-art svg { width: 100%; display: block; }
.clouds { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.cloud { position: absolute; width: 180px; }
.cloud-shape { fill: var(--bg-2); }
.cloud.c1 { top: 18%; left: -200px; animation: drift 60s linear infinite; }
.cloud.c2 { top: 48%; left: -200px; width: 120px; animation: drift 80s linear -30s infinite; }
@keyframes drift { to { transform: translateX(calc(100vw + 400px)); } }

.draw .ln:not(.dash) { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.draw .ln:nth-of-type(odd) { animation-delay: 0.25s; }
.draw .pink-ln { animation-delay: 1s !important; }
.draw .dash { animation: dashmove 1.4s linear infinite; }
.draw .pop { transform-box: fill-box; transform-origin: center; animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 1.6s both; }
.draw .spark { stroke-dasharray: none; stroke-dashoffset: 0; transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.draw .spark.s2 { animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } }
@keyframes dashmove { to { stroke-dashoffset: -20; } }
@keyframes twinkle { 50% { transform: scale(0.5) rotate(45deg); opacity: 0.4; } }

/* ---------- Clients strip ---------- */
.clients { padding: 3.2rem 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.clients p { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 1.4rem; }
.clients ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 4.8rem; }
.clients li { font-size: 1.8rem; font-weight: 900; color: #b7b7b7; letter-spacing: -0.01em; transition: color 0.2s; }
.clients li:hover { color: var(--text); }

/* ---------- Sections ---------- */
section { padding: clamp(6rem, 9vw, 10rem) clamp(1.6rem, 5vw, 6rem); }
.quote-section, .builds { background: var(--bg-2); }

/* ---------- Chat ---------- */
.chat-card {
  max-width: 520px; margin: 4.8rem auto 0; background: #fff; border-radius: 20px;
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.06), 0 31px 30px -18px rgba(0, 0, 0, 0.16);
  overflow: hidden; display: flex; flex-direction: column;
}
.chat-top { display: flex; align-items: center; gap: 1.2rem; padding: 1.6rem 2rem; border-bottom: 1px solid var(--border); }
.chat-top strong { display: block; font-size: 1.6rem; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; }
.status { font-size: 1.2rem; color: var(--text-3); display: flex; align-items: center; gap: 0.5rem; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #2ad5bd; }
.restart { margin-left: auto; background: none; border: none; font: 700 1.2rem var(--main-font); text-transform: uppercase; color: var(--text-3); cursor: pointer; }
.restart:hover { color: var(--pink); }
.chat-body { height: 440px; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.msg { max-width: 86%; padding: 1.2rem 1.6rem; border-radius: 15px; font-size: 1.6rem; line-height: 1.4; animation: msgIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.msg b { font-weight: 700; }
.msg.bot { background: var(--bg-3); color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--pink); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { display: flex; gap: 5px; padding: 1.5rem 1.6rem; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b7b7b7; animation: bounce 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
.inline-link { color: var(--pink); font-weight: 700; }
.inline-link:hover { color: var(--pink-pressed); }
.chat-input { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.8rem; padding: 1.6rem 2rem 2rem; min-height: 78px; border-top: 1px solid var(--border); }
.chip {
  font: 700 1.4rem var(--main-font); padding: 1rem 1.6rem; border-radius: 5px; cursor: pointer;
  background: #fff; color: var(--pink); border: 1px solid var(--pink);
  transition: all 0.2s; animation: msgIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.chip:hover { background: var(--pink-lighter); }
.chip-primary { background: var(--pink); color: #fff; box-shadow: var(--shadow-pink); }
.chip-primary:hover { background: var(--pink-hover); }

.quote-card { padding: 0.4rem 0; }
.quote-card h4 { font-family: var(--alt-font); font-weight: 400; font-size: 2.2rem; margin: 1rem 0 0.2rem; color: var(--text); }
.q-role { color: var(--text-2); font-size: 1.4rem; }
.quote-card ul { list-style: none; margin: 1.2rem 0 1.6rem; display: grid; gap: 0.4rem; }
.quote-card li::before { content: "✓"; color: var(--pink); font-weight: 900; margin-right: 0.8rem; }
.q-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.tag { display: inline-block; align-self: flex-start; font-size: 1.1rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; background: var(--pink-light); color: var(--pink); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4rem; max-width: 1200px; margin: 4.8rem auto 0; }
.cards.three { grid-template-columns: repeat(3, 1fr); max-width: 1000px; }
.card {
  background: #fff; border: 1px solid transparent; border-radius: 20px; padding: 2.4rem; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--pink); transform: translateY(-4px); }
.card-art { height: 140px; display: grid; place-items: center; margin-bottom: 0.4rem; }
.card-art svg { width: 150px; overflow: visible; }
.card-art .ln { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.4s ease; }
.card.in .card-art .ln { stroke-dashoffset: 0; }
.card-art .dash { stroke-dasharray: 3 7; stroke-dashoffset: 0; }
.card h3 { font-size: 2rem; }
.lock { font-size: 1.4rem; }
.card p { color: var(--text-2); flex: 1; font-size: 1.5rem; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 1.4rem; border-top: 1px solid var(--border); font-size: 1.4rem; }
.card-foot strong, .card-foot .link { font-weight: 700; color: var(--text); }
.arrow { color: var(--pink); font-size: 2rem; transition: transform 0.3s; }
.card:hover .arrow { transform: translateX(5px); }
.note { text-align: center; color: var(--text-3); font-size: 1.4rem; margin-top: 3.2rem; }
.note a { color: var(--pink); font-weight: 700; }

/* ---------- How (steps, like "How Lemonade Works") ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.2rem; max-width: 1100px; margin: 5.6rem auto 0; counter-reset: s; }
.steps li { text-align: center; }
.steps span {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 1.6rem; border-radius: 50%;
  border: 2px solid var(--pink); color: var(--pink); font-family: var(--alt-font); font-size: 2rem;
}
.steps h3 { margin-bottom: 0.6rem; }
.steps p { color: var(--text-2); font-size: 1.5rem; }

/* ---------- Values ---------- */
.values { background: var(--bg-2); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; max-width: 1100px; margin: 4.8rem auto 0; }
.value { background: #fff; padding: 3.2rem; border-radius: 15px; border: 1px solid var(--border); box-shadow: 0 30px 18px -13px rgba(0, 0, 0, 0.06); }
.value h3 { font-family: var(--alt-font); font-weight: 400; font-size: 2.4rem; color: var(--pink); margin-bottom: 1rem; }
.value p { color: var(--text-2); }

/* ---------- Final ---------- */
.final { text-align: center; }
.links { margin-top: 2.4rem; display: flex; gap: 3.2rem; justify-content: center; font-size: 1.4rem; font-weight: 700; }
.links a { color: var(--pink); }
.links a:hover { color: var(--pink-pressed); }

.footer { background: var(--night); color: #b7b7b7; padding: 3.2rem 2rem; text-align: center; font-size: 1.2rem; }

.fab {
  position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 60; display: none;
  background: var(--pink); color: #fff; padding: 14px 22px; border-radius: 5px;
  font-weight: 700; font-size: 1.4rem; text-transform: uppercase; box-shadow: var(--shadow-pink);
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease var(--d, 0ms), transform 0.6s ease var(--d, 0ms), border-color 0.2s, box-shadow 0.2s; }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav, .header .btn { display: none; }
  .cards, .cards.three, .value-grid, .steps { grid-template-columns: 1fr; }
  .fab { display: inline-flex; }
  .chat-body { height: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .draw .ln, .card-art .ln { stroke-dashoffset: 0 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Hero scene — Lemonade-style layered line-art street
   ========================================================= */
.hero { padding-bottom: 0; }
.hero-text { position: relative; z-index: 2; }
.scene { position: relative; z-index: 1; margin: -150px calc(clamp(1.6rem, 5vw, 6rem) * -1) 0; }
.scene svg { display: block; width: 100%; height: clamp(300px, 30vw, 460px); }

/* layers */
.far-b { fill: #fff; stroke: #e6e6e6; stroke-width: 2; stroke-linejoin: round; }
.far-l { fill: none; stroke: #e6e6e6; stroke-width: 2; stroke-linecap: round; }
.mid-b { fill: #fff; stroke: #cfcfcf; stroke-width: 2; stroke-linejoin: round; }
.mid-l { fill: none; stroke: #cfcfcf; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bg-cloud { fill: #f3f3f3; }
.fg-w { fill: #fff; stroke: #4a4a4a; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.scene .ln { stroke: #4a4a4a; }
.stone { fill: none; stroke: #e3e3e3; stroke-width: 2; stroke-linecap: round; }
.hair { fill: #4a4a4a; stroke: #4a4a4a; stroke-width: 2; stroke-linejoin: round; }
.dot { fill: #4a4a4a; }
.frame { fill: none; stroke: var(--pink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pink-ln { fill: none; stroke: var(--pink); stroke-width: 2.5; stroke-linecap: round; }
.screen-ui { fill: #ececec; }
.screen-ui.pink-fill { fill: var(--pink); }
.cursor { fill: var(--pink); animation: blink 1s steps(1) infinite; }
.steam-l { fill: none; stroke: #b7b7b7; stroke-width: 2; stroke-linecap: round; }
.ground-band { fill: #f7f7f7; }
.ground-ln { stroke: #4a4a4a; stroke-width: 2.5; stroke-linecap: round; }

/* entrance: layers rise in, back to front */
.layer { opacity: 0; transform: translateY(16px); animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.layer.far { animation-delay: 0.1s; }
.layer.mid { animation-delay: 0.3s; }
.layer.fg.left { animation-delay: 0.5s; }
.layer.fg.right { animation-delay: 0.65s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ambient motion */
.drift { animation: driftX 70s linear infinite; }
.drift.d2 { animation-duration: 95s; animation-delay: -40s; }
@keyframes driftX { from { transform: translateX(-160px); } to { transform: translateX(1600px); } }

.steam-l { animation: steam 2.6s ease-in-out infinite; }
.steam-l.s2 { animation-delay: 1.3s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }

.head { transform-box: fill-box; transform-origin: 50% 100%; animation: nod 4s ease-in-out infinite; }
@keyframes nod { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-4deg); } 90% { transform: rotate(1deg); } }

.arm { transform-box: fill-box; transform-origin: 100% 0; animation: type 0.5s ease-in-out infinite alternate; }
@keyframes type { to { transform: rotate(-2deg) translateY(1px); } }

.quill { transform-box: fill-box; transform-origin: 0 100%; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(4deg); } }

.bird { transform-box: fill-box; transform-origin: 50% 100%; animation: hop 6s ease-in-out infinite; }
@keyframes hop { 0%, 80%, 100% { transform: none; } 84% { transform: translateY(-8px); } 88% { transform: none; } 92% { transform: translateY(-5px) scaleX(-1); } 96% { transform: scaleX(-1); } }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .scene { margin-top: 2.4rem; }
  .scene svg { height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .layer { opacity: 1; transform: none; }
}
