/* ============================================================
   Cyrus AI Tour Guide — Shared Design System (Wave 1, 2026-10-20)
   One token system for the whole app: home, guide pages, gate.
   Brand: deep navy + gold (Play feature-graphic identity).
   Fonts (loaded by each page via Google Fonts link):
   Inter (UI) · Playfair Display (display) · Vazirmatn (FA/RTL)
   ============================================================ */

:root {
  /* color */
  --bg-0: #060d1d;
  --bg-1: #0a1428;
  --bg-2: #101d38;
  --bg-3: #0d1f3c;
  --brand: #0a2540;
  --brand-ink: #0f172a;
  --gold: #e8b84b;
  --gold-2: #c9962e;
  --gold-soft: #fbe3a6;
  --on-gold: #231603;
  --green: #35a06b;
  --on-green: #06231a;
  --text: #eef2f7;
  --text-2: #c3cfe0;
  --muted: #8fa3bd;
  --ok: #34c77b;
  --warn: #f5a623;
  --err: #f26d6d;
  --info: #7dd3fc;
  --line: rgba(232, 184, 75, .16);
  --line-soft: rgba(255, 255, 255, .09);
  --paper: #faf7f0;

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* shadows */
  --sh-1: 0 1px 3px rgba(3, 7, 18, .35);
  --sh-2: 0 10px 30px rgba(0, 0, 0, .35);
  --sh-gold: 0 8px 24px rgba(232, 184, 75, .35);
  --sh-pop: 0 18px 50px rgba(0, 0, 0, .5);

  /* spacing scale (4-pt) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* type */
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --font-fa: Vazirmatn, Inter, sans-serif;
  --wrap: 1120px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, [lang="fa"] body { font-family: var(--font-fa); }
img { max-width: 100%; }
a { color: var(--gold); }
::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 380px) { .wrap { padding: 0 16px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  padding: 13px 24px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:active { transform: scale(.98); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-2));
  color: var(--on-gold); box-shadow: var(--sh-gold);
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost {
  background: rgba(232, 184, 75, .07); color: var(--gold-soft);
  border-color: rgba(232, 184, 75, .45);
}
.btn-green { background: var(--green); color: var(--on-green); }
.btn-block { display: flex; width: 100%; }

/* ---------- forms ---------- */
label.f-label, .f-label {
  display: block; font-size: .7rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-sm); padding: 12px 14px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 184, 75, .22);
}
select option { color: var(--brand-ink); }

/* ---------- hero (guide pages) ---------- */
.hero {
  position: relative; text-align: center;
  padding: var(--sp-5) 20px var(--sp-6);
  background: linear-gradient(165deg, var(--bg-3) 0%, var(--bg-1) 58%, var(--bg-0) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 340px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(232, 184, 75, .14), transparent 62%);
}
.hero > * { position: relative; }
.hero-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  max-width: var(--wrap); margin: 0 auto var(--sp-5); text-align: start;
}
.hero-top .brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; min-width: 0;
}
.hero-top .mono {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; overflow: hidden;
  box-shadow: var(--sh-gold); background: linear-gradient(135deg, var(--gold-soft), var(--gold-2));
}
.hero-top .mono img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-top .brand .t1 {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: .98rem; color: #fff; line-height: 1.1; white-space: nowrap;
}
.hero-top .brand .t2 {
  display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; white-space: nowrap;
  font-family: var(--font-ui); font-style: normal;
}
.hero h1 {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.15;
  color: #fff; margin: 0 0 var(--sp-2);
}
.hero .sub, .hero p.sub {
  color: var(--text-2); font-size: 1rem; line-height: 1.6;
  margin: 0 auto var(--sp-4); max-width: 52ch;
}

/* language switcher */
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: var(--sp-3) 0; }
.lbtn {
  font: inherit; font-size: .72rem; font-weight: 700;
  padding: 7px 13px; border-radius: var(--r-full); cursor: pointer;
  background: rgba(255, 255, 255, .06); color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, .13);
  transition: all .16s ease;
}
.lbtn:hover { border-color: rgba(232, 184, 75, .5); color: var(--gold-soft); }
.lbtn.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* home link pill */
.homelink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 700; text-decoration: none;
  color: var(--gold-soft);
  border: 1px solid rgba(232, 184, 75, .45); border-radius: var(--r-full);
  padding: 8px 16px; background: rgba(232, 184, 75, .07);
  transition: all .16s ease;
}
.homelink:hover { background: rgba(232, 184, 75, .16); }

