/* BMD template gallery. Composition follows the approved references in
   ../referencias/. The carousel is the one bold element; everything else stays quiet. */

:root {
  /* Native scrollbars, the search clear button and autofill follow the page. */
  color-scheme: dark;

  /* BMD palette. The page is navy; paper is its text and the light fallback inside a card. */
  --navy: #0b2545;
  --paper: #fbf8f4;
  --paper-deep: #f1ece4;
  --ink-soft: #4b5868; /* only on the light card fallback */
  --forest: #0e7a3d;
  --forest-hover: #0f8444;
  --forest-deep: #0a5f2f;
  --green: #12a150;
  --green-soft: #8fdfb0;

  /* Roles on navy. */
  --surface: #133158;
  --surface-hover: #1b3f6e;
  --text-soft: #c7d2e0;
  --line: #2b4a70;
  --pill-line: #6f8c70;
  --disabled: #8b9ab0;

  /* System fonts on purpose, as on the BMD sites: no external requests. */
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --page-gutter: clamp(16px, 3vw, 34px);
  --tap: 44px;
}

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

[hidden] { display: none !important; }

/* manipulation: no double-tap zoom on quick presses of the carousel buttons. Pinch still works. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: auto; width: 100%; overflow-x: hidden; background: var(--navy); }

a,
button,
input { touch-action: manipulation; }

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3, p, ol { margin: 0; }

a { color: inherit; }

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

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--navy);
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* ---------- header */

/* Official BMD logo for dark backgrounds. Its own background is the page navy, so it
   sits on the header without a box. Never redrawn, only scaled. */

/* Same pattern as the BMD sites: current language marked, the others as links. */

@media (hover: hover) {
}

.nav-btn svg,
.cta svg,
.swipe-hint svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- introduction and tools */

.intro {
  padding: clamp(22px, 3vw, 34px) var(--page-gutter) clamp(10px, 1.4vw, 16px);
  text-align: center;
}

h1 {
  max-width: 20ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 1.5rem + 3.1vw, 3.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  h1 { max-width: none; }
}

.lede {
  max-width: 58ch;
  margin: 10px auto 0;
  color: var(--text-soft);
  font-size: clamp(1.03rem, 0.98rem + 0.3vw, 1.2rem);
  text-wrap: balance;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 18px;
}

.search {
  display: flex;
  flex: 0 1 460px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.search-label {
  flex: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.search input {
  width: 100%;
  min-height: var(--tap);
  padding: 8px 16px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--paper);
  font: inherit; /* 16 px or more: iOS zooms the page on focus below that */
  appearance: none;
  -webkit-appearance: none;
}

.search input::placeholder { color: var(--text-soft); opacity: 1; }

@media (hover: hover) {
  .search input:hover { border-color: var(--green-soft); }
}

.result-count {
  min-height: var(--tap);
  padding-block: 10px;
  color: var(--text-soft);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 84px; /* the buttons arrive with JavaScript: nothing below should jump */
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 6px 16px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.9375rem;
  white-space: nowrap;
  cursor: pointer;
}

/* Only with a real pointer: after a tap, touch screens would keep the hover colour. */
@media (hover: hover) {
  .pill:hover { background: var(--surface); }
}

@media (hover: hover) and (min-width: 760px) {
  .pill { min-height: 38px; padding-block: 4px; }
}

.pill:active { background: var(--surface); }

.pill[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--forest);
  color: #fff;
}

@media (hover: hover) {
  .pill[aria-pressed="true"]:hover { background: var(--forest-hover); }
}

