* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  font: 16px/1.55 "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  scroll-behavior: smooth;
}
body { margin: 0; background: var(--background); color: var(--ink); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 4px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; object-fit: cover; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.13; }
.wrap { width: min(100% - clamp(2rem, 7vw, 8rem), 1320px); margin-inline: auto; }
.nav {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: .9rem; font-weight: 650;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: .27em; }
.brand { font-weight: 720; letter-spacing: .19em; }
.primary {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center;
  border: 0; background: var(--accent); color: var(--on-accent);
  font-weight: 760; padding: .65rem 1.25rem; text-decoration: none;
}
.primary:hover { filter: brightness(.92); }
.panel-section { padding-block: clamp(3.25rem, 8vw, 7.5rem); scroll-margin-top: 1rem; }
.section-intro { margin-bottom: 1.75rem; }
.section-intro h2 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.05em; }
.section-intro p { margin-top: .65rem; }

.gallery { --background: #151719; --ink: #f4ead9; }
.gallery-heading { margin: clamp(2rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 4rem); }
.gallery-heading h1 { font-size: clamp(2.55rem, 8vw, 7rem); letter-spacing: -.075em; }
.gallery-heading p { margin-top: 1rem; color: #d2cbbd; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.gallery-card { display: flex; flex-direction: column; text-decoration: none; border: 1px solid #ffffff2b; background: #202224; }
.gallery-card:hover { border-color: #f4ead9; }
.gallery-card img, .gallery-card span { display: block; aspect-ratio: 1.4; }
.gallery-card div { border-top: 1px solid #ffffff24; padding: 1.15rem; }
.gallery-card h2 { font-size: 1.45rem; }
.gallery-card p { margin-top: .35rem; color: #d2cbbd; }
.flow-thumb {
  background: repeating-radial-gradient(ellipse at 66% 47%, #101b20 0 11px, #46e8c0 13px 14px, #172d2c 16px 24px);
}
.road-thumb {
  background: linear-gradient(135deg, transparent 52%, #3a4344 52% 59%, #7b695f 59%),
    linear-gradient(180deg, #5c7da7, #f89f79 57%, #4b7585 58%);
}

.flow { --background: #0e171a; --ink: #e8fcf3; --accent: #b5ffbe; --on-accent: #10271e; --focus: #b5ffbe; color-scheme: dark; }
.flow .nav { border-bottom: 1px solid #d4fff139; }
.flow-hero { display: grid; grid-template-columns: 1.05fr 1.2fr; align-items: center; min-height: 69svh; gap: 1.2rem; }
.flow-head { padding-block: 2rem; }
.flow-head h1 { font-size: clamp(3.25rem, 8.2vw, 8rem); margin: 1rem 0 1.2rem; letter-spacing: -.095em; }
.flow-head > p:not(.brand) { max-width: 27rem; color: #b7cec5; }
.flow .primary { margin-top: 1.6rem; }
#flow-art { display: block; width: 100%; height: auto; }
.flow-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; }
.flow-form { padding: clamp(1rem, 4vw, 2rem); display: grid; gap: 1rem; align-content: start; border: 1px solid #d4fff13e; }
.flow-form label { display: grid; gap: .3rem; }
.flow-form input, .flow-form select {
  width: 100%; min-height: 44px; padding: .52rem .65rem; color: var(--ink); border: 1px solid #d4fff148; background: #15272a;
}
.field-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: .55rem; }
.quiet { min-height: 44px; color: var(--ink); background: #15272a; border: 1px solid #d4fff148; padding-inline: .8rem; }
.flow-form .primary { margin-top: .25rem; justify-self: start; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-content: start; }
.results article { padding: clamp(.95rem, 3vw, 1.6rem); background: #172a2a; border-top: 2px solid #b5ffbe; }
.results p { color: #b7cec5; font-size: .9rem; }
.results .route { margin: .6rem 0; }
.results output { display: block; font-size: clamp(1.25rem, 2.45vw, 2.55rem); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.results > p { grid-column: 1/-1; padding: .8rem; }

.chassis { --background: #13151b; --ink: #f7f4ee; --accent: #ff7759; --on-accent: #1e1212; }
.chassis-hero { position: relative; display: grid; align-items: end; min-height: clamp(570px, 82svh, 850px); isolation: isolate; background: #252a34; }
.chassis-photo { position: absolute; inset: 0; z-index: -2; height: 100%; object-position: 57% 52%; }
.chassis-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #101218f7, transparent 75%), linear-gradient(90deg, #111318ab, transparent 65%); }
.chassis-title { padding-block: 2.6rem; }
.chassis-title h1 { font-family: "Bahnschrift", "Arial Black", sans-serif; font-size: clamp(3.35rem, 13vw, 10rem); letter-spacing: -.085em; line-height: .97; margin: .55rem 0 1rem; }
.chassis-title .primary { margin-top: 1.2rem; }
.car-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.car-tabs button { background: transparent; color: var(--ink); padding: .6rem 1.3rem; border: 1px solid #ffffff42; min-height: 44px; }
.car-tabs button[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.car-detail { display: grid; grid-template-columns: 1.35fr .65fr; border: 1px solid #ffffff2d; background: #1a1c22; }
.detail-photo { overflow: hidden; aspect-ratio: 1.8; background: #252a34; }
.detail-photo img { height: 100%; transition: transform .42s ease; }
.car-detail[data-view="nose"] img { transform: scale(1.65); transform-origin: 70% 63%; }
.car-detail[data-view="wheel"] img { transform: scale(1.9); transform-origin: 59% 75%; }
.car-detail figcaption { align-self: center; padding: clamp(1.15rem, 4.5vw, 3rem); }
.car-detail h3 { font-size: clamp(1.35rem, 3vw, 2rem); margin-bottom: .55rem; }

.roll { --background: #ffda51; --ink: #18285f; --accent: #2039a1; --on-accent: #ffea8c; }
.roll .nav { border-bottom: 2px solid currentColor; }
#quantity { display: inline-grid; place-items: center; min-width: 1.6rem; aspect-ratio: 1; padding: .1rem; border-radius: 50%; background: var(--ink); color: #ffea8c; margin-left: .25rem; }
.roll-hero { min-height: 69svh; display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-block: 2.5rem; }
.roll-hero h1 { font-size: clamp(3.55rem, 10vw, 8.6rem); letter-spacing: -.085em; line-height: .98; margin-block: .7rem 1.25rem; }
.roll-hero .primary { margin-top: 1.45rem; }
.roll-hero img { aspect-ratio: 1.15; border-radius: 45% 45% .85rem .85rem; box-shadow: .65rem .65rem 0 #2039a1; }
.roll .panel-section { border-top: 2px solid currentColor; }
.menu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 1rem; }
.menu-items article { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .95rem 0; border-bottom: 1px solid #18285f60; }
.menu-items p { margin-top: .25rem; }
.menu-items button, .basket button { color: inherit; background: transparent; border: 1px solid currentColor; min-height: 44px; padding: .35rem .8rem; }
.menu-items button:hover, .basket button:hover { color: var(--on-accent); background: var(--accent); }
.basket { align-self: start; background: #ffe885; border: 2px solid var(--ink); padding: clamp(1rem, 3vw, 1.75rem); }
.basket h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.basket ul { margin: 0; padding: 0; list-style: none; }
.basket li { display: flex; justify-content: space-between; align-items: center; gap: .45rem; padding: .4rem 0; }
.basket li span { display: flex; align-items: center; gap: .35rem; }
.basket-total { margin: .8rem 0 .35rem; padding-top: .65rem; border-top: 1px solid currentColor; display: flex; justify-content: space-between; font-weight: 750; }
.basket-note { font-size: .875rem; }

@media (max-width: 950px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .flow-hero, .flow-grid, .roll-hero, .menu-grid, .car-detail { grid-template-columns: minmax(0, 1fr); }
  .flow-hero { gap: 0; }
  #flow-art { max-height: 440px; object-fit: contain; }
  .results article { padding-inline: .75rem; }
  .roll-hero img { max-height: 400px; }
  .chassis-hero { min-height: 68svh; }
  .chassis-photo { object-position: 58% center; }
}
@media (max-width: 390px) {
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
