/* =====================================================================
   Components — buttons, glass, cards, rails, nav, forms
   ===================================================================== */

/* ---- Glass ----------------------------------------------------------- */

.glass {
  background: linear-gradient(160deg, rgba(255,255,255,.085), rgba(255,255,255,.028));
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.09);
}
.glass--deep {
  background: linear-gradient(160deg, rgba(7,29,52,.88), rgba(4,22,42,.94));
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

/* ---- Buttons --------------------------------------------------------- */

.btn {
  --btn-bg: var(--surface-strong);
  --btn-fg: var(--text-bright);
  --btn-bd: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 14px 26px;
  min-height: 48px;
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.005em;
  text-align: center;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-mid) var(--ease-out),
              background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.22), transparent 80%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--primary {
  --btn-bg: var(--grad-brand);
  --btn-fg: #04162A;
  --btn-bd: transparent;
  box-shadow: 0 10px 30px -10px rgba(30,167,232,.6);
}
.btn--primary:hover { box-shadow: 0 18px 44px -12px rgba(30,167,232,.75); }

.btn--ghost { --btn-bg: transparent; --btn-bd: var(--border-strong); }
.btn--ghost:hover { --btn-bg: var(--surface-strong); border-color: var(--azure); }

.btn--wa { --btn-bg: var(--whatsapp); --btn-fg: #04231A; --btn-bd: transparent; }
.btn--wa:hover { box-shadow: 0 16px 40px -12px rgba(37,211,102,.6); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #2B1D06; --btn-bd: transparent; }

.btn--sm  { padding: 9px 18px; min-height: 38px; font-size: .84rem; }
.btn--lg  { padding: 17px 34px; min-height: 56px; font-size: 1.03rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0; width: 46px; min-height: 46px; border-radius: var(--r-full); }

.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }

/* ---- Pills & badges -------------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: .45em;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
a.pill:hover { background: var(--surface-strong); border-color: var(--azure); color: var(--text-bright); transform: translateY(-1px); }
.pill.is-active { background: var(--grad-brand); border-color: transparent; color: #04162A; font-weight: 650; }

.badge {
  display: inline-flex; align-items: center; gap: .35em;
  padding: 5px 11px;
  border-radius: var(--r-full);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  background: rgba(2,16,31,.62);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text-bright);
}
.badge--gem   { background: rgba(229,180,91,.92); color: #33230A; border-color: transparent; }
.badge--trend { background: var(--grad-brand); color: #04162A; border-color: transparent; }
.badge--deal  { background: var(--coral); color: #3A0F08; border-color: transparent; }

.rating { color: var(--gold); letter-spacing: .08em; font-size: var(--fs-sm); }

/* ---- Cards ----------------------------------------------------------- */

.card {
  position: relative;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform var(--t-mid) var(--ease-out),
              box-shadow var(--t-mid) var(--ease-out),
              border-color var(--t-mid);
  will-change: transform;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--sh-3);
  color: var(--text);
}
.card__media { position: relative; overflow: hidden; background: var(--navy-800); }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter var(--t-mid);
}
.card:hover .card__media img { transform: scale(1.075); }
.card__badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.card__fav { position: absolute; top: 12px; right: 12px; z-index: 3; }

.card__body { padding: var(--s-5); }
.card__title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -.02em;
  margin: 0 0 6px;
  line-height: 1.25;
}
.card__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--text-dim);
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 99px; background: currentColor; opacity: .6; }
.card__desc { font-size: var(--fs-sm); color: var(--silver-dim); margin: 10px 0 0; }
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.card__price { font-family: var(--font-display); font-size: 1.12rem; font-weight: 650; color: var(--text-bright); }
.card__price s { color: var(--text-dim); font-size: .8rem; font-weight: 400; margin-right: 6px; }

/* Overlay variant: text sits on the image behind a veil. */
.card--overlay { background: var(--navy-900); }
.card--overlay .card__media { aspect-ratio: 3 / 4; }
.card--overlay .card__body {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top,
    rgba(2,16,31,.97) 0%, rgba(2,16,31,.90) 34%, rgba(2,16,31,.62) 68%, rgba(2,16,31,0) 100%);
  padding: var(--s-8) var(--s-5) var(--s-5);
}
.card--overlay .card__desc { color: rgba(220,228,238,.82); }

.card--wide .card__media { aspect-ratio: 16 / 10; }
.card--tall .card__media { aspect-ratio: 3 / 4; }
.card--square .card__media { aspect-ratio: 1; }