/* stat pills */
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin: var(--sp-3) 0; }
.stat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--gold-soft);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: var(--r-full);
}

/* ---------- filters / chips ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); padding: var(--sp-4) 20px var(--sp-2); max-width: var(--wrap); margin: 0 auto; }
.chip {
  font: inherit; font-size: .82rem; font-weight: 700;
  padding: 9px 16px; border-radius: var(--r-full); cursor: pointer;
  background: rgba(255, 255, 255, .05); color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, .13);
  transition: all .16s ease;
}
.chip:hover { border-color: rgba(232, 184, 75, .5); color: var(--gold-soft); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* ---------- card grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4); max-width: var(--wrap); margin: 0 auto;
  padding: var(--sp-4) 20px var(--sp-5);
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; padding-inline: 16px; } }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.chead { padding: 18px 16px 12px; position: relative; border-bottom: 1px solid var(--line); }
.chead h3 { margin: 8px 0 4px; font-size: 1.06rem; font-weight: 800; color: #fff; line-height: 1.3; }
.cbody { padding: 14px 16px 18px; }
.addr { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.prow { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }

/* action buttons inside cards */
.abtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; text-decoration: none;
  padding: 9px 16px; border-radius: var(--r-full);
  border: 1px solid var(--line); color: var(--text); background: var(--bg-3);
  transition: all .16s ease;
}
.abtn:hover { transform: translateY(-1px); }
.abtn.map {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 60%, var(--gold-2));
  color: var(--on-gold); border-color: transparent; box-shadow: var(--sh-gold);
}
.abtn.book { background: var(--green); color: var(--on-green); border-color: transparent; }
.phone {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--info); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.phone:hover { text-decoration: underline; }

