:root {
  --ink: #121418;
  --muted: #5c646f;
  --paper: #f7f7f4;
  --panel: #ffffff;
  --line: #d9ddd8;
  --red: #d71920;
  --red-dark: #9c1015;
  --cyan: #00a7b5;
  --gold: #e9b949;
  --forest: #183a37;
  --shadow: 0 20px 60px rgba(18, 20, 24, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: var(--test-banner-offset, 0px);
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(16px, 5vw, 64px);
  background: rgba(247, 247, 244, 0.92);
  border-bottom: 1px solid rgba(18, 20, 24, 0.1);
  backdrop-filter: blur(16px);
}

.test-mode-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px clamp(16px, 5vw, 64px);
  color: #fff;
  text-align: center;
  background: #9c1015;
  box-shadow: 0 10px 24px rgba(18, 20, 24, 0.16);
}

.test-mode-banner strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.test-mode-banner span {
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 72px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(18, 20, 24, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #2c3036;
  font-weight: 700;
}

.main-nav a,
.site-footer a {
  text-decoration: none;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.nav-cta,
.button.primary {
  background: var(--red);
  color: #fff;
}

.button.primary:hover,
.nav-cta:hover {
  background: var(--red-dark);
}

.button.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary {
  color: #fff;
  background: var(--forest);
}

.button.ghost-light {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.hero {
  position: relative;
  color: #fff;
}

.hero-drive {
  min-height: clamp(1120px, 185vh, 1540px);
  overflow: visible;
  background: #090b0f;
  --content-opacity: 1;
  --content-y: 0px;
  --media-scale: 1.04;
  --media-x: 0px;
  --media-y: 0px;
  --car-scroll-x: 0px;
  --car-scroll-y: 0px;
  --car-scroll-scale: 1;
  --plate-opacity: 1;
  --plate-scale: 1;
  --menu-opacity: 0;
  --menu-y: 105%;
  --menu-scale-x: 0.08;
  --menu-scale-y: 0.16;
  --menu-radius: 8px;
}

.hero-stage {
  position: sticky;
  top: 0;
  display: grid;
  align-items: end;
  min-height: 620px;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

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

.hero-media {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(var(--media-x), var(--media-y), 0) scale(var(--media-scale));
  filter: saturate(1.1) contrast(1.04) brightness(0.88);
  transform-origin: 55% 52%;
  will-change: transform;
}

.hero-overlay {
  z-index: -2;
  background:
    radial-gradient(circle at 58% 56%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(90deg, rgba(7, 8, 12, 0.86), rgba(7, 8, 12, 0.38) 50%, rgba(7, 8, 12, 0.16)),
    linear-gradient(0deg, rgba(7, 8, 12, 0.84), transparent 55%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.42), transparent 34%);
}

.hero-track {
  z-index: -1;
  pointer-events: none;
  perspective: 900px;
}

.track-haze {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -22%;
  height: 56%;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(245, 246, 244, 0.2));
  filter: blur(10px);
  opacity: 0.72;
}

.track-apex {
  position: absolute;
  left: -12vw;
  bottom: -20vh;
  width: 124vw;
  height: 70vh;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.58);
  border-right-color: rgba(215, 25, 32, 0.58);
  border-radius: 52% 48% 0 0;
  transform: rotateX(64deg) rotateZ(-8deg);
  transform-origin: center bottom;
  box-shadow:
    inset 0 18px 30px rgba(255, 255, 255, 0.1),
    0 -16px 60px rgba(215, 25, 32, 0.1);
}

.track-racing-line {
  position: absolute;
  left: 8%;
  bottom: 7%;
  width: 64%;
  height: 12px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.92) 0 42px,
    rgba(215, 25, 32, 0.92) 42px 84px
  );
  filter: blur(0.4px) drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
  opacity: 0.72;
  transform: perspective(720px) rotateX(68deg) rotateZ(-16deg) translateX(var(--media-x));
  transform-origin: left center;
  animation: racingLineRush 1.35s linear infinite;
}

.track-racing-line--late {
  left: auto;
  right: -4%;
  bottom: 19%;
  width: 54%;
  opacity: 0.35;
  transform: perspective(720px) rotateX(66deg) rotateZ(10deg);
  animation-duration: 1.75s;
}

.hero-quick-menu {
  position: absolute;
  top: clamp(82px, 9vh, 112px);
  right: clamp(16px, 5vw, 64px);
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(720px, calc(100% - 32px));
}

.hero-quick-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  font-weight: 950;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.16);
}

.hero-quick-menu a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-content {
  position: relative;
  z-index: 6;
  width: min(760px, 100%);
  padding: 0 clamp(18px, 5vw, 72px) clamp(72px, 12vh, 128px);
  opacity: var(--content-opacity);
  transform: translate3d(0, var(--content-y), 0);
  will-change: opacity, transform;
}

.hero-drive[data-content-hidden="true"] .hero-content {
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  width: min(640px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-car-path {
  position: absolute;
  left: min(74%, calc(100% - 286px));
  bottom: clamp(28px, 6vh, 78px);
  z-index: 5;
  width: min(49vw, 560px);
  min-width: 400px;
  transform-origin: 50% 78%;
  will-change: transform, filter, opacity;
  animation: carIntro 2600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-car-scroll {
  transform: translate3d(var(--car-scroll-x), var(--car-scroll-y), 0) scale(var(--car-scroll-scale));
  transform-origin: 50% 80%;
  will-change: transform;
}

.hero-car {
  position: relative;
  aspect-ratio: 2.22 / 1;
  transform: perspective(900px) rotateX(3deg);
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.5));
}

.hero-car--photo {
  aspect-ratio: 1.68 / 1;
  transform: perspective(900px) rotateX(1.5deg) rotateZ(-1deg);
}

.hero-car--photo::before,
.hero-car--photo::after {
  display: none;
}

.hero-car-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    contrast(1.05)
    saturate(1.04)
    drop-shadow(0 24px 32px rgba(0, 0, 0, 0.46));
}

