/* ═══════════════════════════════════════════════
   Go2Gravel — styles.css
   Custom CSS beyond Tailwind
   ═══════════════════════════════════════════════ */

:root {
  --go2orange: #E87722;
  --charcoal: #1E1C1A;
  --bone: #F3ECDE;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display type gets optical-size + tightened metrics */
.font-display {
  font-variation-settings: "opsz" 96;
  font-feature-settings: "ss01", "cv11";
}

/* Keep the hero on one grid with deliberate headline and reading measures. */
#hero .hero-content {
  padding: 8.5rem clamp(1.5rem, 5vw, 4rem) 4.5rem;
}

#hero .hero-image {
  height: 70%;
  object-position: 68% center;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

@media (min-width: 1024px) {
  #hero .hero-image { height: 100%; object-position: center; mask-image: none; }
}

#hero .hero-copy {
  max-width: 70rem;
}

#hero .hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  max-width: 100%;
  font-size: 0.625rem;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-wrap: balance;
}

#hero .hero-eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 2px;
  flex-shrink: 0;
  background: currentColor;
}

#hero .hero-headline {
  font-size: clamp(2.625rem, 10.5vw, 6.5rem);
  font-weight: 800;
  font-style: normal;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

#hero .hero-headline > span {
  display: block;
}

#hero .hero-headline em {
  font-style: inherit;
}

#hero .hero-description {
  margin-top: 1.75rem;
  max-width: 44ch;
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
}

#hero .hero-actions {
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.75rem;
  max-width: 30rem;
}

#hero .hero-actions > a {
  min-height: 3.25rem;
  padding: 0.875rem 1.125rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.25;
}

#hero .hero-actions > a:first-child { flex: 1.2; }
#hero .hero-actions > a:last-child { flex: 1; }

@media (max-width: 359px) {
  #hero .hero-eyebrow { gap: 0.5rem; letter-spacing: 0.06em; }
  #hero .hero-eyebrow::before { width: 1rem; }
  #hero .hero-actions { gap: 0.5rem; }
  #hero .hero-actions > a { padding-inline: 0.75rem; font-size: 0.8125rem; }
}

@media (min-width: 768px) {
  #hero .hero-content { padding-bottom: 6rem; }
  #hero .hero-eyebrow { font-size: 0.6875rem; }
  #hero .hero-description { margin-top: 2rem; }
  #hero .hero-actions { margin-top: 2.25rem; }
}

@media (min-width: 1024px) {
  #hero .hero-copy {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: end;
  }
  #hero .hero-eyebrow { grid-column: 1 / -1; }
  #hero .hero-headline { grid-column: 1; grid-row: 2 / 4; font-size: clamp(4rem, 6.5vw, 6.5rem); }
  #hero .hero-description { grid-column: 2; margin-top: 0; padding-top: 1.5rem; border-top: 1px solid rgb(243 236 222 / 0.3); }
  #hero .hero-actions { grid-column: 2; align-self: start; margin-top: 1.5rem; }
}

/* Bold expedition-style display type, with Inter for the supporting list. */
#problem .overline {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

#problem .problem-heading {
  max-width: 19ch;
  margin-bottom: 2rem;
  font-size: clamp(2.625rem, 7vw, 5rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

#problem .problem-heading em { font-style: inherit; }

#problem .problem-list {
  display: grid;
  gap: 1.125rem;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.015em;
}

#problem .problem-list li { gap: 0.875rem; }

#problem .problem-resolution {
  max-width: 42ch;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

#problem .problem-resolution span { font-weight: 800; }

/* Give Gerhardt's story a display-led introduction and a distinct closing line. */
#guide .guide-story {
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.75;
}

#guide .guide-story > p:first-child {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(1.375rem, 2.25vw, 1.875rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

#guide .guide-story > p + p { margin-top: 1.5rem; }

#guide .guide-story strong {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 1.08em;
  font-weight: 700;
}

#guide .guide-story > p:last-child > strong {
  display: block;
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--go2orange);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* Slightly larger base on mobile for readability. */
body { font-size: 17px; }
@media (min-width: 768px) { body { font-size: 18px; } }

/* Tighten headings on very small screens so they don't break awkwardly */
@media (max-width: 420px) {
  h1, h2 { hyphens: none; overflow-wrap: break-word; }
}

/* selection */
::selection { background: var(--go2orange); color: #fff; }

/* ── Subtle grain texture overlay ── */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Overline utility ── */
.overline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: inline-block;
}

/* ── Hero: Ken-burns slow zoom ── */
@keyframes kenburns {
  0%   { transform: scale(1.05) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.05) translate(0, 0); }
}
.kenburns {
  animation: kenburns 28s ease-in-out infinite;
  transform-origin: center center;
}

