/* ===========================
   1. CUSTOM PROPERTIES
   =========================== */

:root {
  /* Core palette */
  --ink: #0a0e1a;
  --ink-soft: #5c6478;
  --ink-muted: #8891a4;
  --paper: #f7f8fc;
  --white: #ffffff;

  /* Brand colors */
  --river: #0066ff;
  --river-deep: #003eb3;
  --river-glow: #4d94ff;

  /* Accent colors */
  --accent: #00d4aa;
  --accent-soft: #b3f0e0;
  --warm: #ff6b35;

  /* Surface colors */
  --surface: #ffffff;
  --surface-alt: #f0f2f8;
  --surface-dark: #0f1629;

  /* Functional */
  --border: rgba(10, 14, 26, 0.08);
  --shadow-sm: 0 1px 3px rgba(10, 14, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 14, 26, 0.08);
  --shadow-lg: 0 24px 64px rgba(10, 14, 26, 0.12);
  --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.15);

  /* Typography */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.5rem, 2vw, 1.75rem);
  --text-3xl: clamp(1.875rem, 3vw, 2.5rem);
  --text-4xl: clamp(2.5rem, 4.5vw, 3.75rem);
  --text-5xl: clamp(3rem, 6vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-x: clamp(1.5rem, 6vw, 6rem);
  --section-y: clamp(3rem, 8vw, 6rem);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
}

/* ===========================
   2. DARK MODE OVERRIDES
   =========================== */

[data-theme="dark"] {
  --ink: #e8eaf0;
  --ink-soft: #9aa0b0;
  --ink-muted: #6b7280;
  --paper: #0f1629;
  --surface: #151b30;
  --surface-alt: #1a2140;
  --surface-dark: #0a0e1a;
  --border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.25);
}

/* ===========================
   3. RESET & BASE
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ===========================
   4. TYPOGRAPHY
   =========================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

p {
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ===========================
   5. LAYOUT
   =========================== */

.site {
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--section-x);
}

.section {
  padding: var(--section-y) 0;
}

.section-head {
  margin-bottom: var(--space-12);
  max-width: 640px;
}

.section-head h2 {
  margin-bottom: var(--space-3);
  color: var(--ink);
}

.section-head p {
  font-size: var(--text-lg);
}

/* Emphasized section — light alt in light mode, dark in dark mode */
.section-dark {
  background: var(--surface-alt);
  color: var(--ink);
}

[data-theme="dark"] .section-dark {
  background: var(--surface-dark);
  color: var(--white);
}

[data-theme="dark"] .section-dark .section-head h2 {
  color: var(--white);
}

[data-theme="dark"] .section-dark .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .section-dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .section-dark .card h3,
[data-theme="dark"] .section-dark .card h4 {
  color: var(--white);
}

[data-theme="dark"] .section-dark .card p {
  color: rgba(255, 255, 255, 0.7);
}

.section-alt {
  background: var(--surface-alt);
}

/* ===========================
   6. HEADER & NAVIGATION
   =========================== */

.top {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--section-x);
  background: rgba(247, 248, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .top {
  background: rgba(15, 22, 41, 0.85);
}

.top.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--river);
}

.brand-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}

.brand-sub {
  font-size: var(--text-xs);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.tag {
  padding: var(--space-1) var(--space-3);
  background: var(--accent);
  color: #0a0e1a;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-color: var(--river);
}

.nav a.is-active {
  color: var(--river);
  border-color: var(--river);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  z-index: 1001;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Dark mode toggle */
.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

[data-theme="dark"] .dark-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===========================
   7. HERO
   =========================== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-12);
  min-height: 85vh;
  padding: var(--space-24) var(--section-x) var(--space-20);
  background: linear-gradient(135deg, var(--surface-alt), var(--paper));
  color: var(--ink);
  overflow: hidden;
}

[data-theme="dark"] .hero {
  background: var(--surface-dark);
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.12), transparent 70%);
  top: -250px;
  right: -150px;
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(0, 102, 255, 0.25), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.08), transparent 70%);
  bottom: -200px;
  left: -100px;
  pointer-events: none;
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(0, 212, 170, 0.15), transparent 70%);
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero h1 {
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  color: var(--ink);
}

[data-theme="dark"] .hero h1 {
  color: var(--white);
}

.hero .lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
}

[data-theme="dark"] .hero .lead {
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* Hero CTA overrides for light mode */
.hero .cta-outline {
  color: var(--river);
  border-color: var(--river);
}

.hero .cta-outline:hover {
  background: rgba(0, 102, 255, 0.05);
  border-color: var(--river-deep);
}

[data-theme="dark"] .hero .cta-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .hero .cta-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.pill-row span {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

[data-theme="dark"] .pill-row span {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .panel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.panel h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  color: var(--ink);
}

[data-theme="dark"] .panel h2 {
  color: var(--white);
}

.panel ul {
  margin: 0;
  padding-left: var(--space-6);
  color: var(--ink-soft);
}

[data-theme="dark"] .panel ul {
  color: rgba(255, 255, 255, 0.7);
}

.panel ul li + li {
  margin-top: var(--space-2);
}

.panel.accent {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.06), rgba(0, 212, 170, 0.06));
  border-color: rgba(0, 102, 255, 0.12);
}

