:root {
  --night: #0b100e;
  --pine: #163028;
  --timber: #2a1b12;
  --sand: #cdb892;
  --chestnut: #8a3f22;
  --blaze: #f4ede3;
  --pole: #b83228;
  --brass: #c9a45a;
  --mute: #b7aa96;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--night);
  color: var(--blaze);
  font-family: Sora, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.doors {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  cursor: pointer;
}

.door {
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: transform 1.6s cubic-bezier(0.77, 0, 0.18, 1);
}

.door-left {
  transform-origin: left;
}

.door-right {
  transform-origin: right;
}

.doors.is-open .door-left {
  transform: translateX(-102%);
}

.doors.is-open .door-right {
  transform: translateX(102%);
}

.doors.is-open {
  pointer-events: none;
}

.stall-plate {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: min(280px, 78vw);
  padding: 22px 18px 16px;
  background: linear-gradient(#3d2a18, #2a1b10);
  border: 3px solid var(--brass);
  box-shadow: 0 10px 0 #140c08;
  text-align: center;
  transition: opacity 0.35s ease;
}

.doors.is-open .stall-plate {
  opacity: 0;
}

.door-planks {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      #1c120c 0 14px,
      #2d1c13 14px 28px,
      #3a2418 28px 30px,
      #24160f 30px 46px
    ),
    linear-gradient(#2a1b12, #140e0a);
  box-shadow: inset 0 0 80px #000;
}

.door-iron {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(#3a3a3a, #1a1a1a);
}

.door-left .door-iron {
  right: 0;
}

.door-right .door-iron {
  left: 0;
}

.stall-plate em {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--sand);
}

.stall-plate span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--sand);
  margin-bottom: 6px;
}

.stall-plate strong {
  font-family: Gloock, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  color: var(--brass);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  align-items: stretch;
  overflow: hidden;
}

.hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 10%, #3d5a3a 0%, transparent 40%),
    linear-gradient(180deg, #1a2c28 0%, #0b100e 55%, #1a140e 100%);
}

.hero-photo {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.hero-photo img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: 30% 20%;
  filter: saturate(0.92) contrast(1.05);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, transparent 36%, rgba(11, 16, 14, 0.2) 52%, var(--night) 68%),
    linear-gradient(180deg, transparent 70%, var(--night));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 4;
  align-self: center;
  padding: 8vh 7vw 18vh 4vw;
}