/* Feature card for the editorial band */
.card--feature { grid-column: span 2; grid-row: span 2; }
.card--feature .card__title { font-size: clamp(1.4rem, 2.4vw, 2.1rem); }
@media (max-width: 760px) { .card--feature { grid-column: span 1; grid-row: span 1; } }

/* ---- Horizontal rail (Netflix-style) --------------------------------- */

.rail { position: relative; }
.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(258px, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 6px var(--gutter) var(--s-5);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }
.rail__track--wide { grid-auto-columns: minmax(320px, 1fr); }
.rail__track--narrow { grid-auto-columns: minmax(190px, 1fr); }

.rail__nav { display: flex; gap: 8px; }
.rail__btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-bright);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
}
.rail__btn:hover { background: var(--surface-strong); border-color: var(--azure); transform: scale(1.06); }
.rail__btn[disabled] { opacity: .3; pointer-events: none; }
@media (max-width: 900px) { .rail__nav { display: none; } }

/* ---- Navigation ------------------------------------------------------ */

.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: transform var(--t-mid) var(--ease-out), background var(--t-mid), border-color var(--t-mid);
  border-bottom: 1px solid transparent;
}
.site-nav.is-solid {
  background: rgba(4,22,42,.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--border);
}
.site-nav.is-hidden { transform: translateY(-100%); }
.site-nav__inner { display: flex; align-items: center; gap: var(--s-5); width: 100%; }

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark {
  width: 42px; height: 42px; border-radius: var(--r-full);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px -6px rgba(30,167,232,.65);
  transition: transform var(--t-mid) var(--ease-back), box-shadow var(--t-mid);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.07); box-shadow: 0 0 0 1px rgba(69,200,245,.5), 0 10px 26px -6px rgba(30,167,232,.85); }
.brand__name {
  font-family: var(--font-display);
  font-weight: 650; font-size: 1.16rem;
  letter-spacing: -.035em;
  color: var(--text-bright);
  line-height: 1;
}
.brand__name b { font-weight: 650; color: var(--azure-bright); }
.brand__tag { display: block; font-size: var(--fs-micro); letter-spacing: .13em; text-transform: uppercase; color: var(--text-dim); margin-top: 3px; font-family: var(--font-body); }
@media (max-width: 1080px) { .brand__tag { display: none; } }
@media (max-width: 560px) {
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 1.02rem; }
  .site-nav__inner { gap: var(--s-3); }
  .site-nav { height: 64px; }
  :root { --nav-h: 64px; }
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 15px;
  white-space: nowrap;
  border-radius: var(--r-full);
  color: var(--text);
  font-size: .93rem;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-links a:hover, .nav-links a.is-active { background: var(--surface-strong); color: var(--text-bright); }
@media (max-width: 1040px) { .nav-links { display: none; } }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }

/* The nav carries a lot. Shed it in a deliberate order as space runs out. */
@media (max-width: 1320px) { .nav-links a[data-drop="3"] { display: none; } }
@media (max-width: 1200px) { .nav-links a[data-drop="2"] { display: none; } }
@media (max-width: 1140px) { .nav-actions .btn--passport { display: none; } }

/* ---- Search ---------------------------------------------------------- */

.search {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 300px;
}
@media (max-width: 1240px) { .search { max-width: 210px; } }
.search__field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 16px;
  height: 46px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-mid);
}
.search__field:focus-within {
  border-color: var(--azure);
  background: rgba(255,255,255,.09);
  box-shadow: 0 0 0 4px rgba(30,167,232,.14);
}
.search__field input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--text-bright); font-size: .93rem;
}
.search__field input::placeholder { color: var(--text-dim); }
.search__icon { color: var(--text-dim); flex-shrink: 0; }

.search--hero { max-width: 620px; margin-inline: auto; width: 100%; }
.search--hero .search__field {
  height: 64px; padding-left: 22px; padding-right: 10px;
  background: rgba(4,22,42,.62);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-color: rgba(255,255,255,.2);
  box-shadow: var(--sh-3);
}
.search--hero .search__field input { font-size: 1.05rem; }

