:root {
  --bg: #0b1210;
  --bg-soft: #121a16;
  --bg-card: #17211c;
  --cream: #f4efe4;
  --cream-dim: rgba(244, 239, 228, 0.72);
  --gold: #c9a36a;
  --gold-2: #e3c48a;
  --sage: #97a894;
  --ink: #0e1411;
  --line: rgba(201, 163, 106, 0.22);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", sans-serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.055;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  transition: 0.35s ease;
}

.header.is-scrolled {
  background: rgba(11, 18, 16, 0.78);
  backdrop-filter: blur(18px);
  padding: 14px 36px;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold);
}

.logo span {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  opacity: 0.78;
  transition: 0.2s;
}

.nav a:hover,
.nav a:focus-visible,
.btn:focus-visible,
.logo:focus-visible {
  opacity: 1;
  color: var(--gold-2);
  outline: none;
}

.btn:focus-visible,
.logo:focus-visible,
.burger:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
}

.burger span,
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--cream);
}

.burger span {
  top: 50%;
}

.burger::before {
  top: 14px;
}

.burger::after {
  bottom: 14px;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.06);
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 18, 16, 0.82) 0%, rgba(11, 18, 16, 0.38) 48%, rgba(11, 18, 16, 0.18) 100%),
    linear-gradient(180deg, rgba(11, 18, 16, 0.18) 0%, rgba(11, 18, 16, 0.18) 48%, rgba(11, 18, 16, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 36px 72px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.hero-content h1 {
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(64px, 12vw, 148px);
  max-width: 10ch;
  margin: 18px 0 22px;
}

.hero p {
  max-width: 460px;
  color: var(--cream-dim);
  font-size: 17px;
  font-weight: 400;
}

.hero-meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  right: 36px;
  bottom: 36px;
  z-index: 2;
  writing-mode: vertical-rl;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--sage);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0e1613;
}

.stat {
  padding: 28px 22px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  color: var(--gold-2);
  margin-bottom: 4px;
}

.stat span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

section {
  padding: 110px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(42px, 7vw, 76px);
}

.section-head p {
  max-width: 360px;
  color: var(--cream-dim);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.about-photo {
  position: relative;
}

.about-photo img {
  width: 100%;
  height: 720px;
  object-fit: cover;
  border-radius: 4px 80px 4px 4px;
}

.about-photo figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(11, 18, 16, 0.72);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.about-copy h3 {
  font-size: 42px;
  margin: 14px 0 22px;
}

.about-copy p {
  color: var(--cream-dim);
  margin-bottom: 16px;
}

.facts {
  margin-top: 28px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.facts dt {
  color: var(--sage);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  padding-top: 4px;
}

.disciplines {
  background:
    radial-gradient(circle at 12% 20%, rgba(201, 163, 106, 0.08), transparent 28%),
    var(--bg-soft);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 1.1s ease;
}

.card:hover img {
  transform: scale(1.06);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 18, 16, 0.1), rgba(11, 18, 16, 0.82));
}

.card-body {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 460px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.card h3 {
  font-size: 54px;
  margin: 8px 0 10px;
}

.card p {
  color: var(--cream-dim);
  max-width: 38ch;
}

.horses-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}

.horse {
  background: var(--bg-card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.horse img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.horse-body {
  padding: 22px;
}

.horse h3 {
  font-size: 36px;
  margin-bottom: 8px;
}

.horse p {
  color: var(--cream-dim);
  font-size: 14px;
}

.results {
  background: var(--cream);
  color: var(--ink);
}

.results .kicker,
.results .section-head p {
  color: #6f624c;
}

.results .kicker::before {
  background: #6f624c;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.medal {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.medal .place {
  font-family: var(--font-serif);
  font-size: 64px;
  color: #9a7a3c;
  line-height: 0.8;
  margin-bottom: 16px;
}

.medal h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

.medal p {
  color: #5d564c;
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #ece6d8;
  font-size: 14px;
}

th {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a7164;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 14px;
}

.gallery-grid a {
  overflow: hidden;
  border-radius: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.7s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.05);
}

.gallery-grid a:first-child {
  grid-row: 1 / 3;
}

.contact {
  text-align: center;
}

.contact h2 {
  font-size: clamp(42px, 8vw, 88px);
  margin: 12px 0 18px;
}

.contact p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--cream-dim);
}

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  transition: 0.2s;
}

.btn:hover {
  background: var(--gold);
  color: var(--ink);
}

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--sage);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.9s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 12, 10, 0.92);
  display: none;
  place-items: center;
  padding: 24px;
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .header {
    padding: 16px 18px;
  }

  .nav {
    position: fixed;
    inset: 0 0 auto auto;
    top: 72px;
    right: 16px;
    flex-direction: column;
    background: rgba(14, 22, 19, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 22px;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .burger {
    display: block;
  }

  .hero-content {
    padding: 0 18px 56px;
  }

  .scroll-hint {
    display: none;
  }

  .stats,
  .about-grid,
  .cards,
  .horses-grid,
  .podium,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .about-photo img,
  .gallery-grid,
  .gallery-grid a:first-child {
    height: auto;
    grid-row: auto;
  }

  .about-photo img {
    height: 460px;
  }

  .gallery-grid {
    grid-template-rows: none;
  }

  .gallery-grid a {
    height: 240px;
  }

  .section-head,
  .footer {
    flex-direction: column;
    align-items: start;
  }

  section {
    padding: 80px 0;
  }
}
