/* ============================================================
   VELORA — Mediterranean Curly Hair Research Study
   Warm editorial beauty-brand aesthetic.
   ============================================================ */

:root {
  --ink: #2b211c;
  --ink-soft: #6a5c53;
  --ink-faint: #9a8b80;
  --cream: #f7f1e9;
  --cream-2: #efe5d8;
  --paper: #fffcf7;
  --terracotta: #c06a4d;
  --terracotta-dk: #a5573d;
  --olive: #7c7a4f;
  --gold: #c99a4a;
  --line: #e4d7c6;
  --line-2: #d9c8b3;
  --shadow: 0 18px 50px -28px rgba(70, 45, 30, .45);
  --shadow-sm: 0 8px 24px -18px rgba(70, 45, 30, .5);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maxw: 940px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(201,154,74,.10), transparent 60%),
    radial-gradient(1000px 700px at -10% 110%, rgba(192,106,77,.10), transparent 55%),
    var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- screen switching ---------- */
.screen { display: none; }
.screen.is-active { display: block; }

/* ---------- brand ---------- */
.brand {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand--sm { font-size: 1.05rem; letter-spacing: .28em; background: none; border: 0; cursor: pointer; padding: 0; }
.brand--md { font-size: 1.4rem; letter-spacing: .3em; color: var(--terracotta); display: inline-block; margin-top: 26px; }

/* ============================================================
   LANDING
   ============================================================ */
.landing-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 22px 60px;
}
.brand-row { position: relative; text-align: center; padding: 14px 0 8px; }
.brand-row .brand { font-size: 1.5rem; letter-spacing: .34em; }
.account-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.account-btn:hover { color: var(--terracotta); border-color: var(--terracotta); transform: translateY(-50%) scale(1.06); }

.hero { text-align: center; padding: 26px 6px 8px; }
.eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 auto;
  max-width: 22ch;
  color: var(--ink);
}
.hero-sub {
  margin: 16px auto 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* status band: spots + countdown */
.status-band {
  margin: 30px auto 12px;
  max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.status-item {
  flex: 1;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.status-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--terracotta);
  font-weight: 500;
}
.status-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.status-label--top { margin-bottom: 8px; }
.status-divider { width: 1px; background: var(--line); }
.countdown { gap: 0; }
.clock { display: flex; gap: 10px; }
.clock-unit { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
.clock-unit b { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--ink); line-height: 1; }
.clock-unit i { font-style: normal; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 5px; }

.limited-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  margin: 8px 0 0;
}
.time-note {
  text-align: center;
  color: var(--ink-faint);
  font-size: .86rem;
  font-weight: 500;
  margin: 6px 0 0;
}
.time-note-ico { color: var(--terracotta); }
.start-time-note {
  margin: -12px 0 22px;
  color: var(--ink-faint);
  font-size: .88rem;
  font-weight: 500;
}
.start-time-note span[aria-hidden] { color: var(--terracotta); }

/* founding-100 section (boxless, centered) */
.founding {
  margin: 40px auto 0;
  max-width: 56ch;
  text-align: center;
  padding: 0 8px;
}
.founding-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--terracotta-dk);
  margin: 0 0 12px;
}
.founding-body {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

/* info cards */
.cards {
  margin: 46px auto 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  margin: 0 0 10px;
  color: var(--terracotta-dk);
}
.card p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.card--reward { border-color: var(--line-2); background: linear-gradient(180deg, #fff8ee, var(--paper)); }
.card--reward h2 { color: var(--olive); }

/* start / language block */
.start-block {
  margin: 44px auto 0;
  max-width: 620px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 28px;
}
.start-block .eyebrow { margin-bottom: 8px; }
.start-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  color: var(--ink);
  margin: 0 0 8px;
}
.start-sub {
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0 0 22px;
}
.lang-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.btn-lang {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--ink);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius);
  padding: 18px 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn-lang:hover { transform: translateY(-3px); background: var(--terracotta-dk); }
.btn-lang:active { transform: translateY(0); }
.btn-lang .flag { font-size: 1.9rem; line-height: 1; filter: saturate(1.1); }
.btn-lang-text { display: flex; flex-direction: column; }
.btn-lang-text b { font-size: 1.08rem; font-weight: 600; }
.btn-lang-text small { font-size: .78rem; opacity: .75; }

.landing-foot {
  text-align: center;
  margin-top: 54px;
  color: var(--ink-faint);
  font-size: .8rem;
  letter-spacing: .04em;
}

/* ============================================================
   QUESTIONNAIRE
   ============================================================ */
.survey-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247,241,233,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.survey-top-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lang-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.lang-toggle button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-weight: 600; font-size: .74rem; letter-spacing: .06em;
  padding: 6px 14px; cursor: pointer;
}
.lang-toggle button.active { background: var(--ink); color: var(--cream); }

