*{box-sizing:border-box}

:root{
  /* Palette taken from the brand logo: deep royal purple + the gold droplet. */
  --ink:#27212f;
  --muted:#766d7e;
  --cream:#f7f1ea;
  --purple:#4b2382;
  --purple2:#7b3fb5;
  --gold:#ffc61a;
  --gold-deep:#e8a800;
  --card:#fffdfb;
  --line:#e3d9e6;
  --danger:#b3261e;
  --radius:28px;
}

body{
  margin:0;
  background:radial-gradient(circle at top,#fffaf5 0,#f7f1ea 48%,#efe7df 100%);
  background-attachment:fixed;
  color:var(--ink);
  font-family:Montserrat,-apple-system,Segoe UI,Arial,sans-serif;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

/* ---------- progress ---------- */
.top-progress{
  position:fixed;left:0;top:0;width:100%;height:4px;
  background:#e6dfe8;z-index:99;
}
.top-progress span{
  display:block;height:100%;width:8%;
  background:linear-gradient(90deg,var(--purple),var(--purple2) 62%,var(--gold));
  transition:width .35s ease;
}

/* ---------- shell + brand ---------- */
.tf-shell{
  width:min(780px,92%);
  margin:0 auto;
  padding:calc(55px + env(safe-area-inset-top,0px)) 0 calc(70px + env(safe-area-inset-bottom,0px));
}
.brand-block{display:flex;gap:20px;align-items:center;margin-bottom:24px}
.brand-logo{width:80px;height:auto;flex:none;filter:drop-shadow(0 6px 16px #4b23821f)}
.brand-text{min-width:0}
.eyebrow{font-size:10px;letter-spacing:2.4px;font-weight:700;color:var(--purple);margin-bottom:4px}
.brand-block h1{font:700 31px/1.12 Cinzel,serif;margin:0;letter-spacing:.3px}
.brand-tag{font-size:12.5px;color:var(--muted);margin:7px 0 0;font-style:italic}

/* ---------- step strip ----------
   The "where am I / how long is this" panel. It sits above the card so the
   whole shape of the form is legible at a glance. */
.step-strip{
  background:rgba(255,253,251,.8);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 18px 13px;
  margin-bottom:16px;
}
.step-strip-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.step-title{font-size:13px;font-weight:700;letter-spacing:.3px;color:var(--purple)}
.step-now{font-size:12px;color:var(--muted);font-weight:500;white-space:nowrap}
.step-now strong{color:var(--ink);font-weight:700}
.step-dots{display:flex;gap:5px;margin:11px 0 9px}
.step-dot{
  flex:1;height:5px;border-radius:99px;background:#e6dce8;
  transition:background .3s;
}
.step-dot.done{background:linear-gradient(90deg,var(--purple),var(--purple2))}
.step-dot.now{background:linear-gradient(90deg,var(--gold-deep),var(--gold))}
.step-foot{font-size:11.5px;color:var(--muted)}

[hidden]{display:none!important}

/* "ONLINE" badge in the title — the single word that tells someone they are on
   the right waitlist, so it is set apart rather than buried in the name. */
.h1-online{
  display:inline-block;vertical-align:.22em;
  font:700 11px/1 Montserrat,sans-serif;letter-spacing:1.6px;text-transform:uppercase;
  color:#fff;background:linear-gradient(135deg,var(--purple),var(--purple2));
  padding:6px 10px;border-radius:8px;margin-left:9px;
}

/* Which programme this is. Set as a tick/cross pair rather than a paragraph so
   the distinction from the Retreat is readable at a glance — this is the note
   that stops someone joining the wrong waitlist. */
.disclaimer{
  margin:0 0 16px;padding:13px 17px 14px;
  border:1px solid #f0e2bf;border-left:4px solid var(--gold-deep);
  border-radius:12px;background:#fffaef;
}
.disclaimer-head{
  display:flex;align-items:center;gap:7px;
  font:700 11px Montserrat,sans-serif;letter-spacing:1.5px;text-transform:uppercase;
  color:#8a6d16;margin-bottom:9px;
}
.dc-icon{
  width:15px;height:15px;border-radius:50%;flex:none;
  background:var(--gold-deep);color:#fff;
  display:grid;place-items:center;font:700 10px/1 Montserrat,sans-serif;
}
.disclaimer-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.disclaimer-list li{
  display:flex;align-items:flex-start;gap:9px;
  font-size:13px;line-height:1.55;color:#5e5240;
}
.disclaimer-list strong{color:#3d3424}
.dc-mark{flex:none;width:17px;height:17px;border-radius:50%;margin-top:1px;
  display:grid;place-items:center;font:700 10px/1 Montserrat,sans-serif;color:#fff}
.dc-yes .dc-mark{background:#2f7d4f}
.dc-no .dc-mark{background:#b3261e}

/* Q07 → "Other" free-text follow-up.
   Needs three classes to outrank `.question-card label[for]`, which otherwise
   styles this as a 28px question heading. */
.other-wrap{margin-top:2px}
.question-card .other-wrap .other-label{
  display:block;margin:0;
  font:600 12.5px/1.4 Montserrat,sans-serif;
  color:var(--muted);letter-spacing:.2px;
}
.other-wrap .tf-input{margin:6px 0 10px;font-size:17px}

/* ---------- cards ----------
   Cards are visible by default so the form still works if JS fails;
   the step-by-step behaviour switches on once app.js adds .js-ready. */
.question-card{
  background:rgba(255,253,251,.94);
  border:1px solid #e9e0e7;
  border-radius:var(--radius);
  padding:42px;
  margin-bottom:22px;
  box-shadow:0 22px 70px #43265712;
  min-height:390px;
}
body.js-ready .question-card{display:none;margin-bottom:0;animation:rise .35s ease}
body.js-ready .question-card.active{display:block}

@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

.q-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:18px;gap:12px}
.q-number{font-size:12px;font-weight:700;letter-spacing:2px;color:var(--purple)}
.q-count{font-size:11px;font-weight:600;letter-spacing:1.5px;color:var(--muted)}

.question-card label[for],
.question-card>label{display:block;font:600 28px/1.35 Montserrat,sans-serif;margin-bottom:10px}
.helper,.long-copy{color:var(--muted);font-size:14px;line-height:1.75}

/* ---------- inputs ---------- */
.tf-input{
  width:100%;border:0;border-bottom:2px solid #d8cfdc;
  background:transparent;border-radius:0;
  padding:15px 4px;font-size:19px;font-family:inherit;color:var(--ink);
  outline:0;transition:border-color .2s;margin:16px 0 10px;
}
/* The underline IS the focus indicator here — a box outline fights the design.
   Colour change plus a faint wash keeps focus obvious without the ring. */
.tf-input:focus,.tf-input:focus-visible{
  outline:none;
  border-color:var(--purple);
  background:#faf6ff;
}
.tf-input.invalid{border-color:var(--danger)}
.tf-input.invalid:focus{background:#fdf5f5}
.tf-input::placeholder{color:#b5abbd}

/* Native selects ignore most styling, so wrap them and draw our own chevron. */
.select-wrap{position:relative;margin:16px 0 10px}
.select-wrap::after{
  content:"";position:absolute;right:10px;top:50%;
  width:10px;height:10px;margin-top:-9px;
  border-right:2px solid var(--purple);border-bottom:2px solid var(--purple);
  transform:rotate(45deg);pointer-events:none;
}
.tf-select{
  margin:0;padding-right:36px;cursor:pointer;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
}
.tf-select:invalid{color:#b5abbd}
.tf-select option{color:var(--ink);font-size:16px}

.tf-textarea{resize:vertical;min-height:110px;border:1px solid #ddd3df;border-radius:15px;padding:14px}

.field-error{
  color:var(--danger);font-size:13px;font-weight:600;
  min-height:0;margin:0 0 6px;opacity:0;transition:opacity .18s;
}
.field-error.show{opacity:1;min-height:20px}

/* ---------- buttons ---------- */
/* Back sits left, Next pinned right — the shape people already expect from a
   wizard, so the way forward reads instantly. margin-left:auto keeps Next on
   the right even on the first card, which has no Back button. */
.nav-row{display:flex;align-items:center;gap:12px;margin-top:28px}
.continue-btn,.submit-btn{
  margin-left:auto;
  border:0;border-radius:14px;
  background:linear-gradient(135deg,var(--purple),var(--purple2));
  color:#fff;padding:16px 30px;font:700 15.5px Montserrat,sans-serif;
  box-shadow:0 10px 26px #4b23823d;cursor:pointer;
  transition:transform .15s,box-shadow .15s,opacity .15s;
}
.continue-btn:hover,.submit-btn:hover{transform:translateY(-1px);box-shadow:0 14px 32px #4b238252}
.continue-btn:active,.submit-btn:active{transform:translateY(0)}
.continue-btn:disabled,.submit-btn:disabled{opacity:.6;cursor:default;transform:none}
.continue-btn span,.submit-btn span{opacity:.7;margin-left:8px}

.back-btn{
  border:1px solid var(--line);border-radius:14px;background:#fff;
  color:var(--muted);padding:15px 22px;font:600 14.5px Montserrat,sans-serif;
  cursor:pointer;transition:border-color .15s,color .15s,background .15s;
}
.back-btn:hover{border-color:var(--purple);color:var(--purple);background:#faf7fd}

.continue-btn:focus-visible,.submit-btn:focus-visible,.back-btn:focus-visible{
  outline:2px solid var(--purple);outline-offset:3px;
}

/* ---------- radio choices ---------- */
.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:25px 0 10px}
.choice{position:relative!important;display:block!important;margin:0!important;font:600 15px Montserrat!important}
.choice input{position:absolute;opacity:0;width:0;height:0}
.choice span{
  display:block;border:1px solid #ddd3df;border-radius:16px;
  padding:18px;text-align:center;cursor:pointer;background:#fff;
  transition:border-color .2s,background .2s,color .2s,box-shadow .2s;
}
.choice span:hover{border-color:#c4b2d4}
.choice input:checked+span{
  border-color:var(--purple);background:#f4eafd;color:var(--purple);
  box-shadow:0 8px 20px #4b23821f;
}
.choice input:focus-visible+span{outline:2px solid var(--purple);outline-offset:3px}

.shake{animation:shake .32s}
@keyframes shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

/* ---------- final review ---------- */
.final-card{min-height:430px}
.final-note h2{font:700 30px Cinzel,serif;margin:0 0 18px}
.final-note p{color:var(--muted);line-height:1.75;font-size:15px}
.signature{font-weight:700;margin-top:25px}

.review-summary{
  margin:26px 0 4px;border:1px solid var(--line);border-radius:18px;
  background:#fffaf6;padding:6px 18px;
}
.review-row{
  display:flex;justify-content:space-between;gap:16px;
  padding:11px 0;border-bottom:1px solid #efe6ef;font-size:14px;
}
.review-row:last-child{border-bottom:0}
.review-k{color:var(--muted);font-weight:500;flex:none}
.review-v{font-weight:600;text-align:right;word-break:break-word}

/* ---------- success ---------- */
.success-screen{
  background:rgba(255,253,251,.96);border:1px solid #e9e0e7;
  border-radius:var(--radius);padding:55px 42px;text-align:center;
  box-shadow:0 22px 70px #43265712;
}
.success-logo{width:88px;height:auto;margin:0 auto 18px;display:block}
.success-icon{
  width:70px;height:70px;border-radius:50%;display:grid;place-items:center;
  margin:0 auto 22px;background:#eee2f8;color:var(--purple);
  font-size:30px;font-weight:700;
}
.success-screen h2{font:700 32px Cinzel,serif}
.success-screen p{color:var(--muted);line-height:1.7}
.alert{margin-bottom:18px}

/* Honeypot — off-screen rather than display:none, which many bots skip. */
.hp-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* ---------- mobile ---------- */
@media(max-width:600px){
  .tf-shell{width:94%;padding:calc(32px + env(safe-area-inset-top,0px)) 0 calc(45px + env(safe-area-inset-bottom,0px))}
  .brand-block{margin-bottom:16px;gap:14px}
  .brand-block h1{font-size:23px}
  .brand-logo{width:58px}
  .brand-tag{font-size:11.5px}
  .h1-online{font-size:9.5px;padding:5px 8px;margin-left:7px;letter-spacing:1.1px;vertical-align:.2em}
  .disclaimer{padding:12px 14px}
  .disclaimer-list li{font-size:12.5px;gap:8px}
  .step-strip{padding:12px 14px 11px;border-radius:15px}
  .step-dots{gap:4px}
  .question-card{padding:27px 22px;border-radius:22px;min-height:400px}
  .question-card>label{font-size:22px}
  /* 16px keeps iOS Safari from zooming in on focus. */
  .tf-input{font-size:17px}
  .choice-grid{grid-template-columns:1fr}
  .long-question{min-height:auto}
  .success-screen{padding:42px 24px}
  /* Keep Back and Next on one row on phones too — Next takes the space it
     needs to stay the obvious action. */
  .nav-row{gap:10px;margin-top:22px}
  .back-btn{flex:none;padding:15px 16px}
  .continue-btn,.submit-btn{flex:1;padding:16px 18px}
  .review-row{flex-direction:column;gap:3px}
  .review-v{text-align:left}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
  .continue-btn:hover,.submit-btn:hover{transform:none}
}