.hero-car span {
  position: absolute;
  display: block;
}

.car-shadow {
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 24%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.62), transparent 68%);
  filter: blur(8px);
  transform: translateY(42%);
}

.hero-car::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 27%;
  width: 84%;
  height: 54%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.36), transparent 18% 82%, rgba(255, 255, 255, 0.22)),
    linear-gradient(180deg, #fff 0%, #e9edf0 42%, #c3cbd0 70%, #737f88 100%);
  border-radius: 46% 46% 20% 20% / 34% 34% 28% 28%;
  clip-path: polygon(18% 0, 82% 0, 98% 45%, 92% 84%, 78% 96%, 22% 96%, 8% 84%, 2% 45%);
  box-shadow:
    inset 0 16px 24px rgba(255, 255, 255, 0.86),
    inset 0 -24px 34px rgba(0, 0, 0, 0.28),
    0 16px 32px rgba(0, 0, 0, 0.32);
}

.hero-car::after {
  content: "";
  position: absolute;
  left: 19%;
  bottom: 13%;
  width: 62%;
  height: 15%;
  background:
    linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.38) 18% 82%, transparent),
    linear-gradient(180deg, #171c22, #050607);
  border-radius: 10px 10px 28px 28px;
  clip-path: polygon(5% 0, 95% 0, 88% 100%, 12% 100%);
}