.progress { max-width: 720px; margin: 0 auto; height: 4px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--terracotta)); border-radius: 999px; transition: width .4s ease; }
.progress-meta {
  max-width: 720px; margin: 0 auto; padding: 7px 20px 12px;
  display: flex; justify-content: space-between;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}

.survey-form { max-width: 720px; margin: 0 auto; padding: 14px 20px 90px; }

.step-head { margin: 18px 0 26px; }
.step-kicker { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--terracotta); font-weight: 700; }
.step-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.15rem); margin: 8px 0 10px; line-height: 1.15; }
.step-intro { color: var(--ink-soft); font-size: 1rem; margin: 0; max-width: 60ch; }

/* question block */
.q {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 120px;
}
.q.q--invalid { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(192,106,77,.12); }
.q-label { font-family: var(--serif); font-weight: 500; font-size: 1.14rem; line-height: 1.3; margin: 0 0 4px; color: var(--ink); }
.q-req { color: var(--terracotta); margin-left: 3px; }
.q-help { font-size: .84rem; color: var(--ink-faint); margin: 0 0 14px; }
.q-hint { font-size: .78rem; color: var(--ink-faint); margin: 2px 0 14px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }

/* choice lists (radio / checkbox) */
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.opts.opts--cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 13px 15px; cursor: pointer; background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  font-size: .97rem;
}
.opt:hover { border-color: var(--terracotta); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt .mark {
  flex: 0 0 auto; width: 20px; height: 20px; border: 2px solid var(--line-2);
  display: inline-grid; place-items: center; transition: all .15s ease;
}
.opt .mark--radio { border-radius: 50%; }
.opt .mark--check { border-radius: 6px; }
.opt .mark::after { content: ""; opacity: 0; transition: opacity .15s ease; }
.opt .mark--radio::after { width: 10px; height: 10px; border-radius: 50%; background: var(--cream); }
.opt .mark--check::after { width: 11px; height: 11px; background: var(--cream);
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
  mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); }
.opt.is-checked { border-color: var(--terracotta); background: #fff6ee; box-shadow: inset 0 0 0 1px var(--terracotta); }
.opt.is-checked .mark { background: var(--terracotta); border-color: var(--terracotta); }
.opt.is-checked .mark::after { opacity: 1; }
.opt.is-disabled { opacity: .45; cursor: not-allowed; }

/* grouped multi (wash day) */
.opt-group + .opt-group { margin-top: 20px; }
.opt-group-title { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); font-weight: 700; margin: 0 0 8px; }

