:root {
  --bg: #fff9fb;
  --panel: #ffffff;
  --ink: #2b1f31;
  --ink-soft: #2b1f3122;
  --pink: #ff8ab3;
  --pink-soft: #ffd6e6;
  --purple: #8e7dff;
  --mint: #8af2c0;
  --mint-soft: #dbffee;
  --stone: #efe9f6;
  --accent: #311e75;
  --focus: #1a73e8;
  --ghost: #ffffff;
  /* Wash system tokens */
  --lavender-soft: #eee9ff;
  --wash-size-x: 1400px;
  --wash-size-y: 900px;
  --wash-fade: 60%;
  --wash-opacity: 0.22;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

/* Utility classes */
.hidden { display: none !important; }

.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px 12px; background: var(--panel); border-radius: 8px; }

.container { width: min(1080px, 92%); margin: 0 auto; }
.container { position: relative; }
.narrow { width: min(820px, 92%); }
.grid.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.grid.two-col.reverse { grid-template-columns: 1fr 1.2fr; }

.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: rgba(255,255,255,0.6); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid #ffffffaa; box-shadow: 0 2px 10px rgba(49,30,117,0.06); transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease; }
.site-header.scrolled { background: rgba(255,255,255,0.78); box-shadow: 0 8px 24px rgba(49,30,117,0.12); border-bottom-color: #ffffffcc; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; flex-wrap: nowrap; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand:visited { color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 2px 8px rgba(49,30,117,.18); display: inline-block; transition: transform .12s ease, filter .12s ease; }
.brand-icon:hover { transform: translateY(-1px); filter: drop-shadow(0 4px 10px rgba(142,125,255,.35)); }
.brand-mark { display: none; }
.brand-name { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: 0.3px; color: var(--ink); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.header-cta { padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--ink-soft); }
.app-store-link { 
  background: linear-gradient(135deg, var(--purple), var(--pink)); 
  color: white !important; 
  border: none !important;
  box-shadow: 0 4px 12px rgba(142, 125, 255, 0.25);
}
.app-store-link:hover { 
  filter: brightness(1.05); 
  transform: translateY(-1px); 
  box-shadow: 0 6px 16px rgba(142, 125, 255, 0.35);
}

/* Smooth scroll behavior for in-page anchors */
html { scroll-behavior: smooth; }

.section { padding: clamp(48px, 8vw, 96px) 0; }
main { padding-top: 64px; }
.hero .headline { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 14px; }
.subheadline { font-size: clamp(16px, 2.2vw, 20px); opacity: 0.9; margin: 0 0 24px; }
.subheadline.swap { transition: opacity 200ms ease; }
.subheadline.hidden { opacity: 0; }
/* Lift hero intro closer to header */
.hero .intro { margin-top: -48px; margin-bottom: 8px; }
@media (max-width: 920px) {
  .hero .intro { margin-top: -18px; }
}
@media (min-width: 1020px) {
  .hero .intro { margin-top: -72px; }
}

.waitlist { background: var(--panel); border: 1px solid var(--ink-soft); border-radius: 16px; padding: 12px; box-shadow: 0 10px 40px rgba(49, 30, 117, 0.08); }
.waitlist.compact { padding: 12px; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.waitlist input[type="email"] {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--ink-soft); background: #fff; font-size: 16px; outline: none; transition: box-shadow 0.2s, border-color 0.2s;
}
.waitlist input[type="email"]:focus { border-color: var(--focus); box-shadow: 0 0 0 3px #1a73e822; }
.btn.primary {
  --btn-bg: linear-gradient(135deg, var(--purple), var(--pink));
  --btn-bg-active: linear-gradient(135deg, #6f5ef6, #ff6fa1);
  color: white; background: var(--btn-bg); border: none; border-radius: 12px; padding: 14px 18px; font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; box-shadow: 0 6px 18px rgba(142, 125, 255, 0.35);
}
.btn.primary:hover { filter: brightness(1.02); transform: translateY(-1px); }
.btn.primary:active { background: var(--btn-bg-active); transform: translateY(0); }
.microcopy { font-size: 12px; opacity: 0.8; margin-top: 8px; }
.form-message { margin-top: 10px; font-size: 14px; min-height: 20px; }
.hp { position: absolute; left: -9999px; }

.hero-cta-row { display: flex; align-items: center; gap: 8px; }

.title { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; margin: 0 0 12px; }
.body { margin: 0 0 18px; opacity: 0.95; }
.bullets { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.bullets li { display: flex; align-items: start; gap: 12px; background: var(--panel); border: 1px solid var(--ink-soft); padding: 12px 14px; border-radius: 12px; }
.bullets.fancy { grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); justify-content: center; gap: 16px 18px; }
.bullets.fancy li { width: 100%; padding: 14px 16px; border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.bullets.fancy li:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(49, 30, 117, 0.12); border-color: #00000020; }
.bullets.fancy .emoji { font-size: 22px; }
.emoji { font-size: 20px; }

.steps { margin: 16px 0 0; padding-left: 18px; }
.steps li { margin: 10px 0; }

.art { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 40px rgba(49, 30, 117, 0.10)); }
.hero-mascot { border-radius: 24px; background: none; width: 75%; max-width: 560px; margin-inline: auto; }
.cta-mascot { border-radius: 24px; }
.cta .cta-mascot { width: 65%; max-width: 420px; margin: 0 auto; display: block; }
.floaty { animation: float 4.8s ease-in-out infinite; will-change: transform; }
.floaty-hero { animation: floatHero 6s ease-in-out infinite; will-change: transform; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes floatHero {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(2px, -6px, 0) rotate(0.4deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(0deg); }
  75% { transform: translate3d(-2px, -6px, 0) rotate(-0.4deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.problem {}
.solution {}
.cta {}
.merged {}
.merged .title { font-size: clamp(36px, 6vw, 56px); }
.merged .container { padding-top: 8px; }

/* Accent shapes */
.accents { position: absolute; inset: -20px -20px auto auto; pointer-events: none; z-index: 0; }
.accents .shape { position: absolute; display: block; filter: blur(2px) saturate(110%); opacity: 0.75; }
.accents .s1 { width: 140px; height: 140px; border-radius: 18px; background: linear-gradient(145deg, var(--purple), var(--pink)); transform: rotate(18deg); top: -10px; right: -8px; }
.accents .s2 { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(145deg, var(--mint), var(--pink)); top: 120px; right: 40px; }

/* Wink states (toggled via section .wink) */
.hero .visual .eye-right-wink,
.cta .visual .eye-right-wink { opacity: 0; transition: opacity 180ms ease; }
.hero.wink .visual .eye-right-open,
.cta.wink .visual .eye-right-open { opacity: 0; transition: opacity 180ms ease; }
.hero.wink .visual .eye-right-wink,
.cta.wink .visual .eye-right-wink { opacity: 1; }

/* Layering */
.hero .copy, .solution .copy, .cta .copy, .visual { position: relative; z-index: 1; }

/* Section wash system */
.section { position: relative; overflow: hidden; }
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(var(--wash-size-x) var(--wash-size-y) at var(--wash-x, 80%) var(--wash-y, 20%), var(--wash-color, transparent), transparent var(--wash-fade));
  opacity: var(--wash-opacity);
}
.wash-pink-tr { --wash-color: var(--pink-soft); --wash-x: 85%; --wash-y: 10%; }
.wash-mint-bl { --wash-color: var(--mint-soft); --wash-x: 15%; --wash-y: 85%; }
.wash-lavender-br { --wash-color: var(--lavender-soft); --wash-x: 90%; --wash-y: 70%; }

.site-footer { padding: 44px 0 80px; background: linear-gradient(180deg, rgba(49,30,117,0.08), rgba(49,30,117,0.18)); border-top: 1px solid #ffffff66; }
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 8px; }
.footer-tagline { text-align: center; font-weight: 700; letter-spacing: 0.1px; opacity: 0.95; }
.footer-note { margin-top: 6px; text-align: center; font-size: 12px; opacity: 0.7; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 920px) {
  .grid.two-col, .grid.two-col.reverse { grid-template-columns: 1fr; }
  .header-inner { padding: 10px 0; gap: 8px; }
  .site-nav { display: flex; gap: 8px; }
  .header-cta { font-size: 14px; padding: 8px 12px; white-space: nowrap; }
  .brand-name { font-size: 16px; }
  .brand-icon { width: 24px; height: 24px; }
  .input-row { grid-template-columns: 1fr; }
  .btn.primary { width: 100%; }
}

/* Mobile hero re-order: mascot first, then intro, then waitlist */
@media (max-width: 920px) {
  .hero .grid.two-col { align-items: start; }
  .hero .visual { grid-row: 1; }
  .hero .copy { grid-row: 2; }
  .hero .hero-mascot { width: 68%; max-width: 420px; margin: 0 auto 12px; display: block; }
  .hero .intro { margin-bottom: 12px; }
  .hero-cta-row { justify-content: center; }
  .hero .btn.primary { width: auto; margin: 0 auto; padding: 14px 22px; }
  /* Add a bit more breathing room between hero and story on mobile */
  .hero { margin-bottom: 50px; }
}

/* Merged section cards */
.merged .merged-cards { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 5px; }
.merged .connector { position: absolute; inset: -10px 0 auto 0; width: 110%; height: 200px; z-index: 0; left: -5%; }
.merged .connector-path { transform-origin: center; animation: sweep 8s ease-in-out infinite; }
@keyframes sweep { 0%,100% { opacity: 0.22; } 50% { opacity: 0.34; } }
.merged .card { position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--ink-soft); border-radius: 16px; padding: 16px; box-shadow: 0 12px 36px rgba(49, 30, 117, 0.08); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.merged .card:hover { transform: translateY(-4px); box-shadow: 0 18px 48px rgba(49, 30, 117, 0.12); border-color: #00000022; }
.merged .card .icon { width: 44px; height: 44px; color: var(--purple); display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--purple), var(--pink)); -webkit-mask-image: radial-gradient(circle at center, #000 68%, transparent 70%); mask-image: radial-gradient(circle at center, #000 68%, transparent 70%); filter: saturate(110%); box-shadow: 0 0 0 6px #ffffff88 inset; transition: box-shadow .2s ease, transform .2s ease; }
.merged .card:hover .icon { box-shadow: 0 0 0 6px #ffffffaa inset, 0 0 24px rgba(142,125,255,.35); transform: translateY(-1px); }
.merged .card .icon svg { width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.merged .card h3 { margin: 10px 0 6px; font-size: 18px; font-weight: 700; letter-spacing: 0.1px; }
.merged .card .sub { margin: 0 0 10px; opacity: 0.92; font-size: 14px; }
.merged .card .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px dashed var(--ink-soft); background: #fff; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px); }
.revealed { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }

.trust-note { margin-top: 16px; font-size: 13px; opacity: 0.75; text-align: center; }

@media (max-width: 920px) {
  .merged .merged-cards { grid-template-columns: 1fr; }
  .merged .connector { display: none; }
}

/* Progressive story section */
.story { position: relative; }
.story .title { text-align: center; }
.story .body { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.story .title { font-size: clamp(36px, 6vw, 56px); }
.story .container { padding-top: 8px; }
/* sticky headline removed */
.story-step { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 14px; margin: 18px 0; opacity: 0; transform: translateY(14px); }
.story-step.revealed { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }
.story-step.alt { grid-template-columns: 1fr 1.1fr; }
.story-figure { width: 100%; display: flex; justify-content: center; align-items: center; border-radius: 0; background: transparent; box-shadow: none; transform: translateY(var(--parallax, 0px)); will-change: transform; aspect-ratio: auto; }
.story-figure .story-img { width: 60%; height: auto; display: block; border-radius: 16px; box-shadow: none; background: transparent; margin-inline: auto; }
.story-copy h3 { margin: 0 0 6px; font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(22px, 3.4vw, 32px); line-height: 1.12; }
.story-copy p { margin: 0 0 6px; opacity: 0.9; }
.story-copy .chip { display: inline-flex; font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px dashed var(--ink-soft); background: #fff; }
.chip.swap { animation: floatChip 6s ease-in-out infinite; }
@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 920px) {
  .story-step, .story-step.alt {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin: 24px auto;
    max-width: 620px;
  }
  .story-copy { text-align: center; width: 100%; }
  .story-copy .chip { margin-inline: auto; }
}

/* Align all steps with image left, text right on desktop */
@media (min-width: 921px) {
  .story-step,
  .story-step.alt { grid-template-columns: clamp(340px, 38vw, 480px) 1fr; margin-inline: auto; }
  .story-figure { min-height: clamp(220px, 28vw, 300px); grid-column: 1; }
  .story-copy { max-width: 680px; grid-column: 2; }
}

/* Invitation page styles */
.invite-content {
  margin-top: 24px;
}

.invite-state {
  text-align: center;
  padding: 32px 24px;
  background: var(--panel);
  border: 1px solid var(--ink-soft);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(49, 30, 117, 0.08);
}

.invite-state.hidden {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink-soft);
  border-top: 3px solid var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-icon,
.error-icon,
.no-code-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.invite-state h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 12px;
  color: var(--ink);
}

.invite-state p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0 0 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn.secondary {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--ink-soft);
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn.secondary:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
}

.btn.secondary:active {
  transform: translateY(0);
}

/* App redirect styles */
.app-redirect-message {
  font-size: 14px;
  opacity: 0.8;
  margin: 8px 0 16px;
  font-style: italic;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Mobile adjustments for invitation page */
@media (max-width: 920px) {
  .invite-state {
    padding: 24px 16px;
  }
  
  .error-actions,
  .success-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn.secondary {
    width: 100%;
    max-width: 280px;
  }
}