.car-spoiler {
  left: 22%;
  top: 16%;
  width: 56%;
  height: 8%;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d2228, #060708);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}

.car-roof {
  left: 28%;
  top: 7%;
  width: 44%;
  height: 38%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 42% 58%, rgba(255, 255, 255, 0.14)),
    linear-gradient(180deg, #f8f9f7, #cbd2d6 72%, #919aa2);
  border-radius: 48% 48% 24% 24% / 52% 52% 28% 28%;
  clip-path: polygon(24% 0, 76% 0, 94% 100%, 6% 100%);
}

.car-windshield {
  left: 32%;
  top: 14%;
  width: 36%;
  height: 29%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(180deg, #151c27, #050709);
  border: 4px solid rgba(255, 255, 255, 0.48);
  border-bottom: 0;
  border-radius: 16px 16px 8px 8px;
  clip-path: polygon(11% 0, 89% 0, 100% 100%, 0 100%);
}

.car-hood {
  left: 24%;
  top: 37%;
  width: 52%;
  height: 31%;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(215, 25, 32, 0.82) 22% 27%, transparent 27% 73%, rgba(215, 25, 32, 0.82) 73% 78%, transparent 78%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(211, 218, 222, 0.9));
  border-radius: 0 0 38% 38%;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
}

.car-hood-vent {
  top: 46%;
  width: 13%;
  height: 7%;
  border-radius: 999px;
  background: linear-gradient(180deg, #12161b, #010203);
  box-shadow: inset 0 3px 7px rgba(255, 255, 255, 0.14);
}

.car-hood-vent--left {
  left: 34%;
  transform: skewX(-16deg);
}

.car-hood-vent--right {
  right: 34%;
  transform: skewX(16deg);
}

.car-headlight {
  top: 56%;
  width: 18%;
  height: 11%;
  background:
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(90deg, #fff8da, #f0a94a 50%, #1b2026 86%);
  border: 2px solid rgba(28, 31, 36, 0.58);
  box-shadow:
    0 0 18px rgba(255, 215, 139, 0.48),
    inset 0 2px 6px rgba(255, 255, 255, 0.8);
}

.car-headlight--left {
  left: 17%;
  border-radius: 50% 24% 42% 48%;
  transform: rotate(3deg);
}

.car-headlight--right {
  right: 17%;
  border-radius: 24% 50% 48% 42%;
  transform: rotate(-3deg) scaleX(-1);
}

.car-bumper {
  left: 14%;
  bottom: 12%;
  width: 72%;
  height: 23%;
  background:
    linear-gradient(90deg, rgba(215, 25, 32, 0.78), transparent 15% 85%, rgba(215, 25, 32, 0.78)),
    linear-gradient(180deg, #eef1f2, #8c969f);
  border-radius: 26% 26% 40% 40%;
  clip-path: polygon(6% 0, 94% 0, 100% 46%, 88% 100%, 12% 100%, 0 46%);
}

.car-grille {
  left: 30%;
  bottom: 18%;
  z-index: 2;
  width: 40%;
  height: 12%;
  background:
    repeating-linear-gradient(90deg, #08090b 0 8px, #20262d 8px 12px),
    linear-gradient(180deg, #11161d, #050607);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px 12px 24px 24px;
}

.car-splitter {
  left: 10%;
  bottom: 8%;
  z-index: 3;
  width: 80%;
  height: 7%;
  background:
    linear-gradient(90deg, rgba(215, 25, 32, 0.72), transparent 16% 84%, rgba(215, 25, 32, 0.72)),
    linear-gradient(180deg, #1b2025, #020304);
  border-radius: 100% 100% 10px 10px;
}

.car-fender {
  bottom: 13%;
  width: 19%;
  height: 28%;
  background: linear-gradient(180deg, #f8faf9, #8b949b);
  border-radius: 48% 48% 30% 30%;
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.2);
}

.car-fender--left {
  left: 5%;
  transform: rotate(-9deg);
}

.car-fender--right {
  right: 5%;
  transform: rotate(9deg);
}

.car-wheel {
  bottom: 4%;
  z-index: 4;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #e8ecec 0 9%, #15191e 10% 20%, transparent 21%),
    conic-gradient(from 12deg, #f1f2f0 0 8deg, #0b0d10 8deg 22deg, #aeb5b8 22deg 32deg, #0b0d10 32deg 48deg),
    radial-gradient(circle at center, #090a0c 0 52%, #2a3037 53% 66%, #050607 67%);
  box-shadow:
    inset 0 0 0 8px #050607,
    inset 0 0 0 12px rgba(255, 255, 255, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.5);
}

.car-wheel--left {
  left: 9%;
  transform: rotate(var(--wheel-rotation, 0deg)) skewY(-2deg);
}

.car-wheel--right {
  right: 9%;
  transform: rotate(var(--wheel-rotation, 0deg)) skewY(2deg);
}

.car-mirror {
  top: 34%;
  width: 9%;
  height: 8%;
  background: linear-gradient(180deg, #f5f6f4, #6f7882);
  border-radius: 999px 999px 40% 40%;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.34);
}

.car-mirror--left {
  left: 13%;
  transform: rotate(-16deg);
}

.car-mirror--right {
  right: 13%;
  transform: rotate(16deg);
}

.car-plate {
  left: 50%;
  bottom: 27%;
  z-index: 5;
  min-width: 128px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: #101419;
  background:
    linear-gradient(180deg, #fff, #e9edf0);
  border: 2px solid rgba(12, 15, 19, 0.68);
  border-radius: 6px;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: clamp(0.92rem, 2vw, 1.2rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  opacity: var(--plate-opacity);
  transform: translateX(-50%) scale(var(--plate-scale));
  will-change: opacity, transform;
}

.hero-car--photo .car-shadow {
  left: 6%;
  right: 3%;
  bottom: -2%;
  height: 20%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.48), transparent 70%);
  transform: translateY(12%);
}

.hero-car--photo .car-plate {
  left: 61%;
  bottom: 18%;
  min-width: clamp(92px, 12vw, 132px);
  height: clamp(26px, 3vw, 36px);
  border-color: rgba(30, 34, 38, 0.72);
  font-size: clamp(0.75rem, 1.35vw, 1.08rem);
  transform: translateX(-50%) perspective(220px) rotateX(4deg) rotateZ(-1deg) scale(var(--plate-scale));
}

.hero-plate-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 5vw, 64px);
  min-height: clamp(172px, 24vh, 246px);
  padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 72px);
  color: var(--ink);
  background: #fff;
  border-radius: var(--menu-radius) var(--menu-radius) 0 0;
  box-shadow: 0 -22px 68px rgba(0, 0, 0, 0.22);
  opacity: var(--menu-opacity);
  pointer-events: none;
  transform: translate3d(0, var(--menu-y), 0) scaleX(var(--menu-scale-x)) scaleY(var(--menu-scale-y));
  transform-origin: 50% 72%;
  will-change: opacity, transform, border-radius;
}

.hero-drive[data-menu-ready="true"] .hero-plate-menu {
  pointer-events: auto;
}

.hero-plate-menu .section-kicker {
  margin-bottom: 8px;
  color: var(--red);
}

.hero-plate-menu h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  line-height: 0.95;
}

.hero-plate-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
  width: min(620px, 100%);
}

.hero-plate-links a {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 0 18px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(18, 20, 24, 0.14);
}

.hero-plate-links a:nth-child(1) {
  background: var(--red);
}

.hero-plate-links a:nth-child(2) {
  background: var(--forest);
}

.hero-plate-links a:nth-child(3) {
  background: #111317;
}

.hero-plate-links a:hover {
  transform: translateY(-2px);
}

@keyframes carIntro {
  0% {
    opacity: 0;
    filter: blur(5px) saturate(0.8);
    transform: translate(-112vw, -22vh) scale(0.3) rotate(-18deg);
  }

  38% {
    opacity: 1;
    filter: blur(2px) saturate(1.1);
    transform: translate(-78vw, -16vh) scale(0.46) rotate(-12deg);
  }

  72% {
    filter: blur(0.8px) saturate(1.12);
    transform: translate(-58vw, -4vh) scale(0.78) rotate(-4deg);
  }

  100% {
    opacity: 1;
    filter: blur(0) saturate(1.08);
    transform: translate(-50%, 0) scale(1) rotate(0deg);
  }
}

@keyframes racingLineRush {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 168px 0;
  }
}

.section {
  padding: clamp(56px, 9vw, 104px) clamp(18px, 5vw, 72px);
}

.intro-band {
  background: var(--ink);
  color: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro-grid h2,
.section-heading h2,
.ticket-copy h2,
.community-content h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro-grid p:last-child,
.ticket-copy p,
.community-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  line-height: 1.7;
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 28px;
}

.event-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.event-card,
.feature-card {
  min-height: 320px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(18, 20, 24, 0.08);
}

.event-card {
  display: grid;
  align-content: space-between;
  gap: 24px;
}

.event-card[data-accent="honda"] {
  border-top: 6px solid var(--red);
}

.event-card[data-accent="japon"] {
  border-top: 6px solid var(--cyan);
}

.event-card h3,
.feature-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: 0;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.event-meta span,
.steps span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  color: #263036;
  background: #edf0ec;
  border-radius: 8px;
  font-weight: 850;
  font-size: 0.86rem;
}

.event-card p,
.feature-card p {
  color: var(--muted);
  line-height: 1.65;
}

.highlight-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.highlight-list li {
  display: flex;
  gap: 10px;
  color: #2f363d;
  font-weight: 750;
}

.highlight-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  flex: 0 0 auto;
  background: var(--red);
  border-radius: 50%;
}

.experience {
  background: #e9ece6;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  min-height: 280px;
}

.feature-number {
  display: inline-block;
  margin-bottom: 56px;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 950;
}

.merch-section {
  background: #f7f7f4;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.merch-grid article {
  display: grid;
  gap: 18px;
  min-height: 260px;
  padding: clamp(22px, 4vw, 34px);
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%),
    #15171d;
  box-shadow: 0 14px 40px rgba(18, 20, 24, 0.1);
}

.merch-grid article:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 46%),
    var(--forest);
}

.merch-grid article:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%),
    var(--red-dark);
}

