/* HELIOS MARINE identity. Boat finishes remain independent of these UI colours. */
@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/montserrat-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #f4f3ef;
  --ink: #092338;
  --muted: #566570;
  --line: #d6d9d8;
  --accent: #092338;
  --gold: #f4bb40;
  --panel: #ede8df;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.masthead { height: 88px; }
.wordmark { display: flex; flex: none; letter-spacing: normal; }
.wordmark img { display: block; width: 260px; height: 42px; object-fit: contain; }
.header-caption { margin-right: 3vw; font-size: 11px; font-weight: 400; }
.studio-label { font-size: 9px; font-weight: 500; letter-spacing: 1.5px; }
.studio-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex: none; }

.model-heading { top: 36px; }
.model-heading .eyebrow { font-size: 10px; font-weight: 500; letter-spacing: 2px; }
.model-heading .eyebrow::before { content: ""; display: inline-block; width: 23px; height: 2px; margin: 0 9px 3px 0; background: var(--gold); }
.model-heading h1 { font-size: 48px; font-weight: 400; letter-spacing: 2px; line-height: 1.08; margin: 16px 0 12px; }
.subheading { font-size: 12px; letter-spacing: 0; }
.eyebrow { font-weight: 500; }

.palette-panel { border-radius: 12px; padding-left: 24px; padding-right: 24px; }
.panel-top .eyebrow { font-size: 8px; }
.index { font-size: 7px; letter-spacing: .6px; }
.palette-heading { margin-top: 24px; }
.palette-heading h2 { font-size: 27px; font-weight: 400; letter-spacing: -.8px; line-height: 1.2; margin-bottom: 10px; }
.palette-heading p { font-size: 11px; line-height: 1.7; }
legend, .canopy-options > span, .finish-copy > span:first-child { font-size: 10px; font-weight: 500; }
.finish-copy > span:last-child { font-size: 9px; }
.colour-detail #colour-name { font-size: 11px; }
.finish-options, .custom-colour { border-color: #cdd0ce; }
.custom-colour > span { font-size: 9px; }

.canopy-toggle { border-radius: 24px; border-color: #aeb8bb; }
.canopy-toggle button { border-radius: 20px; font-size: 10px; font-weight: 500; padding: 8px 16px; }
.canopy-toggle button.active { background: var(--ink); color: #fff; }
.canopy-toggle button:not(.active):hover:not(:disabled) { background: #0923380d; }
.icon-button { border-radius: 24px; border-color: #b9c2c5; font-size: 10px; min-height: 42px; padding: 11px 13px; }
.icon-button:hover:not(:disabled), .icon-button[aria-pressed=true] { background: #0923380b; border-color: var(--ink); }
.solid-button { border-radius: 24px; background: var(--ink); color: #fff; }
.swatch.selected::before { border-color: var(--ink); }
.swatch { box-shadow: inset 0 0 0 1px #0923381a; }
.swatch.light, .swatch[data-name="Dune Sand"], .swatch[data-name="Pearl White"] { color: var(--ink); }
.stage-bottom p { font-size: 10px; }
.footer { font-size: 8px; letter-spacing: 1px; }
.footer > span:nth-child(2) { font-weight: 500; letter-spacing: 1.6px; }

@media (min-width: 1051px) {
  .experience { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (min-width: 1600px) {
  .experience { grid-template-columns: minmax(0, 1fr) 350px; }
  .palette-panel { padding-left: 28px; padding-right: 28px; }
  .palette-heading { margin-top: 30px; }
  .palette-heading h2 { font-size: 30px; }
}

/* Keep tall desktop windows bounded by the viewport too. Long finish sections
   scroll inside the palette rather than enlarging the grid and boat canvas. */
@media (min-width: 761px) {
  .studio { height: 100svh; min-height: 0; }
  .masthead, .footer { flex: none; }
  .experience { height: calc(100svh - 144px); min-height: 0; flex: none; grid-template-rows: minmax(0, 1fr); }
  .stage { min-height: 0; }
  .palette-panel { min-height: 0; max-height: 100%; overflow-y: auto; }
}

@media (min-width: 761px) and (max-height: 850px) {
  .masthead { height: 68px; }
  .wordmark img { width: 238px; height: 39px; }
  .experience { height: calc(100svh - 100px); }
  .model-heading { top: 26px; }
  .model-heading h1 { font-size: 44px; letter-spacing: 2px; margin: 14px 0 10px; }
  .model-heading .eyebrow { font-size: 9px; }
  .subheading { font-size: 11px; }
  .palette-panel { padding-top: 18px; padding-bottom: 18px; }
  .palette-heading { margin-top: 0; }
  .palette-heading h2 { font-size: 23px; letter-spacing: -.6px; margin-bottom: 0; }
  .canopy-toggle button { padding: 7px 15px; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .wordmark img { width: 220px; }
  .header-caption { display: none; }
  .palette-panel { padding-left: 18px; padding-right: 18px; }
  .stage-bottom { flex-wrap: wrap; gap: 10px; }
  .stage-bottom p span { max-width: none; }
  .finish-copy > span:last-child { font-size: 8px; }
  .canopy-toggle button { padding-left: 11px; padding-right: 11px; }
}

@media (max-width: 760px) {
  .masthead { height: 72px; margin: 0 6%; gap: 14px; }
  .wordmark img { width: 205px; height: 34px; }
  .studio-label { font-size: 7px; letter-spacing: .7px; max-width: 82px; line-height: 1.6; }
  .studio-label::before { display: none; }
  .model-heading { top: 27px; }
  .model-heading .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  .model-heading h1 { font-size: 36px; letter-spacing: 1.5px; margin: 13px 0 10px; }
  .subheading { font-size: 11px; }
  .stage-bottom { flex-wrap: wrap; gap: 9px; }
  .stage-bottom p { font-size: 9px; }
  .stage-bottom p span { max-width: none; }
  .stage-bottom p svg { width: 17px; height: 17px; }
  .view-actions { gap: 7px; }
  .icon-button, .view-actions #rotate, .view-actions #reset { min-width: 44px; min-height: 44px; justify-content: center; padding: 11px; }
  .cockpit-button { padding: 11px 13px; }
  .palette-panel { display: flex; flex-direction: column; gap: 0; padding: 24px; margin-top: 25px; }
  .panel-top { margin-bottom: 20px; }
  .panel-top .eyebrow { font-size: 9px; }
  .index { font-size: 8px; }
  .palette-heading { margin-top: 0; }
  .palette-heading h2 { font-size: 26px; }
  .palette-heading p { font-size: 11px; }
  .palette-heading p br { display: none; }
  .canopy-options { margin-top: 22px; }
  .canopy-toggle button { min-height: 38px; min-width: 64px; }
  .palette-panel > fieldset#colour-options { margin-top: 24px; }
  .palette-panel legend { font-size: 11px; margin-bottom: 16px; }
  .canopy-options > span, .finish-copy > span:first-child { font-size: 11px; }
  .swatches { display: flex; justify-content: space-between; gap: 12px; max-width: none; }
  .swatch, .finish-swatch { width: 30px; min-height: 30px; height: 30px; flex: none; }
  .swatch::after { inset: -7px; border: 0; }
  .finish-swatch::after { inset: -7px; }
  .finish-swatches { gap: 12px; }
  .colour-detail { margin: 17px 0; }
  .colour-detail #colour-name { font-size: 12px; }
  .colour-detail #colour-code { font-size: 10px; }
  .custom-colour { min-height: 44px; }
  .custom-colour > span { font-size: 10px; }
  .finish-options { margin-top: 19px; padding-top: 18px; }
  .finish-row { gap: 16px 12px; }
  .finish-copy > span:last-child { font-size: 10px; }
  .finish-custom { position: relative; }
  .finish-custom input[type=color] { width: 24px; height: 24px; min-width: 24px; }
  .finish-options:last-child { margin-top: 19px; margin-bottom: 4px; }
  .footer { height: 62px; font-size: 7px; letter-spacing: .5px; }
}

@media (max-width: 370px) {
  .wordmark img { width: 180px; height: 30px; }
  .studio-label { font-size: 6px; max-width: 74px; }
  .model-heading h1 { font-size: 32px; }
  .palette-panel { padding: 20px; }
  .swatches, .finish-swatches { gap: 9px; }
  .swatch, .finish-swatch { width: 27px; height: 27px; min-height: 27px; }
}

/* Compact controls leave the boat as the focus on a phone. */
.panel-top { display: flex; }
.panel-top .eyebrow { font-size: 10px; line-height: 1.4; letter-spacing: 1.5px; }
.fullscreen-button { display: flex; }
.fullscreen-button > span { display: none; }
.immersive-toolbar { display: none; }

@media (max-width: 760px) {
  .masthead { height: 62px; margin: 0 18px; }
  .wordmark img { width: 198px; height: 32px; }
  .studio-label { display: none; }
  .experience { margin: 0 18px; }
  .stage { height: clamp(350px, 52svh, 470px); min-height: 0; overflow: hidden; }
  .model-heading { top: 19px; }
  .model-heading h1 { font-size: 30px; margin: 10px 0 0; letter-spacing: 1px; }
  .subheading { display: none; }
  model-viewer { top: 83px; left: 0; width: 100%; height: calc(100% - 157px); }
  .watermark { font-size: 220px; bottom: 90px; right: 0; }
  .stage-bottom { bottom: 8px; right: 0; gap: 9px; flex-direction: column; align-items: stretch; }
  .stage-bottom p { justify-content: center; font-size: 9px; }
  .stage-bottom p span { max-width: none; }
  .stage-bottom p i { display: inline; }
  .desktop-zoom-hint { display: none; }
  .view-actions { display: flex; gap: 6px; justify-content: space-between; width: 100%; }
  .view-actions .icon-button { min-width: 44px; min-height: 44px; }
  .fullscreen-button { display: flex; padding: 10px 12px; gap: 6px; }
  .fullscreen-button > span { display: inline; font-size: 10px; }
  .palette-panel { margin: 14px 0 22px; padding: 20px; }
  .panel-top { margin-bottom: 0; }
  .panel-top .eyebrow { font-size: 10px; }
  .canopy-options { margin-top: 17px; }
  .palette-panel > fieldset#colour-options { margin-top: 20px; }
  .footer { margin: 0 18px; height: 48px; }
}

@media (max-width: 370px) {
  .masthead, .experience, .footer { margin-left: 14px; margin-right: 14px; }
  .wordmark img { width: 185px; height: 30px; }
  .cockpit-button > span { display: none; }
  .model-heading h1 { font-size: 28px; }
  .palette-panel { padding: 18px; }
}

/* Shared presentation for native fullscreen and the mobile browser fallback. */
html.viewer-immersive, html.viewer-immersive body { overflow: hidden; overscroll-behavior: none; }
.studio.is-immersive {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}
.studio.is-immersive .masthead,
.studio.is-immersive .palette-panel,
.studio.is-immersive .footer,
.studio.is-immersive .model-heading,
.studio.is-immersive .watermark,
.studio.is-immersive .stage-bottom { display: none; }
.studio.is-immersive .experience {
  display: block;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.studio.is-immersive .stage { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.studio.is-immersive model-viewer {
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.studio.is-immersive .immersive-toolbar {
  display: flex;
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 10;
  gap: 8px;
}
.immersive-toolbar .icon-button {
  min-height: 44px;
  padding: 11px 15px;
  gap: 8px;
  font-size: 11px;
  background: var(--paper);
  box-shadow: 0 2px 12px #0923380a;
}
.studio.is-immersive .loading, .studio.is-immersive .error-panel { top: 50%; }
.studio::backdrop { background: var(--paper); }

/* Three mutually exclusive canopy choices, including on small phones. */
.canopy-options { gap: 10px; flex-wrap: wrap; }
.canopy-options > span { flex: none; }
.canopy-toggle { flex: 1; min-width: 172px; }
.canopy-toggle button { flex: 1; min-width: 48px; min-height: 34px; padding-left: 8px; padding-right: 8px; }
@media (max-width: 760px) {
  .canopy-toggle button { min-height: 44px; }
}

/* Local review: grey studio background for the interactive boat. */
.stage {
  color: #edf0f0;
  background: radial-gradient(ellipse at 50% 43%, #39464b 0%, #262e34 48%, #15191d 88%);
  border-radius: 12px;
}
.stage .model-heading { left: 18px; color: #edf0f0; }
.stage .watermark { display: none; }
.stage .stage-bottom { left: 18px; right: 18px; }
.stage .stage-bottom p, .stage .loading, .stage .error-panel p:not(.eyebrow) { color: #aebabe; }
.stage .icon-button {
  color: #e3e8ea;
  border-color: #738087;
  background: rgba(12, 17, 22, .12);
}
.stage .icon-button:hover:not(:disabled) { border-color: #c3ced2; background: rgba(255, 255, 255, .07); }
.stage .icon-button[aria-pressed="true"] { background: #dce3e6; border-color: #dce3e6; color: #17212a; }
.stage .icon-button[aria-pressed="true"]:hover:not(:disabled) { background: #dce3e6; border-color: #dce3e6; color: #17212a; }
.stage button:focus-visible { outline-color: var(--gold); }
.stage .spinner { border-color: #4a5960; border-top-color: #d6dddf; }
.stage .progress-track { background: #4a5960; }
.stage .progress-track span { background: #d6dddf; }
.stage .error-panel { background: #222b31; color: #edf0f0; border: 1px solid #738087; }
.stage .solid-button { background: #dce3e6; color: #17212a; }
.stage .mechanism-hotspot-dot { background: #dce3e6; color: #17212a; }
.stage .mechanism-hotspot[aria-pressed="true"] .mechanism-hotspot-dot { background: var(--gold); color: #092338; }
.stage .mechanism-hotspot-label { color: #092338; }
.studio:fullscreen, .studio.is-immersive, .studio::backdrop { background: #15191d; }
.studio.is-immersive .stage { border-radius: 0; }
@media (max-width: 760px) {
  .stage .model-heading { left: 12px; }
  .stage .stage-bottom { left: 12px; right: 12px; }
  .view-actions .cockpit-button > span, .immersive-toolbar #exit-view > span { display: none; }
  .view-actions .camera-pan-button { padding: 10px 9px; gap: 5px; }
}
@media (max-width: 370px) {
  .view-actions .fullscreen-button > span { display: none; }
}
