@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #e8eef7;
  --muted: #9aa7ba;
  --paper: #08111f;
  --card: rgba(11, 22, 39, 0.78);
  --navy: #f8fbff;
  --sky: #76d8ef;
  --gold: #d8a84c;
  --line: rgba(216, 168, 76, 0.22);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --topbar: rgba(6, 13, 25, 0.78);
  --field: rgba(255, 255, 255, 0.065);
  --soft: rgba(255, 255, 255, 0.075);
  --body-bg:
    radial-gradient(circle at 10% 8%, rgba(118, 216, 239, 0.14), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(216, 168, 76, 0.18), transparent 24rem),
    linear-gradient(135deg, #050a13 0%, #08111f 48%, #111827 100%);
  font-family: 'Manrope', 'Aptos', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body[data-theme="bright"] {
  --ink: #142033;
  --muted: #667085;
  --paper: #f4eadc;
  --card: rgba(255, 252, 246, 0.88);
  --navy: #071735;
  --sky: #2aa8c8;
  --gold: #b98a2e;
  --line: rgba(7, 23, 53, 0.14);
  --shadow: 0 24px 80px rgba(7, 23, 53, 0.16);
  --topbar: rgba(255, 250, 241, 0.82);
  --field: rgba(255, 255, 255, 0.74);
  --soft: rgba(255, 255, 255, 0.52);
  --body-bg:
    radial-gradient(circle at 8% 8%, rgba(42, 168, 200, 0.24), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(216, 168, 76, 0.18), transparent 22rem),
    linear-gradient(135deg, #fffaf1 0%, var(--paper) 52%, #e8eef9 100%);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--body-bg);
  transition: background .25s ease, color .25s ease;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(18px);
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: .85rem;
  align-items: center;
  color: inherit;
  min-width: max-content;
}
.brand-button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0,0,0,.28), 0 0 0 1px rgba(216,168,76,.35);
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  margin-top: .1rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .8rem;
  flex-wrap: wrap;
}
.topbar-copy {
  color: var(--muted);
  font-size: .88rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.theme-toggle,
button,
.ghost {
  border: 0;
  border-radius: 999px;
  padding: .95rem 1.25rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--navy);
  padding: .7rem 1rem;
}
.theme-icon { color: var(--gold); }

main { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }
.wizard-shell { padding: clamp(1.2rem, 3vw, 2rem) 0 clamp(2rem, 5vw, 4rem); }
.wizard-frame {
  background: rgba(7, 14, 25, 0.42);
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
  margin-bottom: 1rem;
}
.wizard-step {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem .85rem;
  font-size: .88rem;
}
.wizard-step span {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
}
.wizard-step.active {
  background: linear-gradient(135deg, rgba(216,168,76,.18), rgba(118,216,239,.12));
  border-color: rgba(216,168,76,.42);
}
.wizard-step.done { border-color: rgba(118,216,239,.32); }
.wizard-stage {
  min-height: min(72vh, 860px);
  display: grid;
}
.wizard-panel {
  display: none;
  align-content: start;
  gap: 1.4rem;
  min-height: 100%;
  padding: clamp(.5rem, 2vw, 1rem);
}
.wizard-panel.active { display: grid; }
.panel-head { max-width: 760px; }
.panel-head p { color: var(--muted); line-height: 1.6; margin: .4rem 0 0; }

.hero-grid,
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}
.form-panel-grid { grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr); }
.final-panel-grid { grid-template-columns: minmax(280px, .6fr) minmax(0, 1fr); }
.hero-copy { display: grid; gap: .8rem; align-content: start; }
.eyebrow, .step {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .42rem .7rem;
  color: var(--navy);
  background: var(--soft);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.route {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin: 0;
}
.brand-kicker {
  color: var(--sky);
  font-weight: 900;
  margin: -.1rem 0 .2rem;
  letter-spacing: .03em;
}
h1, h2 {
  color: var(--navy);
  line-height: .95;
  letter-spacing: -.05em;
  margin: 0;
  font-family: 'Cormorant Garamond', 'Iowan Old Style', 'Georgia', serif;
}
h1 { font-size: clamp(3.1rem, 6.2vw, 5.8rem); max-width: 10ch; }
h2 { font-size: clamp(2.2rem, 4vw, 4.2rem); }
h3 { color: var(--navy); margin: 0 0 .5rem; }
.lead {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 600px;
  opacity: .9;
  margin: 0;
}
.microcopy { color: var(--muted); font-size: .9rem; line-height: 1.45; margin: 0; }
.hero-highlights {
  list-style: none;
  margin: .15rem 0 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.hero-highlights li {
  display: flex;
  gap: .65rem;
  align-items: center;
  color: var(--ink);
  font-size: .95rem;
}
.hero-highlights li::before {
  content: '•';
  color: var(--gold);
  font-size: 1.1rem;
}
.strip {
  padding: 1rem 1.2rem;
  border-left: 5px solid var(--gold);
  background: var(--soft);
  border-radius: 18px;
  color: var(--ink);
  line-height: 1.65;
}
.strip p { margin: 0; }

.flight-card,
.confirmation-card,
.boarding-pass,
.ticket-form,
.seat-layout,
.emission-preview {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.flight-card { border-radius: 34px; padding: clamp(1.3rem, 3.3vw, 2rem); }
.editorial-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01)),
    radial-gradient(circle at top right, rgba(216,168,76,.18), transparent 32%),
    linear-gradient(155deg, rgba(7, 17, 31, .96), rgba(16, 31, 50, .92));
}
.editorial-card::before,
.editorial-card::after {
  content: '';
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,168,76,.35), transparent);
}
.editorial-card::before { top: 4.1rem; }
.editorial-card::after { bottom: 4.3rem; }
.card-topline, .card-footerline, .preview-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.card-topline strong, .preview-topline strong { color: var(--navy); }
.editorial-lockup { display: grid; gap: .8rem; margin: 1.25rem 0 1.4rem; }
.editorial-overline { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; }
.editorial-lockup h2 { max-width: 10ch; }
.editorial-lockup p { margin: 0; color: var(--ink); line-height: 1.55; max-width: 33ch; }
.airport-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 950;
  color: var(--navy);
  font-size: clamp(1.65rem, 4vw, 3.3rem);
  letter-spacing: -.06em;
}
.airport-row i {
  flex: 1;
  min-width: 50px;
  border-top: 2px dashed color-mix(in srgb, var(--navy) 35%, transparent);
  position: relative;
}
.airport-row i::after {
  content: '✈';
  position: absolute;
  right: 42%;
  top: -1rem;
  font-size: 1.1rem;
  color: var(--gold);
}
.flight-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin: 1.3rem 0;
  color: var(--muted);
}
.flight-meta p { margin: 0; }
.flight-meta strong { color: var(--navy); }
.card-footerline { padding-top: .9rem; border-top: 1px dashed rgba(216,168,76,.28); }