.merch-grid span {
  color: var(--gold);
  font-weight: 950;
}

.merch-grid h3 {
  margin: auto 0 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1;
}

.merch-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

.ticket-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  background: #15171d;
  color: #fff;
}

.ticket-copy {
  position: sticky;
  top: 104px;
}

.ticket-copy p {
  margin-top: 20px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.steps span {
  color: #111317;
  background: #fff;
}

.ticket-panel {
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.action-panel,
.page-panel,
.checkout-page,
.register-card,
.validation-result,
.backoffice-auth {
  padding: clamp(20px, 4vw, 34px);
}

.action-panel h3,
.register-card h2,
.checkout-page h2,
.admin-table-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.action-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ecefeb;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 56px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 950;
  cursor: pointer;
}

.tab.active {
  color: var(--ink);
  background: #fff;
}

.panel-view {
  display: none;
  padding: clamp(18px, 4vw, 34px);
}

.panel-view.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-note {
  color: var(--muted);
  margin: -4px 0 12px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  color: #303741;
  font-size: 0.88rem;
  font-weight: 850;
}

input,
select,
textarea,
output {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cfd5d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.button:disabled,
button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

output {
  display: grid;
  place-items: center start;
  font-weight: 950;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 167, 181, 0.36);
  outline-offset: 2px;
}

.full {
  grid-column: 1 / -1;
}

.interest-set {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid #cfd5d0;
  border-radius: 8px;
}

.interest-set legend {
  padding: 0 6px;
  color: #303741;
}

.interest-set label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.interest-set input {
  width: 18px;
  min-height: 18px;
}

.status-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #d7dccf;
  background: #f2f5ee;
  color: #243029;
  line-height: 1.5;
}

.status-box.error {
  border-color: rgba(215, 25, 32, 0.25);
  background: #fff1f1;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.community {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 360px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  background: #f7f7f4;
}

.community-content p {
  margin: 20px 0 28px;
  color: var(--muted);
}

.community-stat {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 28px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--red), var(--forest));
  border-radius: 8px;
}

.community-stat strong {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
}

.community-stat span {
  display: block;
  max-width: 220px;
  margin-top: 16px;
  font-weight: 850;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.76);
  background: #111317;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  color: #fff;
  background: #111317;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(70px, 12vw, 128px) clamp(18px, 5vw, 72px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(18, 20, 24, 0.92), rgba(24, 58, 55, 0.78)),
    url("/assets/hero-motorsport.png") center / cover;
}

.compact-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
}

.page-hero > div {
  width: min(900px, 100%);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 7vw, 5.2rem);
  line-height: 0.95;
}