/* ---------- badges (ONE system) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(232, 184, 75, .09);
  border: 1px solid rgba(232, 184, 75, .45);
  padding: 4px 10px; border-radius: var(--r-full); white-space: nowrap;
}
/* premium tier: solid gold */
.badge.fine, .badge.luxury {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 60%, var(--gold-2));
  color: var(--on-gold); border-color: transparent;
}
/* mid tier: default gold outline (above) */
.badge.mid, .badge.mid-range { /* inherits .badge */ }
/* quiet tiers */
.badge.casual, .badge.budget {
  color: var(--text-2); background: rgba(143, 163, 189, .09);
  border-color: rgba(143, 163, 189, .4);
}
.badge.boutique {
  color: var(--gold-soft); background: rgba(232, 184, 75, .17);
  border-color: var(--gold);
}
/* family-B category tints — subtle fills, AA-safe light text on navy */
.badge.green, .dpill.green { background: rgba(53, 160, 107, .16); border: 1px solid rgba(53, 160, 107, .55); color: #7bd8ab; }
.badge.teal, .dpill.teal { background: rgba(45, 212, 191, .12); border: 1px solid rgba(45, 212, 191, .45); color: #5eead4; }
.badge.amber, .dpill.amber { background: rgba(245, 166, 35, .13); border: 1px solid rgba(245, 166, 35, .5); color: #ffd88a; }
.badge.blue, .dpill.blue { background: rgba(125, 211, 252, .12); border: 1px solid rgba(125, 211, 252, .45); color: #a5e3ff; }
.badge.gray, .dpill.gray { background: rgba(143, 163, 189, .13); border: 1px solid rgba(143, 163, 189, .45); color: var(--text-2); }
.badge.red, .dpill.red { background: rgba(242, 109, 109, .13); border: 1px solid rgba(242, 109, 109, .5); color: #ffb3b3; }
.badge.purple, .dpill.purple { background: rgba(196, 181, 253, .13); border: 1px solid rgba(196, 181, 253, .45); color: #ddd0ff; }

/* ---------- photo-header cards (family B) ---------- */
.ph { position: relative; height: 200px; overflow: hidden; background: var(--bg-3); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 13, 29, .08) 40%, rgba(6, 13, 29, .82) 100%);
}
.ph .badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; backdrop-filter: blur(4px); }
.ptitle { position: absolute; bottom: 0; inset-inline: 0; z-index: 2; padding: 14px 16px; }
.ptitle h3 {
  margin: 0; font-size: 1.25rem; font-weight: 800; color: #fff; line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
}
.ptitle .loc { color: var(--gold-soft); font-size: .8rem; font-weight: 600; margin-top: 3px; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.card .body { padding: 14px 16px 18px; }
.card .park { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.card .feat { color: var(--text-2); font-size: .86rem; line-height: 1.65; }
.card .via { color: var(--muted); font-size: .8rem; margin-top: var(--sp-2); }
.tlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; text-decoration: none;
  color: var(--gold-soft); border: 1px solid rgba(232, 184, 75, .45);
  padding: 8px 15px; border-radius: var(--r-full); background: rgba(232, 184, 75, .07);
  margin-top: var(--sp-3);
}
.book {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; text-decoration: none;
  background: var(--green); color: var(--on-green); border: none; cursor: pointer;
  padding: 9px 16px; border-radius: var(--r-full); margin-top: var(--sp-3);
}
.pcredit { color: var(--muted); font-size: .68rem; margin-top: var(--sp-3); }

/* trail stat pills (hiking) */
.tstats { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--sp-2) 0; }
.tstat {
  background: var(--bg-3); border: 1px solid var(--line-soft); color: var(--text-2);
  font-size: .68rem; font-weight: 600; padding: 4px 10px; border-radius: var(--r-full);
}
.dpill {
  font-size: .68rem; font-weight: 800; letter-spacing: .03em;
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--bg-3); border: 1px solid var(--line-soft); color: var(--text-2);
}
.bestline { font-size: .78rem; color: var(--gold-soft); margin: 6px 0; }

/* ---------- sections & info cards (transport) ---------- */
.sec {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 1.4rem; color: #fff;
  max-width: 880px; margin: var(--sp-6) auto var(--sp-4); padding: 0 20px;
}
.tcard {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; margin: 0 auto 14px; max-width: 880px; box-shadow: var(--sh-1);
}
.tcard h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; color: #fff; }
.tcard p { margin: 0 0 12px; font-size: .9rem; color: var(--text-2); line-height: 1.7; }
.visit {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; text-decoration: none;
  color: var(--gold-soft); border: 1px solid rgba(232, 184, 75, .45);
  padding: 8px 15px; border-radius: var(--r-full); background: rgba(232, 184, 75, .07);
}
.visit:hover { background: rgba(232, 184, 75, .16); }

/* ---------- note / notice / credits / footer ---------- */
.note {
  max-width: var(--wrap); margin: var(--sp-4) auto; padding: var(--sp-4) 20px;
  color: var(--text-2); font-size: .88rem; line-height: 1.7;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg);
}
@media (max-width: 1160px) { .note { margin-inline: 16px; } }
.notice {
  max-width: var(--wrap); margin: var(--sp-4) auto; padding: 14px 18px;
  background: rgba(245, 166, 35, .1); border: 1px solid rgba(245, 166, 35, .4);
  color: #ffd88a; border-radius: var(--r-md); font-size: .88rem; line-height: 1.65;
}
.notice.fcfs { background: rgba(125, 211, 252, .09); border-color: rgba(125, 211, 252, .4); color: #a5e3ff; }
.credits { max-width: var(--wrap); margin: 0 auto; padding: var(--sp-4) 20px; }
.credits h4 { color: var(--text); font-size: .92rem; margin: 0 0 var(--sp-2); }
.credits ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: .8rem; line-height: 1.8; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.7; padding: var(--sp-5) 20px var(--sp-7); }
.foot a { color: var(--gold); text-decoration: none; }

/* ---------- purchase gate (unified) ---------- */
/* Markup stays per-page in Wave 1; Wave 2 removes the inline styles and
   adds .gate-card to the inner wrapper. These rules own the look. */
#vta-gate {
  min-height: 100vh; background: var(--bg-0); color: var(--text);
  font-family: var(--font-ui); padding: 48px 20px; text-align: center;
}
#vta-gate .gate-card,
#vta-gate > div {
  max-width: 420px; margin: 48px auto 0;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 34px 26px 30px; box-shadow: var(--sh-pop);
}
#vta-gate-t {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 1.5rem; color: #fff; margin: 16px 0 8px; line-height: 1.25;
}
#vta-gate-d { color: var(--text-2); line-height: 1.65; font-size: .94rem; margin: 0 0 22px; }
#vta-gate-b {
  display: inline-block; text-decoration: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-2));
  color: var(--on-gold); font-weight: 800; font-size: 1rem;
  padding: 14px 32px; border-radius: var(--r-md); box-shadow: var(--sh-gold);
}
#vta-gate-h { color: var(--gold); text-decoration: none; font-weight: 600; font-size: .9rem; }
#vta-gate-h:hover { color: var(--gold-soft); text-decoration: underline; }
