/* Ride height + Dynamic Glass Roof: one viewport, two cards (60/40). The section takes the viewport's height and the
   cards fill it, so the drawing and the footage scale with the screen and the page length never changes. */
.section--features {
  --field: var(--field-air);
  height: clamp(640px, 100svh, 1080px);
  padding-block: clamp(40px, 6.5vh, 88px) clamp(72px, 10vh, 120px);
}
.features { height: 100%; display: flex; flex-direction: column; }
.features__head { max-width: none; margin-bottom: clamp(16px, 2.8vh, 28px); }
.features__bento { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }

.feature-card { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; padding: 26px 28px 22px; border-radius: 30px; }
.feature-card--ride { background: rgb(255 255 255 / 0.34); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25); }
.feature-card--roof { background: var(--field-roof); color: var(--on-dark); --focus: #ffd34d; color-scheme: dark; }
.feature-card__title { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: clamp(19px, 1.9vw, 27px); font-weight: 650; line-height: 1.15; letter-spacing: -0.045em; }
.feature-card__title .vname { font-size: 0.7em; letter-spacing: -0.035em; }
.feature-card__r2 { margin: 10px 0 0; color: var(--ink-2); font-size: 12px; font-weight: 550; letter-spacing: -0.01em; }
.feature-card__r2 .vname { margin-right: 4px; }
.feature-card--roof .feature-card__r2 { color: rgb(255 255 255 / 0.6); }

/* ---------- Ride height (SVG units are inches) ---------- */
.ride { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; }
.ride__stage { min-width: 0; min-height: 0; }
.ride__drawing { display: block; width: 100%; height: 100%; overflow: visible; }
.ride__liners { fill: #080a0a; }
.ride__shadow { fill: #141416; opacity: 0.2; }
.ride__ground { fill: none; stroke: currentColor; stroke-opacity: 0.19; stroke-width: 0.7px; vector-effect: non-scaling-stroke; }

.ride__water { opacity: 0; }
.ride[data-water-visible="false"] .ride__water { visibility: hidden; }
.ride__water-body { fill: url(#ride-water-fill); }
.ride__wave--back { fill: #7cc6f0; fill-opacity: 0.24; transform: translateY(-0.7px); }
.ride__water-crest { fill: none; stroke: #eefaff; stroke-opacity: 0.85; stroke-width: 1px; vector-effect: non-scaling-stroke; }
/* Waves drift one wavelength (16 in) per cycle; lengths in px are inches inside the SVG. */
.ride__wave--front { animation: ride-wave-front 7s linear infinite; }
.ride__wave--back path { animation: ride-wave-back 11s linear infinite; }
/* Paused while the water is hidden or the card is off-screen (data-on-screen, js/sections/suspension.js). */
.ride[data-water-visible="false"] .ride__wave--front,
.ride[data-water-visible="false"] .ride__wave--back path,
.ride[data-on-screen="false"] .ride__wave--front,
.ride[data-on-screen="false"] .ride__wave--back path { animation-play-state: paused; }
@keyframes ride-wave-front { to { transform: translateX(-16px); } }
@keyframes ride-wave-back { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
.ride__water-guide { fill: none; stroke: #12648e; stroke-opacity: 0.5; stroke-width: 0.7px; vector-effect: non-scaling-stroke; }
.ride__water-label, .ride__water-qualifier { fill: #123c54; font-family: Inter, system-ui, sans-serif; }
.ride__water-label { font-size: 7px; font-weight: 700; letter-spacing: -0.2px; }
.ride__water-qualifier { font-size: 3.6px; font-weight: 600; letter-spacing: -0.04px; }

.ride__bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; min-height: 34px; }
.ride__readout { display: flex; align-items: baseline; gap: 12px; margin: 0; line-height: 1.15; white-space: nowrap; }
.ride__mode { font-size: 17px; font-weight: 650; letter-spacing: -0.035em; }
.ride__offset { color: var(--r1s-ink); font-size: 24px; font-weight: 700; letter-spacing: -0.045em; }
.ride__fording { min-height: 34px; padding: 6px 14px; border: 1px solid rgb(18 60 84 / 0.3); border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.3); color: #123c54; font-size: 12px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; touch-action: manipulation; transition: background-color 160ms, color 160ms, transform var(--dur-press) var(--ease-out); }
.ride__fording[aria-pressed="true"] { background: #123c54; border-color: #123c54; color: white; }
.ride__fording:active { transform: scale(0.95); }
.ride__modes { display: flex; width: min(100%, 640px); justify-self: center; }
.ride__modes button { flex: 1; min-width: 0; min-height: 44px; padding-inline: 8px; font-size: 14px; }

.ride-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; padding-top: 14px; border-top: 1px solid rgb(13 15 28 / 0.12); }
.ride-facts__group + .ride-facts__group { padding-left: 20px; border-left: 1px solid rgb(13 15 28 / 0.12); }
.ride-facts__label { margin: 0 0 8px; color: var(--ink-2); font-size: 11px; font-weight: 600; }
.ride-facts__values { display: flex; gap: 26px; margin: 0; }
.ride-fact { display: grid; gap: 4px; }
.ride-fact dt { font-size: 12px; }
.ride-fact dd { margin: 0; color: var(--c-ink); font-size: clamp(26px, 2.3vw, 34px); font-weight: 720; line-height: 1; letter-spacing: -0.06em; white-space: nowrap; }
.ride-fact dd > span { margin-left: 0.18em; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Dynamic Glass Roof ---------- */
.roof__frame { position: relative; min-height: 0; overflow: hidden; border-radius: 20px; background: #222338; isolation: isolate; }
.roof__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0; transition: opacity 220ms ease-out; }
.roof__frame.is-ready .roof__video { opacity: 1; }
.roof__frame::after { content: ""; position: absolute; inset: 50% 0 0; z-index: 1; background: linear-gradient(transparent, rgb(7 9 19 / 0.8)); pointer-events: none; }
.roof__loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(255 255 255 / 0.7); font-size: 13px; }
.roof__loading[hidden] { display: none; }
.roof__controls { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: white; }
.roof__toggle.seg { background: rgb(9 11 23 / 0.5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.roof__toggle button { display: flex; align-items: center; gap: 7px; min-height: 44px; padding-inline: 16px; color: rgb(255 255 255 / 0.76); font-size: 14px; }
.roof__toggle button[aria-pressed="true"] { color: var(--ink); }
.roof__toggle button span { font-size: 17px; line-height: 1; }
.roof__state { min-width: 56px; text-align: right; color: rgb(255 255 255 / 0.7); font-size: 11px; font-weight: 600; }
.roof__availability { margin: 0; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 0.15); color: rgb(255 255 255 / 0.83); font-size: 12px; line-height: 1.5; }
.roof__availability .vname { margin-right: 6px; }

@media (max-width: 1150px) {
  .features__bento { gap: 16px; }
  .feature-card { gap: 13px; padding: 21px 20px 18px; border-radius: 25px; }
  .feature-card__title { font-size: 20px; gap: 8px; }
  .feature-card__r2 { margin-top: 8px; font-size: 11px; }
  .ride__mode { font-size: 15px; }
  .ride__offset { font-size: 21px; }
  .ride__fording { min-height: 32px; padding-inline: 11px; font-size: 11px; }
  .ride__modes button { font-size: 13px; padding-inline: 4px; }
  .ride-facts { gap: 10px 14px; }
  .ride-facts__group + .ride-facts__group { padding-left: 14px; }
  .ride-facts__label { font-size: 10px; }
  .ride-facts__values { gap: 18px; }
  .ride-fact dd { font-size: 26px; }
  .roof__controls { left: 13px; right: 13px; bottom: 13px; }
  .roof__toggle button { padding-inline: 12px; font-size: 13px; }
  .roof__state { min-width: 44px; font-size: 10px; }
  .roof__availability { font-size: 11px; }
}
/* Narrow screens: cards stack and size to their content. */
@media (max-width: 800px) {
  .section--features { height: auto; }
  .features__bento { grid-template-columns: 1fr; }
  .ride__drawing { height: auto; }
  .roof__frame { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .roof__video, .ride__fording { transition: none; }
  .ride__wave--front, .ride__wave--back path { animation: none; }
}