/* ── Hero: scroll dash ── */
.scroll-dash {
  display: inline-block;
  width: 44px;
  height: 1px;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.scroll-dash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #E87722;
  transform-origin: left;
  animation: scroll-dash 2s ease-in-out infinite;
}
@keyframes scroll-dash {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ── Scroll reveal animations ── */
[data-animate],
[data-animate-left],
[data-animate-right],
[data-animate-scale] {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-animate] { transform: translateY(32px); }
[data-animate-left] { transform: translateX(-42px); }
[data-animate-right] { transform: translateX(42px); }
[data-animate-scale] { transform: scale(0.96); }

[data-animate].visible,
[data-animate-left].visible,
[data-animate-right].visible,
[data-animate-scale].visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-animate-left],
  [data-animate-right],
  [data-animate-scale] { opacity: 1; transform: none; transition: none; }
  .kenburns { animation: none; }
  .scroll-dash::after { animation: none; }
}

/* ── Gallery: CSS grid masonry-lite ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 180px;
  gap: 12px;
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: zoom-in;
  background: var(--charcoal);
}
.gallery-item.tall  { grid-row: span 2; }
.gallery-item.wide  { grid-column: span 2; }
@media (max-width: 560px) {
  .gallery-item.tall, .gallery-item.wide { grid-row: auto; grid-column: auto; }
  .gallery-item { aspect-ratio: 4 / 3; min-height: 0; }
  .gallery-item.tall { aspect-ratio: 3 / 4; }
  .gallery-item.wide { aspect-ratio: 16 / 9; }
}

/* ── Client-requested guided-tour and Gariep trail sections ── */
.new-section-shell {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section-kicker {
  margin-bottom: 1.25rem;
  color: var(--go2orange);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-display {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(2.5rem, 5.3vw, 4.5rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.section-display > span { color: var(--go2orange); }

.guide-section-link {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--go2orange);
  font-size: 1rem;
  font-weight: 600;
}

.guide-section-link:hover { color: var(--go2orange); }

.guided-section {
  overflow: clip;
  padding-block: clamp(5rem, 8vw, 7rem);
  color: var(--bone);
  background: radial-gradient(ellipse at top right, rgb(232 119 34 / 0.08), transparent 55%), var(--charcoal);
}

.guided-intro { max-width: 51rem; }
.guided-lede {
  max-width: 58ch;
  margin-top: 1.75rem;
  color: rgb(243 236 222 / 0.8);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.guided-cards { display: grid; gap: 1.5rem; margin-top: 3rem; }
.guided-card { overflow: hidden; border: 1px solid rgb(243 236 222 / 0.16); border-radius: 4px; }
.trip-video { position: relative; background: #151311; }
.trip-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.video-label {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgb(243 236 222 / 0.25);
  border-radius: 2px;
  color: var(--bone);
  background: rgb(30 28 26 / 0.85);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.guided-card-copy { padding: 1.5rem; }
.guided-card h3 {
  margin-bottom: 0.875rem;
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.guided-card-copy > p { color: rgb(243 236 222 / 0.78); font-size: 0.9375rem; line-height: 1.75; }
.guided-section-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; }
.guided-section-footer > p { color: rgb(243 236 222 / 0.65); font-size: 0.8125rem; }
.section-text-link { display: inline-flex; gap: 1.5rem; align-items: center; border-bottom: 1px solid var(--go2orange); padding-block: 0.5rem; font-family: 'Saira', system-ui, sans-serif; font-size: 1rem; font-weight: 600; }
.section-text-link:hover { color: var(--go2orange); }

.gariep-section { overflow: clip; padding-block: clamp(5rem, 8vw, 7rem); background: #EAE2D2; }
.gariep-section .section-kicker { color: #A84911; }
.gariep-heading-row { display: grid; gap: 1.75rem; margin-bottom: 3rem; }
.gariep-lede { max-width: 52ch; font-size: 1.0625rem; line-height: 1.75; }
.trail-layout { display: grid; gap: 2.5rem; align-items: start; }
.trail-overview { overflow: hidden; border: 1px solid rgb(30 28 26 / 0.15); border-radius: 4px; background: var(--bone); }
.trail-overview > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.trail-overview-copy { padding: 1.5rem; }
.trail-overview-copy > .section-kicker { margin-bottom: 0.5rem; }
.trail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; margin-bottom: 1.5rem; }
.trail-facts > div { padding-block: 1rem; border-bottom: 1px solid rgb(30 28 26 / 0.14); }
.trail-facts dt { margin-bottom: 0.4rem; color: #6F6250; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.trail-facts dd { font-family: 'Saira', system-ui, sans-serif; font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
.trail-enquire { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; min-height: 3.25rem; padding: 0.875rem 1.125rem; border-radius: 4px; color: var(--charcoal); background: var(--go2orange); font-family: 'Saira', system-ui, sans-serif; font-size: 1.0625rem; font-weight: 700; }
.trail-enquire:hover { color: #fff; background: #B8411F; }
.trail-enquiry-note { margin-top: 0.875rem; color: #695F52; font-size: 0.75rem; line-height: 1.6; }
.trail-days { border-top: 1px solid rgb(30 28 26 / 0.25); }
.trail-day { border-bottom: 1px solid rgb(30 28 26 / 0.2); }
.trail-day > summary { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 1.25rem; align-items: center; gap: 0.5rem; min-height: 4.75rem; padding-block: 1.25rem; cursor: pointer; list-style: none; font-family: 'Saira', system-ui, sans-serif; font-size: clamp(1.125rem, 1.6vw, 1.375rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.trail-day > summary::-webkit-details-marker { display: none; }
.trail-day > summary:hover { color: #A84911; }
.day-number { color: #6F6250; font-family: 'Inter', system-ui, sans-serif; font-size: 0.625rem; font-weight: 700; line-height: 1.5; letter-spacing: 0.05em; text-transform: uppercase; }
.day-toggle { color: var(--go2orange); font-size: 1.5rem; font-weight: 400; text-align: center; transition: transform 180ms ease; }
.trail-day[open] .day-toggle { transform: rotate(45deg); }
.trail-day[open] > summary { color: #A84911; }
.day-copy { padding: 0 1.75rem 1.5rem 4rem; font-size: 0.9375rem; line-height: 1.75; }
.trail-practical { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid rgb(30 28 26 / 0.2); }
.trail-practical-intro h3 { max-width: 28ch; font-family: 'Saira', system-ui, sans-serif; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; font-style: italic; line-height: 1.1; letter-spacing: -0.025em; }
.practical-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.practical-card { padding: 1.5rem; border: 1px solid rgb(30 28 26 / 0.3); border-top-width: 3px; border-radius: 3px; }
.practical-card > span { color: #6F6250; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.12em; }
.practical-card h4 { margin-top: 0.75rem; margin-bottom: 0.75rem; font-family: 'Saira', system-ui, sans-serif; font-size: 1.375rem; font-weight: 700; line-height: 1.15; }
.practical-card > p { font-size: 0.875rem; line-height: 1.75; }
.practical-route { border-color: #B85C2F; }
.practical-nature { border-color: #4A5240; }
.practical-driving { border-color: #9A8867; }
.practical-camp { border-color: #736451; }
.trail-day > summary:focus-visible, .trip-video video:focus-visible, .trail-enquire:focus-visible, .guide-section-link:focus-visible, .section-text-link:focus-visible { outline: 2px solid var(--go2orange); outline-offset: 5px; }

@media (min-width: 640px) {
  .practical-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail-day > summary { grid-template-columns: 4.5rem minmax(0, 1fr) 1.25rem; }
  .day-copy { padding-left: 5rem; }
}

@media (min-width: 960px) {
  .guided-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gariep-heading-row { grid-template-columns: 1.1fr 1fr; align-items: end; column-gap: 5rem; }
  .trail-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 4rem; }
}

@media (min-width: 1200px) {
  .practical-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Form: tidy autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #F3ECDE inset;
  -webkit-text-fill-color: #2B2824;
}

/* ── Sticky nav: crisper shadow when scrolled ── */
nav.shadow-sm { box-shadow: 0 1px 0 rgba(30,28,26,0.08); }

/* ── Marquee ── */
.marquee { display: flex; width: max-content; gap: 0; }
.marquee__inner {
  display: inline-flex;
  align-items: center;
  animation: marquee-scroll 60s linear infinite;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
.marquee:hover .marquee__inner { animation-play-state: paused; }

/* ── Pulsing badge ── */
.badge-pulse { position: relative; }
.badge-pulse::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 9999px;
  background: rgba(232, 119, 34, 0.6);
  z-index: -1;
  animation: badge-pulse 2s ease-out infinite;
}
@keyframes badge-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(1.4); opacity: 0;   }
  100% { transform: scale(1.4); opacity: 0;   }
}

/* ── Route rail (horizontal scroll on desktop) ── */
@media (min-width: 768px) {
  .route-rail {
    scrollbar-width: thin;
    scrollbar-color: rgba(30,28,26,0.2) transparent;
    scroll-padding-left: 2rem;
  }
  .route-rail::-webkit-scrollbar { height: 6px; }
  .route-rail::-webkit-scrollbar-thumb { background: rgba(30,28,26,0.2); border-radius: 3px; }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  .marquee__inner { animation: none; }
  .badge-pulse::before { animation: none; opacity: 0; }
}

/* ── Print (light safety net) ── */
@media print {
  nav, footer, #stakes, .grain::before, .marquee { display: none; }
  section { page-break-inside: avoid; }
}