.page-hero p:not(.section-kicker) {
  width: min(720px, 100%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.inline-heading {
  margin: 0 0 18px;
}

.product-grid,
.purchase-list,
.admin-content {
  display: grid;
  gap: 18px;
}

.event-products {
  display: grid;
  gap: 16px;
}

.event-products + .event-products {
  margin-top: 28px;
}

.event-products-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.event-products-heading h3 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.event-products-heading span {
  color: var(--muted);
  font-weight: 850;
}

.ticket-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card,
.purchase-card,
.kpi,
.empty-state {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(18, 20, 24, 0.07);
}

.product-card {
  display: grid;
  gap: 16px;
}

.ticket-display-price {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9f6;
}

.ticket-display-price span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.ticket-display-price strong {
  font-size: 1.28rem;
  white-space: nowrap;
}

.product-card h4,
.purchase-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.product-card p,
.empty-state,
.cart-line span,
.cart-line small {
  color: var(--muted);
  line-height: 1.5;
}

.product-card > strong {
  color: var(--red);
  font-size: 1.4rem;
}

.stacked-form {
  grid-template-columns: 1fr;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.cart-drawer.open {
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 24, 0);
  transition: background 180ms ease;
}

.cart-drawer.open .cart-backdrop {
  background: rgba(18, 20, 24, 0.48);
}

.cart-shell {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(460px, 100vw);
  min-height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.cart-drawer.open .cart-shell {
  transform: translateX(0);
}

.cart-header,
.purchase-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.cart-header h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}

.cart-lines {
  display: grid;
  gap: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr 82px auto 38px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-line strong,
.cart-line span,
.cart-line small {
  display: block;
}

.cart-line input {
  min-height: 38px;
}

.cart-payment-summary {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.cart-payment-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cart-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
}

.checkout-box {
  display: grid;
  gap: 12px;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
}

.terms-check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--red);
}

.terms-check a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.email-check {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.email-check.valid {
  color: #3e6f46;
  border-color: rgba(62, 111, 70, 0.28);
  background: rgba(62, 111, 70, 0.06);
}

.email-check.valid::before {
  content: "✓";
  margin-right: 8px;
}

.email-check.invalid {
  color: var(--red-dark);
  border-color: rgba(215, 25, 32, 0.3);
  background: rgba(215, 25, 32, 0.05);
}

.floating-help {
  position: fixed;
  right: clamp(14px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: #1f8f4d;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(20, 40, 28, 0.28);
}

.floating-help span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 950;
}

.floating-help strong {
  font-size: 0.9rem;
  white-space: nowrap;
}

.internal-payment-shell {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mp-card-brick {
  min-height: 420px;
}

.payment-inline-status {
  border: 1px solid rgba(62, 111, 70, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  color: #315a38;
  background: rgba(62, 111, 70, 0.06);
  font-weight: 850;
}

.payment-test-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.24);
  border-radius: 8px;
  color: #7c1014;
  background: rgba(215, 25, 32, 0.08);
  font-weight: 850;
}

.profile-completion-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ticketera-shop-section {
  grid-template-columns: minmax(0, 1fr);
}

.ticketera-shop-section .inline-heading p:not(.section-kicker) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.ticketera-shop-section .ticket-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.enrollment-section.token-only {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.enrollment-main h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.enrollment-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-orders {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.portal-order-list {
  display: grid;
  gap: 14px;
}

.portal-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.portal-order-card strong,
.portal-order-card span,
.portal-order-card small {
  display: block;
}

.portal-order-card span,
.portal-order-card small {
  margin-top: 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-order-card img {
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.portal-order-card .status-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.pit-lane-section {
  align-items: start;
}

.pit-lane-board {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.pit-lane-user {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 20, 24, 0.06);
}

.pit-lane-user strong {
  font-size: 1.05rem;
}

.pit-lane-user span {
  color: var(--muted);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.pit-lane-tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.empty-state.compact {
  padding: 14px;
}

.legal-section {
  background: #f5f6f2;
}

.legal-copy {
  max-width: 920px;
  margin: 0 auto;
}

.legal-copy h2 {
  margin: 24px 0 8px;
  font-size: 1.25rem;
}

.legal-copy h2:first-child {
  margin-top: 0;
}

.legal-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.order-items {
  margin: 16px 0;
  padding-left: 18px;
  color: var(--muted);
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.ticket-pass {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: #fff;
}

.ticket-pass img {
  width: 160px;
  height: 160px;
}

.ticket-pass code,
.purchase-card code,
.admin-table code {
  color: var(--red-dark);
  font-weight: 850;
}

.scanner-box {
  display: grid;
  gap: 14px;
}

#qrVideo {
  width: 100%;
  min-height: 300px;
  background: #111317;
  border-radius: 8px;
}

.scanner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.manual-code-form {
  margin-top: 20px;
}

.validation-state {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
}

.validation-state.valid {
  background: var(--forest);
}

.validation-state.checked {
  background: var(--red-dark);
}

.validation-state strong {
  font-size: 1.5rem;
}

.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 18px 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 850;
}

.detail-list dd {
  margin: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  display: grid;
  gap: 8px;
}

.kpi span {
  color: var(--muted);
  font-weight: 850;
}

.kpi strong {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.admin-table-section {
  display: grid;
  gap: 14px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #fff;
  background: var(--ink);
}

.admin-table small {
  color: var(--muted);
}

.admin-provider {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-tab {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f6f2;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.admin-tab.active {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.admin-tab-panel,
.admin-editor,
.admin-form-panel {
  display: grid;
  gap: 18px;
}

.admin-form-panel {
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 20, 24, 0.06);
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.admin-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-card--wide {
  grid-column: span 2;
}

.admin-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-card-heading strong,
.admin-form-panel h2 {
  margin: 0;
  font-size: 1.18rem;
}

.admin-card-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

.phase-card {
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9f6;
}

.phase-card legend {
  padding: 0 6px;
  font-weight: 950;
}

.phase-card label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phase-card input[type="checkbox"],
.admin-form-panel input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
}

.phase-price-preview {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.phase-price-preview input[readonly] {
  color: var(--ink);
  background: #eef3ee;
  cursor: default;
}

.admin-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9f6;
}

.admin-check-list legend {
  padding: 0 6px;
}

.admin-check-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.admin-check-list input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}

.muted-inline {
  color: var(--muted);
  font-weight: 800;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-toolbar h2 {
  margin: 0;
}

.admin-toolbar input {
  width: min(420px, 100%);
}

.compact-table {
  min-width: 620px;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .intro-grid,
  .event-grid,
  .feature-grid,
  .merch-grid,
  .ticket-section,
  .community,
  .split-section,
  .ticket-product-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid.two,
  .phase-grid,
  .admin-card--wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .ticket-copy {
    position: static;
  }

  .hero-drive {
    min-height: clamp(1040px, 178vh, 1320px);
  }

  .hero-stage {
    min-height: 660px;
  }

  .hero-quick-menu {
    left: 16px;
    right: 16px;
    justify-content: center;
  }

  .hero-car-path {
    left: 56%;
    bottom: 132px;
    width: 76vw;
    min-width: 360px;
  }

  .hero-plate-menu {
    display: grid;
    align-content: center;
    gap: 18px;
    min-height: 260px;
  }

  .hero-plate-links {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-plate-links a {
    min-height: 54px;
  }
}

@media (max-width: 620px) {
  .brand small,
  .nav-cta {
    display: none;
  }

  .hero-content {
    padding-bottom: 58px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 8.9vw, 2.95rem);
  }

  .hero-drive {
    min-height: 1160px;
  }

  .hero-stage {
    min-height: 720px;
  }

  .hero-quick-menu {
    top: 78px;
    gap: 8px;
  }

  .hero-quick-menu a {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .hero-car-path {
    left: 76%;
    bottom: 390px;
    width: 78vw;
    min-width: 280px;
  }

  .car-plate {
    min-width: 104px;
    height: 28px;
    font-size: 0.82rem;
  }

  .form-grid,
  .enrollment-form,
  .interest-set {
    grid-template-columns: 1fr;
  }

  .portal-order-card {
    grid-template-columns: 1fr;
  }

  .event-card,
  .feature-card {
    min-height: 260px;
  }

  .cart-line {
    grid-template-columns: 1fr 72px;
  }

  .cart-line > strong,
  .cart-line .icon-button {
    justify-self: start;
  }

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

  .test-mode-banner {
    display: grid;
    gap: 4px;
  }
}

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

  .hero-car-path,
  .track-racing-line {
    animation: none;
  }

  .hero-drive {
    --content-opacity: 1;
    --content-y: 0px;
    --car-scroll-x: 0px;
    --car-scroll-y: 0px;
    --car-scroll-scale: 0.95;
    --plate-opacity: 1;
  }

  .hero-car-path {
    transform: translate(-50%, 0) scale(0.9);
  }
}

/* Real-event media layer. This replaces the previous animated hero with static R2 photography. */
.hero-drive {
  min-height: 0;
  overflow: hidden;
  background: #090b0f;
}

.hero-stage {
  position: relative;
  min-height: clamp(640px, 88vh, 860px);
  height: auto;
  align-items: end;
}

.hero-media {
  transform: none;
  filter: saturate(1.04) contrast(1.02) brightness(0.76);
  transform-origin: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.9), rgba(5, 7, 10, 0.5) 48%, rgba(5, 7, 10, 0.08)),
    linear-gradient(0deg, rgba(5, 7, 10, 0.82), rgba(5, 7, 10, 0.04) 62%);
}

.hero-content {
  width: min(820px, 100%);
  opacity: 1;
  transform: none;
}

.hero-meta {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.page-hero {
  background:
    linear-gradient(90deg, rgba(18, 20, 24, 0.92), rgba(24, 58, 55, 0.72)),
    url("/media/honda-fest-2025/image/pista-autos-en-pista/053-img-1830.jpg") center / cover;
}

.gallery-section {
  background: #fff;
}

.gallery-section--final {
  background: #e9ece6;
}

.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: clamp(20px, 5vw, 56px);
  align-items: end;
}

.gallery-heading p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.gallery-grid,
.gallery-strip {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: 16px;
}

.gallery-grid--lead {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.gallery-grid--balanced,
.gallery-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-toolbar {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  gap: 18px;
}

.gallery-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f4;
}

.gallery-summary strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.gallery-summary span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.gallery-filter-button strong {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #edf0ea;
  font-size: 0.78rem;
}

.gallery-filter-button.is-active {
  color: #fff;
  border-color: #d8262f;
  background: #d8262f;
}

.gallery-filter-button.is-active strong {
  color: #d8262f;
  background: #fff;
}

.gallery-grid--catalog {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  align-items: start;
}

.gallery-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(18, 20, 24, 0.08);
}

.gallery-card--wide {
  grid-row: span 2;
}

.gallery-image-link {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111317;
}

.gallery-card--wide .gallery-image-link {
  aspect-ratio: 16 / 10;
}

.gallery-image-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.gallery-image-link:hover img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.03);
}

.gallery-card figcaption {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.gallery-card figcaption strong {
  font-size: 1.05rem;
}

.gallery-card figcaption span {
  color: var(--muted);
  line-height: 1.45;
}

.gallery-card figcaption p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #3f454c;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.gallery-card figcaption small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gallery-strip {
  margin-top: clamp(22px, 5vw, 42px);
}

.gallery-dialog {
  width: min(1080px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gallery-dialog::backdrop {
  background: rgba(18, 20, 24, 0.72);
}

.gallery-dialog-media {
  position: relative;
  overflow: hidden;
  background: #080a0d;
}

.gallery-dialog-media > img:not(.gallery-dialog-watermark):not(.gallery-dialog-signature) {
  display: block;
  width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
  background: #080a0d;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-dialog-signature {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(75%, 620px);
  opacity: 0.9;
  filter: none;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-2.5deg);
  user-select: none;
}

.gallery-dialog-watermark {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 2;
  display: block;
  width: clamp(80px, 12vw, 132px);
  height: auto;
  filter: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-dialog-body {
  padding: 18px 22px 22px;
}

.gallery-dialog h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.gallery-dialog p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.gallery-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.gallery-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 860px) {
  .hero-stage {
    min-height: 720px;
  }

  .gallery-heading,
  .gallery-grid--lead,
  .gallery-grid--balanced,
  .gallery-grid--catalog,
  .gallery-strip {
    grid-template-columns: 1fr;
  }

  .gallery-card--wide {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .hero-stage {
    min-height: 680px;
  }

  .hero-content {
    padding-bottom: 46px;
  }

  .gallery-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-filter-button {
    flex: 1 1 calc(50% - 8px);
  }
}

/* Modern glass gallery */
#galerias.gallery-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7f4ec;
  background:
    linear-gradient(135deg, rgba(216, 38, 47, 0.15), transparent 28%),
    linear-gradient(215deg, rgba(42, 120, 104, 0.18), transparent 32%),
    linear-gradient(180deg, #050607 0%, #11100e 52%, #06090a 100%);
}

#galerias.gallery-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}

#galerias .section-kicker {
  color: #ff6b72;
}

#galerias .gallery-heading,
#galerias .gallery-toolbar,
#galerias .gallery-card,
#galerias .gallery-dialog {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(1.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.24);
}

#galerias .gallery-heading {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: clamp(20px, 4vw, 34px);
  border-radius: 8px;
  display: block;
}

#galerias .gallery-heading h2 {
  color: #fffaf0;
  margin: 0;
}

#galerias .gallery-heading p:last-child {
  color: rgba(247, 244, 236, 0.74);
}

#galerias .gallery-toolbar {
  padding: clamp(14px, 3vw, 22px);
  border-radius: 8px;
}

