/* Lea’s Website Questionnaire — calm landscape palette */
:root {
  --sage-50: #f4f7f3;
  --sage-100: #e4ebe2;
  --sage-200: #c5d4c0;
  --sage-400: #7a9a72;
  --sage-600: #4f6b48;
  --sage-800: #2f422c;
  --stone-100: #f0ebe3;
  --stone-200: #e0d6c8;
  --stone-400: #a89880;
  --stone-700: #5c5346;
  --earth: #8b6f4e;
  --ink: #24301f;
  --muted: #5a6654;
  --surface: rgba(255, 252, 247, 0.92);
  --line: rgba(47, 66, 44, 0.12);
  --focus: #4f6b48;
  --danger: #8a3d2f;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(47, 66, 44, 0.08);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --step-max: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(122, 154, 114, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(168, 152, 128, 0.28), transparent 50%),
    linear-gradient(165deg, var(--sage-50) 0%, var(--stone-100) 45%, #e8efe4 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 48rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.site-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-600);
  background: rgba(228, 235, 226, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.site-header h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.85rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--sage-800);
}

.lede {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.progress-wrap {
  margin: 1.75rem 0 1.25rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(47, 66, 44, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage-400), var(--sage-600));
  transition: width 0.45s ease;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 3vw, 2rem);
  backdrop-filter: blur(8px);
}

.step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.step.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-600);
}

.step h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: var(--sage-800);
}

.step-intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.question {
  margin-bottom: 1.65rem;
  padding-bottom: 1.65rem;
  border-bottom: 1px solid var(--line);
}

.question:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.question-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--ink);
}

.question-hint {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.required-tag,
.optional-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  vertical-align: middle;
}

.required-tag {
  color: var(--sage-800);
  background: var(--sage-100);
}

.optional-tag {
  color: var(--stone-700);
  background: var(--stone-100);
}

input[type="text"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffcf8;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

textarea.tall {
  min-height: 10rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--sage-400);
  box-shadow: 0 0 0 3px rgba(122, 154, 114, 0.25);
}

.starter {
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--stone-700);
  background: rgba(240, 235, 227, 0.7);
  border-left: 3px solid var(--sage-400);
  border-radius: 0 8px 8px 0;
}

.own-answer {
  margin-bottom: 0.85rem;
}

.own-answer-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sage-600);
}

.own-answer-input {
  min-height: 4.25rem !important;
}

.choice-list {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffcf8;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.choice:hover {
  border-color: var(--sage-200);
  background: var(--sage-50);
}

.choice:has(input:checked) {
  border-color: var(--sage-400);
  background: rgba(228, 235, 226, 0.65);
}

.choice input {
  margin-top: 0.2rem;
  accent-color: var(--sage-600);
  flex-shrink: 0;
}

.choice span {
  flex: 1;
}

.mood-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .mood-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.mood-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf8;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.mood-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 66, 44, 0.08);
}

.mood-card:has(input:checked) {
  border-color: var(--sage-600);
  box-shadow: 0 0 0 2px rgba(79, 107, 72, 0.2);
}

.mood-swatch {
  height: 3.25rem;
  border-radius: 8px;
  margin-bottom: 0.15rem;
}

.palette-swatch {
  height: 2.5rem;
}

@media (min-width: 720px) {
  .palette-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.mood-card strong {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--sage-800);
}

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

.mood-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pair-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .pair-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pair-option {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf8;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pair-option:has(input:checked) {
  border-color: var(--sage-400);
  background: rgba(228, 235, 226, 0.65);
}

.pair-option input {
  position: absolute;
  opacity: 0;
}

.pair-option strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.pair-option span {
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(122, 154, 114, 0.45);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--sage-800);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--sage-50);
}

.btn-primary {
  background: linear-gradient(135deg, var(--sage-600), var(--sage-800));
  color: #f7faf5;
  box-shadow: 0 8px 20px rgba(47, 66, 44, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 10px 26px rgba(47, 66, 44, 0.24);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

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

.error-banner {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(138, 61, 47, 0.08);
  border: 1px solid rgba(138, 61, 47, 0.25);
  color: var(--danger);
}

.error-banner.is-visible {
  display: block;
}

.success-panel {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.success-panel.is-visible {
  display: block;
  animation: fadeIn 0.45s ease;
}

.success-panel h2 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--sage-800);
  margin: 0 0 0.75rem;
}

.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sage-100);
  color: var(--sage-600);
  font-size: 1.5rem;
}

.welcome-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.welcome-list li {
  margin-bottom: 0.4rem;
}

.review-box {
  max-height: 18rem;
  overflow: auto;
  padding: 1rem;
  border-radius: 10px;
  background: var(--sage-50);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.field-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .field-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