.search__results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  z-index: 120;
  border-radius: var(--r-md);
  overflow: hidden;
  max-height: min(62vh, 480px);
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.search__results.is-open { opacity: 1; visibility: visible; transform: none; }
.search__row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background var(--t-fast);
}
.search__row:last-child { border-bottom: 0; }
.search__row:hover, .search__row.is-cursor { background: var(--surface-strong); color: var(--text-bright); }
.search__row img, .search__row .search__glyph {
  width: 42px; height: 42px; border-radius: 11px; object-fit: cover;
  background: var(--navy-800); flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.05rem; color: var(--azure-bright);
}
.search__row-main { min-width: 0; flex: 1; }
.search__row-title { font-weight: 600; color: var(--text-bright); font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__row-sub { font-size: var(--fs-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__row-type { font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--slate-dark); flex-shrink: 0; }
.search__empty { padding: 22px 18px; text-align: center; color: var(--text-dim); font-size: var(--fs-sm); }

/* ---- Mobile bottom navigation ---------------------------------------- */

.mobile-nav {
  position: fixed; inset: auto 0 0 0; z-index: 95;
  display: none;
  height: calc(var(--mobile-nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(4,22,42,.93);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border-top: 1px solid var(--border);
}
.mobile-nav__inner { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--mobile-nav); }
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-dim); font-size: var(--fs-micro); font-weight: 500;
  transition: color var(--t-fast);
  position: relative;
}
.mobile-nav a svg, .mobile-nav button svg { width: 21px; height: 21px; }
.mobile-nav a.is-active { color: var(--azure-bright); }
.mobile-nav a.is-active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2.5px; border-radius: 0 0 4px 4px; background: var(--grad-brand);
}
/* The More button is a bar item like the rest, not a button that looks pasted in. */
.mobile-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; cursor: pointer;
  color: var(--text-dim); font: 500 var(--fs-micro)/1 var(--font-body);
  transition: color var(--t-fast);
}
.mobile-nav button[aria-expanded="true"] { color: var(--azure-bright); }

/* ---- "More" sheet — every section of the site, one tap from any page -- */

.more-sheet { position: fixed; inset: 0; z-index: 120; }
.more-sheet[hidden] { display: none; }
.more-sheet__scrim {
  position: absolute; inset: 0; background: rgba(2,10,20,.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: sheetFade .22s var(--ease-out);
}
.more-sheet__panel {
  position: absolute; inset: auto 0 0 0;
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px var(--s-5) calc(var(--s-6) + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -24px 70px -20px rgba(0,0,0,.8);
  animation: sheetUp .28s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .more-sheet__panel, .more-sheet__scrim { animation: none; }
}
@keyframes sheetUp   { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }

.more-sheet__grip { width: 42px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.22); margin: 0 auto 14px; }
.more-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.more-sheet__head strong { font: 650 1.05rem var(--font-display); letter-spacing: -.02em; color: var(--text-bright); }
.more-sheet__x {
  width: 34px; height: 34px; border-radius: var(--r-full);
  background: rgba(255,255,255,.08); border: 1px solid var(--border); color: var(--text);
}
.more-sheet__search { margin-bottom: 16px; }
.more-sheet__list { list-style: none; margin: 0 0 18px; padding: 0; }
.more-sheet__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 4px; min-height: 52px;
  border-bottom: 1px solid var(--border);
  color: var(--text-bright); font-weight: 500;
}
.more-sheet__list a:active { background: rgba(30,167,232,.08); }
.more-sheet__list small { display: block; margin-top: 3px; font-size: var(--fs-xs); font-weight: 400; color: var(--text-dim); }
.more-sheet__list i { color: var(--azure); font-style: normal; }
.more-sheet__foot { display: grid; gap: 10px; }
@media (max-width: 900px) {
  .mobile-nav { display: block; }
  body { padding-bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom)); }
}

/* ---- Floating WhatsApp ----------------------------------------------- */

.wa-float {
  position: fixed; right: 20px; bottom: 22px; z-index: 88;
  width: 56px; height: 56px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--whatsapp); color: #04231A;
  box-shadow: 0 12px 34px -8px rgba(37,211,102,.62);
  transition: transform var(--t-mid) var(--ease-back), box-shadow var(--t-mid),
              opacity var(--t-fast);
}
.wa-float:hover { transform: scale(1.09) rotate(4deg); color: #04231A; }
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 900px) {
  .wa-float { bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom) + 16px); right: 16px; width: 52px; height: 52px; }
  /* On a phone the floating button sits exactly where the hero's Search
     button lands, so it stays out of the way until the visitor has scrolled
     past the first screen. Everything it offers is in the hero anyway. */
  .wa-float.is-tucked { transform: translateY(16px) scale(.5); opacity: 0; pointer-events: none; }
}

/* ---- Forms ----------------------------------------------------------- */

.field { display: block; margin-bottom: var(--s-4); }
.field__label {
  display: block; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 7px;
}
.field__label .req { color: var(--coral); }

