/* ============================================================
   Pangolin Journeys — shared site styles
   Tokens, base, header, footer, buttons, reveal.
   Page-specific CSS lives inline in each page.
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.125rem;
  color: #1B1D1A;
  background: #fff;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ---- Tokens ---- */
:root {
  --green: #013631;
  --green-hover: #024d46;
  --gold: #FEEDA7;
  --cream: #FBF8EE;
  --ink: #1B1D1A;
  --white: #fff;
  --olive: #465B2D;

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --container-width: min(1280px, 100% - clamp(3rem, 8vw, 10rem));

  /* z-index scale */
  --z-sticky: 100;
  --z-header: 200;
  --z-overlay: 190;
}

/* ---- Utility ---- */
.container { width: var(--container-width); margin-inline: auto; }

.kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  display: block;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9em 1.9em;
  transition: background 240ms var(--ease-out-quart), color 240ms var(--ease-out-quart), border-color 240ms, transform 140ms var(--ease-out-quart);
}
.btn:active { transform: scale(0.97); }

.btn--solid-green {
  background: var(--green);
  color: var(--gold);
  border: 1.5px solid var(--green);
}
.btn--solid-green:hover { background: var(--green-hover); border-color: var(--green-hover); }

.btn--outline-green {
  color: var(--green);
  border: 1.5px solid var(--green);
}
.btn--outline-green:hover { background: var(--green); color: var(--gold); }

.btn--outline-cream {
  color: var(--cream);
  border: 1.5px solid rgba(251,248,238,0.45);
}
.btn--outline-cream:hover { background: var(--cream); color: var(--green); border-color: var(--cream); }

/* ---- Site Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.375rem clamp(1.5rem, 4vw, 4rem);
  transition: background 380ms var(--ease-out-quart), padding 380ms var(--ease-out-quart);
}
.site-header.is-scrolled {
  background: var(--green);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.header-logo { flex-shrink: 0; line-height: 0; }
/* drop-shadow keeps the logo legible over a transparent header on bright photos */
.header-logo img { height: 40px; width: auto; filter: drop-shadow(0 1px 5px rgba(1,54,49,0.45)); }
.header-logo .logo-dark { display: none; }
.site-header.is-scrolled .logo-light { display: none; }
.site-header.is-scrolled .logo-dark { display: block; }

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 2.25vw, 2.5rem);
}
.header-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.92;
  text-shadow: 0 1px 6px rgba(1,54,49,0.55);
  transition: opacity 180ms;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] { opacity: 1; }
.header-nav a[aria-current="page"] { color: var(--gold); }

