/* ==========================================================================
   Baiper — Landing page styles
    1. Palettes            6. About             11. Footer
    2. Base                7. Services          12. Reveal animations
    3. Buttons             8. Sectors           13. Keyframes
    4. Header & nav        9. Gallery           14. Reduced motion
    5. Hero & sections    10. Contact
   ========================================================================== */

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ---------- 1. Palettes ----------
   Every colour on the page comes from these tokens (<html data-palette="grafito">).
   The --canvas-* tokens are read by js/circuit-background.js. */

/* Grafito · amarillo eléctrico (default) */
:root,
[data-palette="grafito"] {
  color-scheme: dark;
  --theme-color: #111316;

  --bg: #111316;
  --bg-alt: #181b1f;
  --surface: rgba(36, 39, 45, 0.8);
  --surface-2: rgba(22, 24, 28, 0.85);
  --panel: rgba(36, 39, 45, 0.75);
  --panel-2: rgba(18, 20, 23, 0.9);
  --popover-bg: #1b1e22;
  --popover-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --field-bg: rgba(8, 9, 11, 0.6);
  --field-bg-focus: rgba(8, 9, 11, 0.9);
  --header-bg: rgba(14, 16, 19, 0.82);
  --nav-panel-bg: radial-gradient(ellipse 90% 50% at 100% 100%, rgba(255, 212, 0, 0.1), transparent 70%), #0b0c0e;

  --text: #eceef1;
  --text-muted: #a0a6b0;
  --text-dim: #737a84;
  --text-quote: #d0d4da;

  --accent: #ffd400;
  --accent-rgb: 255, 212, 0;
  --accent-ink: #111316;
  --accent-text: #ffdd33;
  --accent-deco: #ffd400;

  --border: rgba(190, 196, 206, 0.13);
  --border-strong: rgba(255, 212, 0, 0.4);
  --divider: rgba(190, 196, 206, 0.18);
  --focus: #ffd400;
  --focus-border: #ffd400;
  --focus-ring: 0 0 0 3px rgba(255, 212, 0, 0.15), 0 0 20px rgba(255, 212, 0, 0.15);

  --btn-bg: linear-gradient(120deg, #ffb000 0%, #ffe100 100%);
  --btn-shadow: inset 0 0 0 1px rgba(255, 240, 160, 0.4), 0 10px 30px -10px rgba(255, 176, 0, 0.55), 0 0 22px rgba(255, 212, 0, 0.2);
  --btn-shadow-hover: inset 0 0 0 1px rgba(255, 240, 160, 0.65), 0 14px 34px -10px rgba(255, 176, 0, 0.7), 0 0 34px rgba(255, 212, 0, 0.42);
  --ghost-bg: rgba(255, 212, 0, 0.04);
  --ghost-border: rgba(255, 212, 0, 0.35);
  --ghost-text-hover: #ffffff;
  --ghost-bg-hover: rgba(255, 212, 0, 0.1);
  --ghost-border-hover: #ffd400;
  --ghost-shadow-hover: 0 0 22px rgba(255, 212, 0, 0.25), inset 0 0 14px rgba(255, 212, 0, 0.1);

  --chip-bg: rgba(255, 212, 0, 0.07);
  --chip-border: rgba(255, 212, 0, 0.3);
  --chip-text: #ffe066;
  --icon-color: #ffd400;
  --icon-bg: rgba(255, 212, 0, 0.08);
  --icon-border: rgba(255, 212, 0, 0.3);
  --icon-color-hover: #111316;
  --icon-bg-hover: #ffd400;
  --icon-shadow-hover: 0 0 24px rgba(255, 212, 0, 0.45);

  --glow-text-color: transparent;
  --glow-text-bg: linear-gradient(90deg, #fff1a6 0%, #ffd400 45%, #ffb000 100%);
  --glow-text-clip: text;
  --glow-text-filter: drop-shadow(0 0 18px rgba(255, 212, 0, 0.28));
  --em-color: #ffe066;
  --em-bg: none;
  --em-shadow: 0 0 14px rgba(255, 212, 0, 0.45);

  --star: #ffd400;
  --star-glow: 0 0 10px rgba(255, 212, 0, 0.55);
  --led-border: transparent;
  --nav-underline: #ffd400;
  --nav-underline-glow: 0 0 8px #ffd400, 0 0 16px rgba(255, 212, 0, 0.5);
  --wire: rgba(190, 196, 206, 0.22);
  --wire-strong: rgba(255, 212, 0, 0.6);
  --wire-height: 1px;
  --spark: #ffe678;
  --spark-filter: drop-shadow(0 0 4px rgba(255, 212, 0, 0.85));
  --deco-glow: drop-shadow(0 0 4px rgba(255, 212, 0, 0.6));
  --ring-a: #ffb000;
  --ring-b: #fff1a6;
  --spotlight: rgba(255, 212, 0, 0.08);
  --card-shadow-hover: 0 24px 50px -24px rgba(0, 0, 0, 0.85), 0 0 40px -12px rgba(255, 212, 0, 0.28);
  --corner: rgba(255, 212, 0, 0.75);
  --link-hover: #ffe066;
  --link-hover-shadow: 0 0 12px rgba(255, 212, 0, 0.5);
  --logo-filter: drop-shadow(0 0 6px rgba(59, 155, 255, 0.55));
  --pattern-color: #ffd400;
  --pattern-opacity: 0.07;
  --dots: rgba(255, 212, 0, 0.13);
  --selection: rgba(255, 212, 0, 0.32);

  --error: #ff5c6c;
  --error-text: #ff8a96;
  --error-ring: rgba(255, 92, 108, 0.14);
  --success-text: #ffe066;
  --success-border: rgba(255, 212, 0, 0.35);
  --success-bg: rgba(255, 212, 0, 0.07);

  --hero-bg:
    radial-gradient(ellipse 70% 60% at 75% 40%, rgba(255, 196, 0, 0.11), transparent 65%),
    radial-gradient(ellipse 50% 45% at 10% 95%, rgba(255, 212, 0, 0.05), transparent 60%),
    linear-gradient(180deg, #0a0b0d 0%, #15181c 55%, #111316 100%);
  --hero-overlay:
    linear-gradient(90deg, rgba(10, 11, 13, 0.88) 0%, rgba(10, 11, 13, 0.6) 40%, rgba(10, 11, 13, 0) 75%),
    linear-gradient(0deg, #111316 0%, rgba(17, 19, 22, 0) 22%);
  --hero-overlay-mobile: linear-gradient(180deg, rgba(10, 11, 13, 0.5) 0%, rgba(10, 11, 13, 0.75) 55%, #111316 100%);

  --footer-bg: #0a0b0d;
  --footer-text: #eceef1;
  --footer-muted: #a0a6b0;
  --footer-dim: #737a84;
  --footer-line: rgba(255, 255, 255, 0.08);
  --footer-accent: #ffd400;
  --footer-accent-glow: rgba(255, 212, 0, 0.35);

  --canvas-blend: lighter;
  --canvas-trace: 150, 158, 170;
  --canvas-trace-alpha: 0.42;
  --canvas-halo-alpha: 0.06;
  --canvas-node: 255, 238, 170;
  --canvas-glow: 255, 204, 0;
  --canvas-core: 255, 255, 255;
  --canvas-idle-glow: 0.2;
  --canvas-pointer: rgba(255, 212, 0, 0.32);
}

/* ---------- 2. Base ---------- */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 76px;
  --container: 1200px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* PCB trace tile, used as a mask so its colour follows the palette */
  --circuit-pattern: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%23000' stroke-width='1.2'><path d='M0 40h70l20 20h47M240 40h-40l-20 20v47M60 240v-60l20-20h37M60 0v17M0 200h25M240 200h-60l-20-20v-27M20 90h40l20 20v20'/><circle cx='140' cy='60' r='3'/><circle cx='180' cy='110' r='3'/><circle cx='120' cy='160' r='3'/><circle cx='60' cy='20' r='3'/><circle cx='28' cy='200' r='3'/><circle cx='160' cy='150' r='3'/><circle cx='17' cy='90' r='3'/><circle cx='80' cy='133' r='3'/></svg>");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.text-glow {
  color: var(--glow-text-color);
  background: var(--glow-text-bg);
  -webkit-background-clip: var(--glow-text-clip);
  background-clip: var(--glow-text-clip);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  filter: var(--glow-text-filter);
}

.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border: 1px solid var(--led-border);
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-out infinite;
}

/* ---------- 3. Buttons ---------- */

.btn {
  --btn-py: 0.75rem;
  --btn-px: 1.35rem;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--btn-py) var(--btn-px);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-lg {
  --btn-py: 0.95rem;
  --btn-px: 1.7rem;
  font-size: 1rem;
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
}

/* light sweep, like a spark running across the button */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.btn-ghost {
  color: var(--text);
  background: var(--ghost-bg);
  border-color: var(--ghost-border);
}

.btn-ghost:hover {
  color: var(--ghost-text-hover);
  background: var(--ghost-bg-hover);
  border-color: var(--ghost-border-hover);
  box-shadow: var(--ghost-shadow-hover);
  transform: translateY(-2px);
}

/* ---------- 4. Header & navigation ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile menu. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.3s;
}

.site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wire-strong), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.site-header.is-scrolled::before,
.site-header.is-scrolled::after,
.site-header.nav-open::before {
  opacity: 1;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.header-inner .logo {
  margin-right: auto;
}

/* Provisional: the BP mark is hidden for now. To bring it back, delete the
   display rule below (the markup in index.html is still there). */
.logo-mark {
  display: none;
  filter: var(--logo-filter);
}

.logo-mark svg {
  display: block;
  width: 46px;
  height: 46px;
  overflow: visible; /* lets the drop shadow of the 3D mark spill outside the box */
}

.logo:hover .logo-mark {
  animation: flicker 0.9s steps(1) 1;
}

.logo-text {
  font-family: 'Libre Bodoni', 'Bodoni MT', 'Bodoni 72', Didot, serif;
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--nav-underline);
  box-shadow: var(--nav-underline-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-cta-mobile,
.nav-toggle {
  display: none;
}

.nav-toggle {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--ghost-bg);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

.nav-open .nav-toggle {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop: brand centred in a band; the menu is a pill floating over the band's
   bottom edge, with the contact button as its last item. Once the page scrolls,
   the brand shrinks so the header takes less room. */
@media (min-width: 961px) {
  :root {
    --header-h: 188px;
    --brand-band-h: 150px;
    --brand-line: 2px;
  }

  .site-header {
    transition: height 0.3s var(--ease);
  }

  .site-header.is-scrolled {
    --brand-band-h: 96px;
    height: 132px;
  }

  /* The scroll blur sits behind everything; the brand band sits above it and
     covers only the logo area, so the pill menu overlaps its lower edge. */
  .site-header::before {
    z-index: -2;
  }

  .site-header::after {
    inset: 0 0 auto 0;
    z-index: -1;
    height: var(--brand-band-h);
    opacity: 1;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 45%),
      linear-gradient(180deg, #2f343c 0%, #22262c 100%);
    border-bottom: var(--brand-line) solid var(--border-strong);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.7);
    transition: height 0.3s var(--ease);
  }

  .header-inner {
    padding-top: 1.75rem;
    transition: padding-top 0.3s var(--ease), row-gap 0.3s var(--ease);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    justify-items: center;
    row-gap: 1.625rem;
  }

  /* keeps the logo row the same height with or without the mark, so the pill menu stays put */
  .header-inner .logo {
    min-height: 70px;
    margin-right: 0;
    transition: min-height 0.3s var(--ease);
  }

  .is-scrolled .logo {
    min-height: 38px;
  }

  .header-cta {
    display: none;
  }

  .header-inner .logo-mark svg {
    width: 70px;
    height: 70px;
    transition: width 0.3s var(--ease), height 0.3s var(--ease);
  }

  .header-inner .logo-text {
    font-size: 3.5rem;
    line-height: 1;
    transition: font-size 0.3s var(--ease);
  }

  .is-scrolled .header-inner {
    padding-top: 0.875rem;
    row-gap: 1.05rem;
  }

  .is-scrolled .logo-mark svg {
    width: 38px;
    height: 38px;
  }

  .is-scrolled .logo-text {
    font-size: 1.9rem;
  }

  /* pill menu */
  .primary-nav {
    padding: 6px;
    border: var(--brand-line) solid var(--border-strong);
    border-radius: 999px;
    background: var(--bg-alt);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.85);
  }

  .nav-list {
    gap: 2px;
  }

  .nav-link {
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    transition: color 0.2s, background-color 0.2s;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover {
    background: rgba(var(--accent-rgb), 0.08);
  }

  .primary-nav .nav-link.is-active {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .primary-nav .nav-cta-mobile {
    display: inline-flex;
    margin-left: 6px;
    /* same total height as the menu items: padding minus the 2px border, same line height */
    padding: calc(0.65rem - 2px) calc(1.15rem - 2px);
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: none;
    box-shadow: none;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--accent-text);
  }

  .primary-nav .nav-cta-mobile:hover {
    background: var(--btn-bg);
    color: var(--accent-ink);
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem clamp(1rem, 4vw, 2rem) calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--nav-panel-bg);
    border-top: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .nav-open .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    counter-reset: nav;
  }

  .nav-list li {
    counter-increment: nav;
  }

  .nav-open .nav-list li {
    animation: rise 0.45s var(--ease) backwards;
  }

  .nav-open .nav-list li:nth-child(2) { animation-delay: 0.04s; }
  .nav-open .nav-list li:nth-child(3) { animation-delay: 0.08s; }
  .nav-open .nav-list li:nth-child(4) { animation-delay: 0.12s; }

  .nav-link {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1.1rem 0.25rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text);
  }

  .nav-link::before {
    content: counter(nav, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-deco);
  }

  .nav-link::after {
    left: 0.25rem;
    right: auto;
    bottom: -1px;
    width: 64px;
  }

  .nav-cta-mobile {
    display: flex;
    width: 100%;
    padding-block: 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .header-cta {
    display: none;
  }
}

/* ---------- 5. Hero & shared section styles ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 3rem) 0 6rem;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--hero-overlay);
}

.hero-content {
  max-width: 780px;
}

.hero-content > * {
  animation: rise 0.9s var(--ease) backwards;
}

.hero-content > :nth-child(2) { animation-delay: 0.1s; }
.hero-content > :nth-child(3) { animation-delay: 0.2s; }
.hero-content > :nth-child(4) { animation-delay: 0.3s; }
.hero-content > :nth-child(5) { animation-delay: 0.4s; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.95rem 0.4rem 0.75rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chip-text);
}

.hero-title {
  margin-top: 1.5rem;
  font-size: clamp(2.35rem, 4.8vw + 0.6rem, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  max-width: 620px;
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.2rem);
  color: var(--text-muted);
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
  font-weight: 500;
}

.hero-tagline strong {
  font-weight: 600;
  color: var(--em-color);
  background: var(--em-bg);
  text-shadow: var(--em-shadow);
}

.hero-tagline-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--icon-border);
  border-radius: var(--radius-sm);
  background: var(--icon-bg);
  color: var(--icon-color);
  box-shadow: 0 0 20px var(--spotlight);
}

.hero-tagline-icon svg {
  width: 20px;
  height: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
}

.scroll-cue::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent-deco);
  box-shadow: 0 0 8px var(--spotlight);
  animation: scroll-cue 1.8s var(--ease) infinite;
}

@media (max-width: 760px) {
  .hero-overlay {
    background: var(--hero-overlay-mobile);
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-height: 640px) {
  .scroll-cue {
    display: none;
  }
}

.section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}

/* wire along the top edge, with a spark travelling across it */
.section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--wire-height);
  background:
    linear-gradient(90deg, transparent, var(--spark), transparent),
    linear-gradient(90deg, transparent 0%, var(--wire) 30%, var(--wire) 70%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 180px 100%, 100% 100%;
  background-position: -180px 0, 0 0;
  filter: var(--spark-filter);
  animation: wire-spark 7s linear infinite;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
}

.circuit-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--pattern-color);
  opacity: var(--pattern-opacity);
  -webkit-mask-image: var(--circuit-pattern), radial-gradient(ellipse 75% 65% at 50% 50%, #000 15%, transparent 75%);
  -webkit-mask-size: 240px 240px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-image: var(--circuit-pattern), radial-gradient(ellipse 75% 65% at 50% 50%, #000 15%, transparent 75%);
  mask-size: 240px 240px, 100% 100%;
  mask-repeat: repeat, no-repeat;
  mask-composite: intersect;
}

.section-header {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

/* mono label framed by two short traces ending in solder pads */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 36px;
  height: 6px;
  background:
    linear-gradient(var(--accent-deco), var(--accent-deco)) center / 100% 1px no-repeat,
    radial-gradient(circle, var(--accent-deco) 2px, transparent 2.5px) left center / 6px 6px no-repeat;
  filter: var(--deco-glow);
}

.section-eyebrow::after {
  transform: scaleX(-1);
}

.section-title {
  margin-top: 1rem;
  font-size: clamp(2rem, 2.8vw + 1rem, 3rem);
}

.section-lead {
  margin-top: 1rem;
  font-size: 1.075rem;
  color: var(--text-muted);
}

/* ---------- 6. About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.about-text {
  margin-top: 1rem;
  color: var(--text-muted);
}

.about-values {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.about-value {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about-value-title {
  font-size: 1.05rem;
}

.about-value-text {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* image placeholder: swap the inner content for an <img> when available */
.about-media {
  isolation: isolate;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  aspect-ratio: 4 / 3;
  text-align: center;
}

/* any image wrapped in .zoom-btn opens in the lightbox (main.js) */
.zoom-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.zoom-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.zoom-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
}

.about-media .zoom-btn {
  position: absolute;
  inset: 0.6rem;
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(8, 9, 11, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox-img {
  max-width: min(94vw, 1500px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  animation: lightbox-in 0.3s var(--ease);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ghost-border);
  border-radius: 50%;
  background: var(--popover-bg);
  color: var(--text);
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: var(--ghost-border-hover);
  box-shadow: var(--ghost-shadow-hover);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

/* about values that open an .info-dialog with more details */
.value-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s;
}

.value-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
  transition: transform 0.3s var(--ease);
}

.value-btn:hover {
  color: var(--accent-text);
}

.value-btn:hover svg {
  transform: rotate(90deg);
}

.value-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.info-dialog {
  width: min(640px, calc(100% - 2rem));
  max-height: 88vh;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  border: 1px solid var(--border-strong);
  border-top: var(--brand-line, 2px) solid var(--accent-deco);
  border-radius: var(--radius);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}

.info-dialog[open] {
  animation: lightbox-in 0.3s var(--ease);
}

.info-dialog::backdrop {
  background: rgba(8, 9, 11, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.info-dialog .lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 40px;
  height: 40px;
}

.info-dialog-title {
  margin: 0.75rem 2.5rem 0 0;
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
}

.info-dialog .legal-content {
  margin-top: 1rem;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

.about-media-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 1rem;
  border: 1px solid var(--icon-border);
  border-radius: 18px;
  background: var(--icon-bg);
  color: var(--icon-color);
  box-shadow: 0 0 32px var(--spotlight);
}

.about-media-icon svg {
  width: 36px;
  height: 36px;
}

.about-media-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.about-media-hint {
  font-size: 0.88rem;
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-media {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- 7. Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1140px;
  margin-inline: auto;
}

.service-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

/* current running around the border on hover */
.service-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0deg 240deg, var(--ring-a) 300deg, var(--ring-b) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  animation: spin-angle 3s linear infinite paused;
}

/* soft spotlight that follows the pointer (position set in main.js) */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--spotlight), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
}

/* hover effects only on devices with a real mouse: on phones a tap leaves :hover/:focus-within
   stuck, and the lifted card + animated masked border could render as a black box */
@media (hover: hover) and (pointer: fine) {
  .service-card:hover,
  .service-card:focus-within {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--card-shadow-hover);
  }

  .service-card:hover::before,
  .service-card:focus-within::before {
    opacity: 1;
    animation-play-state: running;
  }

  .service-card:hover::after,
  .service-card:focus-within::after {
    opacity: 1;
  }

  .service-card:hover .service-icon {
    color: var(--icon-color-hover);
    background: var(--icon-bg-hover);
    box-shadow: var(--icon-shadow-hover);
  }
}