.other-field { margin-top: 8px; }
.text-input, .textarea, .select {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.text-input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(192,106,77,.12); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236a5c53' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

/* stars */
.stars { display: inline-flex; gap: 6px; margin-top: 8px; }
.star {
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; padding: 4px;
  color: var(--line-2); transition: color .12s ease, transform .12s ease;
}
.star svg { width: 100%; height: 100%; display: block; }
.star:hover { transform: scale(1.12); }
.star.on { color: var(--gold); }
.star-label { display: block; margin-top: 10px; font-size: .9rem; color: var(--terracotta-dk); font-weight: 600; min-height: 1.2em; }

/* curl type grid */
.curlgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; margin-top: 14px; }
.curl-opt {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff;
  padding: 12px 8px; cursor: pointer; text-align: center; transition: all .15s ease;
}
.curl-opt:hover { border-color: var(--terracotta); }
.curl-opt.is-checked { border-color: var(--terracotta); background: #fff6ee; box-shadow: inset 0 0 0 1px var(--terracotta); }
.curl-swatch { width: 46px; height: 46px; margin: 0 auto 8px; }
.curl-code { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.curl-desc { display: block; font-size: .68rem; color: var(--ink-faint); margin-top: 2px; line-height: 1.25; }

/* rating grid (environment) */
.grid-scale-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin: 10px 2px 4px; }
.grid-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.grid-row:last-child { border-bottom: 0; }
.grid-row-label { font-weight: 600; font-size: .98rem; flex: 1 1 120px; }
.scale { display: inline-flex; gap: 6px; }
.scale-dot {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff;
  font-family: var(--sans); font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .13s ease;
}
.scale-dot:hover { border-color: var(--terracotta); }
.scale-dot.on { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }

/* per-challenge cards */
.pc-block { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 16px; margin-top: 12px; background: #fffdf9; }
.pc-title { font-family: var(--serif); font-size: 1.02rem; color: var(--terracotta-dk); margin: 0 0 12px; }
.pc-sub { font-size: .84rem; color: var(--ink-soft); margin: 0 0 4px; font-weight: 600; }
.pc-sub + .stars { margin-bottom: 14px; }

/* either/or trade-off */
.either { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 14px; }
.either-opt {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; cursor: pointer;
  padding: 22px 16px; text-align: center; font-family: var(--serif); font-size: 1.08rem; color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: all .15s ease; line-height: 1.25;
}
.either-opt:hover { border-color: var(--terracotta); }
.either-opt.is-checked { border-color: var(--terracotta); background: #fff2e8; box-shadow: inset 0 0 0 2px var(--terracotta); color: var(--terracotta-dk); }
.either-or { display: grid; place-items: center; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }

/* consent */
.consent { display: flex; gap: 12px; align-items: flex-start; }

/* nav */
.nav-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 1rem; border-radius: 999px;
  padding: 14px 30px; cursor: pointer; border: 1px solid transparent; transition: all .16s ease;
}
.btn-primary { background: var(--ink); color: var(--cream); box-shadow: var(--shadow); flex: 1; max-width: 260px; margin-left: auto; }
.btn-primary:hover { background: var(--terracotta-dk); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost[hidden] { display: none; }

.form-error {
  background: #fdeee7; border: 1px solid var(--terracotta); color: var(--terracotta-dk);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 18px 0 0; font-size: .92rem; font-weight: 500;
}

/* ============================================================
   END CARDS
   ============================================================ */
#thankyou, #closed { min-height: 100vh; min-height: 100dvh; display: none; place-items: center; padding: 30px; }
#thankyou.is-active, #closed.is-active { display: grid; }
.endcard {
  max-width: 560px; text-align: center; background: var(--paper);
  border: 1px solid var(--line); border-radius: 26px; padding: 54px 40px; box-shadow: var(--shadow);
}
.endcard-mark { font-size: 3rem; margin-bottom: 10px; }
.endcard h1 { font-family: var(--serif); font-weight: 500; font-size: 2.1rem; margin: 0 0 16px; color: var(--terracotta-dk); }
.endcard p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.btn-ig {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 26px 0 4px; padding: 14px 26px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; color: #fff; text-decoration: none;
  background: linear-gradient(90deg, #f09433, #e6683c 30%, #dc2743 60%, #cc2366 80%, #bc1888);
  box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
}
.btn-ig:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -22px rgba(188,24,136,.6); }
.btn-ig:active { transform: translateY(0); }
.ig-glyph { width: 22px; height: 22px; display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .lang-buttons { grid-template-columns: 1fr; }
  .status-band { flex-direction: column; }
  .status-divider { width: auto; height: 1px; }
  .either { grid-template-columns: 1fr; }
  .either-or { padding: 4px 0; }
  .btn-primary { max-width: none; }
  .hero-title { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