.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5.5px;
  width: 26px; height: 26px;
  flex-shrink: 0;
  transition: transform 140ms var(--ease-out-quart);
}
.header-burger:active { transform: scale(0.9); }
.header-burger span {
  display: block;
  height: 1.5px;
  background: #fff;
  transition: transform 280ms var(--ease-out-quart), opacity 200ms;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--green);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.mobile-nav a:hover { color: #fff; }
.mobile-nav__close {
  position: absolute;
  top: 1.375rem; right: clamp(1.5rem, 4vw, 4rem);
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  transition: color 180ms, transform 140ms var(--ease-out-quart);
}
.mobile-nav__close:hover { color: #fff; }
.mobile-nav__close:active { transform: scale(0.9); }

@media (max-width: 1024px) {
  .header-nav { display: none; }
  .header-burger { display: flex; }
}

/* ---- Page hero (inner pages) — full-viewport, image-led like the home hero ---- */
.page-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  background: var(--green);
  color: #fff;
  /* top pad reserves the fixed-header band so the bottom-anchored content
     never slides under the nav on short / landscape viewports */
  padding: clamp(6rem, 14vh, 9rem) 0 clamp(3.5rem, 9vh, 7rem);
  overflow: hidden;
}
/* Two-stop scrim: keeps the middle of the photo crisp and clear, while
   darkening the top (nav legibility) and bottom (headline legibility). */
.page-hero--image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(1,54,49,0.78) 0%, rgba(1,54,49,0.35) 10%, rgba(1,54,49,0) 22%),
    linear-gradient(to top, rgba(1,54,49,0.85) 0%, rgba(1,54,49,0.28) 34%, rgba(1,54,49,0) 62%);
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.page-hero__inner { position: relative; z-index: 2; }
.page-hero .kicker { color: var(--gold); margin-bottom: 1.125rem; }
.page-hero h1 {
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.75rem, 5.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.page-hero p {
  font-style: italic;
  font-size: clamp(1.0625rem, 1.35vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  max-width: 46ch;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--green);
  border-top: 1px solid rgba(254,237,167,0.12);
  padding: clamp(3.5rem, 8vh, 6rem) 0 2.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(2rem, 4.5vw, 5rem);
  margin-bottom: 3rem;
}
.footer-brand img { height: 40px; width: auto; margin-bottom: 1.375rem; opacity: 0.88; }
.footer-brand p {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.58);
  max-width: 28ch;
}
.footer-col-head {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.125rem;
  display: block;
}
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.9375rem; color: rgba(255,255,255,0.6); transition: color 200ms; }
.footer-links a:hover { color: #fff; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
}
.footer-contact-item a { color: inherit; transition: color 200ms; }
.footer-contact-item a:hover { color: #fff; }
.footer-socials { display: flex; gap: 0.625rem; margin-top: 1.375rem; }
.footer-social-link {
  width: 36px; height: 36px;
  border: 1px solid rgba(254,237,167,0.2);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.58);
  font-size: 0.8125rem;
  transition: border-color 200ms, color 200ms, transform 140ms var(--ease-out-quart);
}
.footer-social-link:hover { border-color: var(--gold); color: var(--gold); }
.footer-social-link:active { transform: scale(0.92); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.625rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-align: center;
}
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 600px)  { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Featured journeys grid (destinations page) ---- */
.jrn-section { background: var(--cream); padding: clamp(4rem, 9vh, 7.5rem) 0; }
.jrn-section__head { margin-bottom: clamp(2rem, 4vh, 3rem); max-width: 60ch; }
.jrn-section__head .kicker { margin-bottom: 0.875rem; }
.jrn-section__head h2 {
  font-weight: 700;
  font-size: clamp(2rem, 3.25vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.014em;
  color: var(--green);
}
.jrn-section__head p {
  font-style: italic;
  font-size: clamp(1.0625rem, 1.2vw, 1.2rem);
  color: #555751;
  margin-top: 0.5rem;
}
.jrn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.journey-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(1,54,49,0.1);
  overflow: hidden;
  transition: box-shadow 340ms var(--ease-out-quart), transform 340ms var(--ease-out-quart);
}
.journey-card:hover { box-shadow: 0 6px 28px rgba(1,54,49,0.12); transform: translateY(-2px); }
.journey-card__img-wrap { overflow: hidden; }
.journey-card__img-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 640ms var(--ease-out-quart);
}
.journey-card:hover .journey-card__img-wrap img { transform: scale(1.05); }
.journey-card__body { padding: 1.125rem 1.25rem 1.5rem; }
.journey-card__loc {
  font-family: 'DM Mono', monospace;
  font-size: 0.5625rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.journey-card__loc::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--olive); flex-shrink: 0; }
.journey-card__title { font-size: 1.1875rem; font-weight: 600; line-height: 1.25; color: var(--green); margin-bottom: 1rem; }
.journey-card__meta { display: flex; gap: 1.5rem; padding-top: 0.875rem; border-top: 1px solid rgba(1,54,49,0.09); }
.journey-card__meta-item { display: flex; flex-direction: column; gap: 0.225rem; }
.journey-card__meta-label {
  font-family: 'DM Mono', monospace; font-size: 0.5rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8c86;
}
.journey-card__meta-value { font-family: 'DM Mono', monospace; font-size: 0.8125rem; font-weight: 500; color: var(--ink); }

/* ---- Scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 680ms var(--ease-out-expo), transform 680ms var(--ease-out-expo);
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
  .reveal-fade { opacity: 0; transition: opacity 580ms var(--ease-out-expo); }
  .reveal-fade.is-visible { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade { opacity: 1; transform: none; }
  /* Keep colour/opacity feedback; drop transform-based motion */
  .btn:active, .header-burger:active,
  .mobile-nav__close:active, .footer-social-link:active { transform: none; }
}