.pill-count {
  color: var(--text-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.pill[aria-pressed="true"] .pill-count { color: #fff; }

.noscript-note {
  max-width: 60ch;
  margin: 24px auto;
  padding-inline: var(--page-gutter);
  text-align: center;
}

/* ---------- carousel */

.carousel { padding-bottom: clamp(16px, 2vw, 24px); }

.carousel-frame {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  --card-w: clamp(440px, min(47vw, 70vh), 730px);
  --card-h: calc(var(--card-w) * 2 / 3);
  /* Plain numbers, read once by app.js when it measures the cards. */
  --side-ratio: 0.495;
  --side-scale: 0.82;
  --side-turn: 14;
  --stage-pad: 28px;
  --stage-h: calc(var(--card-h) + var(--stage-pad) * 2);
  --btn: 56px;
  position: relative;
  isolation: isolate; /* keeps the halo under the panel text and over the page background */
  /* Name, colours, CTA and pager come first, as in the references. The description, of
     very different lengths, comes after them, so it cannot move the CTA. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* A static fluorescent halo follows the central card's silhouette. Shadows are
   painted without animation or blur filters; this decoration never captures gestures. */
.carousel-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: var(--stage-pad);
  right: 0;
  left: 0;
  width: var(--card-w);
  height: var(--card-h);
  margin-inline: auto;
  border-radius: 20px;
  background: rgba(50, 255, 120, 0.18);
  box-shadow:
    0 0 24px 10px rgba(74, 255, 128, 0.8),
    0 0 65px 26px rgba(25, 245, 104, 0.58),
    0 0 120px 42px rgba(18, 210, 90, 0.28);
  pointer-events: none;
}

/* No card to glow behind: the message stays on plain navy. */
.carousel-frame:has(.empty:not([hidden]))::before { opacity: 0; }

.stage {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  height: var(--stage-h);
  overflow: hidden;
  /* Clip both axes: transformed cards must never enlarge Safari's page viewport. */
  width: 100%;
  min-width: 0;
  max-width: 100%;
  contain: layout paint;
  overscroll-behavior-x: contain;
  perspective: 1700px;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* app.js writes transform, opacity and z-index on every frame of movement.
   No CSS transition here: it would lag behind the finger. */
.card {
  /* The stable stage receives every gesture, even when this card is recycled. */
  pointer-events: none;
  position: absolute;
  top: var(--stage-pad);
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) / -2);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 48px -18px rgba(2, 8, 20, 0.7), 0 3px 8px rgba(2, 8, 20, 0.35);
  visibility: hidden;
  isolation: isolate; /* keeps the rounded corners over the fading image in Safari */
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.card.is-prev,
.card.is-next { cursor: pointer; }

.card * { pointer-events: none; }

.stage.is-dragging,
.stage.is-dragging .card { cursor: grabbing; }

.chrome {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding-inline: 14px;
  border-bottom: 1px solid #e7e4de;
  background: #fff;
}

.chrome-dots,
.chrome-dots::before,
.chrome-dots::after {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f0b429;
}

.chrome-dots {
  position: relative;
  flex: none;
  margin-inline: 14px;
}

.chrome-dots::before,
.chrome-dots::after {
  content: "";
  position: absolute;
  top: 0;
}

.chrome-dots::before { left: -14px; background: #e5534b; }
.chrome-dots::after { left: 14px; background: #3fa85b; }

.chrome-address {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 22px;
  padding-inline: 10px;
  border-radius: 999px;
  background: #eff0f2;
  color: #38424f;
  font-size: 0.75rem;
}

.chrome-lock { flex: none; width: 11px; height: 11px; fill: currentColor; }

.chrome-url {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shot {
  --shot-tone: var(--paper-deep);
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--shot-tone);
}

.shot picture { display: contents; }

/* Side cards sit slightly darker; the central one shows its original colours. The shade is a
   layer inside the card, faded only in opacity. The card's own movement has no transition. */
.chrome { position: relative; }

.chrome::after,
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #06152a;
  opacity: 0.2;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.card.is-active .chrome::after,
.card.is-active .shot::after { opacity: 0; }

.shot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 160ms ease;
  /* The finger never lands on the image: no iOS save menu on a long press, which would
     cancel the gesture, and no native image drag with a mouse. */
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Recycled cards show the design's tone until their own image has loaded. */
.shot.is-ready .shot-image { opacity: 1; }

.shot-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--paper-deep);
  color: var(--navy);
  text-align: center;
}

.shot.is-failed { background: var(--paper-deep); }
.shot.is-failed .shot-fallback { display: flex; }
.shot.is-failed .shot-image { display: none; }

.shot-fallback-name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.4rem);
  line-height: 1.15;
}

.shot-fallback-text { max-width: 34ch; color: var(--ink-soft); font-size: 0.9375rem; }

.card:not(.is-active) .shot-fallback-text { display: none; }

.empty {
  position: absolute;
  inset: var(--stage-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  user-select: text;
  -webkit-user-select: text;
}

.empty-title {
  max-width: 28ch;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.empty-text { max-width: 48ch; color: var(--text-soft); }

.button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 22px;
  border: 1px solid var(--green-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--green-soft);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

@media (hover: hover) {
  .button-quiet:hover { background: var(--surface); --lift: -2px; }
}

.button-quiet:active { background: var(--surface-hover); --lift: 0; }

.nav-btn {
  position: absolute;
  top: calc(var(--stage-h) / 2 - var(--btn) / 2);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--btn);
  height: var(--btn);
  padding: 0;
  border: 1.5px solid var(--pill-line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--paper);
  cursor: pointer;
}

.nav-btn svg { width: 26px; height: 26px; }

@media (hover: hover) {
  .nav-btn:hover:not(:disabled) { border-color: var(--green-soft); background: var(--surface-hover); }
}

.nav-btn:active:not(:disabled) { background: var(--surface-hover); }
.nav-btn:disabled { border-color: var(--line); color: var(--disabled); cursor: default; }

/* The button can sit over any screenshot: a navy gap keeps its focus ring readable on all of them. */
.nav-btn:focus-visible { box-shadow: 0 0 0 3px var(--navy); }
.nav-btn-prev { left: clamp(6px, 2vw, 30px); }
.nav-btn-next { right: clamp(6px, 2vw, 30px); }

.swipe-hint { display: none; grid-row: 2; grid-column: 1; }

/* ---------- active design panel */

/* The panel's children sit directly in the frame's grid. */
.panel { display: contents; }

/* With no results these keep their space, so the page does not jump while typing. */
.panel[hidden] { display: contents !important; visibility: hidden; }
.pager[hidden] { display: flex !important; visibility: hidden; }

.model-heading,
.swatches,
.actions,
.pager,
.model-kind,
.demo-note,
.credit {
  grid-column: 1;
  justify-self: center;
  text-align: center;
}

.model-heading,
.model-kind,
.demo-note,
.credit {
  width: 100%;
  padding-inline: var(--page-gutter);
}

.model-heading { grid-row: 3; }
.swatches { grid-row: 4; }
.actions { grid-row: 5; }
.pager { grid-row: 7; }
.model-kind { grid-row: 8; }
.demo-note { grid-row: 6; }
.credit { grid-row: 9; }

.model-kind-sizer { visibility: hidden; pointer-events: none; }

.model-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 12px;
  font-weight: 400;
}

.model-name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
}

