/* Victoria Tour & Adventure — Phase 1 PWA
   Mobile-first stylesheet. Palette: deep navy + gold, echoing the brand emblem. */

:root {
  --teal-900: #141f38;
  --teal-700: #1b2a4a;
  --teal-600: #2b3f66;
  --teal-100: #e9edf5;
  --sand-100: #faf7f0;
  --sand-200: #efe7d3;
  --ink: #1e2433;
  --muted: #5d6474;
  --accent: #c9962e;
  --accent-dark: #9c741f;
  --danger: #c0392b;
  --ok: #1e8449;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(27, 42, 74, 0.10);
  --maxw: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--sand-100);
  line-height: 1.55;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 96px; }

/* ---------- header / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--teal-900); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 700; letter-spacing: .2px; font-size: 1rem; }
.brand small { display: block; font-weight: 400; font-size: .72rem; opacity: .75; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button {
  border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: .8rem; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--teal-900); font-weight: 700; }

/* ---------- hero (landing) ---------- */
.hero {
  background: linear-gradient(160deg, var(--teal-900) 0%, var(--teal-700) 60%, var(--teal-600) 100%);
  color: #fff; border-radius: 0 0 28px 28px;
  padding: 40px 20px 48px; text-align: center;
  margin: 0 -16px 24px;
}
.hero h1 { margin: 0 0 8px; font-size: 1.9rem; line-height: 1.2; }
.hero p.sub { margin: 0 auto 20px; max-width: 34ch; opacity: .92; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.fact {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 10px 14px; font-size: .85rem; min-width: 110px;
}
.fact strong { display: block; font-size: 1.15rem; }
.price-tag { font-size: 1.6rem; font-weight: 800; margin: 4px 0 18px; }
.price-tag small { font-size: .9rem; font-weight: 400; opacity: .85; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  border-radius: 999px; padding: 14px 30px; font-size: 1rem; font-weight: 700;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(224,138,46,.35); }
.btn-secondary { background: #fff; color: var(--teal-900); border: 2px solid var(--teal-900); }
.btn-ghost { background: transparent; color: var(--teal-900); border: 1.5px dashed var(--muted); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin: 16px 0;
}
.card h2 { margin: 0 0 10px; font-size: 1.2rem; color: var(--teal-900); }
.card h3 { margin: 14px 0 6px; font-size: 1rem; color: var(--teal-700); }
.muted { color: var(--muted); font-size: .9rem; }

/* ---------- station list ---------- */
.station-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.station-item {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid #e5e0d2; border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; font: inherit; color: inherit;
}
.station-item:hover { border-color: var(--teal-600); }
.station-item.active { border: 2px solid var(--teal-600); background: var(--teal-100); }
.station-item .num {
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  background: var(--teal-700); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.station-item.visited .num { background: var(--ok); }
.station-item .meta { flex: 1; min-width: 0; }
.station-item .meta strong { display: block; font-size: .95rem; }
.station-item .meta span { font-size: .8rem; color: var(--muted); }
.station-item .check { color: var(--ok); font-weight: 800; font-size: 1.2rem; }

/* ---------- station detail ---------- */
#station-detail { scroll-margin-top: 70px; }
.tip {
  border-left: 4px solid var(--accent); background: var(--sand-100);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; margin: 10px 0;
}
.tip strong { color: var(--teal-900); }

/* ---------- timers ---------- */
.timer-box { text-align: center; padding: 8px 0 2px; }
.timer-display { font-size: 2.6rem; font-weight: 800; color: var(--teal-900); font-variant-numeric: tabular-nums; }
.timer-label { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timer-controls { display: flex; gap: 10px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.timer-controls .btn { padding: 10px 22px; font-size: .92rem; }
.progress-bar { height: 10px; background: var(--sand-200); border-radius: 999px; overflow: hidden; margin: 10px 0 4px; }
.progress-bar > div { height: 100%; background: var(--teal-600); width: 0%; transition: width .3s ease; }

/* ---------- map ---------- */
#map { height: 62vh; min-height: 340px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1; }
.map-toolbar { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.gps-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-700); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.gps-btn[aria-pressed="true"] { background: var(--ok); }
.next-station-banner {
  background: var(--teal-100); border: 1px solid var(--teal-600); color: var(--teal-900);
  border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; font-size: .92rem;
}
.station-marker {
  background: var(--teal-700); color: #fff; border: 3px solid #fff; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.station-marker.done { background: var(--ok); }
.station-marker.next { background: var(--accent); transform: scale(1.15); }

/* ---------- demo / placeholder banners ---------- */
.demo-banner {
  background: #fff7e6; border: 2px dashed var(--accent-dark); color: #7a4a0d;
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; font-size: .92rem;
}
.demo-banner strong { display: block; margin-bottom: 4px; }

/* ---------- forms ---------- */
.field { margin: 12px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  border: 1.5px solid #d8d2c0; border-radius: 10px; font: inherit;
}
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee7d3; font-size: .95rem; }
.kv:last-child { border-bottom: 0; }

/* ---------- logo ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo img {
  height: 38px; width: auto; border-radius: 8px; display: block;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.hero-logo img {
  max-width: 230px; width: 70%; height: auto; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.30); margin-bottom: 18px; background: #fff;
}

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 32px 16px 24px; }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  .hero h1 { font-size: 2.4rem; }
  #map { height: 60vh; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
}

/* ---------- marker popup ---------- */
.marker-popup { text-align: center; min-width: 150px; }
.marker-popup strong { display: block; margin-bottom: 10px; font-size: .95rem; }
.btn-small { padding: 8px 14px; font-size: .85rem; }

/* ---------- celebration ---------- */
.celebration { position: relative; overflow: hidden; text-align: center; border: 2px solid var(--accent); }
.celebration-emoji { font-size: 3rem; line-height: 1; }
.celebration-time { font-size: 1.1rem; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px;
  animation-name: confetti-fall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(340px) rotate(720deg); opacity: 0; }
}