.service-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* short trace linking the icon to the index number */
.service-card-top::after {
  content: '';
  order: 1;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.service-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--icon-border);
  border-radius: 12px;
  background: var(--icon-bg);
  color: var(--icon-color);
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-index {
  order: 2;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.service-title {
  font-size: 1.15rem;
  line-height: 1.3;
}

.service-text {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.service-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.45rem;
  margin-top: auto;
  padding-block: 0.5rem 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease), text-shadow 0.3s;
}

.service-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.service-link:hover {
  background-size: 100% 2px;
  text-shadow: var(--link-hover-shadow);
}

.service-link:hover svg {
  transform: translateX(4px);
}

@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* an odd last card spans the full row instead of sitting alone */
  .services-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 8. Sectors ---------- */

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.sector-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.sector-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow-hover);
}

.sector-card:hover .info-icon {
  color: var(--icon-color-hover);
  background: var(--icon-bg-hover);
  box-shadow: var(--icon-shadow-hover);
}

.sector-title {
  font-size: 1.05rem;
  line-height: 1.3;
}

.sector-text {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .sectors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sectors-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 9. Gallery ---------- */

.gallery::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dots) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 10%, transparent 70%);
}

.gallery-carousel {
  --gap: 1.25rem;
  --per-view: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

/* native scroll-snap: swipe on touch, buttons scroll one page (main.js) */
.gallery-track {
  display: flex;
  gap: var(--gap);
  padding-block: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: var(--radius);
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.gallery-item {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  margin: 0;
  scroll-snap-align: start;
}

.gallery-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.gallery-media .zoom-btn {
  position: absolute;
  inset: 0;
}

.gallery-media .zoom-btn img {
  border-radius: 0;
}

/* nothing to scroll (all images fit): keep the layout but hide the arrows */
.gallery-carousel.is-static .gallery-btn {
  visibility: hidden;
}

.gallery-media:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow-hover);
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--ghost-border);
  border-radius: 50%;
  background: var(--ghost-bg);
  color: var(--accent-text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, opacity 0.25s;
}

