:root {
  --paper: #fbfaf7;
  --ink: #20201d;
  --muted: #68655d;
  --line: rgba(199, 166, 107, 0.46);
  --soft: #f0ece4;
  --olive: #5f6d4d;
  --clay: #9a664f;
  --gold: #c7a66b;
  --charcoal: #252422;
  --shadow: 0 24px 70px rgba(32, 32, 29, 0.14);
  --sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --nav-logo-size: 130px;
  --nav-logo-drop: 24px;
  --mobile-nav-logo-size: 54px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  letter-spacing: 0;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

button {
  font: inherit;
}

.nav,
.sample-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  padding: 0 clamp(18px, 5vw, 64px);
  color: #fff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.38);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.nav.is-scrolled,
.sample-nav.is-scrolled {
  color: var(--ink);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(222, 216, 203, 0.86);
  box-shadow: 0 10px 34px rgba(32, 32, 29, 0.08);
  text-shadow: none;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 66px;
}



.brand img {
  width: var(--nav-logo-size);
  height: var(--nav-logo-size);
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  transform: translateY(var(--nav-logo-drop));
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.brand-logo-dark {
  display: none;
}

.nav.is-scrolled .brand-logo-light,
.sample-nav.is-scrolled .brand-logo-light {
  display: none;
}

.nav.is-scrolled .brand-logo-dark,
.sample-nav.is-scrolled .brand-logo-dark {
  display: block;
}

.nav-links,
.sample-nav-links {
  display: flex;
  gap: clamp(8px, 1.2vw, 18px);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: relative;
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
}

.menu-button span::before,
.menu-button span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 1.5px;
  background: currentColor;
}

.menu-button span::before {
  top: -7px;
}

.menu-button span::after {
  top: 7px;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(560px, 82svh, 860px);
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: var(--charcoal);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.72)),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.16), transparent 34%);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus-x, 50%) var(--hero-focus-y, 50%);
  transform: translate3d(var(--hero-pan-start-x, 0), var(--hero-pan-start-y, 0), 0)
    scale(var(--hero-zoom-start, 1.025));
  animation: tceHeroDrift var(--hero-duration, 18s) cubic-bezier(0.37, 0, 0.18, 1) infinite alternate;
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.28fr);
  gap: clamp(24px, 4vw, 64px);
  width: min(1560px, calc(100% - 96px));
  margin: 0 auto;
  padding: 0 0 clamp(42px, 7vw, 78px);
  align-items: end;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  max-width: min(1120px, 100%);
  margin-bottom: 18px;
  font-size: clamp(4rem, 8.2vw, 8.8rem);
  line-height: 0.86;
}

.hero-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.55;
}

.hero-meta {
  display: grid;
  gap: 12px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-row strong {
  color: #fff;
  font-weight: 700;
}

.section {
  --section-y: clamp(34px, 5vw, 62px);
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(260px, 0.48fr);
  gap: clamp(20px, 4vw, 58px);
  align-items: center;
  margin-bottom: var(--section-y);
}

.section h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.65rem);
  line-height: 0.92;
}

.section-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.photo-board {
  display: grid;
  gap: 8px;
  height: clamp(360px, 52svh, 560px);
  background: var(--charcoal);
}

.photo-board a,
.photo-board div {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.photo-board span {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.62);
  text-transform: uppercase;
}

.board-trip {
  grid-template-columns: 1.25fr 0.72fr 0.72fr;
  grid-template-rows: 1fr 1fr;
}

.board-trip .main {
  grid-row: span 2;
}

.board-trip .wide {
  grid-column: span 2;
}

