/* =====================================================================
   Bluesys Lighting — components.css
   Frontend component styles. Ref: docs/02-design-system.md §5
   ===================================================================== */

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(47, 230, 201, .22); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  transition: height .25s ease;
}
.site-header.scrolled .nav-row { height: var(--header-h-scrolled); }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.logo-mark {
  width: 14px; height: 14px; border-radius: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta) 55%, var(--amber));
  box-shadow: 0 0 16px rgba(47, 230, 201, .5);
  flex-shrink: 0;
}
/* Uploaded logo (admin → Settings → Branding) replaces the mark + wordmark. */
.logo-img { display: block; height: 34px; width: auto; max-width: 220px; }
.site-footer .logo-img { height: 30px; }
/* Only when a separate light-theme logo was uploaded do the two swap. */
[data-theme="light"] .logo-img-dark { display: none; }
[data-theme="dark"] .logo-img-light { display: none; }

.main-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 14px;
  font-weight: 500;
}
.main-nav a { color: var(--muted); transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

/* theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--cyan); color: var(--text); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }
@media (max-width: 900px) {
  /* The panel slides up out of sight. translateY alone is not enough: it moves
     the panel by a share of its OWN height, so a menu taller than ~5× the header
     still leaves its last item peeking over the logo. visibility guarantees it
     is gone whatever the menu height, and max-height keeps a long menu scrollable
     instead of running off a short screen. */
  .main-nav {
    /* Anchored to the header's real bottom edge rather than a fixed offset.
       The header shrinks from --header-h to --header-h-scrolled once the page
       scrolls; a hard `top: var(--header-h)` left a 16px gap between the header
       and the menu in that state. top:100% of the sticky .site-header follows
       the shrink on its own. */
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    /* Clear the header too, not just the panel's own height — with a plain
       -100% (or the old -120%) the panel sits at header-h minus its height, so
       a tall menu still shows its last item above the logo. */
    transform: translateY(calc(-100% - var(--header-h) - 8px));
    visibility: hidden;
    max-height: calc(100vh - var(--header-h-scrolled));
    overflow-y: auto;
    transition: transform .3s ease, visibility 0s linear .3s;
    z-index: 55;
  }
  .main-nav.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .3s ease, visibility 0s;
  }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter); }
  .main-nav li { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav li:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  .btn-quote-desktop { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(480px 320px at 15% 15%, rgba(47, 230, 201, .16), transparent 70%),
    radial-gradient(520px 360px at 85% 30%, rgba(230, 62, 140, .14), transparent 70%),
    radial-gradient(420px 300px at 60% 90%, rgba(255, 177, 61, .10), transparent 70%);
}
:root[data-theme="light"] .hero-glow { opacity: .55; }
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; letter-spacing: .08em;
  color: var(--cyan); text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}

.hero-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .95;
  margin: 0 0 24px;
}
.hero-sub {
  font-size: 18px; color: var(--muted);
  max-width: 560px; line-height: 1.6; margin: 0 0 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================
   Trust strip
   ========================================================= */
.trust { border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 28px 24px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: none; }
.trust-num { font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; font-size: 30px; }
.trust-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 800px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: none; }
  .trust-item:nth-child(1), .trust-item:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* =========================================================
   Section head
   ========================================================= */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 32px; flex-wrap: wrap;
}
.section-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; letter-spacing: .08em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 10px;
}
.section-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 4vw, 44px);
  margin: 0; line-height: 1;
}
.section-note { max-width: 360px; font-size: 14px; color: var(--muted); }

/* =========================================================
   Category cards
   ========================================================= */
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden;
}
.cat-card { background: var(--surface); padding: 30px 26px; transition: background .15s; }
.cat-card:hover { background: var(--surface-2); }
.cat-icon {
  width: 40px; height: 40px; border-radius: 8px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
}
.cat-dot { width: 16px; height: 16px; border-radius: 4px; }
.cat-card h3 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 20px; font-weight: 700; text-transform: uppercase; margin: 0 0 8px;
}
.cat-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.cat-spec {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px;
}
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Product cards
   ========================================================= */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prod-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 22px;
  display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.prod-card:hover { border-color: var(--surface-2); transform: translateY(-2px); }
.prod-thumb {
  height: 120px; border-radius: 8px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
}
.prod-beam { width: 3px; height: 60px; border-radius: 2px; }
.prod-name { font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.prod-price { font-family: 'IBM Plex Mono', monospace; color: var(--cyan); font-size: 14px; margin-bottom: 12px; }
.prod-price small { color: var(--muted); }
.prod-specs { list-style: none; margin: 0 0 18px; padding: 0; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.prod-specs li::before { content: '—'; margin-right: 6px; color: var(--line); }
.prod-card .btn { margin-top: auto; }
@media (max-width: 1000px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .prod-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Applications
   ========================================================= */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.app-tile {
  aspect-ratio: 3 / 4; border-radius: var(--radius-md);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 16px;
  border: 1px solid var(--line);
  transition: transform .2s ease;
}
.app-tile:hover { transform: translateY(-3px); }
.app-tile span {
  font-family: 'Big Shoulders Display', sans-serif; font-weight: 700;
  font-size: 18px; text-transform: uppercase; position: relative; z-index: 1;
  color: #EDEFF3;
}
.app-tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .7));
}
@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Signature scene — facade colour on scroll
   A building bathed in coloured light; the colour cycles as you
   scroll (live RGB/DMX demo). Swatches let you set it by hand too.
   ========================================================= */
