/* elegantcars — single stylesheet, no build step. */

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-muted: #efeae1;
  --ink: #1c1b19;
  --ink-muted: #5b574f;
  --line: #d9d2c5;
  --accent: #7a5a24;
  --accent-ink: #ffffff;
  --gold: #d9b56f;
  --focus: #1d4ed8;
  --glass: rgba(255, 255, 255, 0.55);
  --tile-glass: rgba(255, 255, 255, 0.5);
  --tile-plate: transparent;
  --tyre: #1c1b19;
  --rim: #b9b4aa;
  --shadow: rgba(28, 27, 25, 0.12);
  --error-bg: #fbeae8;
  --error-ink: #8a1c12;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1d1b18;
    --surface-muted: #26231f;
    --ink: #f2eee6;
    --ink-muted: #b3ada1;
    --line: #3a362f;
    --accent: #d9b56f;
    --accent-ink: #1c1b19;
    --focus: #93b4ff;
    --glass: rgba(255, 255, 255, 0.35);
    --tile-glass: rgba(29, 27, 24, 0.5);
    --tile-plate: #ffffff;
    --tyre: #0a0a09;
    --rim: #8c877d;
    --shadow: rgba(0, 0, 0, 0.45);
    --error-bg: #3a1a16;
    --error-ink: #ffb4a8;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 32px;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header & footer */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.logo:hover {
  opacity: 0.8;
}

.logo span {
  color: var(--accent);
  font-style: italic;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  border-bottom-color: var(--accent);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 24px 0;
}

/* Shared text & controls */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}

.lede {
  font-size: 1.125rem;
  color: var(--ink-muted);
  max-width: 62ch;
}

.button {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
}

.button-ghost {
  background: transparent;
  color: var(--accent);
}

.load-error {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--error-bg);
  color: var(--error-ink);
}

.page-intro {
  padding: 48px 0 24px;
}

/* Homepage */

.page-home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: transparent;
  border-bottom: 0;
}

.page-home .logo,
.page-home .nav-list a {
  color: #fff;
}

.page-home .logo span {
  color: var(--gold);
}

.page-home .nav-list a:hover {
  border-bottom-color: var(--gold);
}

.page-home .site-footer {
  margin-top: 0;
}

/* The homepage is just the hero, so it fills the space above the footer. */
.page-home main {
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-start;
  min-height: 560px;
  min-height: max(560px, 85svh);
  overflow: hidden;
  background: #0b1020;
  color: #fff;
}

.hero-media,
.hero-media img,
.hero-media video,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img,
.hero-media video {
  max-width: none;
  object-fit: cover;
}

/* Keeps the hero text readable over any image or video. */
.hero-overlay {
  background:
    linear-gradient(0deg, rgba(6, 6, 10, 0.85) 0%, rgba(6, 6, 10, 0.35) 55%, rgba(6, 6, 10, 0.55) 100%);
}

@media (min-width: 900px) {
  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(6, 6, 10, 0.82) 0%, rgba(6, 6, 10, 0.5) 45%, rgba(6, 6, 10, 0) 75%),
      linear-gradient(0deg, rgba(6, 6, 10, 0.5) 0%, rgba(6, 6, 10, 0) 40%);
  }
}

/* The header (68px) sits on top of the hero, so this puts the title about
   100px below it. */
.hero-content {
  position: relative;
  padding-top: 168px;
  padding-bottom: 88px;
}

/* Sized to fit the title on one line, even on a phone. */
.hero h1 {
  font-size: clamp(1.5rem, 0.5rem + 5vw, 4.5rem);
}

.hero .lede {
  color: rgba(255, 255, 255, 0.88);
  max-width: 44ch;
  margin-bottom: 32px;
}

/* See-through gold with white text over the photo; solid gold on hover, with
   dark text, as white on solid gold wouldn't have enough contrast. */
.button-hero {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 1.0625rem;
  background: rgba(217, 181, 111, 0.3);
  border-color: var(--gold);
  color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button-hero:hover {
  background: var(--gold);
  color: #1c1b19;
}

@media (prefers-reduced-motion: reduce) {
  .button-hero {
    transition: none;
  }
}

.hero-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font: inherit;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(6, 6, 10, 0.6);
  color: #fff;
  cursor: pointer;
}

.hero :focus-visible {
  outline-color: #fff;
}

/* Filters page */

.filter-group {
  margin-top: 32px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 20px;
  background: var(--tile-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* Tiles are see-through over the page background and turn solid on hover or
   keyboard focus. */
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px var(--shadow);
}

.tile:hover,
.tile:focus-visible {
  background: var(--surface);
}

.tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: var(--surface-muted);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
  color: var(--ink-muted);
}

