:root {
  --ink: #0b1f3a;
  --ink-soft: #1a3358;
  --paper: #f3efe4;
  --paper-2: #ebe4d4;
  --saffron: #e0a116;
  --saffron-deep: #c4890a;
  --sea: #1f6f7a;
  --danger: #b42318;
  --success: #1f6b4a;
  --line: rgba(11, 31, 58, 0.14);
  --shadow: 0 24px 60px rgba(11, 31, 58, 0.18);
  --radius: 4px;
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(224, 161, 22, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 45% at 95% 15%, rgba(31, 111, 122, 0.22), transparent 50%),
    linear-gradient(165deg, #f7f2e7 0%, #e8dfcc 42%, #d9e4e2 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 31, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 58, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  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)'/%3E%3C/svg%3E");
}

.site-header {
  padding: 2.25rem 1.5rem 0.5rem;
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  animation: rise 0.7s ease both;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  text-align: center;
}

.brand span {
  color: var(--saffron-deep);
  font-weight: 400;
  font-style: italic;
}

.brand-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
  text-align: center;
}

.shell {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.intro {
  margin-bottom: 1.75rem;
  text-align: center;
  animation: rise 0.7s ease 0.1s both;
}

.intro h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 400;
}

.lede {
  margin: 0 auto;
  color: var(--ink-soft);
  max-width: 28rem;
  text-align: center;
}

.progress {
  margin-bottom: 1.5rem;
  text-align: center;
  animation: rise 0.7s ease 0.18s both;
}

.progress-track {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  width: 14%;
  background: linear-gradient(90deg, var(--saffron), var(--sea));
  transition: width 0.35s ease;
}

.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(11, 31, 58, 0.45);
}

.progress-steps li.is-done,
.progress-steps li.is-current {
  color: var(--ink);
}

.progress-steps li.is-current {
  color: var(--saffron-deep);
}

form {
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.75s ease 0.22s both;
}

@media (min-width: 640px) {
  form {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

.step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: none;
}

.step.is-active {
  display: block;
  animation: stepIn 0.4s ease both;
}

.step > legend {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  padding: 0;
}

.grid.two {
  display: grid;
  gap: 1rem;
}

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

.phone-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(7.5rem, 9.5rem) 1fr;
}

label,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

label > span,
.radio-group > .sub {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

label small {
  font-weight: 500;
  color: rgba(11, 31, 58, 0.55);
}

abbr {
  text-decoration: none;
  color: var(--saffron-deep);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(31, 111, 122, 0.18);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
}

.radio-group {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.radio-group .sub {
  margin-bottom: 0.15rem;
}

.radio {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0;
  cursor: pointer;
}

.radio input {
  width: auto;
  accent-color: var(--sea);
}

.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}

.check input {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--sea);
}

.is-hidden {
  display: none !important;
}

.char-count {
  font-size: 0.75rem;
  color: rgba(11, 31, 58, 0.5);
  align-self: flex-end;
  margin-top: -0.5rem;
}

.confirm-copy {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.btn {
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}

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

.btn.primary {
  background: var(--ink);
  color: #f7f2e7;
}

.btn.primary:hover {
  background: var(--ink-soft);
}

.btn.primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--ink);
}

.form-error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid rgba(180, 35, 24, 0.25);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.form-success {
  background: #e8f5ef;
  color: var(--success);
  border: 1px solid rgba(31, 107, 74, 0.25);
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
}

.site-footer {
  text-align: center;
  padding: 0 1.5rem 2.5rem;
  font-size: 0.8rem;
  color: rgba(11, 31, 58, 0.5);
}

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

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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