/* pikoLED layout, built on modernist.css tokens */

/* nav */
/* fixed while scrolling: sticky (not position: fixed) keeps it in normal flow when at the top, so
   there's no extra spacer needed to stop the hero jumping up underneath it. z-index keeps it above
   the hero canvas, which comes after it in the DOM and would otherwise paint over it once both are
   positioned; the lightbox (z-index: 100) still covers it when open. */
.site-nav { position: sticky; top: 0; z-index: 20; background: var(--color-bg); padding: var(--space-4) var(--space-6); }
.site-nav .nav-brand { display: flex; align-items: center; margin-right: auto; }
.site-nav .nav-brand img { height: 36px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); flex-wrap: nowrap; }
.nav-links a { font-size: 15px; white-space: nowrap; }
.nav-links .btn { color: var(--color-text); }
.nav-links .btn:hover { color: var(--color-text); }
.nav-links .btn:active { color: var(--color-bg); }

.lang-switch { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; letter-spacing: 0.06em; }
.lang-switch a, .lang-switch [aria-current] { padding: 6px 2px; font-size: 13px; }
.lang-switch [aria-current] { font-weight: 800; }
.lang-switch [aria-hidden] { color: var(--color-neutral-700); }

/* hero */
.hero { position: relative; width: 100%; height: 92vh; min-height: 560px; background: #000; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: var(--space-8);
}
.hero-title {
  margin: 0; max-width: 900px; color: #fff;
  font-size: clamp(34px, 5.5vw, 72px); line-height: 1.02; letter-spacing: -0.02em;
}
.hero-sub { max-width: 560px; margin: var(--space-4) 0 0; font-size: 19px; line-height: 1.5; color: #d8d6d6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero .btn-ghost { color: #fff; border-color: #6b6b6b; padding-inline: calc(var(--space-3) * 1.2); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* sections */
.section { padding: var(--space-8) var(--space-6); border-bottom: 2px solid var(--color-divider); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-6); }
.section-head .tag { white-space: nowrap; flex: none; }
.section-title { margin: 0; font-size: 34px; }

/* product gallery: one flat, numbered list + a sticky viewer (the "index" layout from the v3
   handoff). Content is built by js/products.js from js/media-list.js — these rules only style
   what it renders. Opening the viewer shows the item fullscreen in .gallery-lightbox, below. */
:root {
  /* list vs. viewer column weight. Tune freely; the ratio is what matters, not the numbers. */
  --gallery-list-col: 2fr;
  --gallery-media-col: 3fr;
}
.gallery { display: grid; grid-template-columns: minmax(280px, var(--gallery-list-col)) minmax(0, var(--gallery-media-col)); border-top: 2px solid var(--color-divider); }
.gallery-list { display: flex; flex-direction: column; border-right: 2px solid var(--color-divider); }
.gallery-row {
  all: unset; cursor: pointer; box-sizing: border-box;
  display: grid; grid-template-columns: 64px 1fr; gap: var(--space-3); align-items: baseline;
  padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 2px solid var(--color-divider);
  color: var(--color-text);
}
.gallery-row:hover, .gallery-row.is-active { color: var(--color-accent-700); }
.gallery-row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.gallery-row-num { font-family: var(--font-heading); font-weight: 700; font-size: 34px; line-height: 1; }
.gallery-row-text { display: flex; flex-direction: column; gap: 4px; }
.gallery-row-title { font-family: var(--font-heading); font-weight: 700; font-size: 20px; text-wrap: pretty; }
.gallery-row-meta { font-size: 13px; color: var(--color-neutral-700); }

.gallery-media { padding: var(--space-6) 0 var(--space-6) var(--space-6); min-width: 0; position: sticky; top: var(--space-6); align-self: start; }
.gallery-viewer { all: unset; display: block; cursor: pointer; box-sizing: border-box; width: 100%; }
.gallery-viewer:disabled { cursor: default; }
.gallery-viewer:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.gallery-hint { font-size: 14px; color: var(--color-neutral-700); margin: var(--space-3) 0 0; min-height: 1.4em; }

.product-viewer { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.product-viewer-media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: filter 0.3s;
}
/* colour treatment, set by MEDIA_COLOR_MODE in js/products.js (default: always colour) — the
   lightbox (below) ignores this and always shows full colour. */