.input, .select, .textarea {
  width: 100%;
  padding: 13px 16px;
  min-height: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-bright);
  font-size: .95rem;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-mid);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--slate-dark); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--azure);
  background: rgba(255,255,255,.075);
  box-shadow: 0 0 0 4px rgba(30,167,232,.14);
}
.textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%237C8FA8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}
.select option { background: var(--navy-850); color: var(--text-bright); }

.field-row { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.honeypot { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Chip-style radio group */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  display: inline-flex; align-items: center; gap: .4em;
  padding: 9px 17px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-sm); cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.chips label:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.chips input:checked + label {
  background: var(--grad-brand); border-color: transparent;
  color: #04162A; font-weight: 600;
}
.chips input:focus-visible + label { outline: 2px solid var(--azure-bright); outline-offset: 2px; }

/* ---- Alerts ---------------------------------------------------------- */

.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-4);
}
.alert--ok    { border-color: rgba(63,208,138,.42); background: rgba(63,208,138,.10); color: #A8EDCB; }
.alert--error { border-color: rgba(255,122,102,.42); background: rgba(255,122,102,.10); color: #FFC0B5; }
.alert--info  { border-color: rgba(30,167,232,.42); background: rgba(30,167,232,.10); color: var(--azure-soft); }

/* ---- Toast ----------------------------------------------------------- */

.toast-host {
  position: fixed; z-index: 200;
  left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: min(92vw, 460px);
}
@media (max-width: 900px) { .toast-host { bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom) + 18px); } }
.toast {
  pointer-events: auto;
  padding: 13px 20px;
  border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 500;
  background: rgba(4,22,42,.94);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  color: var(--text-bright);
  box-shadow: var(--sh-3);
  animation: toastIn .4s var(--ease-back);
}
.toast--ok { border-color: rgba(63,208,138,.5); }
.toast--error { border-color: rgba(255,122,102,.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---- Stats ----------------------------------------------------------- */

.stat-row { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 56px); }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 650; letter-spacing: -.03em;
  color: var(--text-bright); line-height: 1;
}
.stat__label { font-size: var(--fs-xs); color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }

/* ---- Breadcrumbs ----------------------------------------------------- */

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: var(--text-dim);
  margin-bottom: var(--s-4);
}
.crumbs a { color: var(--silver-dim); }
.crumbs a:hover { color: var(--azure-bright); }
.crumbs .sep { opacity: .45; }

/* ---- Pagination ------------------------------------------------------ */

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: var(--s-7); flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text); font-size: var(--fs-sm); font-weight: 500;
  transition: all var(--t-fast);
}
.pager a:hover { border-color: var(--azure); color: var(--text-bright); background: var(--surface-strong); }
.pager .is-current { background: var(--grad-brand); border-color: transparent; color: #04162A; font-weight: 650; }
.pager .is-gap { border: 0; background: none; }

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-y);
  padding-top: clamp(48px, 7vw, 90px);
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, transparent, rgba(2,16,31,.6));
}
.footer-grid {
  display: grid; gap: clamp(28px, 4vw, 56px);
  /* min() inside minmax keeps the track from forcing the page wider than
     the viewport on narrow phones. */
  grid-template-columns:
    minmax(min(100%, 240px), 1.4fr)
    repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
@media (max-width: 620px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
.footer-col h4 {
  font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: var(--s-4); font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--silver-dim); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--azure-bright); }

.socials { display: flex; gap: 10px; margin-top: var(--s-4); }
.socials a {
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--silver-dim);
  transition: all var(--t-fast) var(--ease-out);
}
.socials a:hover { background: var(--grad-brand); color: #04162A; border-color: transparent; transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

.footer-base {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 64px);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--text-dim);
}

/* ---- Gallery / lightbox ---------------------------------------------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.gallery__item {
  border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1;
  background: var(--navy-800); cursor: zoom-in; border: 1px solid var(--border);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery__item:hover img { transform: scale(1.08); }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(2,10,20,.94);
  backdrop-filter: blur(14px);
  display: grid; place-items: center;
  padding: var(--gutter);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-mid), visibility var(--t-mid);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--r-md); box-shadow: var(--sh-3); }
.lightbox__close {
  position: absolute; top: 20px; right: 20px;
  width: 46px; height: 46px; border-radius: var(--r-full);
  background: var(--surface-strong); border: 1px solid var(--border-strong);
  color: var(--text-bright); display: grid; place-items: center; font-size: 1.3rem;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: var(--r-full);
  background: var(--surface-strong); border: 1px solid var(--border-strong);
  color: var(--text-bright); display: grid; place-items: center;
}
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* ---- Empty state ----------------------------------------------------- */

