/* ==========================================================
   MUTUALS — shared styles for every page
   To change a brand colour, edit it once in :root below.
   ========================================================== */

:root {
  /* Brand colours */
  --midnight: #1F0F4D;      /* dark brand colour: hero, dark panels, dark buttons */
  --lilac: #B69CFF;         /* bright brand colour: buttons and fills on dark */
  --on-dark: #F8F8F8;       /* all text on midnight backgrounds */
  --lilac-tint: #ECE6FF;

  /* Secondary colours */
  --yellow: #FFEB69;
  --pink: #FFD7EF;
  --aqua: #A0E1E1;
  --peach: #FFC091;

  /* Neutrals */
  --page: #F5F4F8;          /* page background */
  --white: #FFFFFF;
  --ink: #1F0F4D;           /* main text on light backgrounds */
  --muted: #57536A;         /* secondary text */
  --line: #D9D5E4;          /* borders */
  --soft: #ECE9F3;          /* light fills */
  --good-bg: #DDF3E6;
  --good: #1E6B40;
  --error-bg: #FCE3E1;
  --error: #8A1F1B;

  /* Fonts */
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --max: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --section-gap: clamp(64px, 9vw, 120px);

  box-sizing: border-box;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid #6A4BE0; outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; } }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; }
.section { padding: var(--section-gap) var(--gutter) 0; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.row > * { flex: 1 1 420px; min-width: 0; }

/* ---------- Type ---------- */
.h1, .h2, .h3 { font-family: var(--display); font-weight: 700; margin: 0; }
.h1 { font-size: clamp(46px, 7.2vw, 104px); line-height: 0.98; letter-spacing: -0.045em; }
.h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; max-width: 18ch; }
.h3 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.05; letter-spacing: -0.035em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); max-width: 36ch; margin: 24px 0 0; }
.muted { color: var(--muted); }
.kicker { font-weight: 700; font-size: 15px; color: var(--muted); margin: 0 0 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 14px 26px; border-radius: 999px; border: 0;
  font-family: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
}
.btn-lilac { background: var(--lilac); color: var(--midnight); }     /* use on dark backgrounds */
.btn-dark { background: var(--midnight); color: var(--on-dark); }    /* use on light backgrounds */
.btn-outline-dark { background: transparent; color: var(--on-dark); border: 1.5px solid rgba(182,156,255,0.5); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-small { min-height: 44px; padding: 10px 20px; font-size: 15px; }

/* ---------- Header / hero ---------- */
.hero { background: var(--midnight); color: var(--on-dark); padding: 24px var(--gutter) clamp(64px, 9vw, 120px); overflow: hidden; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; }
.hero .brand, .panel-dark .brand { color: var(--on-dark); }
.nav-links { display: flex; gap: 28px; font-weight: 600; font-size: 15px; }
.nav-links a { color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover { text-decoration: underline; }
@media (max-width: 820px) { .nav-links { display: none; } }

.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 80px); margin-top: clamp(48px, 8vw, 96px); }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.badge-dark { display: inline-flex; border: 1.5px solid rgba(182,156,255,0.45); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; margin: 0 0 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.note-dark { margin: 18px 0 0; font-size: 14px; }

/* Floating app cards in the hero */
.stage { flex: 1 1 400px; position: relative; height: 440px; min-width: 300px; max-width: 520px; }
.fc { position: absolute; border-radius: 26px; padding: 18px 20px; color: var(--midnight); box-shadow: 0 24px 56px rgba(0,0,0,0.3); display: flex; flex-direction: column; gap: 8px; animation: float 6s ease-in-out infinite; }
.fc-pot { left: 0; top: 10px; width: 76%; background: var(--white); rotate: -4deg; }
.fc-goal { right: 0; top: -22px; background: var(--aqua); border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 14px; rotate: 6deg; animation-delay: -3s; }
.fc-swap { right: 0; top: 210px; width: 58%; background: var(--yellow); rotate: 4deg; animation-delay: -2s; }
.fc-turn { left: 6%; bottom: 0; width: 46%; background: var(--pink); rotate: -3deg; animation-delay: -1s; }
.fc-num { font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: -0.03em; line-height: 1; }
@keyframes float { 50% { translate: 0 -10px; } }

/* Avatars and bars */
.avatars { display: flex; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--white); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--midnight); }
.avatar + .avatar { margin-left: -9px; }
.bar { height: 12px; border-radius: 999px; background: var(--soft); display: flex; overflow: hidden; }
.bar span { height: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.mode-card { border-radius: 32px; padding: clamp(26px, 3.4vw, 44px); display: flex; flex-direction: column; gap: 18px; color: var(--midnight); }
.mode-card.pots { background: var(--lilac); }
.mode-card.turns { background: var(--yellow); }
.tag-dark { align-self: flex-start; background: var(--midnight); color: var(--on-dark); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip { background: rgba(31,15,77,0.1); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }

/* Steps (numbered because they are a real sequence) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: var(--midnight); }
.step-num.pots { background: var(--lilac); }
.step-num.turns { background: var(--yellow); }
.step strong { font-size: 18px; }
.step span { color: var(--muted); font-size: 15px; }

/* Dark panels (swaps section, examples) */
.panel-dark { background: var(--midnight); color: var(--on-dark); border-radius: 40px; padding: clamp(32px, 5vw, 72px); }
.panel-dark .h2 { color: var(--on-dark); }

/* ---------- FAQ ---------- */
.faq { max-width: 960px; margin: 0 auto; }
.faq details { background: var(--white); border-radius: 22px; padding: 22px 26px; margin-bottom: 10px; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 18px; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; line-height: 1; transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { padding: 0 var(--gutter) 48px; }
.footer-inner { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.footer .brand { font-size: 18px; color: var(--ink); }

/* ---------- Forms (join page) ---------- */
.split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.split > .panel-dark { flex: 1 1 440px; border-radius: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.split > .form-side { flex: 1 1 540px; padding: clamp(28px, 5vw, 72px); display: flex; justify-content: center; align-items: center; }
@media (min-width: 1000px) { .split > .panel-dark { position: sticky; top: 0; height: 100vh; } }

.join-head .h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.join-head p { margin: 20px 0 0; font-size: 19px; max-width: 32ch; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.perks li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.perks svg { flex: none; margin-top: 2px; }
.perks strong { display: block; }

.form-card { width: 100%; max-width: 520px; background: var(--white); border-radius: 32px; padding: clamp(24px, 3.4vw, 40px); display: flex; flex-direction: column; gap: 20px; box-shadow: 0 1px 0 var(--line); }
.form-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -0.035em; line-height: 1.1; }
.form-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.label .opt { font-weight: 500; color: var(--muted); }
.input { font-family: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); color: var(--ink); background: var(--white); min-height: 52px; width: 100%; }
.input:hover { border-color: #BDB6CF; }
.input:focus { border-color: #6A4BE0; outline: none; box-shadow: 0 0 0 4px rgba(106,75,224,0.18); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231F0F4D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #6A4BE0; flex: none; }
.checks { display: flex; flex-direction: column; gap: 12px; }

.optional { background: var(--page); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.optional-title { margin: 0; font-weight: 700; font-size: 16px; }
.optional-title span { font-weight: 500; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 10px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-weight: 600; font-size: 15px; cursor: pointer; }
.pick span:hover { border-color: #BDB6CF; }
.pick input:checked + span { background: var(--lilac); border-color: var(--midnight); }
.pick input:focus-visible + span { outline: 3px solid #6A4BE0; outline-offset: 2px; }
.fine { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

@media (max-width: 999px) {
  .split > .panel-dark { gap: 20px; padding: 24px 20px 64px; }
  .perks { display: none; }
  .join-head .h1 { font-size: 36px; }
  .join-head p { font-size: 16px; margin-top: 12px; }
  .split > .form-side { padding: 0 12px 40px; margin-top: -40px; }
}

/* ---------- Waitlist confirmation ---------- */
.form-error { margin: 0; background: var(--error-bg); color: var(--error); border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 600; }
.btn:disabled { opacity: 0.7; cursor: progress; }
.confirm { gap: 22px; }
.confirm:focus { outline: none; }
.confirm-hero { background: var(--midnight); color: var(--on-dark); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.confirm-hero p { margin: 0; font-size: 17px; }
.confirm-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--lilac); color: var(--midnight); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.confirm-title { margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.04em; line-height: 1.05; }
.confirm-group { display: flex; flex-direction: column; gap: 10px; }
.confirm-group h3 { margin: 0; font-size: 20px; }
.confirm-group p { margin: 0; }
.group-tip { background: var(--page); border-radius: 14px; padding: 12px 16px; }
.confirm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-chips span { flex: 1 1 140px; border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 14px; color: var(--midnight); }
[hidden] { display: none !important; }

/* ---------- Phone and tablet adjustments ---------- */
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

@media (max-width: 640px) {
  .cta-row .btn { flex: 1 1 100%; }
  .nav .btn-small { padding: 10px 16px; font-size: 14px; }

  /* Hero card collage: tidier stack on phones */
  .stage { height: 450px; min-width: 0; flex-basis: 100%; }
  .fc-pot { width: 88%; top: 40px; }
  .fc-goal { top: 0; right: 0; }
  .fc-swap { top: 205px; width: 60%; }
  .fc-turn { left: 0; bottom: 0; width: 50%; }
  .fc-num { font-size: 28px; }

  /* Step cards: number on the left, text on the right */
  .steps { gap: 10px; }
  .card.step { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 2px; padding: 18px 20px; }
  .card.step .step-num { grid-row: span 2; }
  .card { padding: 20px; }
  .mode-card { border-radius: 26px; }
  .panel-dark { border-radius: 28px; }
  .faq details { padding: 18px 20px; }
  .faq summary { font-size: 16px; }
}
@media (max-width: 360px) {
  .h1 { font-size: 40px; }
  .h2 { font-size: 30px; }
  .brand { font-size: 19px; }
}

/* ---------- Simple text pages (privacy) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(24px, 5vw, 72px) var(--gutter); display: flex; flex-direction: column; gap: 24px; }
.doc h2 { margin: 0; font-size: 22px; }
.doc p { margin: 0; }
.draft-note { background: var(--yellow); border-radius: 20px; padding: 16px 20px; font-size: 15px; font-weight: 600; }