.gallery.media-color .product-viewer-media { filter: none; }
.gallery.media-grayscale .product-viewer-media { filter: grayscale(1) contrast(1.08); }
.gallery.media-grayscale-hover .product-viewer-media { filter: grayscale(1) contrast(1.08); }
.gallery.media-grayscale-hover .gallery-viewer:hover .product-viewer-media,
.gallery.media-grayscale-hover .gallery-viewer:focus-visible .product-viewer-media { filter: none; }
body.is-touch .gallery.media-grayscale-hover .product-viewer-media { filter: none; }
.product-viewer-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: var(--space-4); text-align: center; font-size: 12px;
  background: var(--color-neutral-300); color: var(--color-neutral-800);
}
.product-viewer-placeholder.is-video {
  flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: var(--space-2);
  text-align: left; background: #000; color: #d8d6d6;
}
.product-viewer-play { width: 0; height: 0; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.product-viewer-tagwrap { position: absolute; left: 0; top: 0; display: flex; }
.product-viewer-tag { border-radius: 0; }

/* lightbox: fullscreen, opened by clicking the viewer */
body.gallery-lightbox-open { overflow: hidden; }
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.94);
  display: flex; flex-direction: column; justify-content: center; padding: var(--space-8); gap: var(--space-3);
}
.gallery-lightbox-head {
  display: flex; align-items: baseline; gap: var(--space-3);
  max-width: 1400px; width: 100%; margin: 0 auto; color: #fff;
}
.gallery-lightbox-title { font-family: var(--font-heading); font-weight: 700; font-size: 22px; }
.gallery-lightbox-meta { font-size: 14px; color: #d8d6d6; }
.gallery-lightbox-close { margin-left: auto; color: #fff; border-color: #555; padding: 4px 12px; flex: none; }
.gallery-lightbox-stage {
  position: relative; width: 100%; max-width: 1400px; margin: 0 auto; aspect-ratio: 16 / 9; background: #000;
}
.gallery-lightbox-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--space-8);
  border-top: 2px solid var(--color-divider); border-left: 2px solid var(--color-divider);
}
.stat { padding: var(--space-4); border-right: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider); }
.stat-value { font-family: var(--font-heading); font-weight: 700; font-size: 40px; color: var(--color-accent-700); }
.stat-label { font-size: 14px; color: var(--color-neutral-700); margin-top: 4px; }

.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.cap-title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin-bottom: var(--space-2); }
.cap-body { font-size: 15px; color: var(--color-neutral-700); line-height: 1.5; margin: 0; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-8); max-width: 1100px; }
.req { color: var(--color-accent-700, #0b6a99); font-weight: 700; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
.contact-form { display: flex; flex-direction: column; gap: var(--space-4); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot: bots fill it, people never see it */
.contact-note { font-size: 13px; color: var(--color-neutral-700); min-height: 1.4em; margin: 0; }
.contact-side { border-left: 2px solid var(--color-divider); padding-left: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.contact-side p { margin: 0; font-size: 15px; }

.site-footer { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-6); font-size: 13px; color: var(--color-neutral-700); }
.footer-links { display: flex; gap: var(--space-4); }

/* responsive */
@media (max-width: 800px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { border-left: 0; border-top: 2px solid var(--color-divider); padding-left: 0; padding-top: var(--space-6); }
  /* stack into one column, viewer first and pinned to the top as the list scrolls beneath it */
  .gallery { display: flex; flex-direction: column; }
  .gallery-list { border-right: 0; }
  .gallery-media { order: -1; padding: var(--space-6) 0; top: 0; }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { font-size: 26px; }
}
@media (max-width: 640px) {
  .site-nav { padding: var(--space-3) var(--space-4); }
  .nav-links > a:not(.btn) { display: none; }
  .hero-copy { padding: var(--space-6) var(--space-4); }
  .hero-sub { font-size: 16px; }
  .section { padding: var(--space-6) var(--space-4); }
  .stat { padding: var(--space-3); }
  .stat-value { font-size: 28px; }
  .site-footer { padding: var(--space-4); flex-direction: column; }
}

/* short desktop/landscape viewports: shrink the hero copy so the logo stays large and clear of it */
@media (max-height: 800px) and (min-width: 641px) {
  .hero-copy { padding: var(--space-6) var(--space-8); }
  .hero-title { font-size: clamp(28px, 4vw, 52px); }
  .hero-sub { max-width: 720px; margin-top: var(--space-2); font-size: 16px; }
  .hero-actions { margin-top: var(--space-4); }
}

/* the design system's focus ring (#1f8fc4) is only ~1.4:1 on the checked blue fill */
.seg-opt:has(input:checked):has(input:focus-visible) { outline-color: var(--color-text); }