.ticket-form {
  border-radius: 32px;
  padding: clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-content: start;
}
label { display: grid; gap: .45rem; font-weight: 800; color: var(--navy); }
.wide { grid-column: 1 / -1; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 16px;
  padding: 1rem;
  font: inherit;
  color: var(--ink);
}
input:focus, select:focus { outline: 3px solid rgba(118,216,239,.32); border-color: var(--sky); }
.emission-preview {
  border-radius: 30px;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}
.mini-pass {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px dashed rgba(216,168,76,.35);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}
.mini-pass small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .2rem;
}
.mini-pass strong { color: var(--navy); font-size: 1rem; }
.preview-note { margin: 0; color: var(--muted); line-height: 1.55; }

.seat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .6fr);
  gap: 1.5rem;
  border-radius: 36px;
  padding: clamp(1rem, 4vw, 2rem);
}
.plane-nose {
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
  border-radius: 999px 999px 20px 20px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 950;
}
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.seat {
  min-height: 72px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 950;
  padding: .4rem;
}
.seat small { display: block; color: var(--muted); font-weight: 700; margin-top: .15rem; }
.seat[aria-pressed="true"] {
  background: #071735;
  color: white;
  outline: 4px solid rgba(216,168,76,.5);
}
.seat[aria-pressed="true"] small { color: var(--sky); }
.seat-copy {
  border-left: 1px dashed var(--line);
  padding-left: 1.5rem;
  color: var(--muted);
  line-height: 1.6;
}

.confirmation-card {
  border-radius: 32px;
  padding: 1.5rem;
  text-align: left;
}
.compact-confirmation p { margin-top: 0; }
dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.4rem 0 0; text-align: left; }
dt { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
dd { margin: .25rem 0 0; color: var(--navy); font-weight: 800; }

.boarding-pass { display: grid; grid-template-columns: 1fr 180px; overflow: hidden; border-radius: 32px; }
.pass-main { padding: clamp(1.3rem, 4vw, 2.4rem); }
.pass-brand { text-transform: uppercase; color: var(--gold); font-weight: 950; letter-spacing: .16em; margin-bottom: 1.5rem; }
.pass-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.pass-grid p { margin: 0; }
.pass-grid small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; }
.pass-grid strong { color: var(--navy); font-size: 1.05rem; }
.pass-stub {
  background: #071735;
  color: white;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  text-align: center;
  border-left: 2px dashed rgba(255,255,255,.45);
}
.pass-stub span { color: var(--sky); font-weight: 800; }
.pass-stub b { font-size: 3rem; }
.pass-stub code { writing-mode: vertical-rl; opacity: .72; }
.handoff-note {
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: 18px;
}

.wizard-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: .35rem .25rem 0;
}
.primary {
  background: linear-gradient(135deg, #071735, #15315f);
  color: white;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}
body[data-theme="dark"] .primary {
  background: linear-gradient(135deg, var(--gold), #e8c777);
  color: #07111f;
}
.primary:hover:not(:disabled), .ghost:hover, .theme-toggle:hover { transform: translateY(-1px); }
.primary:disabled, .ghost:disabled { opacity: .45; cursor: not-allowed; }
.ghost { color: var(--navy); background: var(--soft); border: 1px solid var(--line); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 4vw, 3rem);
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .hero-grid,
  .panel-grid,
  .seat-layout,
  .boarding-pass,
  .final-panel-grid,
  .form-panel-grid { grid-template-columns: 1fr; }
  .seat-copy {
    border-left: 0;
    border-top: 1px dashed var(--line);
    padding: 1rem 0 0;
  }
  .pass-stub {
    border-left: 0;
    border-top: 2px dashed rgba(255,255,255,.45);
  }
  .pass-stub code { writing-mode: horizontal-tb; }
}

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { min-width: 0; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .wizard-progress,
  .ticket-form,
  dl,
  .pass-grid,
  .wizard-footer { grid-template-columns: 1fr; }
  .wizard-footer { justify-items: stretch; }
  h1 { max-width: none; }
}