.hero-kicker {
  color: var(--sand);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

h1,
h2,
.yegua-name {
  font-family: Gloock, serif;
  font-weight: 400;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  margin-bottom: 22px;
}

.hero-lead {
  max-width: 34ch;
  color: var(--mute);
  font-size: 1.02rem;
  margin-bottom: 28px;
}

.enter {
  display: inline-block;
  text-decoration: none;
  background: var(--chestnut);
  color: var(--blaze);
  padding: 12px 22px;
  border-radius: 2px;
  font-size: 0.92rem;
}

.enter:hover,
.enter:focus-visible {
  background: #a64828;
}

.horse-walk {
  position: absolute;
  left: 0;
  bottom: 78px;
  width: 160px;
  fill: #0a0806;
  opacity: 0.55;
  z-index: 3;
  animation: ride 28s linear infinite;
}

@keyframes ride {
  from {
    transform: translateX(-20vw);
  }
  to {
    transform: translateX(110vw);
  }
}

.grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  z-index: 4;
  background:
    radial-gradient(ellipse 18px 50px at 6% 100%, #12261c 40%, transparent 42%),
    radial-gradient(ellipse 14px 62px at 12% 100%, #1a3326 40%, transparent 42%),
    radial-gradient(ellipse 20px 44px at 18% 100%, #0f2218 40%, transparent 42%),
    radial-gradient(ellipse 16px 70px at 26% 100%, #183024 40%, transparent 42%),
    radial-gradient(ellipse 22px 52px at 34% 100%, #12261c 40%, transparent 42%),
    radial-gradient(ellipse 12px 64px at 42% 100%, #1d3a2b 40%, transparent 42%),
    radial-gradient(ellipse 18px 48px at 50% 100%, #0f2218 40%, transparent 42%),
    radial-gradient(ellipse 20px 68px at 58% 100%, #163028 40%, transparent 42%),
    radial-gradient(ellipse 14px 54px at 66% 100%, #12261c 40%, transparent 42%),
    radial-gradient(ellipse 24px 60px at 74% 100%, #1a3326 40%, transparent 42%),
    radial-gradient(ellipse 16px 46px at 82% 100%, #0f2218 40%, transparent 42%),
    radial-gradient(ellipse 18px 72px at 90% 100%, #183024 40%, transparent 42%),
    radial-gradient(ellipse 14px 50px at 97% 100%, #12261c 40%, transparent 42%),
    linear-gradient(#0b100e, #0b100e);
  animation: sway 6s ease-in-out infinite;
  transform-origin: bottom;
}

@keyframes sway {
  50% {
    transform: skewX(-3deg);
  }
}

.plaque-row {
  padding: 8vh 6vw 4vh;
}

.pole {
  height: 14px;
  margin-bottom: 48px;
  background: repeating-linear-gradient(
    90deg,
    #f3eee6 0 36px,
    var(--pole) 36px 72px
  );
  box-shadow: 0 8px 0 #1a100c;
}

.hug {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
}

.hug-photo {
  width: 100%;
  height: min(78vh, 820px);
  object-fit: cover;
  object-position: center 18%;
  border: 10px solid #1c140e;
  box-shadow: 0 24px 0 #080604;
}

.hug figcaption {
  font-size: 1.15rem;
  color: var(--sand);
  max-width: 28ch;
  padding-bottom: 18px;
}

.album,
.pista {
  padding: 8vh 6vw;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 32px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 10px;
}

.section-head p,
.meets p {
  color: var(--mute);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter {
  background: transparent;
  color: var(--sand);
  border: 1px solid #3a3228;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.filter.is-on,
.filter:hover,
.filter:focus-visible {
  background: var(--pine);
  border-color: var(--sand);
  color: var(--blaze);
}

.stage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.viewport {
  position: relative;
  height: min(68vh, 720px);
  background: #120e0b;
  overflow: hidden;
  box-shadow: inset 0 0 0 8px #1c140e;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 1;
  visibility: visible;
}

.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0806;
}

.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0806;
}

.slide.crop-hug img {
  object-fit: cover;
  object-position: center 16%;
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(11, 16, 14, 0.72);
  padding: 6px 10px;
  font-size: 0.72rem;
  color: var(--sand);
  pointer-events: none;
}

.nav {
  width: 48px;
  height: 48px;
  border: 1px solid var(--sand);
  background: transparent;
  color: var(--blaze);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.nav:hover,
.nav:focus-visible {
  background: var(--chestnut);
  border-color: var(--chestnut);
}

.caption {
  min-height: 1.6em;
  margin: 16px 0 20px;
  color: var(--sand);
  text-align: center;
}

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumbs button {
  flex: 0 0 92px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  background: #1a140e;
  cursor: pointer;
  overflow: hidden;
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.thumbs button.is-on {
  border-color: var(--brass);
}

.thumbs button.is-on img {
  opacity: 1;
}

.meets {
  list-style: none;
  display: grid;
  gap: 0;
  max-width: 52rem;
}

.meets li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid #2a3228;
}

.meets time {
  color: var(--brass);
  font-size: 0.92rem;
}

.meets strong {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.wall {
  padding: 0 6vw 10vh;
}

.wall-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  grid-auto-rows: 260px;
  gap: 14px;
}

.wall-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04);
}

.wall-grid img:nth-child(1) {
  grid-row: span 2;
  height: 100%;
}

.wall-grid img:nth-child(4) {
  grid-column: 2 / 4;
}

.yegua {
  padding: 12vh 8vw 16vh;
  text-align: left;
  background:
    linear-gradient(180deg, #0b100e, #140e0a 40%, #0b100e);
}

.yegua-name {
  font-size: clamp(3.4rem, 10vw, 8rem);
  color: var(--brass);
  margin-bottom: 18px;
}

.yegua-line {
  max-width: 36ch;
  color: var(--mute);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.yegua-keep {
  color: var(--sand);
}

@media (max-width: 860px) {
  .hero,
  .hug {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-photo {
    min-height: 0;
  }

  .hero-photo img {
    height: 68vh;
    object-position: center 18%;
  }

  .hero-veil {
    background: linear-gradient(180deg, transparent 42%, var(--night) 82%);
  }

  .hero-copy {
    padding: 22px 22px 36px;
  }

  h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .hero-lead {
    font-size: 0.98rem;
  }

  .horse-walk {
    display: none;
  }

  .grass {
    height: 48px;
  }

  .stall-plate {
    width: min(260px, 84vw);
    padding: 18px 14px 14px;
  }

  .plaque-row,
  .album,
  .pista {
    padding: 36px 18px;
  }

  .hug {
    gap: 16px;
  }

  .hug-photo {
    height: 72vw;
    border-width: 6px;
  }

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

  .viewport {
    height: min(52vh, 420px);
  }

  .nav {
    position: absolute;
    top: 38%;
    z-index: 4;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    background: rgba(11, 16, 14, 0.55);
  }

  .prev {
    left: 8px;
  }

  .next {
    right: 8px;
  }

  .filters {
    gap: 8px;
  }

  .filter {
    padding: 10px 14px;
  }

  .thumbs button {
    flex-basis: 76px;
    height: 54px;
  }

  .meets li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wall {
    padding: 0 18px 48px;
  }

  .wall-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 28vw;
    gap: 8px;
  }

  .wall-grid img:nth-child(1),
  .wall-grid img:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  .yegua {
    padding: 64px 22px calc(72px + env(safe-area-inset-bottom));
  }

  .yegua-line {
    font-size: 1rem;
  }
}

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

  .doors,
  .door,
  .slide,
  .grass,
  .horse-walk {
    animation: none;
    transition: none;
  }

  .doors {
    display: none;
  }
}