.model-category {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.3rem);
}

.model-category:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 50%;
  background: currentColor;
}

.model-kind {
  max-width: calc(62ch + var(--page-gutter) * 2);
  margin-top: 10px;
  color: var(--text-soft);
  hyphens: auto;
  text-wrap: pretty;
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.swatch {
  --swatch: var(--paper-deep);
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: var(--swatch);
}

/* The demo stays the main action; asking for a site in this style sits beside it, quieter. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 14px;
  padding-inline: var(--page-gutter);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: min(350px, 100%);
  min-height: 50px;
  padding: 10px 28px;
  border-radius: 10px;
  background: var(--forest);
  box-shadow: inset 0 0 0 1px var(--green); /* the fill alone is under 3:1 against navy */
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.cta-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 22px;
  border: 1px solid var(--green-soft);
  border-radius: 10px;
  background: transparent;
  color: var(--green-soft);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

/* Same space with no results, so the page does not jump while typing. */
.cta-choose[hidden] { display: inline-flex !important; visibility: hidden; }

/* Discreet highlight: a 2 px lift and the arrow leaning forward. Transform only, only
   while a real pointer is over the button, never on a loop. */
.cta,
.cta-choose,
.button-quiet { transform: translateY(var(--lift, 0)); }

.cta svg { flex: none; width: 22px; height: 22px; transform: translateX(var(--nudge, 0)); }

@media (prefers-reduced-motion: no-preference) {
  .cta,
  .cta-choose,
  .button-quiet,
  .cta svg { transition: transform 160ms ease-out; }
}

@media (hover: hover) {
  .cta:hover { background: var(--forest-hover); --lift: -2px; --nudge: 3px; }
}

@media (hover: hover) {
  .cta-choose:hover { background: var(--surface); --lift: -2px; }
}

.cta:active { background: var(--forest-deep); --lift: 0; }
.cta-choose:active { background: var(--surface-hover); --lift: 0; }

.demo-note {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.875rem;
}

.credit {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.875rem;
}

.credit a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-left: 6px;
  color: var(--paper);
  text-underline-offset: 3px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 40px;
  margin-top: 8px;
}