.gallery-btn svg {
  width: 22px;
  height: 22px;
}

.gallery-btn:hover:not(:disabled) {
  border-color: var(--ghost-border-hover);
  background: var(--ghost-bg-hover);
  box-shadow: var(--ghost-shadow-hover);
}

.gallery-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.gallery-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 960px) {
  .gallery-carousel {
    --per-view: 2;
  }
}

@media (max-width: 620px) {
  .gallery-carousel {
    --per-view: 1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
  }

  .gallery-track {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .gallery-prev {
    grid-row: 2;
    justify-self: end;
  }

  .gallery-next {
    grid-row: 2;
    justify-self: start;
  }
}

/* ---------- 10. Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.panel {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--panel) 0%, var(--panel-2) 100%);
}

/* HUD-style corner brackets */
.panel::before {
  --l: 16px;
  content: '';
  position: absolute;
  inset: -7px;
  pointer-events: none;
  background:
    linear-gradient(var(--corner) 0 0) top left / var(--l) 1.5px,
    linear-gradient(var(--corner) 0 0) top left / 1.5px var(--l),
    linear-gradient(var(--corner) 0 0) top right / var(--l) 1.5px,
    linear-gradient(var(--corner) 0 0) top right / 1.5px var(--l),
    linear-gradient(var(--corner) 0 0) bottom left / var(--l) 1.5px,
    linear-gradient(var(--corner) 0 0) bottom left / 1.5px var(--l),
    linear-gradient(var(--corner) 0 0) bottom right / var(--l) 1.5px,
    linear-gradient(var(--corner) 0 0) bottom right / 1.5px var(--l);
  background-repeat: no-repeat;
  filter: var(--deco-glow);
}

.panel-title {
  font-size: 1.35rem;
}

.contact-form {
  display: grid;
  gap: 0.35rem;
}

.contact-form .panel-title {
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field > label:not(.checkbox) {
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
}

.req {
  color: var(--accent-deco);
}

.input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

textarea.input {
  min-height: 150px;
  resize: vertical;
}

.input::placeholder {
  color: var(--text-dim);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--focus-border);
  background: var(--field-bg-focus);
  box-shadow: var(--focus-ring);
}

.field.has-error .input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-ring);
}

