/* Travelers Code: modern, sleek theme */
:root {
  --night: #1c2638;   /* soft midnight navy (was near-black) */
  --night-2: #24314a;
  --night-3: #2c3b58;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5e7eb;
  --bg: #f6f7fb;
  --white: #fff;
  --gold: #e9c38b;          /* brand sand, brightened */
  --gold-2: #f3dbb4;
  --accent: #f59e0b;
  --accent-ink: #1a1206;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --radius: 16px;
  --head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 .5em; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }
.demo-banner { background: var(--red); color: #fff; text-align: center; font-weight: 600; padding: 10px 16px; position: sticky; top: 0; z-index: 60; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 5; background: linear-gradient(160deg, #2a3a57 0%, #1f2a3f 45%, #1a2334 100%); color: #fff; padding-bottom: 72px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.routes path { fill: none; stroke: rgba(233,195,139,.35); stroke-width: 1.2; stroke-dasharray: 4 8; animation: dash 30s linear infinite; }
.routes circle { fill: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
@keyframes dash { to { stroke-dashoffset: -600; } }
.glow { position: absolute; width: 900px; height: 900px; right: -300px; top: -420px; background: radial-gradient(closest-side, rgba(245,158,11,.22), transparent 70%); }
.hero-bg::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, rgba(20,28,42,.35)); pointer-events: none; }

.nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 17px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--gold-2), var(--accent)); color: var(--accent-ink); font-family: var(--head); font-weight: 800; font-size: 13px; }
.brand-mark.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; vertical-align: middle; margin-right: 6px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; color: rgba(255,255,255,.75); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: #fff; }
@media (max-width: 560px) { .nav-links { display: none; } }