.board-day {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.board-day .main {
  grid-column: span 2;
  grid-row: span 2;
}

.board-day .wide {
  grid-column: span 2;
}

.board-poi {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 520px;
}

.board-poi .main {
  grid-row: span 2;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(280px, 0.38fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.story-copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.route-map {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(280px, 0.38fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: stretch;
}

.route-canvas {
  position: relative;
  min-height: clamp(320px, 44svh, 470px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(95, 109, 77, 0.12), transparent 32%),
    linear-gradient(0deg, rgba(199, 166, 107, 0.18), transparent 42%),
    var(--soft);
}

.route-canvas::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(32, 32, 29, 0.12);
  transform: rotate(-10deg);
}

.route-line {
  position: absolute;
  inset: 19% 18% 20% 20%;
  border-left: 2px solid rgba(154, 102, 79, 0.68);
  border-bottom: 2px solid rgba(154, 102, 79, 0.68);
  border-radius: 0 0 0 120px;
  transform: skewY(-11deg);
}

.route-pin {
  position: absolute;
  display: grid;
  gap: 6px;
  min-width: 138px;
  padding: 12px;
  color: var(--ink);
  background: rgba(251, 250, 247, 0.88);
  border: 1px solid rgba(32, 32, 29, 0.16);
  box-shadow: 0 14px 34px rgba(32, 32, 29, 0.11);
}

.route-pin::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 6px rgba(154, 102, 79, 0.15);
}

.route-pin strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.route-pin span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.route-pin small {
  color: var(--muted);
  line-height: 1.35;
}

.pin-lisbon {
  left: 11%;
  bottom: 18%;
}

.pin-douro {
  left: 43%;
  top: 42%;
}

.pin-porto {
  right: 10%;
  top: 14%;
}

.route-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.route-list article {
  padding: 18px;
  background: var(--paper);
}

.route-list h3 {
  margin-bottom: 8px;
  font-size: 1.65rem;
  line-height: 1;
}

.route-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.stat {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.itinerary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.day-card,
.poi-card,
.note-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.day-card img,
.poi-card img {
  height: 230px;
}

.card-copy {
  padding: 18px;
}

.card-copy h3,
.note-card h3 {
  margin-bottom: 10px;
  font-size: 1.72rem;
  line-height: 1;
}

.card-copy p,
.note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 0.38fr);
  gap: 22px;
  padding: 22px;
  background: var(--paper);
}

.time {
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin-bottom: 8px;
  font-size: 1.8rem;
  line-height: 1;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-item img {
  height: 130px;
}

.poi-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(260px, 0.32fr);
  gap: 28px;
}

.fact-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.fact-list div {
  padding: 18px;
  background: var(--paper);
}

.fact-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--clay);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fact-list span {
  color: var(--muted);
  line-height: 1.45;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-card {
  padding: 20px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
  background: var(--charcoal);
}

.cta-band h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes tceHeroDrift {
  to {
    transform: translate3d(var(--hero-pan-end-x, -1.15%), var(--hero-pan-end-y, 0.7%), 0)
      scale(var(--hero-zoom-end, 1.075));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero > img {
    animation: none;
    transform: none;
  }
}
@media (max-width: 920px) {
  .nav,
  .sample-nav {
    height: 58px;
    justify-content: center;
    padding: 0 14px;
  }

  .brand {
    position: absolute;
    left: 14px;
    min-height: 58px;
    font-size: 1.08rem;
  }

  
.brand img {
    width: var(--mobile-nav-logo-size);
    height: var(--mobile-nav-logo-size);
    max-width: 54px;
    max-height: 54px;
    transform: none;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.26));
  }

  .nav-links,
  .sample-nav-links {
    display: none;
  }

  .menu-button {
    position: absolute;
    right: 12px;
    display: grid;
  }

  .hero {
    min-height: clamp(700px, 86svh, 760px);
  }

  .hero-inner,
  .section-head,
  .split,
  .poi-layout,
  .route-map,
  .cta-band {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3.4rem, 15.5vw, 5.6rem);
  }

  .photo-board,
  .board-trip,
  .board-day,
  .board-poi {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    height: auto;
    min-height: 0;
  }

  .photo-board a,
  .photo-board div {
    aspect-ratio: 1 / 1;
  }

  .photo-board .main,
  .photo-board .wide {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 16 / 10;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-item img {
    height: 220px;
  }

  .route-canvas {
    min-height: 420px;
  }

  .route-pin {
    min-width: 126px;
  }
}

