:root {
  /* Hybrid Palette: Soft Lo-Fi Editorial + Vintage Print */
  --bg-parchment: #f4f1ea;
  /* Soft, clean off-white cream */
  --ink-black: #383531;
  /* Stronger charcoal, readable but warm */
  --poster-red: #c95c4d;
  /* Mid-tone terracotta red, pops but not glowing */
  --vintage-navy: #3e5a6b;
  /* Deeper dusty blue for duotone contrast */
  --gold-leaf: #bdae9c;
  /* Soft taupe/beige for subtle lines */
  --olive-green: #596147;
  /* Deep but soft olive green */

  --muted: #8c8882;

  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Crimson Pro', serif;
}

* {
  box-sizing: border-box;
}

:where([hidden]) {
  display: none !important;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-parchment);
  color: var(--ink-black);
  position: relative;
  overflow-x: hidden;
}

/* THE PAPER/HALFTONE TEXTURE - Removed for readability */

/* CORE LAYOUT */
.app {
  width: 100%;
  min-height: 100dvh;
}

/* INTRO SCREEN */
.intro-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.intro-inner {
  text-align: center;
  width: min(800px, 92vw);
  border: 2px solid var(--ink-black);
  border-radius: 16px;
  padding: 4rem 2rem;
  background-color: var(--bg-parchment);
  position: relative;
  color: var(--ink-black);
  box-shadow: 6px 6px 0 var(--vintage-navy);
}

.intro-inner h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-black);
}

.intro-inner p {
  margin: 24px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.intro-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.start-btn {
  display: inline-block;
  background: var(--ink-black);
  color: var(--bg-parchment);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  padding: 1rem 4rem;
  border-radius: 12px;
  border: 2px solid var(--ink-black);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0 var(--vintage-navy);
}

.start-btn:hover {
  background: var(--vintage-navy);
  border-color: var(--vintage-navy);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--poster-red);
}

.intro-cta span {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-black);
}

.intro-time {
  margin-top: 24px;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-black);
}

/* FORM STAGE */
.form-stage {
  min-height: 100dvh;
  display: grid;
}

form {
  width: min(800px, 90vw);
  margin: 0 auto;
  min-height: 100dvh;
  padding: clamp(40px, 8vw, 80px) 0 clamp(40px, 8vw, 80px);
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 20px;
}

.question {
  display: grid;
  align-content: center;
  gap: 24px;
}

.q-meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 400;
  font-family: var(--font-body);
}

.question h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0;
}

.required-mark {
  color: var(--poster-red);
}

/* INPUTS */
input,
textarea {
  width: 100%;
  background: var(--bg-parchment);
  border: 0;
  border-bottom: 2px solid var(--ink-black);
  color: var(--ink-black);
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  padding: 12px 0;
  outline: none;
  transition: all 0.2s ease;
}

textarea {
  min-height: 150px;
  resize: vertical;
  border: 2px solid var(--ink-black);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 4px 4px 0 var(--gold-leaf);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

input:focus {
  border-bottom-color: var(--poster-red);
}

textarea:focus {
  border-color: var(--poster-red);
  box-shadow: 6px 6px 0 var(--poster-red);
  transform: translate(-2px, -2px);
}

/* RADIO & CHECKBOX LISTS */
.option-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid var(--ink-black);
  border-radius: 12px;
  background: var(--bg-parchment);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Soft hover/select state for blocks */
.choice:hover {
  background: #ffffff;
  border-color: var(--poster-red);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--poster-red);
}

.choice:hover span {
  color: var(--ink-black);
}

.choice input {
  width: 24px;
  height: 24px;
  margin: 0;
  flex: 0 0 24px;
  border: 2px solid var(--ink-black);
  border-radius: 8px;
  /* Slightly rounded square */
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-parchment);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Checkmark/Radio active state */
.choice input:checked {
  background: var(--poster-red);
  border-color: var(--poster-red);
}

.choice span {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--ink-black);
  transition: color 0.2s ease;
}

.choice:has(input:checked) {
  border-color: var(--poster-red);
  background: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--poster-red);
}

