/* MotoMax 5.0: composition and motion tokens. Text retains AA-level dark-on-light contrast. */
:root {
  --paper: #f6f5f1;
  --ink: #30383a;
  --muted: #586367;
  --line: #d4dad6;
  --steel: #52676e;
  --mm-fast: 180ms;
  --mm-medium: 420ms;
  --mm-scene: 850ms;
  --mm-ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}
body {
  background: var(--paper);
  color: var(--ink);
}
/* Root repair: a portrait photograph must size from its intrinsic ratio, not fill a landscape cell. */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 100px);
  padding: 80px max(28px, calc((100vw - 1240px) / 2));
  background: #e8ece7;
  color: var(--ink);
  overflow: visible;
  align-items: center;
}
.editorial .editorial-photo {
  position: relative;
  min-height: 0;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  overflow: visible;
  background: transparent;
  margin: 0;
}
.editorial .editorial-photo img {
  display: block;
  position: static;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: none !important;
  clip-path: none;
  animation: none;
}
.editorial .editorial-caption {
  display: block;
  position: static;
  margin-top: 12px;
  padding: 0;
  background: transparent;
  color: #4c5b57;
  font-size: 10px;
}
.editorial .editorial-copy {
  padding: 0;
  min-width: 0;
  max-width: 500px;
  align-self: center;
}
.editorial .editorial-copy h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}
.editorial .editorial-copy p,
.editorial .editorial-copy .eyebrow {
  color: #465752;
}
.editorial .editorial-copy p {
  font-size: 14px;
  line-height: 1.85;
}
.hero.cinematic.everyday {
  background: #f0f1ec;
  height: clamp(550px, 37vw, 850px);
}
.hero.cinematic.everyday .hero-copy h1 {
  font-size: clamp(46px, 4vw, 92px);
  letter-spacing: -0.055em;
}
.everyday .hero-visual img {
  translate: var(--hero-drift-x, 0px) var(--hero-drift-y, 0px);
  transition: translate 700ms var(--mm-ease);
}
.everyday .hero-content {
  padding-left: max(28px, calc((100vw - 1500px) / 2));
  padding-right: 35px;
}
.everyday .hero-copy {
  max-width: 540px;
}
.everyday .hero-caption {
  left: max(28px, calc((100vw - 1500px) / 2)) !important;
}
.discovery-bar {
  padding-top: 24px;
  padding-bottom: 24px;
}
.section {
  padding-top: 72px;
  padding-bottom: 72px;
}
.section-head {
  margin-bottom: 32px;
  align-items: end;
}
.section-head h2,
.contact-strip h2 {
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.12;
}
.page-head {
  padding-top: 58px;
  padding-bottom: 38px;
}
.page-head h1 {
  font-size: clamp(38px, 4.6vw, 68px);
  letter-spacing: -0.05em;
}
.car {
  box-shadow: none !important;
  background: transparent !important;
  min-width: 0;
}
.car-data {
  padding-top: 20px;
  padding-bottom: 22px;
}
.car-heading h3 {
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.car-photo {
  background: #e5e9e4;
}
.car-photo .demo {
  background: #eef1ebed;
  color: #283c36;
  font-size: 9px;
  letter-spacing: 0.02em;
}
.car-photo .badge {
  background: #f6f5f1e8;
  color: #394846;
}
.car .price-row strong {
  font-size: 22px;
  font-weight: 600;
}
.car:hover .price-row strong {
  translate: 0 -1px;
  color: #425e5b;
}
.car.is-visible .car-photo {
  animation: none;
}
.car.is-visible .car-data {
  animation: card-information 420ms 80ms both;
}
.btn {
  min-height: 48px;
  padding: 13px 24px;
  line-height: 1.4;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  letter-spacing: 0.015em;
}
.btn:not(.outline):not(.light) {
  background: #354b48;
  border-color: #354b48;
  color: #fff;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn.outline {
  color: #354b48;
  border-color: #9eada5;
  background: transparent;
}
.btn.outline:hover {
  color: #fff;
  background: #354b48;
  border-color: #354b48;
}
.text-link {
  line-height: 1.7;
}
.model-story {
  color: var(--ink);
  background: #e8ece8;
  --scene-tone: #e8ece8;
}
.model-stage {
  background: var(--scene-tone);
  overflow: visible;
}
.story-heading > .eyebrow,
.story-heading > p {
  color: #4b605a;
}
.story-heading h2 {
  font-size: clamp(32px, 3.3vw, 50px);
}
.model-frames {
  width: min(100%, 1200px);
}
.model-frame > img {
  background: #e0e5df;
  object-fit: contain;
}
.model-frame figcaption {
  background: transparent;
  color: var(--ink);
  min-width: 0;
  gap: 24px;
  padding: 22px 28px;
}
.model-frame figcaption > span {
  color: #4b605a;
  max-width: 200px;
}
.model-frame h3 {
  color: var(--ink);
  font-size: clamp(25px, 2.8vw, 42px);
  overflow-wrap: anywhere;
  min-width: 0;
}
.model-frame figcaption > p {
  color: #4b605a;
  max-width: 220px;
}
.model-controls button {
  color: #50645c;
  min-height: 44px;
}
.model-controls button[aria-pressed="true"] {
  color: #253d33;
  border-color: #536e60;
}
.story-enhanced .model-stage {
  min-height: 0;
  padding-top: calc(var(--nav-height) + var(--notice-height) + 18px);
  padding-bottom: 25px;
  gap: 0;
  justify-content: space-evenly;
}
.story-enhanced .model-frames {
  height: clamp(280px, 43vh, 640px);
  margin: 20px auto;
}
.story-enhanced .model-frame {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.story-enhanced .model-frame > img {
  height: 100%;
  min-height: 0;
}
.story-enhanced .model-frame figcaption {
  height: auto;
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
}
.contact-strip {
  gap: 50px;
  align-items: center;
}
.footer {
  background: #374541;
  color: #f4f4ed;
  padding-top: 58px;
}
.footer-top {
  gap: 50px;
  padding-bottom: 48px;
}
.footer-brand p,
.footer-contact,
.footer-bottom,
.footer-nav a {
  color: #e0e7df;
}
.footer .brand img {
  opacity: 0.96;
}
.vehicle-top h1 {
  font-size: clamp(34px, 4.3vw, 64px);
}
.vehicle-price {
  font-size: 30px;
}
.showroom-gallery {
  background: #e7eae4;
}
.inquiry-box {
  background: #e9ede6;
  border-color: #cdd6cb;
  box-shadow: none;
}
.contact-grid {
  gap: clamp(35px, 6vw, 90px);
}
input,
select,
textarea {
  transition:
    border-color var(--mm-fast),
    background-color var(--mm-fast),
    box-shadow var(--mm-fast);
}
input:focus,
select:focus,
textarea:focus {
  border-color: #627e70;
  box-shadow: 0 0 0 3px #627e701f;
}
.empty {
  animation: empty-state 400ms var(--mm-ease);
  background: #e9ede7;
  border: 1px solid #d4ddd1;
}
.pagination button {
  transition:
    background-color var(--mm-fast),
    color var(--mm-fast),
    transform var(--mm-fast);
}
.pagination button:active {
  transform: scale(0.96);
}
.gallery-thumbs button {
  transition:
    opacity var(--mm-fast),
    border-color var(--mm-fast),
    transform var(--mm-fast);
}
.gallery-thumbs button[aria-current="true"] {
  transform: translateY(-3px);
}
@keyframes card-information {
  from {
    opacity: 0.5;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes empty-state {
  from {
    opacity: 0.3;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes mm-page-in {
  from {
    opacity: 0.5;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

::view-transition-old(root) {
  animation: soft-appear 170ms reverse both;
}
::view-transition-new(root) {
  animation: mm-page-in 360ms var(--mm-ease) both;
}
@media (max-width: 1100px) {
  .hero.cinematic.everyday {
    height: auto;
  }
  .everyday .hero-content {
    padding: 38px 36px 46px;
  }
  .editorial {
    gap: 45px;
    padding: 64px 36px;
  }
  .editorial .editorial-photo {
    max-width: 360px;
  }
}
@media (max-width: 760px) {
  .hero.cinematic.everyday .hero-copy h1 {
    font-size: clamp(44px, 9vw, 62px);
  }
  .everyday .hero-content {
    padding: 34px 24px 42px;
  }
  .everyday .hero-caption {
    left: 24px !important;
  }
  .editorial {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 24px;
    gap: 32px;
  }
  .editorial .editorial-photo {
    max-width: 340px;
  }
  .editorial .editorial-copy {
    max-width: 100%;
  }
  .editorial .editorial-copy h2 {
    font-size: 34px;
  }
  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }
  .section-head h2,
  .contact-strip h2 {
    font-size: 34px;
  }
  .model-frame figcaption {
    padding: 20px 24px;
  }
  .model-frame figcaption h3 {
    font-size: 28px;
  }
  .model-frame figcaption p {
    margin-top: 8px;
  }
  .footer-top {
    gap: 32px;
  }
  .footer {
    padding-top: 44px;
  }
  .page-head {
    padding-top: 38px;
  }
  .contact-strip {
    gap: 24px;
  }
  .model-stage {
    padding-top: 48px;
  }
  .everyday .hero-visual img {
    translate: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .everyday .hero-visual img {
    translate: none !important;
  }
  .gallery-thumbs button[aria-current="true"] {
    transform: none;
  }
}

/* Hidden showcase slides must not expand the document with a scaled image. */
.story-enhanced .model-frames {
  width: min(100%, 1200px);
}
.model-frame > img,
.story-enhanced .model-frame > img,
.story-enhanced .model-frame.is-current > img {
  transform: none;
}

/* Legacy mobile rules fixed this cell to 240px while its natural image is taller. */
.editorial .editorial-photo {
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  align-self: start;
}

.performance-report {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 9999;
  background: #f6f5f1;
  color: #24372d;
  padding: 12px;
  border: 1px solid #7c9383;
  font: 11px/1.5 monospace;
  max-height: 130px;
  overflow: auto;
}

.car:hover .price-row strong {
  translate: none;
}

/* Snapshot layers never intercept catalog or navigation input. */
::view-transition,
::view-transition-group(*),
::view-transition-image-pair(*),
::view-transition-old(*),
::view-transition-new(*) {
  pointer-events: none;
}

#results {
  position: relative;
}
.result-exit {
  pointer-events: none !important;
  user-select: none;
}

/* Manual carousel: one normal-flow section, independent of page scroll. */
.model-story {
  height: auto;
  position: relative;
}
.model-story .model-stage {
  position: static;
  height: auto;
  min-height: 0;
  padding: 54px 0 40px;
  display: block;
}
.story-controlled .model-frames {
  display: grid;
  position: relative;
  width: min(100%, 1200px);
  height: auto;
  margin: 34px auto 22px;
}
.story-controlled .model-frame {
  position: relative;
  inset: auto;
  grid-area: 1/1;
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 500ms var(--mm-ease),
    visibility 500ms;
}
.story-controlled .model-frame > img {
  height: clamp(260px, 29vw, 420px);
  width: 100%;
  object-fit: contain;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 700ms var(--mm-ease);
}
.story-controlled .model-frame figcaption {
  height: auto;
  min-height: 100px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  padding: 22px 28px;
}
.story-controlled .model-frame h3 {
  transform: translateY(8px);
  transition: transform 500ms 90ms var(--mm-ease);
}
.story-controlled .model-frame.is-current {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.story-controlled .model-frame.is-current > img {
  clip-path: inset(0);
}
.story-controlled .model-frame.is-current h3 {
  transform: none;
}
.story-navigation {
  display: none;
}
.story-controlled .story-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.story-arrows {
  display: flex;
  align-items: center;
  gap: 16px;
}
.story-arrows [data-model-counter] {
  font-size: 12px;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #3e574b;
}
.story-controlled .model-controls {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
@media (max-width: 900px) {
  .story-controlled .story-navigation {
    flex-direction: column;
    align-items: stretch;
  }
  .story-arrows {
    justify-content: space-between;
  }
  .story-controlled .model-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .story-controlled .model-frame figcaption {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 126px;
    padding: 20px 24px;
  }
  .story-controlled .model-frame figcaption > span {
    display: none;
  }
  .story-controlled .model-frame figcaption > p {
    max-width: none;
    margin: 0;
  }
  .story-controlled .model-frame > img {
    height: clamp(230px, 50vw, 380px);
  }
}
@media (max-width: 430px) {
  .story-arrows {
    gap: 10px;
  }
  .story-arrows .btn {
    padding: 12px 17px;
  }
  .story-controlled .model-controls {
    gap: 10px;
  }
  .story-controlled .model-controls button {
    font-size: 10px;
  }
  .model-story .model-stage {
    padding-top: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-controlled .model-frame,
  .story-controlled .model-frame > img,
  .story-controlled .model-frame h3 {
    transition: none;
  }
  .story-controlled .model-frame h3 {
    transform: none;
  }
}

/* Outgoing captions disappear immediately so model names never overlap. */
.story-controlled .model-frame:not(.is-current) figcaption {
  visibility: hidden;
  opacity: 0;
}
.story-controlled .model-frame.is-current figcaption {
  visibility: visible;
  opacity: 1;
  transition: opacity 220ms 100ms;
}

.about-lead > img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  max-width: 420px;
  object-fit: contain;
  justify-self: center;
}

.hero.cinematic.everyday h1 .hero-line:last-child {
  color: #52676e;
}
