:root {
  --bg: #fbf7f5;
  --ink: #1b1a1f;
  --muted: #6f6a74;
  --card: #ffffff;
  --border: #efe9ec;
  --pink: #ff2ba5;
  --magenta: #ff0040;
  --purple: #d600f0;
  --orange: #ff8a3d;
  --teal: #2bb6c4;
  --ring: rgba(255, 43, 165, 0.55);
  --shadow: 0 22px 60px rgba(120, 20, 80, 0.16);
  --brand-grad: linear-gradient(110deg, var(--orange) 0%, var(--pink) 52%, var(--purple) 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(255, 138, 61, 0.16) 0%, transparent 60%),
    radial-gradient(1000px 600px at 92% -4%, rgba(214, 0, 240, 0.14) 0%, transparent 58%),
    radial-gradient(800px 500px at 50% 108%, rgba(43, 182, 196, 0.12) 0%, transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: scroll;
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(18px, 5vw, 32px) 56px;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero { text-align: center; }

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-grad);
  padding: 7px 15px;
  border-radius: 999px;
  margin: 0 0 22px;
  box-shadow: 0 8px 20px rgba(255, 43, 165, 0.28);
}

h1 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.3rem, 7.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

h1 .name {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto 14px;
}

.lede strong { color: var(--ink); font-weight: 600; }

/* ---- Picker -------------------------------------------------------------- */
.picker { margin-top: clamp(38px, 7vw, 60px); }

.picker h2 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 4.2vw, 2.1rem);
  text-align: center;
  margin: 0 0 6px;
}

.picker-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 30px;
  font-size: 0.95rem;
}

.swatches {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.wood-head {
  text-align: center;
  margin-bottom: 18px;
}

.wood-head h3 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  margin: 0 0 2px;
  color: var(--pink);
}

.wood-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.swatch {
  position: relative;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 14px 12px 14px;
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 4px 14px rgba(27, 26, 31, 0.05);
}

.swatch:hover {
  transform: translateY(-4px);
  border-color: #f6d3e7;
  box-shadow: 0 16px 32px rgba(255, 43, 165, 0.14);
}

.swatch:focus-visible { outline: none; border-color: var(--ring); }

.swatch[aria-checked="true"] {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 43, 165, 0.16), 0 16px 32px rgba(255, 43, 165, 0.2);
  transform: translateY(-4px);
}

.swatch .chair {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 0 10px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
}

.swatch .label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
}

.swatch .tick {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.swatch[aria-checked="true"] .tick { opacity: 1; transform: scale(1); }

/* ---- Submit bar ---------------------------------------------------------- */
.submit-bar { margin-top: 32px; }

.note-field {
  display: block;
  margin-bottom: 16px;
}

.note-field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 7px;
}

.note-field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.note-field input::placeholder { color: #b7b1bb; }
.note-field input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 43, 165, 0.14);
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chosen { margin: 0; color: var(--muted); font-size: 0.95rem; }
.chosen strong { color: var(--pink); }

#submit {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: var(--brand-grad);
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.12s ease, opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 26px rgba(255, 43, 165, 0.32);
}

#submit:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 16px 30px rgba(255, 43, 165, 0.4); }
#submit:active:not(:disabled) { transform: translateY(0); }
#submit:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.status { margin: 16px 0 0; min-height: 1.4em; font-size: 0.95rem; }
.status.ok { color: #14a05a; }
.status.err { color: var(--magenta); }

.footer {
  margin-top: 52px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- Success state ------------------------------------------------------- */
.done .picker, .done .submit-bar { display: none; }

.thanks {
  position: relative;
  text-align: center;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 44px 28px;
  margin-top: 36px;
  box-shadow: var(--shadow);
  animation: pop 0.35s ease;
  overflow: hidden;
}

.thanks::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--brand-grad);
}

.thanks h2 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-size: 1.75rem;
}

.thanks p { margin: 0 auto; max-width: 42ch; color: var(--muted); }
.thanks strong { color: var(--pink); }
.thanks .big { font-size: 2.6rem; margin-bottom: 8px; }

@keyframes pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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