/* In Bloom application funnel — Signature look.
   Tokens sampled from inbloomsignature.co.uk + 2020 brand guidelines (locked).
   Type encodes voice: Poppins for what you read, the brand serif for what is
   spoken aloud (the audition script) and hand-signed (Lauren's sign-off). */

/* ---- Local Poppins (OFL) — page makes zero external requests ---- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/poppins-700.woff2") format("woff2");
}

:root {
  --paper: #FEFCF6;        /* page background (Signature cream) */
  --panel: #F1EAE7;        /* card/section panel (soft blush-cream) */
  --ink: #302B23;          /* body text (warm near-black) */
  --taupe: #695F4F;        /* headline taupe */
  --taupe-deep: #534630;   /* sub-headline / emphasis */
  --blush: #E6C7C4;        /* brand primary — accents, focus rings, progress */
  --blush-deep: #D9AFAB;   /* derived blush shade for decorative glyphs on panel */
  --gold: #C9A24D;         /* sparing highlight — decorative rules only (2.3:1, never text) */
  --ok: #3A7D44;
  --err: #B3261E;
  --line: #E5DCD0;         /* warm hairline borders */
  --radius-card: 12px;     /* cards + media corners */
  --radius-pill: 999px;    /* all buttons are pills */
  --serif: "Big Caslon", "Palatino", Georgia, serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-soft: 0 10px 28px -20px rgba(48, 43, 35, 0.35);
}

* { box-sizing: border-box; margin: 0; }
html, body { overflow-x: hidden; }
body {
  font: 400 17px/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; }
::selection { background: var(--blush); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blush); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 22px 88px; }

/* ---- Persistent header: logo centred at top throughout ---- */
.site-head { padding: 30px 0 22px; }
.logo { width: 104px; display: block; margin: 0 auto; }

/* ---- Wizard steps ---- */
section[data-step][hidden] { display: none; }
.step { display: flex; flex-direction: column; gap: 22px; }

h1 {
  font-size: clamp(1.75rem, 1.15rem + 2.7vw, 2.5rem);
  line-height: 1.26;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--taupe);
}
h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.7vw, 1.9rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--taupe);
}
p { line-height: 1.65; }
strong { color: var(--taupe-deep); }

/* ---- Slim "Step X of 4" progress line ---- */
.progress { display: flex; flex-direction: column; gap: 9px; margin-bottom: 6px; }
.progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
}
.progress-track {
  display: block;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(105, 95, 79, 0.14);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--blush);
  transform-origin: left center;
}
.p1 .progress-fill { width: 25%; }
.p2 .progress-fill { width: 50%; }
.p3 .progress-fill { width: 75%; }
.p4 .progress-fill { width: 100%; }

/* ---- Welcome video: 16:9 media frame, Loom-ready, placeholder for now ---- */
#welcome-video {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  background: var(--panel);
  border-radius: var(--radius-card);
  overflow: hidden;
}
#welcome-video:empty { display: none; }
#welcome-video iframe,
#welcome-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.wv-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
}
.wv-glyph { width: 42px; height: 42px; fill: var(--taupe); opacity: 0.5; }
.wv-ph p { font-size: 0.92rem; font-weight: 600; color: var(--taupe); }

/* ---- Copy blocks ---- */
.pay-block {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  line-height: 1.9;
  box-shadow: var(--shadow-soft);
}
.pay-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.gdpr { font-size: 0.85rem; color: var(--taupe); }

/* ---- Buttons: primary = deep ink pill, subtle hover lift ---- */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(48, 43, 35, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(48, 43, 35, 0.45); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 6px -2px rgba(48, 43, 35, 0.35); }
.btn:disabled {
  background: var(--panel);
  color: var(--taupe);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* secondary / back = quiet taupe text links */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  background: none;
  border: none;
  color: var(--taupe);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-link:hover { color: var(--taupe-deep); }

.step-actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 10px; }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; font-size: 0.95rem; color: var(--taupe-deep); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--taupe);
  box-shadow: 0 0 0 4px var(--blush);
}

