:root {
  --ink: #fff8e8;
  --muted: #d9cfbc;
  --night: #06150f;
  --panel: rgba(8, 25, 17, 0.82);
  --panel-solid: #0b2017;
  --green: #0b3d27;
  --gold: #f1bd3a;
  --wine: #7d1734;
  --ocean: #196f78;
  --line: rgba(255, 248, 232, 0.2);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #06150f 0%, #082016 42%, #11100c 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body::selection {
  color: #06150f;
  background: var(--gold);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  transform: translateY(-150%);
  padding: 0.6rem 0.85rem;
  color: #06150f;
  background: var(--gold);
  border-radius: 6px;
  transition: transform 180ms ease;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem max(1rem, calc((100% - 1180px) / 2));
  background: rgba(4, 17, 12, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.brand img {
  width: 2.6rem;
  height: 1.75rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  min-height: 2.35rem;
  padding: 0.55rem 0.75rem;
  color: rgba(255, 248, 232, 0.82);
  text-decoration: none;
  border-radius: 6px;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  outline: 0;
}

.hero {
  position: relative;
  min-height: 90svh;
  overflow: hidden;
  isolation: isolate;
  padding: 7.25rem max(1.2rem, calc((100% - 1180px) / 2)) 4rem;
}

.hero-photo,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-photo {
  z-index: -2;
  background: url("/assets/knysna-commons.jpg") center / cover no-repeat;
  transform: scale(1.03);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 17, 12, 0.96) 0%, rgba(4, 17, 12, 0.8) 42%, rgba(4, 17, 12, 0.22) 100%),
    linear-gradient(0deg, rgba(6, 21, 15, 0.96) 0%, rgba(6, 21, 15, 0.14) 56%, rgba(6, 21, 15, 0.54) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.76fr);
  align-items: end;
  gap: 3rem;
  min-height: calc(90svh - 11.25rem);
}

.hero-copy {
  max-width: 720px;
}

.kicker,
.card-label {
  margin: 0 0 0.65rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

h1 {
  max-width: 9ch;
  margin-bottom: 1.1rem;
  font-size: 5rem;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: 2.55rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 690px;
  margin-bottom: 1.5rem;
  color: rgba(255, 248, 232, 0.9);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action,
.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.action:hover,
.control-button:hover {
  transform: translateY(-1px);
}

.primary {
  color: #06150f;
  background: var(--gold);
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 850;
}

.secondary,
.control-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-self: center;
}

.gallery-card,
.feature-photo,
.place-card,
.score-copy,
.trait,
.taste-card,
.identity-panel,
.note-copy {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gallery-card {
  position: relative;
  margin-bottom: 0;
  min-height: 170px;
}

.gallery-card.large {
  grid-row: span 2;
  min-height: 350px;
}

.gallery-card img,
.feature-photo img,
.place-card img,
.taste-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card img {
  position: absolute;
  inset: 0;
}

.gallery-card figcaption,
.feature-photo figcaption {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 1;
  color: var(--ink);
  font-weight: 850;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.gallery-card::after {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.section {
  padding: 5.6rem max(1.2rem, calc((100% - 1180px) / 2));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading p:not(.kicker),
.score-copy p,
.note-copy p,
.identity-panel p {
  color: var(--muted);
}

.route-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: repeat(2, minmax(265px, auto));
  gap: 1rem;
}

.place-card {
  position: relative;
  min-height: 270px;
}

.place-card img {
  position: absolute;
  inset: 0;
}

.place-card::after {
  position: absolute;
  content: "";
  inset: 0;
  background:
    linear-gradient(180deg, transparent 12%, rgba(5, 17, 12, 0.5) 50%, rgba(5, 17, 12, 0.92) 100%);
}

.place-card > div {
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 1rem;
  z-index: 1;
}

.place-card p:last-child {
  max-width: 37rem;
  margin-bottom: 0;
  color: rgba(255, 248, 232, 0.88);
}

.place-wilderness {
  grid-row: span 2;
}

.rugby-section {
  background:
    linear-gradient(90deg, rgba(11, 61, 39, 0.72), rgba(125, 23, 52, 0.22)),
    #0a1f16;
}

.rugby-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.feature-photo {
  position: relative;
  min-height: 420px;
  margin-bottom: 0;
}

.score-copy {
  padding: 2rem;
}

.score-panel {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.score-row span {
  color: var(--muted);
}

.score-row strong {
  color: var(--gold);
  font-size: 3.2rem;
  line-height: 0.9;
}

.score-row.muted strong {
  color: rgba(255, 248, 232, 0.44);
}

.score-note {
  margin: 1rem 0 0;
  color: var(--muted);
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.trait {
  padding: 1.35rem;
}

.trait-number {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--gold);
  font-weight: 900;
}

.trait p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.taste-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
}

.taste-card > img {
  width: 100%;
  height: 250px;
  min-height: 250px;
  object-fit: cover;
}

.panel-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
}

.panel-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.control-button {
  width: fit-content;
  margin-top: 0.25rem;
  font-weight: 850;
}

.microcopy {
  color: var(--muted);
  font-size: 0.95rem;
}

.taste-card.is-toasted,
.choc-panel.is-open {
  border-color: rgba(241, 189, 58, 0.74);
}

.choc-panel.is-open img {
  filter: saturate(1.1) contrast(1.04);
}

.identity-section {
  padding-top: 0;
}

.identity-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.52fr) 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(11, 61, 39, 0.88), rgba(25, 111, 120, 0.3)),
    var(--panel-solid);
}

