/* ---- Fonts: self-hosted, no request to Google ---- */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-var.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic-var.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-italic-var.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ---- Base reset ---- */
:root {
  color-scheme: light;
}
body {
  margin: 0;
  padding: 0;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #faf9f5;
  color: #141413;
}
img {
  max-width: 100%;
}
[hidden]:not([hidden="until-found" i]) {
  display: none !important;
}

/* ---- Theme & components ---- */
:root {
  /* dark is the default palette — this brand lives in its shadow material */
  --bg: #15130f;
  --bg-elevated: #1d1a14;
  --ink: #ede6d8;
  --ink-muted: #a79d89;
  --gold: #c89a4c;
  --gold-dim: #6d5527;
  --gold-line: rgba(200, 154, 76, 0.35);
  --focus: #e3c684;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e7e2d4;
    --bg-elevated: #ddd7c4;
    --ink: #201c15;
    --ink-muted: #6e6656;
    --gold: #8c6a2e;
    --gold-dim: #c3ac7c;
    --gold-line: rgba(140, 106, 46, 0.4);
    --focus: #6e4f18;
  }
}

:root[data-theme="light"] {
  --bg: #e7e2d4;
  --bg-elevated: #ddd7c4;
  --ink: #201c15;
  --ink-muted: #6e6656;
  --gold: #8c6a2e;
  --gold-dim: #c3ac7c;
  --gold-line: rgba(140, 106, 46, 0.4);
  --focus: #6e4f18;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px) 24px;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

.page-break {
  page-break-after: always;
}

@media print {
  .hide-on-print {
    display: none;
  }
}

.hidden {
  display: none !important;
}
.block {
  display: block !important;
}
.relative {
  position: relative !important;
}
.focus {
  color: var(--focus) !important;
}

.stage {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(28px, 4vw, 40px);
  position: relative;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: inherit;
}

.mark {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0;
  animation: rise 0.9s ease forwards;
}

.arc-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: -18px;
}

.arc-wrap svg {
  width: 220px;
  height: 110px;
  overflow: visible;
}

.arc-wrap path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.6s 0.4s cubic-bezier(0.3, 0.8, 0.3, 1) forwards;
}

h1 {
  font-family: "Cormorant Garamond", serif;
  font-optical-sizing: auto;
  font-weight: 460;
  font-style: normal;
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  opacity: 0;
  animation: rise 0.9s 0.15s ease forwards;
}

.sub {
  font-family: "Cormorant Garamond", serif;
  /* font-style: italic; */
  font-weight: 420;
  font-size: clamp(18px, 2.4vw, 19px);
  line-height: 1.6;
  color: var(--gold);
  max-width: 46ch;
  margin: 0;
  opacity: 0;
  animation: rise 0.9s 0.35s ease forwards;
}

.desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 0;
  opacity: 0;
  animation: rise 0.9s 0.5s ease forwards;
}

.divider {
  width: 100%;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: rise 0.9s 0.62s ease forwards;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-line);
}
.divider span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.fine {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 38ch;
  margin: 0;
  opacity: 0;
  animation: rise 0.9s 0.72s ease forwards;
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: rise 0.9s 0.86s ease forwards;
}

button.start {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--bg);
  background: var(--gold);
  border: none;
  border-radius: 2px;
  padding: 16px 46px;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}
button.start:hover {
  background: var(--focus);
  transform: translateY(-1px);
}
button.start:active {
  transform: translateY(0);
}
button.start:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button.start:disabled,
button.start:disabled:hover {
  opacity: 0.35;
  cursor: default;
  background: var(--gold);
  transform: none;
  box-shadow: none;
}