.facade-pin { position: relative; }
.facade-scene {
  --glow: #2FE6C9;
  position: relative; width: 100%; height: 100vh; min-height: 580px;
  overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 60% at 50% 116%, color-mix(in srgb, var(--glow) 24%, transparent), transparent 60%),
    linear-gradient(180deg, #05070c 0%, #0A0D12 72%);
  transition: background .2s linear;
}
.facade-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* SVG parts colored live via the --glow custom property */
.facade-tower   { fill: #0F1420; stroke: #2A3242; stroke-width: 1.5; }
.facade-ground  { fill: #070A0F; }
.facade-win     { fill: var(--glow); }
.facade-wash    { fill: var(--glow); }
.facade-beam    { fill: var(--glow); }
.facade-fixture { fill: #0B0E14; stroke: #3A4658; stroke-width: 1; }

/* HUD */
.facade-hud { position: absolute; top: 24px; left: 24px; z-index: 3; display: flex; align-items: center; gap: 14px; }
.facade-swatch {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  background: var(--glow); box-shadow: 0 0 26px var(--glow);
  transition: background .2s linear, box-shadow .2s linear;
}
.facade-hud .hud-label {
  font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 22px; letter-spacing: .02em; color: #EDEFF3; line-height: 1;
}
.facade-hud .hud-sub { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #8D96A8; margin-top: 5px; }

.facade-caption {
  position: absolute; bottom: 22px; left: 24px; z-index: 3;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .08em;
  color: #8D96A8; text-transform: uppercase;
}
.facade-scroll-hint {
  position: absolute; top: 24px; right: 24px; z-index: 3;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .1em;
  color: var(--glow); opacity: .9; transition: color .2s linear;
}
.facade-swatches { position: absolute; bottom: 18px; right: 24px; z-index: 3; display: flex; gap: 10px; align-items: center; }
.facade-swatches .sw-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #8D96A8; margin-right: 4px; }
.facade-dot {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid rgba(255, 255, 255, .22); background: currentColor;
  transition: transform .15s ease, border-color .15s ease;
}
.facade-dot:hover { transform: scale(1.15); border-color: rgba(255, 255, 255, .6); }
@media (max-width: 560px) {
  .facade-hud .hud-label { font-size: 18px; }
  .facade-swatches .sw-label { display: none; }
}

/* =========================================================
   Credibility / manufacturing
   ========================================================= */
.cred {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 48px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.cred .section-title { font-size: clamp(26px, 3.4vw, 34px); }
.cred p { color: var(--muted); margin-top: 16px; line-height: 1.7; }
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.badge { border: 1px solid var(--line); border-radius: 8px; padding: 16px; font-size: 13px; color: var(--muted); }
.badge b { display: block; font-family: 'Big Shoulders Display', sans-serif; font-size: 19px; font-weight: 700; margin-bottom: 2px; color: var(--text); }
@media (max-width: 850px) { .cred { grid-template-columns: 1fr; padding: 32px; } }

/* =========================================================
   FAQ
   ========================================================= */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-size: 16px; font-weight: 600; padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.faq-icon { color: var(--cyan); font-size: 22px; font-weight: 400; transition: transform .2s ease; flex-shrink: 0; margin-left: 16px; line-height: 1; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p { color: var(--muted); font-size: 14px; line-height: 1.7; padding: 0 0 20px; margin: 0; max-width: 600px; }

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: linear-gradient(120deg, rgba(47, 230, 201, .10), rgba(230, 62, 140, .08) 50%, rgba(255, 177, 61, .08));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 64px 0; text-align: center;
}
.cta-band h2 { font-family: 'Big Shoulders Display', sans-serif; font-size: clamp(28px, 4vw, 42px); text-transform: uppercase; margin: 0 0 12px; }
.cta-band p { color: var(--muted); margin: 0 0 28px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 56px 0 32px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.site-footer li { margin-bottom: 10px; }
.site-footer .foot-links a { opacity: .85; }
.site-footer .foot-links a:hover { opacity: 1; color: var(--cyan); }
.foot-about { color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 280px; }

/* Newsletter signup.
   flex-wrap matters: without it the input and button demand one unbroken line,
   which made this footer column 265px wide and pushed the whole page sideways
   on a 375px phone. Wrapping lets the button drop under the input instead. */
.foot-subscribe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.foot-subscribe input[type="email"] {
  flex: 1 1 150px; min-width: 0; padding: 9px 12px; font-size: 13.5px;
  color: var(--text); background: var(--surface-2, rgba(255,255,255,.05));
  border: 1px solid var(--line); border-radius: 8px;
}
.foot-subscribe input[type="email"]:focus { outline: none; border-color: var(--cyan); }
.foot-subscribe .btn { padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }
.foot-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.foot-note-error { color: var(--magenta); margin-top: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.foot-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--muted);
}
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
/* On a phone two footer columns leave ~160px each — too tight for the newsletter
   field and the longer link labels. One column below 520px. */
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .foot-subscribe input[type="email"] { flex: 1 1 100%; }
  .foot-subscribe .btn { width: 100%; }
}

/* =========================================================
   Floating WhatsApp
   ========================================================= */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); }

/* =========================================================
   Reveal init state (GSAP toggles these off)
   ========================================================= */
.reveal { opacity: 0; }
:root:not([data-motion="on"]) .reveal { opacity: 1; } /* no-JS / reduced-motion safe */
