/* Three ways to present the three cabins (js/cabins-options.js). Nothing here applies without ?cabins=. */
.co-num { display: none; }
.cab-opt .co-num { display: block; font-weight: 200; font-size: clamp(64px, 6.4vw, 112px); line-height: .82; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(23, 22, 21, .5); margin-bottom: 14px; }
.cab-opt .model .ph .tag, .cab-opt .model .ph .si { display: none; }

/* Selector: the maquette left, one cabin's details right, three tabs under the view */
.co-select { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: clamp(30px, 4vw, 56px); }
.co-select .maq { margin: 0; }
.co-select .maq-view { aspect-ratio: 4 / 3.1; }
.co-select .models { display: block; }
.co-select .model { display: none; }
.co-select .model.on { display: block; animation: coIn .5s ease both; }
.co-select .model .ph { display: none; }
@keyframes coIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.co-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--rule); }
.co-tabs button { all: unset; cursor: pointer; padding: 14px 12px 6px 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.co-tabs button::before { content: ""; position: absolute; left: 0; right: 12px; top: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.co-tabs button.on::before { transform: scaleX(1); }
.co-tabs b { font-weight: 300; font-size: clamp(20px, 1.7vw, 28px); letter-spacing: -.01em; }
.co-tabs span { font-family: var(--caps); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--ink2); }
.co-tabs button:not(.on) b { opacity: .5; }

/* Line-up: the three side by side, each its own 3D view, at one scale */
.cab-lineup .models { margin-top: clamp(30px, 4vw, 56px); gap: clamp(16px, 2vw, 32px); }
.cab-lineup .model { position: relative; padding-top: 4px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.cab-lineup .model .co-num { position: absolute; top: -18px; right: 4px; z-index: 2; margin: 0; -webkit-text-stroke: 1px rgba(23, 22, 21, .35); }
.cab-lineup .model .ph { aspect-ratio: 3 / 3.4; transition: box-shadow .5s; }
.cab-lineup .model.on { transform: translateY(-8px); }
.cab-lineup .model.on .ph { box-shadow: 0 46px 80px -46px rgba(30, 26, 20, .8); }
.cab-lineup .model.on .co-num { -webkit-text-stroke: 1px var(--red); }

/* Sequence: the section holds, the maquette turns from the 30 to the 80, the details change beside it */
.co-track { position: relative; height: 320vh; margin-top: clamp(20px, 3vw, 40px); }
.co-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: 84px 0 30px; box-sizing: border-box; }
.co-stage .co-left { position: relative; height: 72vh; }
.co-stage .models { display: block; position: relative; height: 100%; }
.co-stage .model { position: absolute; inset: 0; will-change: opacity, transform; }
.co-stage .model .ph { display: none; }
.co-stage .maq { margin: 0; }
.co-stage .maq-view { aspect-ratio: auto; height: 74vh; }
.co-stage .maq-arrow, .co-stage .maq-hint { display: none; }

@media (max-width: 760px) {
  .co-select { grid-template-columns: 1fr; }
  .co-tabs b { font-size: 18px; }
  .cab-lineup .model .ph { aspect-ratio: 4 / 3; }
  .co-track { height: auto; }
  .co-stage { position: relative; height: auto; grid-template-columns: 1fr; padding: 0; }
  .co-stage .co-left { height: auto; order: 2; }
  .co-stage .model { position: relative; inset: auto; }
  .co-stage .maq-view { height: auto; aspect-ratio: 4 / 3.6; }
}

/* Photos of each cabin in the big view, when media/cabin-30|50|80.jpg exist (they cross-fade with the cabin on show) */
.cv-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 1; pointer-events: none; }
.co-stage .maq-name { z-index: 5; }   /* above the three stacked photos */

