:root {
  color-scheme: light dark;
  --bg: #f2f0eb;
  --surface: #faf9f6;
  --surface-2: #e8e6df;
  --text: #17201d;
  --muted: #5d6863;
  --line: #c8cbc3;
  --accent: #b84c2f;
  --accent-strong: #8d321d;
  --on-accent: #fffaf6;
  --header: rgba(242, 240, 235, 0.88);
  --shadow: 0 24px 60px rgba(44, 51, 47, 0.13);
  --radius: 14px;
  --max: 1240px;
  --font: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121816;
    --surface: #19211e;
    --surface-2: #222c28;
    --text: #edf1ed;
    --muted: #aab5af;
    --line: #39433f;
    --accent: #df7454;
    --accent-strong: #f08a69;
    --on-accent: #16100e;
    --header: rgba(18, 24, 22, 0.9);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body.menu-open { overflow: hidden; }

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

a { color: inherit; }

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(calc(100% - 40px), var(--max));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border: 7px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
}

.site-nav { display: flex; align-items: center; gap: 28px; }

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

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

.nav-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  text-align: center;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-open .menu-button span { opacity: 0; }
.menu-open .menu-button::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-button::after { transform: translateY(-6px) rotate(-45deg); }

.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.hero {
  min-height: calc(100dvh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(38px, 7vw, 110px);
  padding-block: clamp(40px, 8vh, 84px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  line-height: 1.02;
  letter-spacing: -0.055em;
}

h1 { margin-bottom: 22px; font-size: clamp(3.4rem, 7vw, 6.8rem); max-width: 9ch; }
h2 { margin-bottom: 22px; font-size: clamp(2.4rem, 5vw, 4.8rem); max-width: 12ch; }
h3 { margin-bottom: 10px; font-size: clamp(1.35rem, 2.2vw, 2rem); }

.lede { max-width: 35ch; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button-secondary { background: transparent; color: var(--text); }
.button-small { min-height: 40px; padding: 9px 14px; font-size: 0.88rem; }
.button.saved { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.hero-visual { position: relative; }

.hero-visual img {
  aspect-ratio: 4 / 5;
  max-height: calc(100dvh - 130px);
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-note {
  position: absolute;
  right: -24px;
  bottom: 28px;
  width: 190px;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 700;
}

.section { padding-block: clamp(78px, 11vw, 150px); }
.section-tight { padding-block: clamp(56px, 7vw, 90px); }
.section-intro { max-width: 640px; margin-bottom: 48px; }
.section-intro p { color: var(--muted); font-size: 1.08rem; }

.destination-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.destination-card {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: #f8f8f4;
}

.destination-card:nth-child(3) { grid-column: 1 / -1; min-height: 420px; }

.destination-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.16, 1, .3, 1);
}

.destination-card:hover img { transform: scale(1.025); }

.destination-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 12, 10, 0.76));
}

.card-content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.card-content p { margin: 0; color: rgba(255,255,255,.82); }
.card-content h3 { margin-bottom: 4px; color: #fff; }
.card-content .button { border-color: #f8f8f4; background: rgba(10,10,10,.3); color: #fff; backdrop-filter: blur(8px); }
.card-content .button.saved { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.manifesto {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: start;
  gap: clamp(32px, 8vw, 120px);
}

.manifesto-number { color: var(--accent); font-size: clamp(5rem, 15vw, 13rem); font-weight: 900; line-height: 0.75; letter-spacing: -0.08em; }
.manifesto-copy p { max-width: 40ch; color: var(--muted); font-size: 1.15rem; }

.story-strip {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.story-strip img { height: 100%; min-height: 480px; object-fit: cover; }
.story-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 70px); }
.story-copy p { color: var(--muted); }

.page-hero { padding-block: clamp(74px, 10vw, 130px) 60px; }
.page-hero h1 { max-width: 12ch; }
.page-hero p { max-width: 42ch; color: var(--muted); font-size: 1.15rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active { border-color: var(--text); background: var(--text); color: var(--bg); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.catalog-card {
  grid-column: span 7;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

.catalog-card:nth-child(even) { grid-column: span 5; }
.catalog-card.hidden { display: none; }
.catalog-card img { aspect-ratio: 16 / 11; object-fit: cover; }
.catalog-card:nth-child(even) img { aspect-ratio: 4 / 5; }
.catalog-body { padding: 24px; }
.catalog-body p { color: var(--muted); }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.catalog-meta span { color: var(--muted); font-size: 0.86rem; font-weight: 700; }

.planner-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
  gap: clamp(28px, 6vw, 80px);
  padding-bottom: 120px;
}

.planner-panel {
  position: sticky;
  top: 104px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
}

.form-field { display: grid; gap: 8px; margin-bottom: 18px; }
.form-field label { font-size: 0.9rem; font-weight: 750; }
.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
}

.form-field input::placeholder { color: var(--muted); opacity: 1; }
.form-field input:focus,
.form-field select:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent), transparent 65%); }

.trip-list { display: grid; gap: 14px; }
.empty-state { padding: 52px 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.empty-state p { max-width: 36ch; margin: 0 auto 22px; color: var(--muted); }

.trip-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
}

.trip-item img { width: 90px; height: 76px; border-radius: 9px; object-fit: cover; }
.trip-item h3 { margin: 0 0 3px; font-size: 1.05rem; letter-spacing: -0.02em; }
.trip-item p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.remove-button { width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
.remove-button:hover { background: var(--surface-2); color: var(--text); }

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 120px;
}

.about-grid img { min-height: 620px; object-fit: cover; border-radius: var(--radius); }
.principles { display: grid; gap: 30px; padding: clamp(20px, 5vw, 60px); }
.principle { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.principle:last-child { border-bottom: 0; }
.principle p { margin: 0; color: var(--muted); }

.site-footer { padding-block: 44px; border-top: 1px solid var(--line); }
.footer-wrap { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.footer-wrap p { margin: 7px 0 0; color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity 600ms ease, transform 600ms cubic-bezier(.16,1,.3,1); }

@media (max-width: 900px) {
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    top: 72px;
    right: 0;
    left: 0;
    min-height: calc(100dvh - 72px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 34px 20px;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(.16,1,.3,1);
  }
  .menu-open .site-nav { transform: translateX(0); }
  .site-nav a { font-size: 1.6rem; }
  .hero, .manifesto, .story-strip, .planner-layout, .about-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-block: 56px 80px; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; }
  .hero-visual img { max-height: none; aspect-ratio: 16 / 12; }
  .hero-note { right: 16px; }
  .destination-grid { grid-template-columns: 1fr; }
  .destination-card, .destination-card:nth-child(3) { grid-column: auto; min-height: 430px; }
  .story-strip img { min-height: 360px; }
  .catalog-card, .catalog-card:nth-child(even) { grid-column: span 12; }
  .catalog-card:nth-child(even) img { aspect-ratio: 16 / 11; }
  .planner-panel { position: static; }
  .about-grid img { min-height: 420px; }
}

@media (max-width: 560px) {
  .nav-wrap, .shell { width: min(calc(100% - 28px), var(--max)); }
  h1 { font-size: clamp(3.15rem, 17vw, 4.4rem); }
  .card-content { align-items: flex-start; flex-direction: column; padding: 22px; }
  .destination-card, .destination-card:nth-child(3) { min-height: 460px; }
  .manifesto-number { font-size: 7rem; }
  .trip-item { grid-template-columns: 70px 1fr auto; gap: 12px; }
  .trip-item img { width: 70px; height: 64px; }
  .footer-wrap { align-items: flex-start; flex-direction: column; }
}

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