.field-error {
  min-height: 1.3rem;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--error-text);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

.checkbox a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: var(--accent-deco);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  color: var(--success-text);
  border-color: var(--success-border);
  background: var(--success-bg);
}

.form-status.is-error {
  color: var(--error-text);
  border-color: var(--error);
  background: var(--error-ring);
}

.contact-info .panel-title {
  margin-bottom: 1.75rem;
}

.info-list {
  display: grid;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--icon-border);
  border-radius: var(--radius-sm);
  background: var(--icon-bg);
  color: var(--icon-color);
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.info-icon svg {
  width: 20px;
  height: 20px;
}

.info-item > div {
  min-width: 0;
}

.info-label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.info-value {
  font-style: normal;
  line-height: 1.55;
}

.info-link {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.2s, text-shadow 0.2s, text-decoration-color 0.2s;
}

.info-link:hover {
  color: var(--link-hover);
  text-shadow: var(--link-hover-shadow);
  text-decoration-color: var(--accent);
}

.email-list {
  display: grid;
  gap: 0.7rem;
}

.email-list li {
  display: flex;
  flex-direction: column;
}

.email-dept {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.info-hours {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px dashed var(--divider);
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-footer .btn {
    width: 100%;
  }
}

/* ---------- 11. Footer ---------- */

.site-footer {
  position: relative;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bg);
  color: var(--footer-text);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(600px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--footer-accent), transparent);
  box-shadow: 0 0 12px var(--footer-accent-glow);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--footer-line);
}

