/* ──────────────────────────────────────────────────────────────
   FlightClaimKit — design system ported from ouritperson.com
   Editorial palette: cream / terracotta / charcoal · Playfair + Inter
   ────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light only;
  --cream:      #faf7f2;
  --bone:       #f0ebe2;
  --charcoal:   #1a1a1a;
  --terracotta: #c2410c;
  --terracotta-dark: #9a3412;
  --clay:       #9c6644;
  --mute:       #6b5d4f;
  --rule:       #d6cfc2;
  --green:      #15803d;
  --gold:       #d4a017;
  --dark-1:     #0d1117;
  --dark-2:     #0f1729;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--charcoal); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.3; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 720px) { .wrap, .wrap-narrow { padding: 0 1.25rem; } }

.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.18em; color: var(--terracotta); text-transform: uppercase;
  margin-bottom: 1rem;
}
.intro-divider { width: 64px; height: 2px; background: var(--terracotta); margin: 2.5rem auto 0; }

/* ─── NAV ───────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif); font-weight: 900; font-size: 1.15rem;
  color: var(--charcoal); text-decoration: none; letter-spacing: -0.02em;
}
.nav-logo:hover { text-decoration: none; color: var(--terracotta); }
.nav-links { display: flex; gap: 1.75rem; align-items: center; }
.nav-links a {
  color: var(--charcoal); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
/* Filled CTA — same box as the outlined "Install app" button beside it
   (matching border width, padding, font), just charcoal-filled. */
.btn-nav {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--charcoal); color: var(--cream);
  border: 1.5px solid var(--charcoal);
  padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  font-family: var(--sans); text-decoration: none;
}
.btn-nav:hover { background: var(--terracotta); border-color: var(--terracotta); text-decoration: none; color: var(--cream); }
/* The CTA lives inside .nav-links, so out-specify `.nav-links a` (which would
   otherwise paint the button text charcoal-on-charcoal = invisible). */
.nav-links a.btn-nav { color: #faf7f2; border-bottom: 1.5px solid var(--charcoal); }
.nav-links a.btn-nav:hover { color: #faf7f2; background: var(--terracotta); border-color: var(--terracotta); }

/* ── One sizing rule for BOTH nav buttons so they're pixel-identical;
   only the fill colour differs (outline vs charcoal). High enough
   specificity (incl. #id) to beat .btn-outline / .nav-links a. ── */
.nav-links a.btn-nav,
#navInstallBtn.btn-outline {
  box-sizing: border-box; height: 40px; padding: 0 1.2rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600; line-height: 1;
  border-width: 1.5px; border-style: solid; border-color: var(--charcoal);
  text-decoration: none;
}

.hamburger { display: none; background: transparent; border: none; cursor: pointer; padding: 6px; width: 40px; height: 40px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #1a1a1a; margin: 5px 0; border-radius: 2px; transition: all 0.2s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mob-menu {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: #faf7f2; z-index: 100; padding: 1rem 1.5rem 2rem;
  flex-direction: column; gap: 0.25rem; overflow-y: auto;
}
.mob-menu.open { display: flex; }
/* Hide the install banner while the menu overlay is open. */
body.menu-open .install-banner { display: none; }
.mob-menu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0 1.25rem; margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.mob-close {
  background: none; border: none; font-size: 2.25rem; line-height: 1;
  color: var(--charcoal); cursor: pointer; padding: 0 0.25rem;
}
.mob-close:hover { color: var(--terracotta); }
.mob-menu a {
  color: var(--charcoal); text-decoration: none;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  padding: 0.65rem 0; border-bottom: 1px solid var(--rule);
}
.mob-menu a.nav-logo { font-size: 1.15rem; padding: 0; border-bottom: none; }
.mob-menu a:hover { color: var(--terracotta); }
.mob-menu .btn-primary { margin-top: 1rem; border-bottom: none; color: var(--cream); }
.mob-menu .btn-primary:hover { color: var(--cream); }
@media (max-width: 820px) {
  .nav-links, .btn-nav { display: none; }
  .hamburger { display: block; }
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; padding: 0.85rem 1.6rem;
  background: var(--charcoal); color: var(--cream);
  border: none; font-family: var(--sans); font-weight: 700; font-size: 0.98rem;
  cursor: pointer; transition: background 0.15s; text-decoration: none; text-align: center;
}
.btn-primary:hover { background: var(--terracotta); text-decoration: none; color: var(--cream); }
.btn-outline {
  display: inline-block; padding: 0.8rem 1.5rem;
  border: 1.5px solid var(--charcoal); color: var(--charcoal);
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; transition: all 0.15s; background: transparent; cursor: pointer;
}
.btn-outline:hover { background: var(--charcoal); color: var(--cream); text-decoration: none; }
.btn-block { display: block; width: 100%; }

/* ─── HERO ──────────────────────────────────────────────────── */
.hero { padding: 5rem 0 3.5rem; text-align: center; }
.hero h1 { max-width: 880px; margin: 0 auto 1.25rem; }
.hero h1 em { color: var(--terracotta); font-style: italic; }
.hero-sub {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem); line-height: 1.4; color: var(--mute);
  max-width: 660px; margin: 0 auto 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 1.75rem; font-size: 0.85rem; color: var(--mute); }