.tile-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
}

/* Narrower brand tiles so all the brands fit on one row on a laptop screen;
   auto-fit stretches them to fill the row whatever the number of brands. */
.tile-grid-brands {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.tile-grid-brands .tile {
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  border-top: 3px solid var(--accent);
}

/* Logos vary from square emblems to long wordmarks, so each is fitted inside
   the same box. In dark mode a white plate keeps dark logos visible (same for
   the black car type figures below). */
.tile-grid-brands .tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 88px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--tile-plate);
  border-radius: 6px;
}


.tile-media-photo {
  padding: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tile-plate);
}

.tile-type-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-count {
  font-size: 0.875rem;
  /* Main ink rather than muted, to stay readable on the see-through tile. */
  color: var(--ink);
}

.all-link-wrap {
  margin-top: 32px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .card {
    transition: none;
  }
  .tile:hover {
    transform: none;
  }
}

/* Stock page */

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 8px 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.chip:hover {
  background: var(--surface);
}

.chip-x {
  font-size: 1.125rem;
  line-height: 1;
  padding: 0 4px;
}

.results-status {
  margin: 12px 0 0;
  color: var(--ink-muted);
}

/* One car per row: photo on the left, details on the right. On narrow
   screens the photo goes on top instead. */
.car-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px var(--shadow);
}

/* The focus ring goes on the whole card, matching its click area. */
.card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}

.card-media {
  background: var(--surface-muted);
  padding: 28px 20px 16px;
}

.card-media-photo {
  position: relative;
  padding: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

/* The whole photo is shown, never cropped; .photo-backdrop fills the rest of
   the frame. */
.card-media-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.card-meta {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.card-title {
  font-size: 1.375rem;
  margin-bottom: 6px;
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-title a:focus-visible {
  outline: none;
}

.card-tagline {
  margin: 0 0 8px;
  color: var(--ink-muted);
}

.card-engine {
  margin: 0 0 16px;
  font-size: 0.875rem;
}

.card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card-specs dt {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.card-specs dd {
  margin: 0;
  font-weight: 600;
}

.card-price {
  margin: auto 0 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--accent);
}

@media (min-width: 720px) {
  .card {
    flex-direction: row;
  }

  .card-media {
    flex: 0 0 42%;
    display: flex;
    align-items: center;
  }

  /* The photo fills the left column, however tall the details are. */
  .card-media-photo {
    aspect-ratio: auto;
    min-height: 260px;
  }

  .card-media-photo img {
    position: absolute;
    inset: 0;
  }

  .card-media svg {
    width: 100%;
  }

  .card-body {
    padding: 24px 28px;
  }

  .card-specs {
    max-width: 420px;
  }
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

/* Silhouettes */

.silhouette-shadow {
  fill: var(--shadow);
}

.silhouette-glass {
  fill: var(--glass);
}

.silhouette-tyre {
  fill: var(--tyre);
}

.silhouette-rim {
  fill: var(--rim);
}

/* Car detail page */

.back-link-wrap {
  margin: 20px 0;
}

.back-link {
  font-weight: 600;
  text-decoration: none;
}

.back-link::before {
  content: "← ";
}

.back-link:hover {
  text-decoration: underline;
}

.detail-hero {
  background: var(--surface-muted);
}

.detail-media {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}

.detail-media .silhouette {
  width: min(100%, 900px);
}

.detail-media-photo {
  position: relative;
  padding: 0;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  overflow: hidden;
  background: var(--surface);
}

/* The whole photo is shown, never cropped; .photo-backdrop fills the rest of
   the landscape frame. */
.detail-media-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-layout {
  display: grid;
  gap: 32px;
  padding-top: 40px;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 64px;
  }
}

.detail-description {
  max-width: 62ch;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--accent);
  margin: 24px 0 0;
}

.detail-specs h2 {
  font-size: 1.25rem;
}

.spec-table {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}

.spec-table div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.spec-table dt {
  color: var(--ink-muted);
}

.spec-table dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 760px;
}

.contact-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.contact-card h2 {
  font-size: 0.8125rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.contact-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}

/* Car detail carousel */

.carousel {
  background: var(--surface-muted);
  padding-bottom: 16px;
}

.carousel-stage {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  overflow: hidden;
  background: var(--surface);
  touch-action: pan-y;
  user-select: none;
}

.carousel-image {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

/* Faded, cropped copy of the current photo behind the uncropped one, so the
   frame keeps a fixed landscape height without empty bars. */
.detail-media-photo .photo-backdrop,
.carousel-stage .photo-backdrop,
.card-media-photo .photo-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(12, 11, 10, 0.6);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-btn:hover {
  background: rgba(12, 11, 10, 0.85);
}

.carousel-btn:focus-visible {
  outline-color: #fff;
}

.carousel-prev {
  left: 16px;
}

.carousel-next {
  right: 16px;
}

.carousel-counter {
  position: absolute;
  right: 16px;
  bottom: 16px;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(12, 11, 10, 0.65);
  color: #fff;
  font-size: 0.875rem;
}

.carousel-thumbs {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 16px auto 0;
  overflow-x: auto;
}

.carousel-thumb {
  display: block;
  width: 112px;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.7;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-thumb:hover,
.carousel-thumb[aria-current="true"] {
  opacity: 1;
}

.carousel-thumb[aria-current="true"] {
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .carousel-thumb {
    width: 84px;
  }
}

/* Button in the photo's top-right corner that opens the full-screen viewer. */
.carousel-expand {
  top: 16px;
  right: 16px;
  transform: none;
  font-size: 1.375rem;
}

.carousel-image,
.detail-media-photo img:not(.photo-backdrop) {
  cursor: zoom-in;
}

/* Full-screen photo viewer (a modal <dialog>). */
.lightbox-open {
  overflow: hidden;
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0a09;
  color: #fff;
}

.lightbox::backdrop {
  background: #0b0a09;
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 16px 56px;
  touch-action: pan-y;
  user-select: none;
}

.lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  top: 16px;
  right: 16px;
  transform: none;
}

.lightbox-counter {
  top: 28px;
  right: auto;
  bottom: auto;
  left: 16px;
}

.lightbox-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.lightbox .carousel-btn:focus-visible {
  outline-color: #fff;
}

@media (max-width: 600px) {
  .lightbox .carousel-prev,
  .lightbox .carousel-next {
    top: auto;
    bottom: 48px;
    transform: none;
  }
}

/* Header: menu and language switcher */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.header-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 24px;
}

/* Small screens: logo and language globe share the top row, and the page
   links get a full-width row of their own underneath. */
@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0 12px;
    min-height: 60px;
  }

  .header-end {
    display: contents;
  }

  .header-inner .logo {
    flex: 1 1 0;
    min-width: 0;
  }

  .header-inner .logo-image {
    max-width: 100%;
    object-position: left center;
  }

  .header-end > nav:not(.lang-switch) {
    order: 3;
    flex-basis: 100%;
    border-top: 1px solid var(--line);
  }

  .nav-list {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
  }

  .nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    white-space: nowrap;
  }
}

