/* =========================================================
   OtakuTyan — Premium dark travel editorial
   ========================================================= */

:root {
  --focus: var(--primary-light);

  --bg: #08090F;
  --bg-secondary: #0D0E16;
  --surface: #12131C;
  --surface-hover: #181925;

  --primary: #B84DFF;
  --primary-light: #D56BFF;
  --secondary: #7A3FFF;

  --pink: #FF5FC8;
  --purple: #9B4DFF;

  --text: #F5F3FA;
  --text-secondary: #B8B5C4;
  --text-muted: #777483;

  --border: rgba(255, 255, 255, 0.10);

  --grad-accent: linear-gradient(135deg, #B84DFF, #FF5FC8);
  --grad-fade: linear-gradient(180deg, rgba(8, 9, 15, 0), rgba(8, 9, 15, 0.95));

  --header-h: 70px;
  --maxw: 1280px;
  --radius: 16px;
  --ease: 0.35s cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Light theme override (subtle — the site is dark-first) */
:root[data-theme="light"] {
  --bg: #F6F5FA;
  --bg-secondary: #EFEDF5;
  --surface: #FFFFFF;
  --surface-hover: #F1EEF8;
  --text: #16131F;
  --text-secondary: #4A4658;
  --text-muted: #8A8697;
  --border: rgba(10, 8, 20, 0.12);
  --grad-fade: linear-gradient(180deg, rgba(246, 245, 250, 0), rgba(246, 245, 250, 0.9));
}

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

/* The width/height attributes on every <img> reserve space against layout
   shift, but they also land as presentational height hints. Defaulting to
   auto keeps the intrinsic ratio; the cover contexts below set a real
   height (or aspect-ratio) with a more specific selector. */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: rgba(184, 77, 255, 0.35); color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 64px;
}

.section { padding: 120px 0; }
.section--tight { padding: 96px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--ease), gap var(--ease);
}
.link-arrow:hover { color: var(--primary-light); gap: 14px; }

.gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
  will-change: transform;
}

.btn--primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(184, 77, 255, 0.6);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -12px rgba(255, 95, 200, 0.65);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 77, 255, 0.55);
  background: rgba(184, 77, 255, 0.08);
}

.btn--wide { padding: 15px 40px; }

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background var(--ease), border-color var(--ease), backdrop-filter var(--ease);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(8, 9, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
:root[data-theme="light"] .header.scrolled { background: rgba(246, 245, 250, 0.78); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo svg { width: 24px; height: 24px; }
.logo .logo-globe { color: var(--text); }
.logo .logo-accent {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 38px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.nav a:hover { color: var(--primary-light); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: color var(--ease), background var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.icon-btn svg { width: 20px; height: 20px; }

.hamburger { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 24s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to { transform: scale(1.16); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 15% 30%, rgba(122, 63, 255, 0.42), transparent 55%),
    radial-gradient(90% 80% at 100% 0%, rgba(255, 95, 200, 0.22), transparent 50%),
    linear-gradient(90deg, rgba(8, 9, 15, 0.85) 0%, rgba(8, 9, 15, 0.5) 45%, rgba(8, 9, 15, 0.15) 100%),
    linear-gradient(180deg, rgba(8, 9, 15, 0.4), rgba(8, 9, 15, 0.9));
}

.hero__inner {
  max-width: 640px;
  padding: 140px 0 120px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(184, 77, 255, 0.14);
  border: 1px solid rgba(184, 77, 255, 0.35);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.hero h1 {
  margin: 26px 0 22px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero h1 span { display: block; }

.hero__lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 40px;
}

.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-indicator .mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  position: relative;
}
.scroll-indicator .mouse::after {
  content: "";
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 7px;
  border-radius: 2px;
  background: var(--primary-light);
  transform: translateX(-50%);
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}

/* =========================================================
   DESTINATIONS
   ========================================================= */
.destinations { background: var(--bg); }

.dest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.dest-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--ease), box-shadow var(--ease);
}
.dest-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.dest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 15, 0) 35%, rgba(8, 9, 15, 0.9) 100%);
  z-index: 1;
}
.dest-card__body {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.dest-card__name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dest-card__country {
  font-size: 14px;
  color: var(--text-secondary);
}
.dest-card__arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  transition: opacity var(--ease), transform var(--ease);
}
.dest-card__arrow svg { width: 18px; height: 18px; color: #fff; }

.dest-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -25px rgba(184, 77, 255, 0.55);
}
.dest-card:hover img { transform: scale(1.06); }
.dest-card:hover .dest-card__arrow { opacity: 1; transform: translateY(0) scale(1); }

