/* ==========================================================================
   itinerary.id — shared foundation
   Design tokens, reset, fonts, and the components used by every page
   (header, drawer nav, footer, buttons, forms, focus states).
   ========================================================================== */

/* ---- Fonts (Outfit only — Latin coverage; system stack as fallback) ---- */
@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  color-scheme: light dark;

  /* brand */
  --primary: #587b7f;
  --primary-strong: #46666a;
  --secondary: #e2c044;
  --secondary-text: #8a6f00; /* gold that passes AA on light surfaces */
  --tertiary: #393e41;

  /* roles — light */
  --bg: #ffffff;
  --surface: #f2f5f5;
  --surface-raised: #ffffff;
  --text: #22282a;
  --text-muted: #5b6467;
  --border: #d7dedf;
  --on-primary: #ffffff;
  --on-media: #ffffff; /* text over photography, always on a scrim */
  --footer-bg: #2f3538;
  --footer-text: #c9cccd;
  --focus: #b8860b;

  --glass-bg: linear-gradient(115deg, rgba(226, 192, 68, 0.05), rgba(46, 62, 64, 0.55));
  --glass-border: rgba(255, 255, 255, 0.55);
  --scrim-bottom: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0) 70%);

  --radius: 1rem;
  --radius-sm: 0.5rem;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 4.25rem;

  --font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --surface: #1d2327;
    --surface-raised: #232a2e;
    --text: #e8eaeb;
    --text-muted: #a8b0b3;
    --border: #3a4348;
    --footer-bg: #101416;
    --footer-text: #b7bcbe;
    --focus: #e2c044;
  }
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Utilities ---- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus-visible {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.site-header .container {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

.logo span {
  color: var(--primary);
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--on-primary);
}

/* ---- Mobile drawer nav ---- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  width: min(20rem, 85vw);
  height: 100dvh;
  padding: 1rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
  background: var(--surface-raised);
  box-shadow: -0.5rem 0 3rem rgba(0, 0, 0, 0.25);
  transform: translateX(105%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drawer.active {
  transform: translateX(0);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}

.drawer-close svg {
  width: 24px;
  height: 24px;
}

.drawer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 500;
}

.drawer nav a:hover {
  background: var(--surface);
  color: var(--primary);
}

.drawer nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
}

.drawer .btn {
  margin-top: auto;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(0.25rem);
  backdrop-filter: blur(0.25rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 900px) {
  .site-nav,
  .site-header .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (min-width: 901px) {
  .drawer,
  .overlay {
    display: none;
  }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--footer-bg);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer p {
  color: var(--footer-text);
  font-size: 0.95rem;
}

.site-footer .items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  color: var(--footer-text);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---- Shared section heading pattern ---- */
.section-head {
  text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
}

.section-head .eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  color: var(--text);
}