.empty {
  text-align: center; padding: clamp(40px, 8vw, 90px) var(--s-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--text-dim);
}
.empty__icon { font-size: 2.6rem; margin-bottom: var(--s-4); opacity: .6; }
.empty h3 { color: var(--silver-dim); }

/* ---- Info list (place facts) ----------------------------------------- */

.facts { display: grid; gap: 1px; background: var(--border); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.fact {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: 15px 18px; background: var(--bg-elevated);
}
.fact__label {
  flex: 0 0 42%; max-width: 190px;
  font-size: var(--fs-xs); letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 600; padding-top: 2px;
}
.fact__value { flex: 1; font-size: var(--fs-sm); color: var(--text-bright); }

/* ---- Map (Leaflet) --------------------------------------------------- */

.leaflet-map {
  height: 420px; border-radius: var(--r-lg);
  border: 1px solid var(--border); overflow: hidden; background: var(--navy-800);
  z-index: 1;
}
.leaflet-container { background: var(--navy-850) !important; font-family: var(--font-body) !important; }
.leaflet-tile { filter: saturate(.72) brightness(.78) contrast(1.06); }
.leaflet-popup-content-wrapper {
  background: rgba(7,29,52,.96) !important; color: var(--text) !important;
  border-radius: var(--r-md) !important; border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.leaflet-popup-tip { background: rgba(7,29,52,.96) !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: var(--fs-sm) !important; }
.leaflet-popup-content b { color: var(--text-bright); }
.leaflet-control-attribution {
  background: rgba(4,22,42,.7) !important; color: var(--slate-dark) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--slate) !important; }
.leaflet-bar a {
  background: rgba(7,29,52,.94) !important; color: var(--text-bright) !important;
  border-color: var(--border) !important;
}
.leaflet-bar a:hover { background: var(--navy-700) !important; }

.map-pin {
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: var(--grad-brand); border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(30,167,232,.6);
  display: grid; place-items: center; color: #04162A; font-weight: 700; font-size: 12px;
}

/* ── Brand mark, everywhere it appears ─────────────────────────────────────
   The lockup markup comes from partials/brandmark.php, so these rules cover
   the nav, the footer, the error page, the passport cover and the splash. */

.brand--footer { margin-bottom: 18px; }
.brand--footer .brand__tag { display: block; }

.error-page__brand { margin-bottom: 22px; }
.error-page__brand .brand { justify-content: center; }

.passport-hero__crest { margin-bottom: 18px; }
.passport-hero__crest .brand__tag { color: var(--gold, #E5B45B); letter-spacing: .16em; }

/* Installed-app splash. Only ever visible in standalone mode, and it removes
   itself on a CSS animation, so a JS failure can never leave it covering the
   page. */
.app-splash { display: none; }
@media (display-mode: standalone) {
  .app-splash {
    display: grid; position: fixed; inset: 0; z-index: 9999;
    place-content: center; justify-items: center; gap: 18px;
    background:
      radial-gradient(900px 600px at 50% 0%, rgba(30,167,232,.18), transparent 60%),
      var(--navy-950, #04162A);
    animation: splash-out .5s var(--ease-out, ease) 1.05s forwards;
    pointer-events: none;
  }
  .app-splash img {
    width: 96px; height: 96px; border-radius: var(--r-full);
    box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 50px -18px rgba(30,167,232,.9);
    animation: splash-in .7s var(--ease-back, cubic-bezier(.34,1.56,.64,1)) both;
  }
  .app-splash span {
    font-family: var(--font-display); font-weight: 650; font-size: 1.25rem;
    letter-spacing: -.03em; color: var(--text-bright, #F2F7FF);
  }
}
@keyframes splash-in  { from { opacity: 0; transform: scale(.86) } to { opacity: 1; transform: none } }
@keyframes splash-out { to   { opacity: 0; visibility: hidden } }
@media (prefers-reduced-motion: reduce) {
  .app-splash, .app-splash img { animation-duration: .01ms; }
}

/* Print header — an itinerary printed from this site should still say where
   it came from. Hidden on screen. */
.print-brand { display: none; }


/* ---- Mobile tap targets ---------------------------------------------- */
/* Text links in the footer and breadcrumbs sit at ~17px tall, which is a
   small target on a phone. Padding, not font size, fixes that. */
@media (max-width: 760px) {
  .footer-col ul a, .footer-base a { display: inline-block; padding: 7px 0; }
  .crumbs a, .crumbs span { display: inline-block; padding-block: 8px; }
  .tiny a, .small a { display: inline-block; padding-block: 6px; }
  .socials a { width: 42px; height: 42px; }
}
