:root {
  color-scheme: dark;
  --bg: #070808;
  --panel: rgba(18, 20, 20, 0.9);
  --panel-strong: rgba(25, 27, 28, 0.96);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4f4f2;
  --muted: #aaa9a4;
  --red: #d52834;
  --red-deep: #881822;
  --gold: #d9b43b;
  --blue: #2874a8;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 75% 10%, rgba(180, 180, 170, 0.12), transparent 28rem),
    linear-gradient(180deg, #101111 0%, var(--bg) 35%, #050606 100%);
  color: var(--text);
}

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(5, 6, 6, 0.9), rgba(5, 6, 6, 0.55));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.88;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 0;
}

.brand em {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 900;
  font-style: normal;
}

.brand strong {
  color: var(--red);
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  letter-spacing: 0.46em;
}

.nav {
  display: flex;
  gap: clamp(18px, 4vw, 54px);
  align-items: center;
  color: #d9d9d7;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding-block: 8px;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: 150ms ease;
}

.nav a:hover::after,
.nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: block;
  isolation: isolate;
  min-height: 650px;
  padding: 150px clamp(22px, 5vw, 68px) 70px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 52% 47%, rgba(255, 255, 255, 0.1), transparent 20rem),
    linear-gradient(90deg, rgba(3, 4, 4, 0.96) 0%, rgba(5, 6, 6, 0.86) 35%, rgba(5, 6, 6, 0.72) 62%, rgba(5, 6, 6, 0.98) 100%),
    linear-gradient(180deg, rgba(5, 6, 6, 0.64), rgba(5, 6, 6, 0.96)),
    url("./assets/images/cars/Ford/b5fb464f-fe08-48c5-835f-8000bec0f993.jpeg") center 42% / cover no-repeat,
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #121313, #050606);
  content: "";
}

.hero::after {
  position: absolute;
  top: -15%;
  bottom: -10%;
  left: clamp(140px, 19vw, 280px);
  z-index: -1;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 35, 49, 0.98) 18%, rgba(255, 35, 49, 0.78) 78%, transparent);
  box-shadow: 0 0 24px rgba(255, 35, 49, 0.5);
  content: "";
  transform: rotate(11deg);
}

.hero-copy {
  width: min(100%, 900px);
  padding-bottom: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(4.6rem, 9vw, 8.9rem);
  line-height: 0.84;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 18px 35px rgba(0, 0, 0, 0.62);
}

h1 span {
  display: block;
  background: linear-gradient(180deg, #ffffff 0%, #b9b9b7 45%, #70706f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  display: grid;
  grid-template-columns: clamp(110px, 14vw, 185px) minmax(0, 1fr);
  gap: clamp(60px, 9vw, 130px);
  align-items: start;
  margin-top: 4px;
}

.hero-logo {
  width: clamp(105px, 13vw, 178px);
  height: clamp(105px, 13vw, 178px);
  object-fit: contain;
  margin-top: 8px;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.7));
}

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

.hero-main .hero-actions {
  margin-top: 28px;
}

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.mini-button,
.filter-row button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  padding: 0 36px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.primary,
.filter-row .active {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, #d92a37, #8d1620);
}

.ghost {
  border-color: rgba(213, 40, 52, 0.72);
  background: rgba(0, 0, 0, 0.24);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 0;
  max-width: 520px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(213, 40, 52, 0.24);
  border-bottom: 1px solid rgba(213, 40, 52, 0.15);
  padding-bottom: 22px;
}

.hero-stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-inline: 24px;
  color: #bebebb;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stats span:first-child {
  padding-left: 0;
}

.hero-stats span + span {
  border-left: 1px solid rgba(213, 40, 52, 0.72);
}

.hero-stats strong {
  color: var(--text);
  font-size: 1.85rem;
  line-height: 1;
}

.gallery-stats span {
  display: inline-grid;
  gap: 2px;
  min-width: 96px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-stats strong {
  color: var(--text);
  font-size: 1.15rem;
}

.hero-media {
  width: min(100%, 860px);
  min-height: 430px;
  justify-self: end;
  margin: 0;
}

.photo-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: #101111;
}

.photo-frame img,
.lightbox-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media.photo-frame {
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

.hero-media.photo-frame img {
  min-height: 430px;
}

.photo-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.48));
  content: "";
}

figcaption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
}

.section,
.panel,
.gallery-section {
  width: min(100% - 44px, 1420px);
  margin-inline: auto;
}

.section {
  padding: 44px 0 18px;
}

.section-title,
.panel-heading {
  margin-bottom: 20px;
}