.field-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  min-height: 48px;
  padding: 6px 0;
}
.field-checkbox input[type="checkbox"] {
  width: 23px;
  height: 23px;
  margin-top: 2px;
  accent-color: var(--taupe-deep);
  flex-shrink: 0;
}

.field-file input[type="file"] { max-width: 100%; min-height: 48px; color: var(--taupe); font-size: 0.92rem; }
.field-file input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--taupe-deep);
  background: #fff;
  border: 1.5px solid var(--taupe);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  margin-right: 14px;
  cursor: pointer;
}

.field-error { color: var(--err); font-size: 0.9rem; }

/* ---- Audition script card: the brand serif speaks ---- */
.script-card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: 58px 26px 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.85;
}
.script-card::before {
  content: "\201C";
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: var(--serif);
  font-style: normal;
  font-size: 4.75rem;
  line-height: 1;
  color: var(--blush-deep);
}

/* ---- In-browser recorder (rec-whyme / rec-script mounts) ---- */
.rec {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: 20px 20px 22px;
}
.rec-modes { display: flex; gap: 22px; }
.rec-modes label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--taupe-deep);
  cursor: pointer;
}
.rec-modes input[type="radio"] {
  width: 21px;
  height: 21px;
  accent-color: var(--taupe-deep);
}

.rec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--blush);
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 1px 2px rgba(48, 43, 35, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rec-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(48, 43, 35, 0.4); }
.rec-btn:active { transform: translateY(0); }

.rec-timer {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--taupe-deep);
  font-variant-numeric: tabular-nums;
}

.rec-preview video { border-radius: 10px; display: block; }
.rec-preview audio { width: 100%; }

.rec-again {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--taupe);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--taupe-deep);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}
.rec-again:hover { background: rgba(255, 255, 255, 0.55); }

.rec-fallback { font-size: 0.9rem; color: var(--taupe); }
.linklike {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: var(--taupe-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.up-status { font-size: 0.92rem; font-weight: 600; color: var(--taupe-deep); }
.up-status a { color: var(--taupe-deep); }
.rec-err { color: var(--err); font-size: 0.9rem; }

/* JS toggles [hidden] on .rec-btn/.rec-modes/.rec-again; their explicit
   `display` above ties [hidden]'s UA-stylesheet display:none at equal
   specificity, so author CSS would win and show them anyway — force it back. */
.rec-btn[hidden], .rec-modes[hidden], .rec-again[hidden] { display: none; }

/* ---- Thanks (step 5): serif sign-off + Lauren's hand ---- */
.step[data-step="5"] { text-align: center; padding-top: 6vh; gap: 10px; }
.step[data-step="5"] p {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--taupe-deep);
  max-width: 30em;
  margin: 0 auto;
}
.signature {
  width: 180px;
  display: block;
  margin: 4px auto 0;
  mix-blend-mode: multiply; /* knock any white scan background into the cream */
}

/* ---- Entry motion: one orchestrated moment per step ---- */
@media (prefers-reduced-motion: no-preference) {
  .step:not([hidden]) { animation: step-in 0.45s ease-out both; }
  .step:not([hidden]) .progress-fill { animation: fill-grow 0.8s 0.1s cubic-bezier(0.22, 0.7, 0.3, 1) both; }
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fill-grow {
  from { transform: scaleX(0.55); }
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .rec-btn { transition: none; }
  .btn:hover, .rec-btn:hover { transform: none; }
}

/* ---- Small screens up ---- */
@media (min-width: 480px) {
  .step-actions { flex-direction: row-reverse; justify-content: flex-start; gap: 16px; }
  .step-actions .btn { width: auto; flex: 1 1 auto; }
  .step-actions .btn-link { flex: 0 0 auto; }
}

/* ---- Desktop: more air, larger measure ---- */
@media (min-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding-bottom: 120px; }
  .site-head { padding: 48px 0 40px; }
  .logo { width: 134px; }
  .step { gap: 26px; }
  .pay-block { padding: 28px 32px; }
  .script-card { padding: 64px 34px 32px; }
  .rec { padding: 24px 24px 26px; }
}