.hero-inner { position: relative; z-index: 2; padding-top: 48px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 13px; font-weight: 500; color: rgba(255,255,255,.85); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); font-weight: 800; margin: 22px 0 16px; }
.grad { background: linear-gradient(90deg, var(--gold-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.7); max-width: 560px; margin: 0 0 36px; }

/* ---------- Search ---------- */
.search { max-width: 1080px; }
.trip-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.trip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.trip-toggle span { display: block; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.7); transition: all .15s; }
.trip-toggle input:checked + span { background: #fff; color: var(--ink); }
.trip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { display: flex; align-items: stretch; background: #fff; border-radius: 20px; padding: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.35); gap: 4px; }
.field { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; border-radius: 14px; transition: background .15s; }
.field:hover { background: #f8fafc; }
.field:focus-within { background: #f1f5f9; }
.field + .field, .swap + .field { border-left: 1px solid var(--line); }
.field:focus-within, .field:focus-within + .field { border-left-color: transparent; }
.field.date { flex: 0 0 170px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); padding: 2px 0 0; width: 100%; min-width: 0; }
.field input::placeholder { color: #94a3b8; font-weight: 400; }
.field input.valid { color: var(--ink); }
.swap { align-self: center; flex: 0 0 auto; width: 36px; height: 36px; margin: 0 -10px; z-index: 2; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: transform .2s, box-shadow .15s; }
.swap:hover { transform: rotate(180deg); box-shadow: var(--shadow); }
.btn-search { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 0 28px; background: linear-gradient(135deg, var(--gold), var(--accent)); color: var(--accent-ink); font-family: var(--head); font-weight: 700; font-size: 16px; cursor: pointer; transition: transform .1s, filter .15s, box-shadow .15s; box-shadow: 0 6px 20px rgba(245,158,11,.35); }
.btn-search:hover { filter: brightness(1.05); box-shadow: 0 8px 28px rgba(245,158,11,.45); }
.btn-search:active { transform: scale(.98); }
.btn-search:disabled { filter: grayscale(.5); cursor: wait; }

@media (max-width: 920px) {
  .bar { flex-wrap: wrap; padding: 10px; gap: 6px; }
  .field, .field.date { flex: 1 1 100%; border: 1px solid var(--line) !important; }
  .field.date { flex: 1 1 calc(50% - 6px); }
  .swap { position: absolute; right: 22px; margin: 0; top: 52px; display: none; }
  .btn-search { flex: 1 1 100%; justify-content: center; height: 54px; }
}
.form-error { color: #fecaca; background: rgba(220,38,38,.18); border: 1px solid rgba(220,38,38,.4); border-radius: 10px; padding: 10px 14px; font-weight: 500; margin: 12px 0 0; }
.fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.hero .fine { color: rgba(255,255,255,.5); padding-left: 6px; }

/* Autocomplete */
.ac-list { position: absolute; top: calc(100% + 12px); left: 0; width: max(100%, 360px); margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(15,23,42,.25); border: 1px solid var(--line); z-index: 40; max-height: 360px; overflow-y: auto; color: var(--ink); }
.ac-list li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: #f1f5f9; }
.ac-code { font-family: var(--head); font-weight: 700; font-size: 13px; background: var(--night); color: var(--gold); border-radius: 8px; padding: 5px 0; width: 48px; text-align: center; flex: 0 0 auto; }
.ac-main { font-weight: 600; font-size: 15px; }
.ac-sub { font-size: 13px; color: var(--muted); }
.ac-empty { color: var(--muted); font-size: 14px; cursor: default !important; background: none !important; }

/* ---------- Results ---------- */
.results { padding-top: 40px; }
.results:empty { padding: 0; }
.leg-title { font-size: 24px; margin: 22px 0 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.leg-title small { font-family: var(--body); font-weight: 400; font-size: 15px; color: var(--muted); letter-spacing: 0; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 640px) { .summary { grid-template-columns: 1fr; } }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .v { font-family: var(--head); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.stat:nth-child(3) .v { color: var(--green); }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar > strong { font-family: var(--head); font-size: 18px; }
.toolbar select { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.toolbar label { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid transparent; padding: 20px 22px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr 220px; gap: 22px; transition: box-shadow .2s, border-color .2s, transform .2s; animation: rise .3s ease-out both; }
.card:hover { box-shadow: 0 12px 40px rgba(15,23,42,.1); border-color: #e2e8f0; transform: translateY(-1px); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .card { grid-template-columns: 1fr; padding: 18px; } }
.card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pill.save { background: var(--green-bg); color: var(--green); }
.pill.hidden { background: var(--night); color: var(--gold); }
.route-note { font-size: 14px; color: var(--muted); }
.route-note strong { color: var(--ink); font-weight: 600; }

.timeline { display: flex; flex-direction: column; }
.seg { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 8px 0; align-items: center; }
.seg.skip { opacity: .42; }
.logo { width: 38px; height: 38px; border-radius: 10px; background: #f1f5f9; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 12px; color: var(--ink-2); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.seg-main { font-size: 15px; }
.seg-main .t { font-family: var(--head); font-weight: 700; font-size: 17px; }
.seg-sub { font-size: 13px; color: var(--muted); }
.layover { font-size: 13px; color: var(--muted); padding: 2px 0 2px 52px; position: relative; }
.layover::before { content: ''; position: absolute; left: 18px; top: -4px; bottom: -4px; border-left: 2px dotted #cbd5e1; }
.getoff { margin: 8px 0; padding: 10px 14px 10px 52px; background: var(--green-bg); color: var(--green); border-radius: 10px; font-size: 14px; font-weight: 600; position: relative; }
.getoff::before { content: '✓'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 13px; }
.skip-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); margin-top: 6px; padding-left: 52px; }

.price-col { display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid #f1f5f9; padding-left: 22px; }
@media (max-width: 720px) { .price-col { border-left: 0; padding-left: 0; border-top: 1px solid #f1f5f9; padding-top: 14px; } }
.price { font-family: var(--head); font-weight: 800; font-size: 36px; line-height: 1; letter-spacing: -0.03em; }
.price small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.was { font-size: 13px; color: var(--muted); }
.was s { color: var(--red); }
.btn-book { display: block; text-align: center; background: var(--night-2); color: #fff; text-decoration: none; padding: 13px; border-radius: 12px; font-family: var(--head); font-weight: 700; font-size: 14px; transition: background .15s, transform .1s; }
.btn-book:hover { background: var(--night-3); }
.btn-book:active { transform: scale(.98); }
.btn-alt { text-align: center; font-size: 13px; color: var(--muted); }
.btn-alt:hover { color: var(--ink); }
.price-col .fine { margin: 0; font-size: 12px; }

.notice { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; font-size: 15px; color: #78350f; }
.notice.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.empty { background: #fff; border-radius: var(--radius); padding: 30px; text-align: center; color: var(--ink-2); box-shadow: var(--shadow); }
.empty strong { display: block; font-family: var(--head); font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.checked { font-size: 13px; color: var(--muted); margin: 8px 0 24px; }
details.regular { margin: 10px 0 30px; }
details.regular summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; list-style: none; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
details.regular summary::before { content: '▸'; transition: transform .15s; }
details.regular[open] summary::before { transform: rotate(90deg); }

.loading { background: #fff; border-radius: var(--radius); padding: 34px; text-align: center; box-shadow: var(--shadow); }
.plane-track { position: relative; height: 28px; max-width: 360px; margin: 6px auto 16px; border-bottom: 2px dashed #e2e8f0; }
.plane-track span { position: absolute; left: 0; top: 0; font-size: 22px; color: var(--accent); animation: fly 2.4s ease-in-out infinite; }
@keyframes fly { 0% { left: 0; } 50% { left: calc(100% - 24px); } 100% { left: 0; } }
@media (prefers-reduced-motion: reduce) { .plane-track span, .card, .routes path { animation: none; } }
.loading p { margin: 4px 0; color: var(--muted); }
.loading p strong { color: var(--ink); font-family: var(--head); font-size: 17px; }

/* ---------- Info sections ---------- */
.how, .rules { padding: 64px 20px 0; }
.how h2, .rules h2 { font-size: clamp(26px, 3.2vw, 34px); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--night); color: var(--gold); display: grid; place-items: center; font-family: var(--head); font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 680px) { .tips { grid-template-columns: 1fr; } }
.tip { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-left: 3px solid var(--accent); }
.tip strong { font-family: var(--head); font-size: 16px; }
.tip p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.footer { margin-top: 80px; background: linear-gradient(160deg, #24314a, #1c2638); color: rgba(255,255,255,.75); padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer .fine { color: rgba(255,255,255,.45); margin: 0; max-width: 620px; }
.footer a { color: var(--gold); }

/* ---------- About & contact ---------- */
.about { padding: 64px 20px 0; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }
.about h2 { font-size: clamp(26px, 3.2vw, 34px); }
.about p { color: var(--ink-2); font-size: 16px; margin: 0 0 14px; max-width: 620px; }
.contact-card { background: linear-gradient(160deg, #2a3a57, #1f2a3f); color: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); scroll-margin-top: 20px; }
.contact-card h3 { font-size: 20px; }
.contact-card p { color: rgba(255,255,255,.7); font-size: 15px; margin: 0 0 16px; }
.contact-link { display: inline-block; color: var(--accent-ink); background: linear-gradient(135deg, var(--gold), var(--accent)); padding: 11px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.contact-link:hover { filter: brightness(1.05); }
.hours { margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.8); }
.hours span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 600; margin-bottom: 2px; }

/* Deal badges */
.pill.best { background: #fff7ed; color: #c2410c; }
.was.note { font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 6px 8px; }