.inline-extra {
  width: 100%;
  display: grid;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 16px;
  color: var(--poster-red);
  font-family: var(--font-body);
  text-transform: uppercase;
}

.inline-extra input {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

/* AGREE CHECKBOX */
.agree {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
}

.agree input {
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1px solid var(--gold-leaf);
  border-radius: 8px;
  /* Slightly rounded checkbox */
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.agree input:checked {
  background: var(--olive-green);
  border-color: var(--olive-green);
}

.agree span {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 400;
}

/* FOOTER NAV */
.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 20px;
  align-items: center;
  border-top: 2px solid var(--ink-black);
  padding-top: 24px;
}

button {
  border: 2px solid var(--ink-black);
  padding: 12px 32px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-parchment);
  box-shadow: 4px 4px 0 var(--ink-black);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: translate(4px, 4px);
}

button.ghost {
  color: var(--ink-black);
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

button.ghost:hover:not(:disabled) {
  border-color: var(--ink-black);
}

button.solid {
  background: var(--ink-black);
  color: var(--bg-parchment);
}

button.solid:hover:not(:disabled) {
  background: var(--vintage-navy);
  border-color: var(--vintage-navy);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--poster-red);
}

/* PROGRESS BAR */
.progress-wrap {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-track {
  width: min(200px, 20vw);
  height: 8px;
  border: 2px solid var(--ink-black);
  background: transparent;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 7%;
  height: 100%;
  background: var(--poster-red);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#progressLabel {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink-black);
}

/* SYSTEM STATUS */
.status {
  margin: 0;
  min-height: 24px;
  font-weight: 400;
  font-size: 1rem;
}

.status.error {
  color: var(--poster-red);
}

.status.success {
  color: var(--olive-green);
}

/* SUCCESS SCREEN */
.success {
  width: min(800px, 90vw);
  margin: auto;
  border: 2px solid var(--ink-black);
  border-radius: 16px;
  padding: 4rem;
  background-color: var(--bg-parchment);
  color: var(--ink-black);
  text-align: center;
  box-shadow: 8px 8px 0 var(--vintage-navy);
}

.success h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  color: var(--ink-black);
}

.success p {
  margin: 24px 0 0;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
}

/* HIDE HP HONEYPOT */
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* --- LAYERED ART & COLLAGE --- */
.art-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.collage-element {
  position: absolute;
}

.hibiscus-red,
.hibiscus-navy {
  width: 500px;
  height: 500px;
  background-image: url('hibiscus-art.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: screen;
  mix-blend-mode: multiply;
  opacity: 0.8;
}

.hibiscus-red {
  background-color: var(--poster-red);
  top: -10vh;
  right: -10vw;
  transform: rotate(15deg);
}

.hibiscus-navy {
  background-color: var(--vintage-navy);
  opacity: 0.4;
}

.yantra-rings {
  width: 600px;
  height: 600px;
  border-width: 1px;
  border-style: solid;
  border-color: var(--vintage-navy);
  border-radius: 50%;
  top: 15vh;
  right: -20vw;
  opacity: 0.4;
  mix-blend-mode: multiply;
}

.yantra-rings::before,
.yantra-rings::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-width: 1px;
  border-style: solid;
  border-color: inherit;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.yantra-rings::before {
  width: 90%;
  height: 90%;
}

.yantra-rings::after {
  width: 80%;
  height: 80%;
}

.text-stamp {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--poster-red);
  opacity: 0.3;
  top: 35vh;
  right: 5vw;
  transform: rotate(90deg);
  letter-spacing: 0.5em;
  mix-blend-mode: multiply;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
  .nav-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "progress progress"
      "back next";
    border-top: none;
    padding-top: 0;
  }

  .progress-wrap {
    grid-area: progress;
    justify-self: start;
    width: 100%;
    margin-bottom: 24px;
    justify-content: space-between;
  }

  .progress-track {
    width: 70%;
  }

  #prevBtn {
    grid-area: back;
    justify-self: start;
  }

  #nextBtn,
  #submitBtn {
    grid-area: next;
    justify-self: end;
  }
}