/* Landing page (havely.co): warm and illustrative, in the spirit of Headspace/Calm.
   Order: hero (copy + waitlist | evening scene with the smiling house and Bobbie), before/after (the long
   message vs the guide), a night with Havely (peach band), ask the guide, privacy as a quiet night (plum),
   who it's for, FAQ, and a coral call to action with the house peeking in. */

section { padding-block: 88px; position: relative; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; justify-items: center; }
.section-head h2, .ask-copy h2, .night-copy h2, .cta-panel h2 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.035em; line-height: 1; }
.section-head p { color: var(--muted); font-size: 19px; max-width: 36em; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); }

/* ── hero ─────────────────────────────────────────────────────────── */
.hero { padding-block: 28px 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.badge i { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; }
.badge svg { width: 12px; height: 12px; }
.hero h1 { font-size: clamp(46px, 6vw, 80px); letter-spacing: -0.045em; line-height: 0.94; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

.scene-wrap { position: relative; width: 100%; max-width: 620px; justify-self: center; }
.scene { width: 100%; height: auto; display: block; overflow: visible; }
.scene .sky { fill: var(--peach); }
.scene .hill { fill: var(--mint); }
.twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 3.4s ease-in-out infinite; }
.twinkle.t2 { animation-delay: -1.2s; animation-duration: 4.2s; }
.twinkle.t3 { animation-delay: -2.4s; animation-duration: 3s; }
.tail { transform-box: fill-box; transform-origin: 90% 95%; animation: wag 1.1s ease-in-out infinite; }

.float { position: absolute; z-index: 2; border-radius: 22px; box-shadow: var(--shadow-lg); animation: bob 7s ease-in-out infinite; }
.note-card { top: 6%; left: -3%; background: var(--butter); color: #2E1838; padding: 12px 16px 13px; rotate: -4deg; display: grid; gap: 2px; }
.note-card b { font-family: var(--f-display); font-weight: 800; font-size: 17px; }
.note-card span { font-size: 13.5px; color: #5C4663; }
.done-card { top: 38%; right: -4%; background: var(--surface); padding: 10px 16px 10px 10px; display: flex; gap: 10px; align-items: center; rotate: 3deg; animation-delay: -2.5s; }
.done-card i { width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; flex: none; }
.done-card svg { width: 15px; height: 15px; }
.done-card b { display: block; font-size: 15px; }
.done-card small { display: block; font-size: 12.5px; color: var(--muted); }
.ask-card { bottom: 3%; left: 0; width: min(270px, 58%); background: var(--surface); padding: 12px; display: grid; gap: 7px; font-size: 14px; animation-delay: -4.5s; }
.ask-card .q { justify-self: end; background: var(--ink); color: var(--on-ink); border-radius: 18px 18px 5px 18px; padding: 7px 12px; }
.ask-card .a { background: var(--surface-2); border-radius: 18px 18px 18px 5px; padding: 8px 12px; }

/* ── waitlist form ─────────────────────────────────────────────────── */
.join { display: grid; gap: 10px; width: 100%; max-width: 540px; }
.join .field { display: flex; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 24px; padding: 6px; box-shadow: var(--shadow); transition: border-color .15s; }
.join .field:focus-within { border-color: var(--ink); }
.join input[type="email"] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; padding: 11px 6px 11px 14px; outline: none; }
.join input[type="email"]::placeholder { color: var(--muted); opacity: .85; }
.join .btn { flex: none; border-radius: 18px; }
.join .note { font-size: 13.5px; color: var(--muted); padding-inline: 14px; }
.join .note a { color: var(--muted); }
.join .error { font-size: 14.5px; color: var(--siren); font-weight: 600; padding-inline: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.offer { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; background: var(--butter); color: var(--on-butter); border-radius: 18px; padding: 9px 16px; font-size: 15px; line-height: 1.4; }
.offer .tag { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--butter-label); }
.offer p { color: inherit; }

.joined { display: grid; gap: 10px; background: var(--surface); border-radius: 26px; padding: 20px 22px; width: 100%; max-width: 540px; box-shadow: var(--shadow); }
.joined:focus { outline: none; }
.joined h3 { font-size: 22px; display: flex; gap: 10px; align-items: center; }
.joined h3 i { width: 34px; height: 34px; border-radius: 12px; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; flex: none; }
.joined h3 svg { width: 19px; height: 19px; }
.joined p { font-size: 15.5px; color: var(--muted); }
.joined .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.joined .linkish { background: none; border: 0; padding: 7px 4px; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.demo-link { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.demo-link .play { width: 42px; height: 42px; border-radius: 50%; background: var(--coral); color: #2E1838; display: grid; place-items: center; flex: none; transition: transform .2s; }
.demo-link .play svg { width: 14px; height: 14px; margin-left: 2px; }
.demo-link small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.demo-link:hover .play { transform: scale(1.08) rotate(-6deg); }

/* ── before / after ───────────────────────────────────────────────── */
.ba-grid { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 1040px; margin: 0 auto; }
.ba figure { margin: 0; display: grid; gap: 14px; justify-items: start; }
.ba-label { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.before { rotate: -1.5deg; }
.after { rotate: 1deg; }
.chat { background: var(--surface); border-radius: 30px; padding: 16px 18px 20px; box-shadow: var(--shadow); display: grid; gap: 8px; width: 100%; }
.chat-head { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.msg { justify-self: end; max-width: 94%; background: var(--surface-2); border-radius: 20px 20px 6px 20px; padding: 10px 14px 8px; font-size: 14.5px; line-height: 1.45; margin: 0; }
.msg time { display: block; text-align: right; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.msg:first-of-type span { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.warn { display: inline-flex; gap: 8px; align-items: center; background: var(--siren-soft); color: var(--siren); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 7px 14px 7px 10px; }
.warn svg { width: 17px; height: 17px; flex: none; }
.ba-arrow { width: 100%; height: auto; justify-self: center; }
.stack { display: grid; gap: 12px; width: 100%; }
.blk { background: var(--surface); border-radius: 24px; padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 3px; align-content: start; }
.blk svg { width: 24px; height: 24px; margin-bottom: 4px; }
.blk b { font-family: var(--f-display); font-weight: 800; font-size: 17px; }
.blk span { font-size: 14px; }
.blk-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tint-mint { background: var(--mint); color: var(--on-mint); }
.tint-butter { background: var(--butter); color: var(--on-butter); }
.tint-sos { background: var(--siren-soft); }
.tint-sos svg { color: var(--siren); }
.blk-title { margin-bottom: 6px; }
.mini-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.mini-tl li { display: grid; grid-template-columns: 44px 22px 1fr; gap: 8px; align-items: center; }
.mini-tl li > span:first-child { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-tl i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.mini-tl i svg { width: 11px; height: 11px; margin: 0; }
.mini-tl .done { color: var(--muted); }
.mini-tl .done i { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }
.mini-tl .now { font-weight: 700; }
.mini-tl .now i { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 14%, transparent); }
.mini-tl em { font-style: normal; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-left: 4px; }

/* ── soft bands with waves ────────────────────────────────────────── */
.tinted { background: var(--peach); margin-block: 70px; }
.wave { position: absolute; left: 0; width: 100%; height: 70px; display: block; }
.wave.top { top: -69px; }
.wave.bottom { bottom: -69px; }
.tinted .wave path { fill: var(--peach); }
.night .wave path { fill: #2E1838; }

/* ── a night with Havely ──────────────────────────────────────────── */
.ev { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; position: relative; }
.ev::before { content: ""; position: absolute; top: 30px; left: 10%; right: 10%; border-top: 3px dashed color-mix(in srgb, var(--coral) 70%, transparent); }
.ev li { display: grid; justify-items: center; text-align: center; gap: 8px; align-content: start; position: relative; }
.ev li:nth-child(even) { margin-top: 44px; }
.ev-dot { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); margin-bottom: 6px; }
.ev-dot svg { width: 26px; height: 26px; }
.ev-dot.butter { background: var(--butter); color: var(--on-butter); }
.ev-dot.mint { background: var(--mint); color: var(--on-mint); }
.ev-dot.white { background: var(--surface); color: var(--ink); }
.ev-dot.plum { background: #2E1838; color: #FFF1E8; }
.ev time { font-family: var(--f-display); font-weight: 800; font-size: 15px; color: var(--muted); letter-spacing: .02em; }
.ev h3 { font-size: 20px; }
.ev p { color: var(--muted); font-size: 15px; max-width: 16em; }

.sos-card { margin-top: 64px; background: var(--surface); border-radius: 36px; padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; align-items: center; box-shadow: var(--shadow); }
.sos-copy { display: grid; gap: 10px; }
.sos-copy h3 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; letter-spacing: -0.03em; }
.sos-copy p { color: var(--muted); font-size: 17px; }
.sos-mock { border: 2.5px solid var(--siren); border-radius: 26px; padding: 20px; display: grid; gap: 6px; background: var(--bg); }
.sos-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--siren); }
.sos-addr { font-family: var(--f-display); font-weight: 900; font-size: clamp(28px, 3.6vw, 38px); line-height: 1; }
.sos-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }
.sos-call { background: var(--siren); color: #FFFFFF; border-radius: 18px; padding: 14px; display: flex; gap: 10px; justify-content: center; align-items: center; font-family: var(--f-display); font-weight: 800; font-size: 20px; }
.sos-call svg { width: 22px; height: 22px; }

/* ── ask the guide ────────────────────────────────────────────────── */
.ask { overflow-x: clip; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.ask-copy { display: grid; gap: 16px; justify-items: start; }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--surface); border-radius: 999px; padding: 9px 16px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
.chips li:nth-child(odd) { rotate: -2deg; }
.chips li:nth-child(even) { rotate: 1.5deg; }
.chat-card { position: relative; background: var(--surface); border-radius: 36px; padding: 26px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; font-size: 15.5px; line-height: 1.45; }
.chat-card::before { content: ""; position: absolute; z-index: -1; width: min(44%, 260px); aspect-ratio: 1; right: -6%; top: -16%; background: var(--coral); border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; rotate: 12deg; }
.chat-card .me { justify-self: end; max-width: 80%; background: var(--ink); color: var(--on-ink); border-radius: 22px 22px 6px 22px; padding: 10px 15px; }
.chat-card .bot { justify-self: start; max-width: 90%; background: var(--surface-2); border-radius: 22px 22px 22px 6px; padding: 12px 15px; }
.chat-card small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* ── privacy as a quiet night ─────────────────────────────────────── */
.night { background: #2E1838; color: #FFF6F0; margin-block: 70px; }
.night-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.night-sky svg { width: 100%; height: 100%; }
.night-grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.night-copy { display: grid; gap: 14px; justify-items: start; }
.night .eyebrow, .night .lead { color: #D6C6DA; }
.sleepy-house { width: 220px; height: auto; margin-top: 8px; }
.zz { fill: #FFE08A; font-family: var(--f-display); font-weight: 900; font-size: 24px; animation: drift 4s ease-in-out infinite; }
.zz.small { font-size: 16px; animation-delay: -2s; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.promises li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 26px; padding: 22px; display: grid; gap: 6px; }
.promises b { font-family: var(--f-display); font-weight: 800; font-size: 20px; }
.promises span { color: #D6C6DA; font-size: 15.5px; }

/* ── who it's for ─────────────────────────────────────────────────── */
.who-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; }
.who-list li { display: grid; justify-items: center; gap: 6px; align-content: start; }
.blobby { width: 150px; height: 138px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 52% 48% 46% 54% / 56% 50% 50% 44%; transition: transform .3s ease; }
.blobby svg { width: 64px; height: 64px; }
.who-list li:nth-child(2) .blobby { border-radius: 46% 54% 58% 42% / 48% 56% 44% 52%; }
.who-list li:nth-child(3) .blobby { border-radius: 58% 42% 50% 50% / 44% 52% 48% 56%; }
.who-list li:nth-child(4) .blobby { border-radius: 50% 50% 42% 58% / 54% 44% 56% 46%; }
.who-list li:hover .blobby { transform: rotate(-4deg) scale(1.04); }
.blobby.coral { background: var(--coral); }
.blobby.butter { background: var(--butter); }
.blobby.mint { background: var(--mint); }
.blobby.peach { background: var(--peach); }
.who-list b { font-family: var(--f-display); font-weight: 800; font-size: 20px; line-height: 1.15; }
.who-list span { color: var(--muted); font-size: 15px; }

/* ── faq ──────────────────────────────────────────────────────────── */
.faq-section { padding-top: 40px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: 24px; padding: 0 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 19px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-display); font-weight: 800; font-size: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--peach); display: grid; place-items: center; flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }
.faq details a { color: var(--ink); font-weight: 600; }

/* ── call to action ───────────────────────────────────────────────── */
.cta { padding-top: 24px; }
.cta-panel { position: relative; overflow: hidden; background: var(--coral); color: #2E1838; border-radius: 48px; padding: clamp(32px, 6vw, 80px); min-height: 380px; }
.cta-copy { position: relative; z-index: 1; display: grid; gap: 18px; justify-items: start; max-width: 620px; }
.cta-panel .lead { color: #2E1838; }
.cta-panel .join .field { border-color: transparent; }
.cta-panel .join .note, .cta-panel .join .note a { color: #2E1838; }
.cta-panel .join .error { color: #2E1838; background: var(--surface); border-radius: 12px; padding: 6px 14px; justify-self: start; }
.peek { position: absolute; right: 4%; bottom: -16px; width: min(300px, 32%); height: auto; animation: peek 6s ease-in-out infinite; }

/* ── motion ───────────────────────────────────────────────────────── */
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes twinkle { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: .35; scale: .7; } }
@keyframes wag { 0%, 100% { rotate: -8deg; } 50% { rotate: 14deg; } }
@keyframes drift { 0%, 100% { translate: 0 0; opacity: 1; } 50% { translate: 4px -6px; opacity: .55; } }
@keyframes peek { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.can-reveal .reveal { opacity: 0; translate: 0 28px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1); }
.can-reveal .reveal.in { opacity: 1; translate: 0 0; }
.can-reveal .ev li.reveal:nth-child(2) { transition-delay: .08s; }
.can-reveal .ev li.reveal:nth-child(3) { transition-delay: .16s; }
.can-reveal .ev li.reveal:nth-child(4) { transition-delay: .24s; }
.can-reveal .ev li.reveal:nth-child(5) { transition-delay: .32s; }

/* ── smaller screens ──────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .scene-wrap { max-width: 560px; margin-top: 8px; }
  .ask-grid, .night-grid, .sos-card { grid-template-columns: 1fr; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 860px) {
  .ba-grid { grid-template-columns: 1fr; justify-items: stretch; }
  .ba-arrow { width: 90px; rotate: 90deg; margin: -8px auto; }
  .before, .after { rotate: 0deg; }
  .ev { grid-template-columns: 1fr; gap: 26px; max-width: 520px; margin: 0 auto; }
  .ev::before { top: 30px; bottom: 30px; left: 29px; right: auto; border-top: 0; border-left: 3px dashed color-mix(in srgb, var(--coral) 70%, transparent); }
  .ev li { grid-template-columns: 60px 1fr; justify-items: start; text-align: left; column-gap: 18px; row-gap: 2px; }
  .ev li:nth-child(even) { margin-top: 0; }
  .ev-dot { grid-row: span 3; margin-bottom: 0; }
}
@media (max-width: 640px) {
  section { padding-block: 64px; }
  .hero { padding-block: 12px 48px; }
  .join .field { flex-direction: column; border-radius: 24px; }
  .join input[type="email"] { padding: 12px; }
  .join .btn { width: 100%; }
  .note-card { top: 0; left: 0; padding: 9px 13px 10px; }
  .note-card b { font-size: 15px; }
  .note-card span { font-size: 12px; }
  .done-card { top: auto; bottom: 4%; right: 0; padding: 8px 12px 8px 8px; }
  .done-card i { width: 26px; height: 26px; }
  .ask-card { display: none; }
  .blk-row, .promises { grid-template-columns: 1fr; }
  .cta-panel { border-radius: 34px; padding-bottom: 150px; }
  .peek { width: 170px; right: 50%; translate: 50% 0; }
  @keyframes peek { 0%, 100% { translate: 50% 0; } 50% { translate: 50% -10px; } }
  .bar-actions .btn.ghost { display: none; }
  .tinted, .night { margin-block: 50px; }
  .wave { height: 50px; }
  .wave.top { top: -49px; }
  .wave.bottom { bottom: -49px; }
}
@media (max-width: 420px) {
  .who-list { grid-template-columns: 1fr; }
}
