:root {
  --ink: #0a0a0a;
  --paper: #fffaf0;
  --paper-deep: #f6eddd;
  --orange: #f47c20;
  --gold: #d8b46e;
  --muted: #686158;
  --line: #d9cfbd;
  --white: #fffdf8;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--ink);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }

.experience {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(360px, 43%) 1fr;
  background: var(--paper);
}

.photo-panel {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #151515;
}

.photo-panel img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center center;
  transition: opacity .28s ease, transform .5s ease;
  z-index: 1;
}

.photo-backdrop {
  position: absolute;
  inset: -28px;
  background: center / cover no-repeat;
  filter: blur(20px) brightness(.58) saturate(.9);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .25s ease;
}

.photo-panel.contain { background: #3b1018; }
.photo-panel.contain .photo-backdrop { opacity: 0; }
.photo-panel.contain img { object-fit: contain; }

.photo-panel img.changing { opacity: 0; transform: scale(1.012); }

.photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(0,0,0,.68));
  pointer-events: none;
  z-index: 2;
}

.photo-caption {
  position: absolute;
  left: clamp(24px, 4vw, 64px);
  right: clamp(24px, 4vw, 64px);
  bottom: 42px;
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  line-height: 1.12;
  text-wrap: balance;
  z-index: 3;
}

.form-panel {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 30px clamp(32px, 6vw, 92px) 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(216,180,110,.13), transparent 32%),
    var(--paper);
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.wordmark { width: 210px; height: auto; display: block; }

.draft-label {
  font-size: .69rem;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 800;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px 8px;
}

.progress { height: 3px; background: #e7dece; margin-top: 24px; overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .32s ease; }

.question-shell {
  width: min(100%, 720px);
  margin: auto 0;
  padding: 38px 0 26px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.question-shell.swap { animation: arrive .24s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  color: var(--orange);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4.3vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: .99;
  text-wrap: balance;
}

.intro {
  max-width: 58ch;
  margin: 24px 0 0;
  color: #443f38;
  font-size: clamp(1.04rem, 1.4vw, 1.22rem);
  line-height: 1.58;
}

.answer-area { margin-top: 30px; display: grid; gap: 12px; }

.text-input, .text-area {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #b8ad99;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 2px 12px;
  font-size: 1.24rem;
  outline: none;
}
.text-area { min-height: 132px; resize: vertical; line-height: 1.5; border: 1px solid var(--line); padding: 16px; background: rgba(255,255,255,.46); }
.text-input:focus, .text-area:focus { border-color: var(--orange); }
.text-input::placeholder, .text-area::placeholder { color: #938a7b; }

.file-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 17px 19px;
  border: 1px dashed #a99d89;
  background: rgba(255,255,255,.48);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-picker:hover { border-color: var(--orange); background: #fff2df; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker strong, .file-picker small { display: block; }
.file-picker strong { font-size: 1rem; }
.file-picker small { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.file-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--orange); font-size: 1.35rem; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.choices.one-column { grid-template-columns: 1fr; }

.choice {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.choice:hover { border-color: #a69b88; transform: translateY(-1px); }
.choice.selected { border-color: var(--orange); background: #fff2df; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark {
  flex: 0 0 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #83796c;
  border-radius: 50%;
  color: transparent;
  font-size: .78rem;
  font-weight: 900;
}
.multi .choice-mark { border-radius: 4px; }
.choice.selected .choice-mark { border-color: var(--orange); background: var(--orange); color: white; }
.choice-text { font-size: .98rem; line-height: 1.35; }

.required-note { min-height: 20px; margin: 13px 0 0; color: #a84219; font-size: .88rem; }

.actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.back-button {
  justify-self: start;
  border: 0;
  padding: 12px 0;
  background: transparent;
  color: #5f584e;
  cursor: pointer;
}
.step-count { color: #746c61; font-size: .82rem; }
.next-button {
  justify-self: end;
  min-width: 164px;
  border: 0;
  background: var(--ink);
  color: white;
  padding: 15px 20px;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.next-button:hover { background: #28231f; transform: translateY(-1px); }
.next-button span { color: var(--orange); margin-left: 12px; }

.confirmation {
  padding: 16px;
  border-left: 3px solid var(--orange);
  background: rgba(255,255,255,.55);
  font-size: .94rem;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .experience { display: block; min-height: 100dvh; }
  .photo-panel {
    min-height: clamp(210px, 28dvh, 270px);
    height: clamp(210px, 28dvh, 270px);
  }
  .photo-caption {
    left: 20px;
    right: 20px;
    bottom: 16px;
    max-width: 25ch;
    font-size: clamp(1.18rem, 5vw, 1.4rem);
    line-height: 1.14;
  }
  .photo-panel.contain img { object-fit: cover; }
  .photo-panel.contain .photo-backdrop { opacity: 0; }
  .form-panel {
    min-height: calc(100dvh - clamp(210px, 28dvh, 270px));
    padding: 17px 20px calc(16px + env(safe-area-inset-bottom));
    grid-template-rows: auto auto auto auto;
  }
  .brand-row { gap: 16px; }
  .wordmark { width: 132px; }
  .draft-label { font-size: .58rem; padding: 7px 9px 6px; }
  .progress { height: 2px; margin-top: 14px; }
  .question-shell {
    width: 100%;
    margin: 0;
    padding: 26px 0 22px;
    overflow: visible;
  }
  .eyebrow { margin-bottom: 12px; font-size: .7rem; line-height: 1.35; }
  h1 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 10.5vw, 3rem);
    line-height: 1.01;
  }
  .intro { margin-top: 16px; font-size: 1rem; line-height: 1.48; }
  .answer-area { margin-top: 22px; }
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: 54px; }
  .actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(255,250,240,.97);
    padding: 14px 0 2px;
    grid-template-columns: auto 1fr;
    backdrop-filter: blur(10px);
  }
  .step-count { display: none; }
  .next-button { min-width: 150px; min-height: 52px; }

  .experience[data-question="start"] .form-panel { min-height: auto; }
  .experience[data-question="start"] .photo-panel {
    min-height: clamp(280px, 34dvh, 330px);
    height: clamp(280px, 34dvh, 330px);
  }
  .experience[data-question="start"] .photo-shade {
    background: linear-gradient(180deg, rgba(0,0,0,.48), transparent 55%);
  }
  .experience[data-question="start"] .photo-caption {
    top: 20px;
    bottom: auto;
    max-width: 18ch;
    text-shadow: 0 2px 16px rgba(0,0,0,.62);
  }
  .experience[data-question="start"] .question-shell { padding: 24px 0 20px; }
  .experience[data-question="start"] h1 { font-size: clamp(2.45rem, 11.5vw, 3rem); }
  .experience[data-question="start"] .actions { grid-template-columns: 1fr; }
  .experience[data-question="start"] .next-button {
    width: 100%;
    justify-self: stretch;
  }
}

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