.lang-switch {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px var(--shadow);
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.lang-menu a:hover {
  background: var(--surface-muted);
}

.lang-menu a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}

.lang-menu a[aria-current="true"]::after {
  content: "✓";
}

.page-home .lang-toggle {
  color: #fff;
}

.page-home .lang-toggle:hover,
.page-home .lang-toggle[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.page-home .lang-toggle:focus-visible {
  outline-color: #fff;
}

/* Image behind the whole page: the brand image on a brand-filtered stock
   page, and images/filters/filters-page.* on the filters page. Tweak
   --backdrop-opacity to make it stronger or subtler, and --text-panel for the
   see-through panel behind the page content. */

:root {
  --backdrop-opacity: 0.85;
  --text-panel: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-panel: rgba(20, 19, 17, 0.5);
  }
}

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.page-backdrop img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: var(--backdrop-opacity);
}

/* The page content sits on one see-through panel over the image. Muted text
   switches to the main ink colour, as the grey wouldn't stand out enough. */
.has-backdrop main {
  margin-top: 32px;
  padding-bottom: 40px;
  background: var(--text-panel);
  border-radius: var(--radius);
}

.has-backdrop .page-intro {
  padding-top: 32px;
}

.has-backdrop .page-intro .lede,
.has-backdrop .results-status {
  color: var(--ink);
}

/* Site logo image (images/logo.*, images/logo-on-dark.*). Change the height
   here to resize it; the width follows the image. */

.logo-pending .logo-text {
  visibility: hidden;
}

.logo picture {
  display: block;
}

.logo-image {
  display: block;
  height: 32px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .logo-image {
    height: 26px;
  }
}

/* Photo credits */

.photo-credit {
  margin: 8px auto 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.photo-credit:empty {
  display: none;
}

.photo-credit a {
  color: inherit;
}

.credits-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.credit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.credit-thumb {
  flex: none;
  width: 112px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-muted);
}

.credit-file {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.credit-item .photo-credit {
  margin: 0 0 4px;
  font-size: 0.875rem;
  color: var(--ink);
}

.credit-source {
  font-size: 0.8125rem;
}
