/* AquaVista Edge — public explorer skin matched to aquavista.digital
   Complete replacement stylesheet. Tokens, serif stack and pill controls mirror
   the live site (input/website.css, captured 2026-10-08). Every original layout
   selector is preserved; only the palette/typography is re-skinned. */
:root {
  --navy: #0d2b45;
  --navy-deep: #081c2e;
  --ivory: #f4efe6;
  --ivory-soft: #faf7f0;
  --seafoam: #9fd8cb;
  --seafoam-deep: #286c5c;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --gold: #d9a441;
  --line: rgba(13, 43, 69, 0.14);
  --line-soft: rgba(13, 43, 69, 0.09);
  --scene: var(--navy-deep);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 14px 34px rgba(13, 43, 69, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory-soft);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--navy); line-height: 1.2; }
a { color: var(--seafoam-deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 3px; border-radius: 4px; }

/* Header — sticky ivory bar like the site */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--navy); display: inline-block; }
.brand svg { width: 26px; height: 26px; flex: none; display: block; }
.sep { color: var(--muted); font-weight: 400; }
.back-link {
  font: 600 .8rem var(--font);
  letter-spacing: .06em;
  color: var(--navy);
  text-decoration: none;
  opacity: 1;
  margin-right: 10px;
  white-space: nowrap;
}
.back-link:hover { opacity: 1; }
.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  font: 600 .68rem var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--ivory);
  white-space: nowrap;
}
.badge.concept { color: var(--seafoam-deep); border-color: var(--seafoam-deep); background: rgba(159, 216, 203, 0.16); }

/* Viewer-first layout — use the available desktop width. */
main {
  max-width: 1920px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.viewport, .controls, .panel { grid-column: 1 / 2; }
.programme, .gallery, .about { grid-column: 2 / 3; }
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .viewport, .controls, .panel, .programme, .gallery, .about { grid-column: 1 / -1; }
}

/* Viewer — navy shell matching the site hero/scene panels */
.viewport {
  position: relative;
  background: var(--scene);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: auto;
  height: clamp(480px, calc(100svh - 170px), 900px);
  min-height: 300px;
  border: 1px solid rgba(159, 216, 203, 0.22);
  box-shadow: var(--shadow);
}
#gl { width: 100%; height: 100%; display: block; touch-action: none; }
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ivory);
  background: rgba(40, 108, 92, 0.92);
  color: var(--ivory);
  font: 700 11px/1 var(--font);
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(8, 28, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hotspot:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 2px; }
.hotspot.active { background: var(--seafoam); color: var(--navy-deep); }
.vp-controls {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 20px);
  z-index: 5;
}
.vp-status {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 11px;
  color: rgba(244, 239, 230, 0.78);
  background: rgba(8, 28, 46, 0.62);
  border: 1px solid rgba(159, 216, 203, 0.18);
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 5;
  max-width: 60%;
  text-align: right;
  pointer-events: none;
}

/* Buttons — seafoam pills on the navy shell, navy pills on ivory panels */
.btn {
  appearance: none;
  font: 600 12px/1 var(--font);
  letter-spacing: 0.02em;
  color: var(--ivory);
  background: rgba(13, 43, 69, 0.88);
  border: 1.5px solid rgba(159, 216, 203, 0.55);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-deep); border-color: var(--seafoam); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 2px; border-radius: 999px; }
.btn[aria-pressed="true"] {
  background: var(--seafoam);
  border-color: var(--seafoam);
  color: var(--navy-deep);
}
.btn[aria-pressed="true"]:hover { background: var(--ivory); border-color: var(--ivory); color: var(--navy-deep); }
.btn:disabled { opacity: 0.5; cursor: default; }
#langToggle { background: var(--seafoam-deep); border-color: var(--seafoam-deep); color: var(--ivory); }
#langToggle:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

/* Controls & panels — airy ivory cards with hairline navy borders */
.controls {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
}
.ctl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ctl-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--seafoam-deep);
  min-width: 74px;
}
.ctl-group { display: flex; gap: 6px; flex-wrap: wrap; }
.ctl-group .btn { background: var(--ivory-soft); color: var(--navy); border-color: var(--line); }
.ctl-group .btn:hover { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.ctl-group .btn[aria-pressed="true"] { background: var(--seafoam-deep); border-color: var(--seafoam-deep); color: var(--ivory); }
.ctl-group .btn[aria-pressed="true"]:hover { background: var(--navy); border-color: var(--navy); }
.fineprint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

/* Detail panel */
.panel {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
  min-height: 120px;
}
.panel h2 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
#detailBody { margin: 0 0 12px; font-size: 14px; }
.cta {
  display: inline-block;
  background: var(--seafoam-deep);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.cta:hover { background: var(--navy); transform: translateY(-1px); }
.cta:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 3px; }
.cta-note { display: block; font-weight: 400; font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* Sections — warm ivory cards, seafoam top rules like .approach-item */
section { border-radius: var(--radius); }
.programme, .gallery, .about, .location-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-top: 2px solid var(--seafoam);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.programme h2, .gallery h2, .about h2, .location-card h2 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
#progList { list-style: none; margin: 0; padding: 0; }
#progList li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
#progList li:last-child { border-bottom: 0; }
.prog-val { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--navy); }

/* Gallery — thumbnail tiles on ivory like .region-card */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.grid button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--ivory-soft);
  aspect-ratio: 16 / 10;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.grid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid button:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 2px; }