.counter {
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

.dots { display: inline-flex; align-items: center; gap: 12px; }

.dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--pill-line);
  border-radius: 50%;
}

.dot.is-on { border-color: var(--green-soft); background: var(--green-soft); }

.closing {
  max-width: 1120px;
  margin: 10px auto 0;
  padding-inline: var(--page-gutter);
  text-align: center;
}

.tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  font-style: italic;
}

.tagline::before,
.tagline::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.notice {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

/* ---------- how it works and footer */

.how {
  max-width: 1120px;
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding: 0 var(--page-gutter) clamp(32px, 5vw, 56px);
}

.how h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-steps li {
  padding-top: 12px;
  border-top: 2px solid var(--pill-line);
  counter-increment: step;
}

.how-steps h3 {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.3;
}

.how-steps h3::before { content: counter(step) ". "; }

.how-steps p { margin-top: 6px; max-width: 42ch; color: var(--text-soft); hyphens: auto; }

.how-action { margin: 0; }

/* Same content as the BMD sites' footer: logo, what BMD does, contact and legal pages. */

/* ---------- entry page, shown only without JavaScript or until the redirect runs */

.language-choice {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(32px, 8vw, 72px) var(--page-gutter);
}

.language-choice ul { margin: 20px 0 0; padding: 0; list-style: none; }

.language-choice li + li { margin-top: 12px; }

.language-choice a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--pill-line);
  border-radius: 10px;
  text-decoration: none;
}

@media (hover: hover) {
  .language-choice a:hover { background: var(--surface); }
}

.choice-language { display: block; font-weight: 600; }
.choice-title { color: var(--text-soft); }

/* ---------- small screens: phone screenshots and stacked panel */