/* =========================================================
   STORIES
   ========================================================= */
.stories { background: var(--bg-secondary); }

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.story-card:hover {
  transform: translateY(-6px);
  border-color: rgba(184, 77, 255, 0.4);
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.9);
}

.story-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.story-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.story-card:hover .story-card__media img { transform: scale(1.05); }

/* The badge straddles the image edge. It lives in __body rather than
   __media because __media must clip the hover zoom, and overflow:hidden
   would cut the overhanging half off. */
.story-card__cat {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin-top: -38px;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--grad-accent);
  color: #fff;
}

.story-card__body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.story-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.story-card__desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 22px;
}
.story-card__meta {
  margin-top: auto;
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.story-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.story-card__meta svg { width: 14px; height: 14px; }

.center-cta { text-align: center; margin-top: 56px; }

/* =========================================================
   ABOUT
   ========================================================= */
.about { background: var(--bg); position: relative; overflow: hidden; }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.about__title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.about__text {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 440px;
  margin-bottom: 34px;
}

.about__media {
  position: relative;
  border-radius: var(--radius);
  box-shadow: 0 40px 120px -30px rgba(184, 77, 255, 0.5);
}
.about__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.about__media::before {
  content: "";
  position: absolute;
  inset: -30% -18% 20% 30%;
  background: radial-gradient(closest-side, rgba(184, 77, 255, 0.4), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

/* =========================================================
   NEWSLETTER
   ========================================================= */
.newsletter { background: var(--bg-secondary); }

.newsletter__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.newsletter__title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.newsletter__text {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 400px;
}

.newsletter__form {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.newsletter__form:focus-within {
  border-color: rgba(184, 77, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 77, 255, 0.12);
}
.newsletter__form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.newsletter__form input::placeholder { color: var(--text-muted); }

.newsletter__note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.newsletter__msg {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  min-height: 20px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 80px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}
.footer__brand-text {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 260px;
  margin-top: 18px;
}
.footer__col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer__col a {
  color: var(--text-secondary);
  font-size: 15px;
  transition: color var(--ease), padding-left var(--ease);
}
.footer__col a:hover { color: var(--primary-light); padding-left: 4px; }

.footer__socials { display: flex; gap: 10px; }
.footer__socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: color var(--ease), border-color var(--ease), transform var(--ease), background var(--ease);
}
.footer__socials a:hover {
  color: #fff;
  border-color: transparent;
  background: var(--grad-accent);
  transform: translateY(-3px);
}
.footer__socials svg { width: 17px; height: 17px; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.to-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform var(--ease), box-shadow var(--ease);
}
.to-top:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(255, 95, 200, 0.6); }
.to-top svg { width: 18px; height: 18px; }

/* Floating back-to-top (mobile / after scroll) */
.to-top-float {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity var(--ease), transform var(--ease);
}
.to-top-float.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* =========================================================
   SEARCH OVERLAY
   ========================================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 9, 15, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 24px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}
.search-overlay.open { opacity: 1; visibility: visible; }

.search-panel {
  width: 100%;
  max-width: 720px;
  transform: translateY(-24px);
  transition: transform var(--ease);
}
.search-overlay.open .search-panel { transform: translateY(0); }

.search-panel h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 16px;
  transition: border-color var(--ease);
}
.search-field:focus-within { border-color: var(--primary); }
.search-field svg { width: 24px; height: 24px; color: var(--text-muted); flex-shrink: 0; }
.search-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 20px;
  font-family: inherit;
}
.search-field input::placeholder { color: var(--text-muted); }