.identity-panel img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
}

.note-section {
  min-height: 52svh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(6, 21, 15, 0.94), rgba(6, 21, 15, 0.38)),
    url("/assets/wilderness-commons.jpg") center / cover no-repeat;
}

.note-copy {
  width: min(760px, 100%);
  padding: 2rem;
}

.note-copy p {
  font-size: 1.08rem;
}

.site-footer {
  display: grid;
  gap: 0.55rem;
  padding: 2rem max(1.2rem, calc((100% - 1180px) / 2));
  color: rgba(255, 248, 232, 0.68);
  background: #050d09;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #88d0d6;
}

.trademark-note {
  color: rgba(255, 248, 232, 0.52);
}

.note-dialog {
  width: min(680px, calc(100% - 2rem));
  padding: 2rem;
  color: #20130b;
  background: #fff4db;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.note-dialog::backdrop {
  background: rgba(2, 8, 5, 0.78);
  backdrop-filter: blur(5px);
}

.note-dialog .kicker {
  color: var(--wine);
}

.note-dialog h2 {
  color: #30190e;
}

.note-dialog p {
  color: #46301f;
  font-size: 1.05rem;
}

.signature {
  margin-bottom: 0;
  font-weight: 850;
}

.close-button {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #30190e;
  background: transparent;
  border: 1px solid rgba(48, 25, 14, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.reveal {
  transform: translateY(0);
  opacity: 1;
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 940px) {
  .hero-inner,
  .rugby-layout,
  .taste-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 1.8rem;
    align-items: start;
  }

  .hero-gallery {
    max-width: 680px;
  }

  .route-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .place-wilderness {
    grid-row: auto;
  }

  .trait-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    padding-top: 0.75rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 14rem;
  }

  nav a {
    min-height: 2rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 92svh;
    padding-top: 6rem;
  }

  h1 {
    font-size: 3.35rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card.large {
    min-height: 220px;
  }

  .place-card {
    min-height: 310px;
  }

  .taste-card,
  .identity-panel {
    grid-template-columns: 1fr;
  }

  .taste-card > img {
    min-height: 260px;
  }

  .control-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .brand span {
    display: none;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero-actions {
    display: grid;
  }
}

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

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