@media (max-width: 759px) {

  /* Hero, search and filters take less height, so the carousel starts within the first
     screen of a phone, as in the mobile reference. */
  .intro { padding-top: 14px; padding-bottom: 6px; }
  h1 { max-width: none; font-size: clamp(1.75rem, 1.15rem + 2.9vw, 2.4rem); }
  .lede { margin-top: 6px; font-size: 1rem; }
  .tools { flex-direction: column; align-items: stretch; gap: 0; margin-top: 12px; }
  .search { flex: none; display: block; }

  /* The placeholder shows what to type. The label stays for screen readers. */
  .search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .result-count { min-height: 1.4em; padding-block: 4px 0; font-size: 0.875rem; line-height: 1.4; text-align: center; }

  .filters {
    position: relative;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-height: 52px;
    margin-top: 6px;
    margin-inline: calc(var(--page-gutter) * -1);
    padding: 2px var(--page-gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: var(--page-gutter);
    overscroll-behavior-x: contain;
  }

  .filters::-webkit-scrollbar { display: none; }

  /* This row scrolls, so it clips anything drawn outside a button: the ring goes inside. */
  .filters .pill:focus-visible { outline-offset: -3px; }

  .carousel-frame {
    --card-w: min(60vw, 340px, 62vh); /* 62vh: a phone on its side still fits a whole card */
    --card-h: calc(var(--card-w) * 1.5);
    --side-ratio: 0.377;
    --side-turn: 16;
    --stage-pad: 20px;
    --btn: 48px;
  }

  .stage { perspective: 900px; }
  .card { border-radius: 18px; }
  .chrome { display: none; }

  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 0.9375rem;
  }

  .swipe-hint svg { width: 32px; height: 24px; stroke-width: 1.4; }
  .swipe-hint[hidden] { display: flex !important; visibility: hidden; }

  .model-heading { flex-direction: column; align-items: center; margin-top: 6px; }
  .model-name { min-height: 1.2em; font-size: 1.85rem; }
  .model-category { min-height: 1.4em; font-size: 1rem; line-height: 1.4; }
  .model-category:not(:empty)::before { display: none; }

  .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .cta { display: flex; min-width: 0; }
  .cta-choose { min-height: var(--tap); padding-block: 8px; font-size: 1rem; }
  .cta-choose[hidden] { display: flex !important; }

  /* The buttons leave the stage and flank the counter, as in the mobile reference. */
  .nav-btn {
    position: static;
    grid-row: 7;
    grid-column: 1;
    justify-self: center;
    align-self: center;
    margin-top: 12px;
  }

  .nav-btn-prev { transform: translateX(-92px); }
  .nav-btn-next { transform: translateX(92px); }

  .pager { min-height: var(--btn); margin-top: 12px; }
  .dots { display: none; }
  .model-kind { margin-top: 12px; }

  .tagline { gap: 12px; font-size: 1.0625rem; }
  .tagline::before,
  .tagline::after { min-width: 16px; }

  .how-steps { grid-template-columns: minmax(0, 1fr); }

  /* Footer in one column, links side by side so it stays short on a phone. */
}

@media (max-width: 359px) {
}

@media (min-width: 760px) and (max-width: 1023px) {
  /* The logo already leads home; the longer German menu then still fits on one line. */

  .carousel-frame {
    --card-w: clamp(300px, min(54vw, 78vh), 540px);
    --side-ratio: 0.44;
    --btn: 48px;
  }
}

/* Soft entrance below the carousel. revelar.js adds reveal-ready only when motion is
   allowed; without it, or with reduced motion, every section is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    transition: opacity 520ms ease-out, transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .reveal-ready .reveal:not(.is-in) {
    opacity: 0;
    transform: translateY(18px);
  }

  .reveal-ready .how-steps .reveal:nth-child(2) { transition-delay: 70ms; }
  .reveal-ready .how-steps .reveal:nth-child(3) { transition-delay: 140ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot-image,
  .chrome::after,
  .shot::after { transition: none; }
  .cta,
  .cta-choose,
  .button-quiet,
  .cta svg { transform: none; }
}

@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media (forced-colors: active) {
  .card.is-active { outline: 2px solid CanvasText; }
  .dot.is-on { background: Highlight; }
  .carousel-frame::before,
  .chrome::after,
  .shot::after { display: none; }
}

/* Licence details stay available without interrupting template selection. */
.footer-credits { grid-column: 1 / -1; min-width: 0; }
.footer-credits summary { color: var(--paper); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.footer-credits[open] summary { margin-bottom: 12px; }
.footer-credits .credit { padding: 0; text-align: left; margin-bottom: 10px; }

/* Clip decorative horizontal overflow without creating a nested scrolling body.
   The document remains the single native vertical scroller on iOS. */
@supports (overflow: clip) {
  html, body { overflow-x: clip; overflow-y: visible; }
}

/* Preview clips never intercept the pointer or the page's vertical scrolling. */
.preview-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; }
.preview-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce), (max-width: 759px) { .preview-video { display: none; } }

.gallery-credits { padding: 24px var(--page-gutter); max-width: 1120px; margin-inline: auto; }