/* Round seventeen, ?cview=: the head stays in the pinned screen with the cabins */
.cv-head { margin: 0; }
.cv-head .lede { max-width: 30em; }
.cv-index { display: flex; gap: 0; }
.cv-index span { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 0 0; border-top: 1px solid var(--rule); opacity: .45; transition: opacity .4s; }
.cv-index span.on { opacity: 1; }
.cv-index span i { position: absolute; left: 0; top: -1px; height: 2px; width: calc(100% - 14px); background: var(--red); transform: scaleX(var(--f, 0)); transform-origin: left; }
.cv-index b { font-weight: 200; font-size: clamp(30px, 2.6vw, 46px); line-height: .9; letter-spacing: -.03em; }
.cv-index em { font-style: normal; font-family: var(--caps); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--ink2); }
@media (min-width: 761px) {
  .cv-column .co-stage, .cv-banner .co-stage, .cv-overlay .co-stage { padding-top: 96px; padding-bottom: 28px; }
  /* the cards a little more compact so head and card fit one screen */
  [class*="cv-"] .co-stage .co-num { font-size: clamp(48px, 4.4vw, 76px); margin-bottom: 6px; }
  [class*="cv-"] .co-stage .model-body { padding-top: 8px; }
  [class*="cv-"] .co-stage .model h3 { margin: 2px 0 6px; }
  [class*="cv-"] .co-stage .model .d { font-size: 15px; line-height: 1.45; }
  [class*="cv-"] .co-stage .mplan { width: auto; max-width: 100%; height: 22vh; margin: 12px 0 4px; }
  [class*="cv-"] .co-stage .model dl { margin-top: 10px; }
  [class*="cv-"] .co-stage .model dl div { padding: 8px 10px 8px 0; }

  /* Column: head on top of the left column, the card under it, the view on the right */
  .cv-column .co-stage { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.5fr); align-items: stretch; }
  .cv-column .co-stage .co-left { height: auto; display: flex; flex-direction: column; gap: 22px; }
  .cv-column .cv-head h2 { font-size: clamp(34px, 2.9vw, 54px); margin: 14px 0 12px; }
  .cv-column .cv-head .lede { font-size: 15px; line-height: 1.5; }
  .cv-column .co-stage .models { flex: 1; min-height: 0; border-top: 1px solid var(--rule); padding-top: 4px; }
  .cv-column .co-stage .maq-view { height: 100%; }
  .cv-column .co-stage .co-right, .cv-column .co-stage .maq { height: 100%; }

  /* Banner: head across the top, the index under it, then details and view side by side */
  .cv-banner .co-stage { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); grid-template-rows: auto auto minmax(0, 1fr); row-gap: 18px; align-items: stretch; }
  .cv-banner .cv-head { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 48px; align-items: end; }
  .cv-banner .cv-head .kick { grid-column: 1 / -1; }
  .cv-banner .cv-head h2 { font-size: clamp(34px, 3vw, 56px); margin: 10px 0 0; white-space: nowrap; }
  .cv-banner .cv-head .lede { font-size: 15px; line-height: 1.5; margin: 0; max-width: 34em; justify-self: end; }
  .cv-banner .cv-index { grid-column: 1 / -1; }
  .cv-banner .co-stage .co-left { height: auto; }
  .cv-banner .co-stage .models { height: 100%; }
  .cv-banner .co-stage .co-right, .cv-banner .co-stage .maq { height: 100%; min-height: 0; }
  .cv-banner .co-stage .maq-view { height: 100%; }
  .cv-banner [class*="cv-"] .co-stage .co-num, .cv-banner .co-stage .co-num { display: none; }

  /* Overlay: the view fills the pinned screen, the head on a paper panel top left, the card bottom left */
  .cv-overlay .co-stage { display: block; position: sticky; padding: 0; }
  .cv-overlay .co-stage .co-right { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); }   /* edge to edge */
  .cv-overlay .co-stage .maq, .cv-overlay .co-stage .maq-view { height: 100%; }
  .cv-overlay .co-stage .maq-view { box-shadow: none; }
  .cv-overlay .co-stage .maq-name { display: none; }
  .cv-overlay .cv-head { position: absolute; z-index: 3; left: max(var(--pad), calc(50% - 660px + var(--pad))); top: 104px; width: min(500px, 36vw); padding: 24px 28px 26px; background: rgba(244, 241, 233, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -36px rgba(30, 26, 20, .6); }
  .cv-overlay .cv-head h2 { font-size: clamp(30px, 2.5vw, 46px); margin: 12px 0 10px; }
  .cv-overlay .cv-head .lede { font-size: 14px; line-height: 1.5; margin: 0; }
  .cv-overlay .co-stage .co-left { position: absolute; z-index: 3; left: calc(50% + 660px - var(--pad) - min(420px, 30vw)); right: auto; top: 104px; bottom: 28px; width: min(420px, 30vw); height: auto; }
  .cv-overlay .co-stage .models { height: 100%; }
  .cv-overlay .co-stage .model { padding: 18px 22px 16px; background: rgba(244, 241, 233, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -36px rgba(30, 26, 20, .6); bottom: auto; }
  .cv-overlay .cv-index { position: absolute; z-index: 3; left: max(var(--pad), calc(50% - 660px + var(--pad))); bottom: 30px; width: min(500px, 36vw); padding: 0 16px; background: rgba(20, 19, 18, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .cv-overlay .cv-index span { border-top-color: rgba(244, 241, 233, .25); padding: 12px 14px 12px 0; }
  .cv-overlay .cv-index b, .cv-overlay .cv-index em { color: var(--paper); }
}
@media (max-width: 760px) {
  .cv-head { margin-bottom: 20px; }
  .cv-index { margin: 0 0 16px; }
}

/* Round eighteen, three cleaner Overlays (?cview=panel|rail|caption): the photo edge to edge, and the head, the
   30 / 50 / 80 index and the cabin's card in one block, vertically centred on the left */
.cv-shade { display: none; }
@media (min-width: 761px) {
  .cv-ovb .co-stage { display: block; position: sticky; padding: 0; }
  .cv-ovb .co-stage .co-right { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); }   /* edge to edge */
  .cv-ovb .co-stage .maq, .cv-ovb .co-stage .maq-view { height: 100%; }
  .cv-ovb .co-stage .maq-view { box-shadow: none; }
  .cv-ovb .co-stage .maq-name { display: none; }
  .cv-block { position: absolute; z-index: 3; left: max(var(--pad), calc(50% - 660px + var(--pad))); top: calc(50% + 34px); transform: translateY(-50%); width: min(440px, 33vw); box-sizing: border-box; }
  .cv-ovb .cv-head h2 { font-size: clamp(30px, 2.4vw, 44px); line-height: 1.02; margin: 10px 0 8px; }
  .cv-ovb .cv-head .lede { font-size: 13.5px; line-height: 1.5; margin: 0; max-width: 32em; }
  .cv-ovb .co-stage .co-left { position: static; height: auto; width: auto; }
  .cv-ovb .co-stage .models { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; height: auto; }
  .cv-ovb .co-stage .model { grid-area: 1 / 1; position: relative; inset: auto; }
  .cv-ovb .co-stage .co-num, .cv-ovb .co-stage .model .w { display: none; }
  .cv-ovb .co-stage .model-body { padding-top: 0; }
  .cv-ovb .co-stage .model h3 { font-size: clamp(22px, 1.7vw, 28px); margin: 0 0 4px; }
  .cv-ovb .co-stage .model .d { font-size: 14px; line-height: 1.45; min-height: 0; }
  .cv-ovb .co-stage .mplan { height: 17vh; margin: 10px 0 4px; }
  .cv-ovb .co-stage .model dl { grid-template-columns: repeat(4, auto); margin-top: 8px; }
  .cv-ovb .co-stage .model dl div { padding: 7px 12px 7px 0; }
  .cv-ovb .co-stage .model dt { font-size: 10.5px; }
  .cv-ovb .co-stage .model dd { font-size: 18px; }
  .cv-ovb .cv-index b { font-size: clamp(24px, 2vw, 34px); }

  /* One panel: everything on one paper panel */
  .cv-panel .cv-block { padding: 26px 28px 22px; background: rgba(244, 241, 233, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 40px 80px -40px rgba(20, 18, 16, .65); }
  .cv-panel .cv-index { margin: 18px 0 16px; }
  .cv-panel .cv-index span { padding: 9px 12px 0 0; }

  /* Index rail: 30 / 50 / 80 as tabs in a dark rail, the head and the card in a paper column beside it */
  .cv-rail .cv-block { display: grid; grid-template-columns: 84px minmax(0, 1fr); width: min(510px, 37vw); box-shadow: 0 40px 80px -40px rgba(20, 18, 16, .65); }
  .cv-rail .cv-index { flex-direction: column; background: rgba(23, 22, 21, .84); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .cv-rail .cv-index span { flex: 1; justify-content: center; align-items: center; padding: 0; border-top: 0; border-bottom: 1px solid rgba(244, 241, 233, .14); opacity: .42; }
  .cv-rail .cv-index span:last-child { border-bottom: 0; }
  .cv-rail .cv-index span.on { opacity: 1; }
  .cv-rail .cv-index b { color: var(--paper); font-size: clamp(28px, 2.3vw, 40px); }
  .cv-rail .cv-index em { display: none; }
  .cv-rail .cv-index span i { left: auto; right: 0; top: 0; width: 3px; height: 100%; transform: scaleY(var(--f, 0)); transform-origin: top; }
  .cv-rail .cv-col { padding: 26px 28px 22px; background: rgba(244, 241, 233, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .cv-rail .cv-head { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
  .cv-rail .co-stage .model .w { display: block; margin-bottom: 4px; }   /* the rail doesn't say who it's for, so the card does */

  /* On the photo: no cards, the words straight on the photo over a soft shade from the left */
  .cv-caption .cv-shade { display: block; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(90deg, rgba(14, 13, 12, .86) 0%, rgba(14, 13, 12, .76) 28%, rgba(14, 13, 12, .46) 46%, rgba(14, 13, 12, 0) 64%); }
  .cv-caption .cv-block { color: var(--paper); text-shadow: 0 1px 18px rgba(0, 0, 0, .35); }
  .cv-caption .cv-head .kick { color: rgba(244, 241, 233, .74); }
  .cv-caption .cv-head .kick i { background: rgba(244, 241, 233, .4); }
  .cv-caption .cv-head h2 { color: var(--paper); }
  .cv-caption .cv-head h2 em { color: #ef6f5d; }
  .cv-caption .cv-head .lede { color: rgba(244, 241, 233, .8); }
  .cv-caption .cv-index { margin: 20px 0 18px; }
  .cv-caption .cv-index span { border-top-color: rgba(244, 241, 233, .28); }
  .cv-caption .cv-index b { color: var(--paper); }
  .cv-caption .cv-index em { color: rgba(244, 241, 233, .7); }
  .cv-caption .co-stage .model h3 { color: var(--paper); }
  .cv-caption .co-stage .model .d { color: rgba(244, 241, 233, .82); }
  .cv-caption .co-stage .mplan { border-color: transparent; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .7); }
  .cv-caption .co-stage .scale-note { color: rgba(244, 241, 233, .62); }
  .cv-caption .co-stage .model dl { border-top-color: rgba(244, 241, 233, .6); }
  .cv-caption .co-stage .model dl div { border-bottom-color: rgba(244, 241, 233, .18); }
  .cv-caption .co-stage .model dt { color: rgba(244, 241, 233, .62); }
  .cv-caption .co-stage .model dd { color: var(--paper); }
}
@media (max-width: 760px) {
  /* on a phone the block opens up: head, index, the photo, then the card */
  .cv-block, .cv-col { display: contents; }
  .cv-ovb .co-stage .cv-head { order: 1; }
  .cv-ovb .co-stage .cv-index { order: 2; }
  .cv-ovb .co-stage .co-right { order: 3; }
  .cv-ovb .co-stage .co-left { order: 4; }
}

/* Nov 24 (Sam): the last photo of the three sizes holds, and the walk slides up over it, no gap between them. The run
   gets one more screen (the hold) and the walk moves up by one screen, on a higher layer, with a shadow on its top edge */
@media (min-width: 761px) {
  .co-hold .co-track { height: 420vh; }
  .co-hold .co-track + .inside ~ .plan50 { z-index: 4; }   /* the 50 m2 plan still slides over the walk's last view */
  .co-hold .co-track + .inside { margin-top: -100vh; z-index: 3; box-shadow: 0 -34px 70px -24px rgba(0, 0, 0, .55); }
}