.hero-trust strong { color: var(--charcoal); }
@media (max-width: 720px) { .hero { padding: 3rem 0 2rem; } }

/* ─── HOW IT WORKS / STEP CARDS ─────────────────────────────── */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--bone); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head p { color: var(--mute); font-size: 1.05rem; margin: 0.75rem 0 0; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .steps-grid { grid-template-columns: 1fr; } }
.step {
  background: var(--cream); border: 1px solid var(--rule);
  padding: 2rem 1.75rem; display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.step:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.step-num {
  font-family: var(--sans); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.18em; color: var(--terracotta); margin-bottom: 1.25rem;
}
.step h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 0.6rem; }
.step p { font-size: 0.95rem; color: var(--mute); margin: 0; line-height: 1.6; }

/* ─── CARDS / GRID (claims, faq) ────────────────────────────── */
.card {
  background: var(--cream); border: 1px solid var(--rule);
  padding: 2rem 1.75rem; transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 980px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards-grid { grid-template-columns: 1fr; } }

/* ─── PAYOUT / AMOUNT TABLE ─────────────────────────────────── */
.amount-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.amount-table th, .amount-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); }
.amount-table th { font-family: var(--sans); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }
.amount-table td.amt { font-weight: 700; color: var(--terracotta); }

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-family: var(--sans); font-weight: 600; font-size: 0.82rem;
  color: var(--charcoal); margin-bottom: 0.4rem; letter-spacing: 0.02em;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule); background: var(--cream);
  font-family: var(--sans); font-size: 0.95rem; color: var(--charcoal);
  outline: none; transition: border-color 0.15s; border-radius: 0;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--terracotta); }
.form-group textarea { min-height: 110px; resize: vertical; }

/* ─── WIZARD ────────────────────────────────────────────────── */
.wizard { padding: 3rem 0 5rem; min-height: 70vh; }
.wiz-progress { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; margin-bottom: 0.5rem; }
.wiz-progress-bar { height: 100%; background: var(--terracotta); width: 0%; transition: width 0.3s ease; }
.wiz-step-meta { font-size: 0.8rem; color: var(--mute); letter-spacing: 0.04em; margin-bottom: 2rem; text-align: right; }

.wiz-step { display: none; animation: wizfade 0.25s ease; }
.wiz-step.active { display: block; }
@keyframes wizfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wiz-q { font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.15; margin: 0 0 0.6rem; }
.wiz-help { color: var(--mute); font-size: 1rem; line-height: 1.55; margin: 0 0 1.75rem; max-width: 560px; }
.wiz-help .eg { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--clay); font-style: italic; }