/* Phase 1: one Continue under the options, enabled once an answer is picked */
.q-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.no-email {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.no-email strong {
  color: var(--ink);
  font-weight: 600;
}

/* screens beyond the landing view — hidden until reached */
.screen {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.screen.show {
  display: flex;
  animation: rise 0.6s ease forwards;
}

.progress {
  display: flex;
  gap: 6px;
}
.progress i {
  width: 20px;
  height: 2px;
  background: var(--gold-line);
  border-radius: 2px;
}
.progress i.done {
  background: var(--gold);
}

.q-tag {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.q-heading {
  font-family: "Cormorant Garamond", serif;
  font-weight: 460;
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.3;
  max-width: 32ch;
  margin: 0;
  text-wrap: balance;
}

.options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt {
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  padding: 18px 20px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
.opt:hover {
  border-color: var(--gold);
  transform: translateX(2px);
}
.opt:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.opt.with-continue.chosen {
  padding-bottom: 36px;
}
.opt.chosen {
  border-color: var(--gold);
  background: var(--bg-elevated);
}
.opt.chosen .opt-head {
  color: var(--gold);
}
.opt[disabled] {
  cursor: default;
}
.opt.fade {
  opacity: 0.32;
  transform: none;
}
.opt.hidden {
  display: none;
}

.opt-head {
  font-family: "Cormorant Garamond", serif;
  font-weight: 560;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
}
.opt-desc {
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.opt-confirm {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--gold);
  background: var(--gold-line);
  padding: 5px;
  border-radius: 3px;
  cursor: pointer;
  position: absolute;
  right: 6px;
  bottom: 6px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  display: none;
}
.opt-confirm:hover {
  background: var(--gold-dim);
  transform: translateY(-1px);
}
.opt.chosen .opt-confirm {
  display: block;
}
.opt.chosen .opt-confirm.hidden {
  display: none;
}

.insight-block {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}
.insight-block.show {
  display: flex;
  animation: rise 0.5s ease forwards;
}

.insight {
  font-family: "Cormorant Garamond", serif;
  /* font-style: italic; */
  font-weight: 420;
  font-size: clamp(18px, 2.6vw, 20px);
  line-height: 1.6;
  color: var(--gold);
  max-width: 40ch;
  margin: 0;
}

.end p {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 460;
  line-height: 1.4;
  max-width: 30ch;
  color: var(--ink);
  margin: 0;
}
.end span.note {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Phase 1 result screen */
.result-archetype {
  font-family: "Cormorant Garamond", serif;
  font-weight: 560;
  font-size: clamp(28px, 4.6vw, 42px);
  color: var(--gold);
  margin: 0;
}
.result-insight {
  font-family: "Cormorant Garamond", serif;
  font-weight: 420;
  font-size: clamp(20px, 2.5vw, 22px);
  line-height: 1.75;
  max-width: 48ch;
  color: var(--ink);
  margin: 0;
}
.full-result-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}
.match-tag {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: -12px;
}
.match-line {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 0;
}
.artwork-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 30px 26px;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-line);
  border-radius: 4px;
}
.artwork-frame {
  width: 268px;
  height: 268px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(
    155deg,
    rgba(200, 154, 76, 0.18),
    rgba(200, 154, 76, 0.03)
  );
  position: relative;
  flex-shrink: 0;
  padding: 12px;
}
.artwork-frame::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-line);
}
.artwork-image {
  /* padding: 12px; */
}
.artwork-title {
  font-family: "Cormorant Garamond", serif;
  /* font-style: italic; */
  font-weight: 500;
  font-size: 19px;
  color: var(--gold);
}
.artwork-why {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 40ch;
  margin: 0;
}
.artwork-link {
  font-size: 12px;
  color: var(--gold);
}
.artwork-link:hover {
  color: var(--ink-muted);
}
.talisman-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 44ch;
}
.talisman-intro,
.talisman-body {
  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin: 0;
}
.talisman-question {
  font-family: "Cormorant Garamond", serif;
  /* font-style: italic; */
  font-weight: 460;
  font-size: 22px;
  line-height: 1.5;
  color: var(--gold);
  margin: 0;
}
.talisman-line {
  font-family: "Cormorant Garamond", serif;
  /* font-style: italic; */
  font-weight: 500;
  font-size: 21px;
  color: var(--ink);
  margin: 4px 0 0;
}

/* Phase 1 result → Phase 2 bridge */
.phase2-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-top: 18px;
}
.phase2-bridge .divider {
  margin-bottom: 14px;
}
.phase2-lead {
  font-family: "Cormorant Garamond", serif;
  font-weight: 460;
  font-size: clamp(19px, 2.4vw, 21px);
  line-height: 1.55;
  max-width: 38ch;
  color: var(--ink);
  margin: 0;
}
.phase2-bridge .cta-block {
  margin-top: 6px;
}