#galerias .gallery-summary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

#galerias .gallery-summary strong {
  color: #ffffff;
  text-shadow: 0 0 28px rgba(255, 107, 114, 0.34);
}

#galerias .gallery-summary span {
  color: rgba(247, 244, 236, 0.72);
}

#galerias .gallery-controls {
  gap: 10px;
}

#galerias .gallery-filter-button {
  color: rgba(247, 244, 236, 0.86);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

#galerias .gallery-filter-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 114, 0.58);
  background: rgba(255, 255, 255, 0.13);
}

#galerias .gallery-filter-button strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

#galerias .gallery-filter-button.is-active {
  color: #fff;
  border-color: rgba(255, 107, 114, 0.88);
  background: linear-gradient(135deg, rgba(216, 38, 47, 0.86), rgba(181, 30, 47, 0.78));
}

#galerias .gallery-filter-button.is-active strong {
  color: #d8262f;
  background: #fff;
}

#galerias .gallery-grid--catalog {
  width: min(1320px, 100%);
  grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
}

#galerias .gallery-card {
  position: relative;
  align-content: stretch;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  transform-origin: center bottom;
}

#galerias .gallery-card--feature {
  grid-column: span 2;
}

#galerias .gallery-card--quiet {
  grid-row: auto;
}

#galerias .gallery-image-link {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 8px;
}