/* big tappable choice buttons (one question per screen) */
.wiz-choices { display: grid; gap: 0.85rem; max-width: 560px; }
.wiz-choice {
  display: flex; align-items: flex-start; gap: 0.9rem; text-align: left;
  background: var(--cream); border: 1.5px solid var(--rule);
  padding: 1.1rem 1.25rem; cursor: pointer; font-family: var(--sans);
  font-size: 1rem; color: var(--charcoal); transition: all 0.15s; width: 100%;
}
.wiz-choice:hover { border-color: var(--terracotta); transform: translateY(-1px); }
.wiz-choice.selected { border-color: var(--terracotta); background: #fff; box-shadow: inset 0 0 0 1px var(--terracotta); }
.wiz-choice .ic { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.wiz-choice .ct strong { display: block; font-weight: 600; margin-bottom: 2px; }
.wiz-choice .ct small { color: var(--mute); font-size: 0.85rem; }

.wiz-fields { max-width: 560px; }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; max-width: 560px; }
.wiz-nav .btn-back { background: none; border: none; color: var(--mute); font-family: var(--sans); font-weight: 600; cursor: pointer; font-size: 0.92rem; padding: 0.5rem; }
.wiz-nav .btn-back:hover { color: var(--charcoal); }
.wiz-nav .btn-back[hidden] { visibility: hidden; }

/* result screen */
.result-card { max-width: 640px; margin: 0 auto; background: var(--cream); border: 1px solid var(--rule); padding: 2.5rem; text-align: center; }
.result-badge { display: inline-block; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1.25rem; }
.result-badge.eligible { background: rgba(21,128,61,0.12); color: var(--green); }
.result-badge.maybe { background: rgba(212,160,23,0.15); color: #9a6c00; }
.result-badge.no { background: rgba(107,93,79,0.12); color: var(--mute); }
.result-amount { font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 4rem); color: var(--terracotta); line-height: 1; margin: 0.5rem 0; }
.result-reasons { text-align: left; max-width: 480px; margin: 1.5rem auto; }
.result-reasons li { color: var(--mute); font-size: 0.92rem; padding: 0.3rem 0; }

/* letter preview (blurred until paid) */
.letter-preview { position: relative; margin: 2rem auto; max-width: 640px; border: 1px solid var(--rule); background: #fff; }
.letter-doc { padding: 2.5rem; font-family: var(--serif); font-size: 0.85rem; line-height: 1.7; color: #333; text-align: left; }
.letter-preview.locked .letter-doc { filter: blur(5px); user-select: none; pointer-events: none; max-height: 360px; overflow: hidden; }
.letter-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; background: linear-gradient(180deg, rgba(250,247,242,0.2), rgba(250,247,242,0.95));
}
.letter-lock .lock-inner { background: #fff; border: 1px solid var(--rule); padding: 1.75rem; text-align: center; max-width: 340px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.price-tag { font-family: var(--serif); font-size: 2rem; color: var(--terracotta); }

/* ─── PWA INSTALL BANNER + iOS SHEET ────────────────────────── */
.install-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80;
  max-width: 520px; margin: 0 auto;
  background: var(--charcoal); color: var(--cream);
  border-radius: 12px; padding: 1rem 1.1rem;
  display: none; align-items: center; gap: 0.9rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  animation: wizfade 0.3s ease;
}
.install-banner.show { display: flex; }
.install-banner .ib-icon { width: 42px; height: 42px; border-radius: 9px; background: var(--terracotta); flex-shrink: 0; display: grid; place-items: center; font-size: 1.4rem; }
.install-banner .ib-text { flex: 1; line-height: 1.3; }
.install-banner .ib-text strong { display: block; font-size: 0.95rem; }
.install-banner .ib-text small { color: #d6cfc2; font-size: 0.8rem; }
.install-banner .ib-btn { background: var(--terracotta); color: #fff; border: none; padding: 0.6rem 1.1rem; border-radius: 8px; font-family: var(--sans); font-weight: 700; cursor: pointer; font-size: 0.9rem; }
.install-banner .ib-close { background: none; border: none; color: #9c8f7a; font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0 0.25rem; }

.ios-sheet { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.5); }
.ios-sheet.show { display: flex; }
.ios-sheet-inner { background: var(--cream); border-radius: 16px 16px 0 0; padding: 2rem 1.5rem; max-width: 520px; width: 100%; text-align: center; }
.ios-sheet-inner h3 { font-family: var(--serif); margin-bottom: 0.75rem; }
.ios-sheet-inner ol { text-align: left; color: var(--mute); margin: 1.25rem 0; padding-left: 1.25rem; line-height: 1.8; }
.ios-share { display: inline-block; padding: 1px 6px; border: 1px solid var(--terracotta); border-radius: 4px; color: var(--terracotta); }

/* ─── FAQ ───────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--rule); padding: 1.25rem 0; }
.faq-item summary { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; cursor: pointer; list-style: none; color: var(--charcoal); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--terracotta); font-weight: 400; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--mute); margin: 0.85rem 0 0; }

/* ─── ADMIN ─────────────────────────────────────────────────── */
.admin-wrap { max-width: 1000px; margin: 2rem auto; padding: 0 1.5rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--rule); }
.admin-table th, .admin-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); text-align: left; font-size: 0.9rem; }
.admin-table th { background: var(--bone); font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; }
.pill.pending { background: rgba(212,160,23,0.15); color: #9a6c00; }
.pill.paid { background: rgba(21,128,61,0.12); color: var(--green); }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer { background: var(--charcoal); color: var(--cream); padding: 3.5rem 2rem 2.5rem; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-logo { font-family: var(--serif); font-weight: 900; font-size: 1.4rem; color: var(--cream); margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.92rem; color: #d6cfc2; line-height: 1.6; max-width: 340px; }
.footer-col h4 { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; color: #d6cfc2; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 1rem; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--cream); text-decoration: none; padding: 0.25rem 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--terracotta); text-decoration: none; }
.footer-bottom { max-width: 1180px; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid #2a2a2a; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: #9c8f7a; }
.footer-bottom a { color: #d6cfc2; }
.disclaimer { font-size: 0.78rem; color: #9c8f7a; max-width: 1180px; margin: 1.25rem auto 0; line-height: 1.6; }

/* ─── PRINT (printable letter) ──────────────────────────────── */
@media print {
  nav, footer, .no-print { display: none !important; }
  body { background: #fff; }
  .letter-doc { padding: 0; font-size: 11pt; }
}