/* Phase 2 */
.p2-text {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 46ch;
  margin: 0;
}

.p2-text.specific {
  color: var(--gold);
}

.p2-note {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 0;
}
.nudge-text {
  /* font-family: "Cormorant Garamond", serif; */
  font-weight: 400;
  font-size: clamp(14px, 2.4vw, 15px);
  line-height: 1.8;
  color: var(--gold);
  max-width: 56ch;
  margin: 0;
}
#phase2Q1Nudge .nudge-head {
  font-size: clamp(24px, 3.6vw, 30px);
}
.nudge-text.focus {
  color: var(--focus);
}
.opt.tap {
  text-align: center;
  align-items: center;
}
.opt.tap .opt-head {
  text-align: center;
}
#p2q2Opts,
#p2RevealOpts {
  flex-direction: row;
}
#p2q2Opts .opt,
#p2RevealOpts .opt {
  flex: 1;
}

.p2-textarea {
  width: 100%;
  min-height: 96px;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
}
.p2-textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.p2-textarea::placeholder {
  color: var(--ink-muted);
  opacity: 0.7;
}

.curiosity {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 28px;
  border-radius: 3px;
  margin-top: 25px;
  margin-bottom: 25px;
  position: relative;
}
.curiosity.dark {
  background: var(--gold-line);
}

#p2ParallelBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.closer-look {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding-top: 6px;
}

.email-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}
.email-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  padding: 14px 16px;
}
.email-input::placeholder {
  color: var(--ink-muted);
  opacity: 0.7;
}
.email-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* ---- Email form: results only / results + newsletter ---- */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.choice:hover {
  border-color: var(--gold);
}
.choice:has(input:checked) {
  border-color: var(--gold);
}
/* The real radio stays in place for keyboards and screen readers. */
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.choice-mark {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.choice-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.choice input:checked + .choice-mark::after {
  transform: scale(1);
}
.choice input:focus-visible + .choice-mark {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.choice-text {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.choice input:checked ~ .choice-text {
  color: var(--ink);
}
.privacy-note {
  text-align: center;
  margin: 0;
}
.email-input[aria-invalid="true"] {
  border-color: var(--gold);
  outline: 1px solid var(--gold);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark,
  h1,
  .sub,
  .desc,
  .divider,
  .fine,
  .cta-block,
  .screen,
  .insight-block {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .arc-wrap path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}


/* ---- Consent banner (js/consent.js), in the quiz's own colours ---- */
.consent {
  position: fixed; z-index: 90; left: 24px; bottom: 24px; max-width: 420px;
  background: var(--bg-elevated); color: var(--ink);
  border: 1px solid var(--gold-line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.consent.on { opacity: 1; transform: none; }
.consent-in { padding: 26px 26px 22px; }
.consent-t { margin: 0 0 10px; font-family: "Cormorant Garamond", serif; font-size: 23px; line-height: 1.2; color: var(--gold); }
.consent-p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ink-muted); }
.consent-p a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.consent-state { margin: 12px 0 0; font-size: 12px; color: var(--gold); }
.consent-b { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.consent-b button {
  padding: 12px 10px; background: transparent; border: 1px solid var(--gold-line); color: var(--gold);
  font: 400 11px/1 "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.consent-b button:hover, .consent-b button:focus-visible { background: var(--gold); color: var(--bg); outline: none; }
@media (max-width: 560px) { .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

.legal-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 56px;
  font-size: 11px; letter-spacing: 0.08em; color: var(--ink-muted); opacity: 0.75;
}
.legal-foot a, .legal-foot button { color: inherit; text-decoration: none; }
.legal-foot a:hover, .legal-foot .cookie-link:hover { text-decoration: underline; }
.cookie-link { padding: 0; background: none; border: 0; font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }

/* ---- Price under each match, and the ways out of the quiz ---- */
.artwork-price { margin: 6px 0 0; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-muted); }
.exits { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 28px 0 0; font-size: 12px; letter-spacing: 0.06em; }
.exits a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-line); padding-bottom: 2px; }
.exits a:hover { color: var(--ink); }