#galerias .gallery-card--feature .gallery-image-link {
  aspect-ratio: 16 / 10;
}

#galerias .gallery-card--quiet .gallery-image-link {
  aspect-ratio: 3 / 4;
}

#galerias .gallery-image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 6, 8, 0.02), rgba(4, 6, 8, 0.18) 45%, rgba(4, 6, 8, 0.82)),
    linear-gradient(135deg, rgba(216, 38, 47, 0.18), transparent 44%);
  pointer-events: none;
}

#galerias .gallery-image-link img {
  transform: scale(1.01);
  filter: saturate(0.95) contrast(1.02) brightness(0.93);
  transition:
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 520ms ease;
}

#galerias .gallery-card:hover .gallery-image-link img {
  transform: scale(1.075);
  filter: saturate(1.12) contrast(1.04) brightness(1);
}

#galerias .gallery-card figcaption {
  position: absolute;
  inset-inline: 10px;
  bottom: 10px;
  z-index: 2;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #fff;
  background: rgba(7, 9, 12, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition:
    transform 260ms ease,
    background 260ms ease,
    border-color 260ms ease;
}

#galerias .gallery-card:hover figcaption {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 114, 0.48);
  background: rgba(7, 9, 12, 0.74);
}

#galerias .gallery-card figcaption strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fffaf0;
  font-size: 0.98rem;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#galerias .gallery-card figcaption span,
#galerias .gallery-card figcaption p,
#galerias .gallery-card figcaption small {
  color: rgba(247, 244, 236, 0.72);
}

#galerias .gallery-card figcaption p {
  -webkit-line-clamp: 2;
}

#galerias .gallery-card figcaption small {
  color: rgba(255, 210, 125, 0.76);
  -webkit-line-clamp: 1;
}

#galerias .gallery-card figcaption p,
#galerias .gallery-card figcaption small {
  max-height: 0;
  opacity: 0;
  transition:
    max-height 240ms ease,
    opacity 240ms ease;
}

#galerias .gallery-card:hover figcaption p,
#galerias .gallery-card:hover figcaption small,
#galerias .gallery-card--feature figcaption p,
#galerias .gallery-card--feature figcaption small {
  max-height: 4.8em;
  opacity: 1;
}

.gallery-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.985);
  transition:
    opacity 620ms ease,
    transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.gallery-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 860px) {
  #galerias .gallery-grid--catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #galerias .gallery-card--feature,
  #galerias .gallery-card--quiet {
    grid-column: auto;
    grid-row: auto;
  }

  #galerias .gallery-card--feature .gallery-image-link,
  #galerias .gallery-card--quiet .gallery-image-link,
  #galerias .gallery-image-link {
    aspect-ratio: 1 / 1.16;
  }
}

@media (max-width: 620px) {
  #galerias.gallery-section {
    padding-inline: 14px;
  }

  #galerias .gallery-heading {
    padding: 18px;
  }

  #galerias .gallery-grid--catalog {
    grid-template-columns: 1fr;
  }

  #galerias .gallery-card figcaption {
    inset-inline: 8px;
    bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-reveal,
  #galerias .gallery-image-link img,
  #galerias .gallery-card figcaption,
  #galerias .gallery-filter-button {
    transition: none;
  }

  .gallery-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Pro slideshow gallery */
#galerias .gallery-shell {
  display: grid;
  width: min(1320px, 100%);
  margin: 0 auto;
  gap: clamp(16px, 2.4vw, 26px);
  padding: clamp(14px, 2.6vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(1.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.24);
}

#galerias .gallery-shell .gallery-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

#galerias .gallery-tab-button {
  flex: 0 0 auto;
  min-width: max-content;
}

#galerias .gallery-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.46fr);
  gap: 14px;
  align-items: stretch;
}

#galerias .gallery-search,
#galerias .gallery-summary {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

#galerias .gallery-search {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px 16px;
}

#galerias .gallery-search span {
  color: rgba(247, 244, 236, 0.66);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

#galerias .gallery-search input {
  width: 100%;
  color: #fffaf0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 850;
}

#galerias .gallery-search input::placeholder {
  color: rgba(247, 244, 236, 0.42);
}

#galerias .gallery-viewer {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 14px;
  align-items: center;
  min-height: clamp(430px, 62vw, 760px);
}

#galerias .gallery-slide {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: clamp(420px, 58vw, 740px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #08090b;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

#galerias .gallery-slide__image {
  display: block;
  height: 100%;
  min-height: inherit;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

#galerias .gallery-slide__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.66), rgba(4, 5, 7, 0.08) 52%, rgba(4, 5, 7, 0.28)),
    linear-gradient(0deg, rgba(4, 5, 7, 0.82), transparent 52%);
  pointer-events: none;
}

#galerias .gallery-slide__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.03) brightness(0.92);
  user-select: none;
  -webkit-user-drag: none;
}

#galerias .gallery-slide__caption {
  position: absolute;
  left: clamp(12px, 2vw, 22px);
  right: auto;
  bottom: clamp(12px, 2vw, 22px);
  display: grid;
  width: min(330px, calc(100% - 28px));
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fffaf0;
  background: rgba(7, 9, 12, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px) saturate(1.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
}

#galerias .gallery-slide__counter {
  width: fit-content;
  padding: 2px 6px;
  color: #fff;
  border-radius: 999px;
  background: rgba(216, 38, 47, 0.62);
  font-size: 0.62rem;
  font-weight: 950;
}

#galerias .gallery-slide__caption strong {
  color: #fffaf0;
  font-size: clamp(0.86rem, 1.08vw, 1.02rem);
  line-height: 1.16;
}