.grid button:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Lightbox — navy-deep scrim */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 28, 46, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
#lbImg {
  max-width: min(1100px, 94vw);
  max-height: 82vh;
  border-radius: 10px;
  border: 1px solid rgba(159, 216, 203, 0.25);
  box-shadow: 0 20px 60px rgba(8, 28, 46, 0.6);
}
.lb-x {
  position: absolute;
  top: 14px;
  right: 14px;
  appearance: none;
  border: 1.5px solid var(--seafoam);
  background: rgba(13, 43, 69, 0.7);
  color: var(--seafoam);
  font: 600 13px/1 var(--font);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.lb-x:hover { background: var(--navy-deep); color: var(--ivory); border-color: var(--ivory); }
.lb-x:focus-visible { outline: 3px solid var(--seafoam); outline-offset: 2px; }

/* WebGL fallback & intro — readable on the navy shell */
.fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  color: rgba(244, 239, 230, 0.82);
}
.fallback img { max-width: 100%; max-height: 70%; border-radius: 10px; border: 1px solid rgba(159, 216, 203, 0.25); }
.fallback[hidden] { display: none; }

/* Footer — navy-deep band like the site footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(244, 239, 230, 0.66);
  border-top: 1px solid rgba(159, 216, 203, 0.18);
  text-align: center;
  font-size: 12px;
  padding: 18px;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Independent columns keep controls close to the viewer. */
.left-column,.right-column { min-width:0; display:flex; flex-direction:column; gap:16px; }
.controls,.panel,.programme,.gallery,.about { margin:0; }
.intro h1 { font-size:26px; color:var(--navy); margin:0 0 3px; }
.intro p { margin:0; color:var(--muted); font-size:13px; }
.location-card { background:var(--ivory); border:1px solid var(--line); border-top:2px solid var(--seafoam); padding:14px 16px; }
.location-card h2 { margin:0 0 10px; font-size:.78rem; color:var(--muted); letter-spacing:.14em; }
.location-card p { margin:6px 0; }
.coordinates { font-variant-numeric:tabular-nums; font-size:13px; }
.feature-group { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.feature-group .btn { background:var(--ivory-soft); color:var(--navy); border-color:var(--line); }
.feature-group .btn:hover { background:var(--navy); color:var(--ivory); border-color:var(--navy); }
.feature-group .btn[aria-pressed="true"] { background:var(--seafoam-deep); color:var(--ivory); border-color:var(--seafoam-deep); }
.feature-group .btn[aria-pressed="true"]:hover { background:var(--navy); border-color:var(--navy); }
.vp-status { top:auto; bottom:10px; max-width:calc(100% - 20px); }

/* Solar summary card (rendered only from runtime api.solar) */
.solar-card {
  background: var(--ivory-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--seafoam-deep);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0;
}
.solar-card.unavailable { border-left-color: var(--gold); }
.solar-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--navy);
  text-transform: none;
}
.solar-list { list-style: none; margin: 0 0 8px; padding: 0; }
.solar-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.solar-list li:last-child { border-bottom: 0; }
.solar-list .prog-val { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--navy); }
[hidden] { display:none !important; }
@media(max-width:900px) {
  .left-column,.right-column { grid-column:1/-1; }
  .viewport { height:clamp(360px,65svh,680px); }
}
@media(max-width:600px) {
  .viewport { height:clamp(360px,100vw,480px); }
}
@media(max-width:420px) {
  main { padding:10px; }
  .brand { font-size:.92rem; gap:6px; }
  .site-header { padding:10px 12px; }
  .btn { min-height:34px; padding:8px 11px; }
  .viewport { min-height:340px; }
  .ctl-label { font-size:10px; min-width:64px; }
  .controls,.panel { padding:12px; }
  #progList li { font-size:12px; }
  .vp-status { max-width:calc(100% - 16px); }
}
@media(max-width:360px) {
  .vp-controls { max-width:calc(100% - 14px); gap:5px; }
  .btn { padding:7px 9px; font-size:11.5px; }
  .header-right { gap:5px; }
}

/* Optional brand header fragment (output/brand-header.html):
   inline site logo svg, serif wordmark, no duplicate h1. */
.brand-fragment .brand { gap:.6rem; text-decoration:none; }