.section-title {
  text-align: center;
}

h2 {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  text-transform: uppercase;
}

.section-title p,
.panel-heading p,
.gallery-summary p,
.build-content p {
  color: var(--muted);
}

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

.build-card,
.panel,
.gallery-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-strong), rgba(10, 11, 11, 0.92));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.build-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    background 150ms ease;
}

.build-card:hover,
.build-card:focus-visible {
  border-color: rgba(213, 40, 52, 0.68);
  background: linear-gradient(180deg, rgba(30, 27, 28, 0.98), rgba(11, 12, 12, 0.94));
  outline: none;
  transform: translateY(-2px);
}

.build-rank {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 2;
  color: var(--red);
  font-size: 2.8rem;
  font-weight: 950;
}

.build-media {
  height: clamp(380px, 34vw, 560px);
  margin-bottom: 16px;
}

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

.build-content h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.mini-button {
  display: inline-flex;
  min-width: 126px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  color: #d3d2ce;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.specs span {
  min-height: 42px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.panel {
  margin-top: 18px;
  padding: 22px;
}

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

.car-tile {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.car-tile:hover,
.shot:hover,
.filter-row button:hover {
  border-color: rgba(255, 255, 255, 0.36);
}

.thumb {
  min-height: 78px;
  border-radius: 5px;
}

.thumb.photo-frame img {
  aspect-ratio: 16 / 9;
}

.car-tile strong {
  font-size: 0.82rem;
}

.car-tile small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.car-tile.more {
  place-content: center;
  min-height: 100%;
  border: 1px solid var(--line);
  text-align: center;
}

.split {
  width: min(100% - 44px, 1420px);
  margin: 18px auto 0;
  align-items: stretch;
}

.split .panel {
  width: auto;
  margin: 0;
  min-height: 520px;
}

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

.shot {
  min-height: clamp(170px, 17vw, 280px);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
}

.filter-row button {
  min-height: 42px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.gallery-section {
  margin-top: 18px;
  margin-bottom: 34px;
  padding: 22px;
}

.gallery-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.gallery-stats {
  display: flex;
  gap: 20px;
}

.gallery-filters {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.gallery-filters .filter-row {
  gap: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.gallery-item {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-item img {
  aspect-ratio: 4 / 3;
}

.lightbox,
.album-dialog {
  width: min(92vw, 980px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #090a0a;
  color: var(--text);
}

.album-dialog {
  width: min(92vw, 1180px);
  max-height: 88vh;
  padding: 22px;
  overflow: auto;
}

.lightbox[open],
.album-dialog[open] {
  animation: dialogFade 160ms ease both;
}

.lightbox::backdrop,
.album-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.lightbox-close,
.album-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: var(--text);
  cursor: pointer;
}

.album-close {
  position: sticky;
  top: 0;
  float: right;
}

.lightbox-media {
  min-height: min(62vw, 600px);
  border: 0;
  border-radius: 0;
  background: #050606;
}

.lightbox-media img {
  max-height: min(72vh, 760px);
  object-fit: contain;
}

.lightbox p {
  margin: 0;
  padding: 14px 18px 18px;
  color: var(--muted);
}

.album-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin: 0 52px 18px 0;
}

.album-head h2 {
  margin: 0;
}

.album-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.album-photo {
  min-height: 220px;
  padding: 0;
  cursor: pointer;
}

@keyframes dialogFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
  }

  .nav {
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    font-size: 0.72rem;
  }

  .hero,
  .featured-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 72px;
    padding-bottom: 46px;
  }

  .hero-title {
    grid-template-columns: clamp(82px, 16vw, 130px) minmax(0, 1fr);
    gap: clamp(22px, 6vw, 54px);
  }

  .hero-stats {
    max-width: 100%;
  }

  .hero-media {
    min-height: 310px;
    justify-self: stretch;
  }

  .car-strip,
  .gallery-grid,
  .album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .hero-title {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-logo {
    width: 96px;
    height: 96px;
  }

  .hero,
  .section,
  .panel,
  .gallery-section,
  .split {
    width: min(100% - 28px, 1420px);
  }

  .hero {
    padding-inline: 14px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-stats span {
    padding-inline: 0;
  }

  .hero-stats span + span {
    border-left: 0;
  }

  .build-content,
  .gallery-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .specs,
  .car-strip,
  .recent-grid,
  .gallery-grid,
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split .panel {
    min-height: auto;
  }

  .shot,
  .album-photo {
    min-height: 180px;
  }

  .gallery-stats {
    flex-wrap: wrap;
  }
}