[data-theme="dark"] .panel.accent {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(0, 212, 170, 0.15));
  border-color: rgba(0, 102, 255, 0.2);
}

.bars {
  display: grid;
  gap: var(--space-4);
}

.bars span {
  font-weight: 700;
  color: var(--ink);
}

[data-theme="dark"] .bars span {
  color: var(--white);
}

.bars em {
  display: block;
  font-style: normal;
  color: var(--ink-soft);
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}

[data-theme="dark"] .bars em {
  color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   8. CTAs
   =========================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.cta-primary,
.cta:not(.cta-outline) {
  background: var(--river);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.cta-primary:hover,
.cta:not(.cta-outline):hover {
  background: var(--river-deep);
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
  transform: translateY(-1px);
}

.cta-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.cta-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

/* ===========================
   9. FEATURE STRIP
   =========================== */

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding: var(--space-12) var(--section-x);
  background: var(--river);
  color: var(--white);
}

.strip-item {
  text-align: center;
  padding: var(--space-4);
}

.strip-value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.strip-label {
  display: block;
  font-size: var(--text-sm);
  opacity: 0.85;
}

/* ===========================
   10. CARDS
   =========================== */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin-bottom: var(--space-3);
  color: var(--ink);
}

.card h4 {
  margin-bottom: var(--space-3);
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: var(--text-base);
}

/* Accent left-border card variant */
.card-accent {
  border-left: 4px solid var(--river);
}

/* ===========================
   11. EXPERIENCE SECTION
   =========================== */

.experience-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(3, 1fr);
}

/* ===========================
   12. ITINERARY SECTION
   =========================== */

.itinerary-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(4, 1fr);
}

[data-theme="dark"] .section-dark .card-accent {
  border-left-color: var(--accent);
}

/* ===========================
   13. NOTES SECTION
   =========================== */

.notes-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(4, 1fr);
}

/* ===========================
   14. GETTING HERE SECTION
   =========================== */

.getting-here-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(3, 1fr);
}

/* ===========================
   15. FOOTER
   =========================== */

.footer {
  background: var(--surface-alt);
  color: var(--ink);
  padding: var(--space-16) var(--section-x) var(--space-12);
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .footer {
  background: var(--surface-dark);
  color: var(--white);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-12);
  align-items: start;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  display: block;
  margin-bottom: var(--space-2);
}

.footer-brand p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 360px;
}

[data-theme="dark"] .footer-brand p {
  color: rgba(255, 255, 255, 0.6);
}

.footer-nav {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--ink);
}

[data-theme="dark"] .footer-nav a {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin-inline: auto;
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-bottom span {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

[data-theme="dark"] .footer-bottom span {
  color: rgba(255, 255, 255, 0.4);
}

.footer-tags {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer-tags span {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

[data-theme="dark"] .footer-tags span {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

/* ===========================
   16. ANIMATIONS
   =========================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.experience-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.experience-grid .card.reveal:nth-child(3) { transition-delay: 0.2s; }

.itinerary-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.itinerary-grid .card.reveal:nth-child(3) { transition-delay: 0.2s; }
.itinerary-grid .card.reveal:nth-child(4) { transition-delay: 0.3s; }

.notes-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.notes-grid .card.reveal:nth-child(3) { transition-delay: 0.2s; }
.notes-grid .card.reveal:nth-child(4) { transition-delay: 0.3s; }

.getting-here-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.getting-here-grid .card.reveal:nth-child(3) { transition-delay: 0.2s; }

.strip .strip-item.reveal:nth-child(2) { transition-delay: 0.1s; }
.strip .strip-item.reveal:nth-child(3) { transition-delay: 0.2s; }
.strip .strip-item.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ===========================
   17. RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-16) var(--section-x) var(--space-12);
  }

  .itinerary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100dvh;
    background: var(--surface);
    flex-direction: column;
    padding: 5rem var(--space-8) var(--space-8);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 32px rgba(10, 14, 26, 0.15);
    z-index: 1000;
    gap: var(--space-2);
  }

  [data-theme="dark"] .nav {
    background: var(--surface-dark);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav a {
    font-size: var(--text-lg);
    padding: var(--space-3) 0;
    border-bottom: none;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.5);
    z-index: 999;
  }

  .experience-grid {
    grid-template-columns: 1fr;
  }

  .itinerary-grid {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .getting-here-grid {
    grid-template-columns: 1fr;
  }

  .strip {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    padding: var(--space-8) var(--section-x);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

@media (max-width: 480px) {
  .strip {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===========================
   18. REDUCED MOTION
   =========================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
