.circuit-page { background: #fff; }
.circuit-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 11vw, 146px) 28px clamp(78px, 11vw, 138px);
  color: #fff;
  background:
    linear-gradient(110deg, rgba(10, 32, 68, .94), rgba(16, 43, 87, .78)),
    url("assets/circuit-entrance.png") center 48% / cover no-repeat;
}
.circuit-hero::after {
  position: absolute;
  right: -120px;
  bottom: -240px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255,255,255,.04), 0 0 0 88px rgba(255,255,255,.025);
  content: "";
}
.circuit-hero-inner { position: relative; z-index: 1; width: min(1128px, 100%); margin: 0 auto; }
.circuit-hero .eyebrow { color: #d3e2f5; }
.circuit-hero h1 { max-width: 760px; margin: 0; font: 400 clamp(48px, 7vw, 84px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.circuit-hero h1 em { color: #a9cbef; font-weight: 400; }
.circuit-hero-inner > p:last-child { max-width: 570px; margin: 26px 0 0; color: #e0e9f4; font-size: 17px; line-height: 1.7; }

.circuit-gallery { width: min(1184px, 100%); margin: 0 auto; padding: 92px 28px 112px; }
.gallery-heading { max-width: 690px; margin-bottom: 42px; }
.gallery-heading h2 { margin: 0; color: #0b2856; font: 400 clamp(38px, 5vw, 58px)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.gallery-heading > p:last-child { margin: 18px 0 0; color: #657087; font-size: 15px; }
.gallery-grid { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.gallery-card { overflow: hidden; border: 1px solid #e6ebf0; border-radius: 14px; background: #fff; box-shadow: 0 14px 36px rgba(12,38,75,.08); }
.gallery-photo-button { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #e8eef4; cursor: zoom-in; text-align: left; }
.gallery-photo-button img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .3s ease; }
.gallery-photo-button:hover img, .gallery-photo-button:focus-visible img { transform: scale(1.035); }
.gallery-photo-hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 14px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(11,40,86,.88); color: #fff; font-size: 11px; font-weight: 800; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
.gallery-photo-button:hover .gallery-photo-hint, .gallery-photo-button:focus-visible .gallery-photo-hint { opacity: 1; transform: translateY(0); }
.gallery-photo-hint span { font-size: 15px; line-height: 1; }
.gallery-card .card-body { padding: 22px 24px 24px; }
.gallery-photo-number { margin: 0 0 8px; color: #c9473d; font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.gallery-card h3 { margin: 0; color: #12366f; font: 700 22px/1.2 Georgia, "Times New Roman", serif; }
.gallery-card .card-body > p:last-child { margin: 9px 0 0; color: #657087; font-size: 14px; line-height: 1.6; }

.gallery-contact { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 56px max(28px, calc((100% - 1128px) / 2)); background: #edf5fb; }
.gallery-contact h2 { margin: 0; color: #0b2856; font: 400 clamp(34px, 4vw, 48px)/1.05 Georgia, "Times New Roman", serif; }
.gallery-contact p:not(.kicker) { max-width: 670px; margin: 14px 0 0; color: #657087; }
.gallery-contact .kicker { margin-bottom: 12px; }
.gallery-contact .button { flex: 0 0 auto; }
.circuit-modal .modal-content { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: #081b39; color: #fff; }
.circuit-modal .modal-header { position: absolute; top: 0; right: 0; z-index: 2; padding: 18px; }
.circuit-modal .modal-body { padding: 22px 22px 18px; }
.circuit-modal-image { display: block; width: 100%; max-height: min(76vh, 840px); object-fit: contain; }
.circuit-modal-caption { margin: 14px 48px 0 0; color: #e0e9f4; font-size: 14px; text-align: center; }

@media (max-width: 760px) {
  .circuit-hero { padding: 80px 20px; }
  .circuit-gallery { padding: 68px 20px 78px; }
  .gallery-contact { align-items: flex-start; flex-direction: column; padding: 46px 20px; }
  .gallery-contact .button { width: 100%; justify-content: space-between; }
  .circuit-modal .modal-body { padding: 52px 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-photo-button img, .gallery-photo-hint { transition: none; }
}