.footer-brand p {
  max-width: 40ch;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--footer-muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--footer-dim);
}

.legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.legal-list a {
  color: var(--footer-muted);
  transition: color 0.2s;
}

.legal-list a:hover {
  color: var(--footer-accent);
}

/* ---------- 12. Language switch & legal pages ---------- */

.lang-switch {
  display: flex;
  flex: none;
  padding: 3px;
  /* same frame as the desktop pill menu */
  border: var(--brand-line, 2px) solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.lang-switch a {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 0.2s, background-color 0.2s;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current] {
  background: var(--accent);
  color: var(--accent-ink);
}

/* desktop: top-right corner, vertically centred in the brand band */
@media (min-width: 961px) {
  .header-inner .lang-switch {
    position: absolute;
    top: calc(var(--brand-band-h) / 2);
    right: clamp(1rem, 4vw, 2rem);
    transform: translateY(-50%);
    transition: top 0.3s var(--ease);
  }
}

/* first-layer data protection notice under the contact form */
.form-privacy {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.form-privacy a,
.legal-content a:not(.btn) {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: var(--accent-deco);
  text-underline-offset: 3px;
}

.legal-page {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem));
}

.legal-page .section-header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.legal-updated {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.legal-content {
  max-width: 820px;
  margin-inline: auto;
}

.legal-content h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.35rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-content p,
.legal-content ul {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-content li + li {
  margin-top: 0.35rem;
}

.legal-content li::marker {
  color: var(--accent-deco);
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

.legal-data {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 1rem 0 0;
}

.legal-data dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 0.2rem;
}

.legal-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* service detail pages (reuse the legal-page layout) */
.legal-content .detail-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.legal-content .detail-types li {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: var(--brand-line, 2px) solid var(--accent-deco);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text);
}

.detail-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.legal-content .detail-cta p {
  flex: 1 1 18rem;
  margin: 0;
  color: var(--text);
}

@media (max-width: 620px) {
  .legal-content .detail-types {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* data still to be filled in: easy to spot until it is replaced */
.pending {
  padding: 0.05rem 0.4rem;
  border: 1px dashed var(--error);
  border-radius: 4px;
  background: var(--error-ring);
  color: var(--error-text);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* small phones: make room for logo + language switch + menu button */
/* three languages: single-line logo and a tighter switch below desktop */
@media (max-width: 960px) {
  .header-inner .logo-text {
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .lang-switch {
    letter-spacing: 0.04em;
  }

  .lang-switch a {
    padding: 0.3rem 0.45rem;
  }
}

@media (max-width: 420px) {
  .header-inner {
    gap: 0.75rem;
  }

  .header-inner .logo-text {
    font-size: 1.9rem;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .header-inner {
    gap: 0.5rem;
  }

  .header-inner .logo-text {
    font-size: 1.5rem;
  }

  .lang-switch a {
    padding: 0.28rem 0.38rem;
  }
}

@media (max-width: 620px) {
  .legal-data {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .legal-data dd + dt {
    margin-top: 0.8rem;
  }
}

/* ---------- 13. Reveal on scroll (classes toggled in main.js) ---------- */

.js .reveal:not(.is-visible) {
  opacity: 0;
}

.reveal.is-visible {
  animation: reveal-up 0.8s var(--ease) backwards;
  animation-delay: var(--reveal-delay, 0s);
}

.about-layout > :nth-child(2),
.services-grid > :nth-child(2),
.sectors-grid > :nth-child(3n + 2),
.contact-layout > :nth-child(2) { --reveal-delay: 0.08s; }
.sectors-grid > :nth-child(3n),
.services-grid > :nth-child(3) { --reveal-delay: 0.16s; }

/* ---------- 14. Keyframes ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes wire-spark {
  from { background-position: -180px 0, 0 0; }
  to { background-position: calc(100% + 180px) 0, 0 0; }
}

@keyframes spin-angle {
  to { --angle: 360deg; }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

@keyframes attention {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); }
  80%, 100% { box-shadow: 0 0 0 16px rgba(var(--accent-rgb), 0); }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  15% { opacity: 0.35; }
  30% { opacity: 1; }
  45% { opacity: 0.6; }
  60% { opacity: 1; }
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- 15. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal:not(.is-visible) {
    opacity: 1;
  }
}