.search-popular { margin-top: 34px; }
.search-popular p {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.search-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.search-tags button {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--ease), border-color var(--ease), background var(--ease), transform var(--ease);
}
.search-tags button:hover {
  color: #fff;
  border-color: transparent;
  background: var(--grad-accent);
  transform: translateY(-2px);
}

.search-close {
  position: absolute;
  top: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: color var(--ease), border-color var(--ease), transform var(--ease);
}
.search-close:hover { color: #fff; border-color: var(--primary); transform: rotate(90deg); }
.search-close svg { width: 20px; height: 20px; }
.search-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.search-hint kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: inherit;
}

/* =========================================================
   MOBILE NAV
   ========================================================= */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  padding: calc(var(--header-h) + 40px) 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color var(--ease), padding-left var(--ease);
}
.mobile-nav a:hover { color: var(--primary-light); padding-left: 8px; }
.mobile-nav__footer {
  margin-top: auto;
  display: flex;
  gap: 12px;
}

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1199px) {
  .container { padding: 0 40px; }
  .section { padding: 96px 0; }
  .dest-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 26px; }
  .about__grid { gap: 48px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .hamburger { display: grid; }
  .desktop-only { display: none; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__media { order: -1; }
  .newsletter__grid { grid-template-columns: 1fr; gap: 32px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 767px) {
  .container { padding: 0 22px; }
  .section { padding: 72px 0; }
  .hero { min-height: 88vh; }
  .hero__inner { padding: 130px 0 110px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__overlay {
    background:
      radial-gradient(120% 90% at 50% 20%, rgba(122, 63, 255, 0.4), transparent 60%),
      linear-gradient(180deg, rgba(8, 9, 15, 0.45), rgba(8, 9, 15, 0.92));
  }
  .story-grid { grid-template-columns: 1fr; }
  .dest-grid {
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    margin: 0 -22px;
    padding-left: 22px; padding-right: 22px;
    scrollbar-width: none;
  }
  .dest-grid::-webkit-scrollbar { display: none; }
  .dest-card { scroll-snap-align: start; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
  .newsletter__form { flex-direction: column; border-radius: 20px; padding: 16px; }
  .newsletter__form .btn { width: 100%; }
  .search-overlay { padding-top: 10vh; }
}

/* =========================================================
   LIGHT THEME OVER DARK IMAGERY

   Hero overlays are dark in both themes, so anything sitting on top of
   a hero photo keeps the dark-theme text tokens. Re-declaring the custom
   properties on the section scope fixes every child at once.
   ========================================================= */
:root[data-theme="light"] .hero,
:root[data-theme="light"] .page-hero {
  --text: #F5F3FA;
  --text-secondary: #C9C5D6;
  --text-muted: #A6A2B4;
  --border: rgba(255, 255, 255, 0.16);
  /* `color` inherits as a resolved value, so redefining --text alone would
     not reach headings that simply inherit from <body>. */
  color: var(--text);
}

/* The header is transparent until scrolled — over a hero it needs light
   text, but on hero-less pages (guides, contact) it must stay dark. */
:root[data-theme="light"] body:has(.hero, .page-hero) .header:not(.scrolled) {
  --text: #F5F3FA;
  --text-secondary: #E6E3EE;
  --text-muted: #C9C5D6;
  --border: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

/* =========================================================
   FOCUS SYSTEM
   Low specificity via :where() so components can refine the ring,
   but nothing removes it by accident.
   ========================================================= */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.dest-card:focus-visible,
.tile:focus-visible,
.continent-card:focus-visible { outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 300;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 12px 30px -8px rgba(184, 77, 255, 0.6);
  transition: transform var(--ease);
}
/* Reveal on any focus, not just :focus-visible — a skip link is only ever
   reached by keyboard, and programmatic focus must show it too. */
.skip-link:focus { transform: translate(-50%, 0); }
.skip-link:focus-visible { outline-offset: 4px; }

/* =========================================================
   LANGUAGE SWITCH
   ========================================================= */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
/* The MODX build renders this as one <span class="is-active"> (current
   language) plus one <a> (link to the counterpart page). The static
   prototype used two <button>s; both shapes are styled here. */
.lang-switch button,
.lang-switch a,
.lang-switch span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease), background var(--ease);
}
.lang-switch button:hover,
.lang-switch a:hover { color: var(--text); }
.lang-switch button.is-active,
.lang-switch span.is-active { color: #fff; background: var(--grad-accent); }

/* =========================================================
   SAVED / BOOKMARKS
   ========================================================= */
.icon-btn--saved { position: relative; }
.saved-badge {
  position: absolute;
  top: 3px; right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-wrap > .story-card,
.card-wrap > .list-card { flex: 1; }

.bookmark-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(8, 9, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--ease), transform var(--ease), background var(--ease), color var(--ease);
}
.bookmark-btn svg { width: 18px; height: 18px; }
.card-wrap:hover .bookmark-btn,
.bookmark-btn:focus-visible,
.bookmark-btn.is-on { opacity: 1; transform: scale(1); }
.bookmark-btn:hover { background: rgba(8, 9, 15, 0.8); }
.bookmark-btn.is-on { color: var(--pink); border-color: rgba(255, 95, 200, 0.5); }
.bookmark-btn.is-on svg { fill: var(--pink); }

/* Touch devices never hover — keep the control permanently visible. */
@media (hover: none) {
  .bookmark-btn { opacity: 1; transform: scale(1); }
}

.saved-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(8, 9, 15, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.saved-panel {
  position: fixed;
  top: 0; right: 0;
  z-index: 170;
  width: min(400px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform var(--ease);
}
.saved-panel.open { transform: translateX(0); }
.saved-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.saved-panel__head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.saved-panel__body { flex: 1; overflow-y: auto; padding: 16px; }

.saved-empty {
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
  line-height: 1.6;
}

.saved-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  transition: background var(--ease);
}
.saved-item:hover { background: var(--surface-hover); }
.saved-item__link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.saved-item__link img {
  width: 60px; height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.saved-item__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.saved-item__kicker { display: block; margin-top: 3px; font-size: 13px; color: var(--text-muted); }
.saved-item__remove {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--ease), background var(--ease);
}
.saved-item__remove:hover { color: var(--pink); background: rgba(255, 95, 200, 0.12); }
.saved-item__remove svg { width: 15px; height: 15px; }

/* =========================================================
   COOKIE CONSENT
   ========================================================= */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 190;
  width: min(760px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px 26px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(18, 19, 28, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, calc(100% + 48px));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-theme="light"] .cookie-bar { background: rgba(255, 255, 255, 0.92); }
.cookie-bar.in { transform: translate(-50%, 0); }
.cookie-bar__text strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.cookie-bar__text p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.cookie-bar__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-bar__actions .btn { padding: 12px 20px; font-size: 14px; white-space: nowrap; }

/* =========================================================
   READING PROGRESS
   ========================================================= */
.read-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  z-index: 95;
  width: 100%;
  height: 3px;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
}

/* =========================================================
   MISC
   ========================================================= */
.mobile-nav__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mobile-nav__footer { flex-direction: column; align-items: stretch; }

@keyframes otShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}
.search-field.shake { animation: otShake 0.4s ease; }

@media (max-width: 900px) {
  .header-actions > .lang-switch,
  .header-actions > .js-theme-toggle { display: none; }
}

@media (max-width: 767px) {
  .dest-grid > * { scroll-snap-align: start; }
  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    bottom: 14px;
    padding: 20px;
  }
  .cookie-bar__actions { flex-direction: column-reverse; }
  .cookie-bar__actions .btn { width: 100%; }
  .saved-panel { width: 100vw; }
}