#galerias .gallery-slide__caption em {
  display: none;
  color: rgba(255, 210, 125, 0.88);
  font-style: normal;
  font-weight: 850;
}

#galerias .gallery-slide__caption p,
#galerias .gallery-slide__caption small {
  margin: 0;
  color: rgba(247, 244, 236, 0.78);
  line-height: 1.36;
}

#galerias .gallery-slide__caption p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.74rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#galerias .gallery-slide__caption small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: rgba(247, 244, 236, 0.62);
}

#galerias .gallery-slide__caption small span {
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.62rem;
}

.gallery-slide__signature {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(75%, 880px);
  opacity: 0.9;
  filter: none;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-2.5deg);
  user-select: none;
}

.gallery-dialog-signature span,
.gallery-slide__signature span,
.gallery-dialog-signature small,
.gallery-slide__signature small {
  display: block;
  max-width: 100%;
  overflow: visible;
  color: rgba(255, 255, 255, 0.055);
  font-family: "Arial Black", Impact, Arial, sans-serif;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.84;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.28);
}

.gallery-dialog-signature span,
.gallery-slide__signature span {
  font-size: var(--gallery-signature-main, 6rem);
  font-style: italic;
}

.gallery-dialog-signature small,
.gallery-slide__signature small {
  margin-top: 0.08em;
  color: rgba(255, 255, 255, 0.045);
  font-size: var(--gallery-signature-sub, 2rem);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.24);
}

.gallery-slide__watermark {
  position: absolute;
  right: clamp(16px, 2.4vw, 30px);
  bottom: clamp(16px, 2.4vw, 30px);
  z-index: 2;
  width: clamp(70px, 8vw, 118px);
  height: auto;
  filter: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#galerias .gallery-slide__actions {
  position: absolute;
  top: clamp(12px, 2vw, 22px);
  right: clamp(12px, 2vw, 22px);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(420px, calc(100% - 28px));
}

#galerias .gallery-share-button,
.gallery-dialog .gallery-share-button {
  min-height: 36px;
  padding: 8px 11px;
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 9, 12, 0.34);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.16);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

#galerias .gallery-share-button--primary,
.gallery-dialog .gallery-share-button--primary {
  border-color: rgba(255, 107, 114, 0.52);
  background: rgba(216, 38, 47, 0.68);
}

#galerias .gallery-share-button:hover,
.gallery-dialog .gallery-share-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(216, 38, 47, 0.72);
}

#galerias .gallery-share-button:disabled,
.gallery-dialog .gallery-share-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

#galerias .gallery-nav {
  display: grid;
  place-items: center;
  width: 56px;
  height: 86px;
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(1.24);
  -webkit-backdrop-filter: blur(18px) saturate(1.24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

#galerias .gallery-nav:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 114, 0.6);
  background: rgba(216, 38, 47, 0.64);
}

#galerias .gallery-nav span {
  font-size: 3rem;
  line-height: 1;
}

#galerias .gallery-empty {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

#galerias .gallery-empty strong {
  color: #fffaf0;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

#galerias .gallery-empty span {
  color: rgba(247, 244, 236, 0.7);
}

#galerias .gallery-filmstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

#galerias .gallery-thumb {
  position: relative;
  flex: 0 0 clamp(118px, 12vw, 170px);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

#galerias .gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(0.88) contrast(1.02);
  transition:
    opacity 180ms ease,
    transform 240ms ease,
    filter 180ms ease;
}

#galerias .gallery-thumb span {
  position: absolute;
  inset-inline: 8px;
  bottom: 8px;
  overflow: hidden;
  color: #fffaf0;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  text-overflow: ellipsis;
}

#galerias .gallery-thumb.is-active {
  border-color: #ff6b72;
  box-shadow: 0 0 0 2px rgba(255, 107, 114, 0.2);
}

#galerias .gallery-thumb.is-active img,
#galerias .gallery-thumb:hover img {
  opacity: 1;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

@media (max-width: 900px) {
  #galerias .gallery-search-row {
    grid-template-columns: 1fr;
  }

  #galerias .gallery-viewer {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  #galerias .gallery-nav {
    position: absolute;
    top: 42%;
    z-index: 5;
    width: 46px;
    height: 68px;
  }

  #galerias .gallery-nav--prev {
    left: 10px;
  }

  #galerias .gallery-nav--next {
    right: 10px;
  }

  #galerias .gallery-slide,
  #galerias .gallery-slide__image,
  #galerias .gallery-slide__image img {
    min-height: min(74vh, 560px);
  }

  #galerias .gallery-slide__caption {
    left: 10px;
    right: auto;
    bottom: 10px;
    width: min(260px, calc(100% - 20px));
    max-width: 260px;
  }
}

@media (max-width: 620px) {
  #galerias .gallery-shell {
    padding: 12px;
  }

  #galerias .gallery-search,
  #galerias .gallery-summary {
    min-height: 0;
  }

  #galerias .gallery-search input {
    font-size: 0.98rem;
  }

  #galerias .gallery-slide,
  #galerias .gallery-slide__image,
  #galerias .gallery-slide__image img {
    min-height: 520px;
  }

  #galerias .gallery-slide__caption strong {
    font-size: 0.92rem;
  }

  #galerias .gallery-slide__actions {
    top: 10px;
    right: 10px;
    max-width: 180px;
    gap: 6px;
  }

  #galerias .gallery-share-button {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 0.68rem;
  }

  #galerias .gallery-slide__watermark {
    right: 12px;
    bottom: 96px;
    width: 62px;
  }

  #galerias .gallery-slide__signature {
    width: 76%;
  }

  .gallery-dialog-watermark {
    right: 14px;
    bottom: 14px;
    width: 76px;
  }

  .gallery-dialog-signature {
    width: 78%;
  }

  #galerias .gallery-slide__caption p {
    -webkit-line-clamp: 2;
  }

  #galerias .gallery-thumb {
    flex-basis: 118px;
  }
}
