/* ============================================================
   Dynalektric — Editorial Industrial Design System
   ============================================================ */

:root {
  /* Clean blue-grey base — Power | Motion | Safety */
  --bg: #F5F7FA;
  --bg-alt: #EAEFF5;
  --bg-card: #FFFFFF;
  --ink: #002A52;
  --ink-soft: #334155;
  --ink-muted: #64748B;
  --rule: #E2E8F0;
  --rule-soft: #EEF2F7;

  /* Deep navy for premium dark panels */
  --panel-dark: #003366;
  --on-dark: #F5F7FA;
  --line-soft: #7DD3FC;

  /* Primary = ocean blue, Secondary = deep navy */
  --accent: #0077B6;
  --accent-hover: #005F92;
  --accent-soft: #D7EEF8;
  --accent-2: #003366;
  --accent-2-soft: #D6E1EE;

  /* Brand accents */
  --brand-bright: #00AEEF;
  --brand-light: #7DD3FC;

  /* Red accent — used sparingly for section numbers, eyebrows, dividers, active states */
  --red: #C1121F;
  --red-soft: rgba(193, 18, 31, 0.08);

  /* Typography — Montserrat only, single family across the site */
  --font-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  /* Density */
  --section-y: 50px;
  --container-max: 1720px;
  --gutter: 72px;

  /* Effects */
  --radius: 2px;
  --radius-card: 4px;
  --shadow-card: 0 1px 2px rgba(14,17,22,0.04), 0 8px 24px rgba(14,17,22,0.04);
  --shadow-card-hover: 0 1px 2px rgba(14,17,22,0.05), 0 16px 40px rgba(14,17,22,0.08);
}

@media (min-width: 1600px) {
  :root { --gutter: 88px; }
}

@media (max-width: 1200px) {
  :root { --gutter: 48px; }
}

@media (max-width: 1024px) {
  :root { --section-y: 78px; --gutter: 40px; }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; --section-y: 56px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
}

[data-density="compact"] {
  --section-y: 80px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background textures */
body[data-texture="grid"]::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(14,17,22,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,17,22,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}
body[data-texture="dots"]::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(14,17,22,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* App root sits above texture */
#app { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.375rem, 4.8vw, 3.875rem); line-height: 1.04; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: clamp(1.6875rem, 3.3vw, 2.625rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 600; }
h3 { font-size: clamp(1.375rem, 2.1vw, 1.6875rem); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
h4 { font-size: clamp(1.1875rem, 1.7vw, 1.3125rem); line-height: 1.3; letter-spacing: -0.005em; font-weight: 600; }

p { color: var(--ink-soft); text-wrap: pretty; font-size: clamp(1rem, 1.1vw, 1.0625rem); line-height: 1.65; }
.lead { font-size: clamp(1.125rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--ink-soft); max-width: 60ch; font-weight: 400; }

/* Mono utilities */
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
.mono-num { font-family: var(--font-mono); font-feature-settings: 'tnum'; }

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-y) 0; }
.section-tight { padding: calc(var(--section-y) * 0.6) 0; }

.rule { height: 1px; background: var(--rule); border: 0; }
.rule-soft { height: 1px; background: var(--rule-soft); border: 0; }

/* Section header pattern */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gutter);
  align-items: end;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 64px;
}
.section-head .eyebrow { display: flex; align-items: center; gap: 12px; }
.section-head .eyebrow .num { font-family: var(--font-mono); font-size: 13px; color: var(--red); font-weight: 600; }
.section-head .eyebrow .label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2,.8,.2,1);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-cta .btn {
  padding: 8px 16px;
  font-size: 14px;
  gap: 8px;
}
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary .arrow { transition: transform 200ms; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn-ghost:hover { color: var(--red); border-color: var(--red); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,247,250,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  /* Fluid gutter: shrinks at laptop widths to give nav room, independent of --gutter */
  padding: 14px clamp(24px, 2.5vw, 48px);
  max-width: 1800px;
  margin: 0 auto;
}
.topbar-logo { display: flex; align-items: center; flex: 0 0 auto; }
.topbar-logo img { width: 100%; height: auto; max-height: 44px; display: block; object-fit: contain; object-position: left center; }
.topbar-nav {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.nav-link {
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink-muted);
  padding: 6px 5px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 150ms;
  position: relative;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 5px; right: 5px; bottom: 0;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
}
.topbar-cta {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-left: 30px;
}
.topbar-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

@media (min-width: 1440px) {
  .topbar-logo { width: 315px; }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .topbar-logo { width: 220px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .topbar-logo { width: 148px; }
}
@media (min-width: 375px) and (max-width: 767px) {
  .topbar-logo { width: 164px; }
}
@media (max-width: 374px) {
  .topbar-logo { width: 148px; }
}
@media (max-width: 1080px) {
  .topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .topbar-nav { display: none; }
  .topbar-meta { display: none; }
}
@media (max-width: 560px) {
  .topbar-cta .btn { display: none; }
}

/* Mobile menu button */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
}
@media (max-width: 1080px) {
  .menu-btn { display: block; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  padding: 80px var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-drawer .nav-link { font-size: 28px; padding: 16px 0; text-align: left; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
.mobile-drawer .close-btn {
  position: absolute;
  top: 18px; right: var(--gutter);
}

/* Footer */
.footer {
  background: #1c2638;
  color: var(--on-dark);
  padding: 72px 0 32px;
  margin-top: var(--section-y);
  position: relative;
}
/* Layered top edge: 3px visible gray stripe, then 3px red accent — flush with footer top */
.footer::before,
.footer::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
}
.footer::before {
  top: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.60);
}
.footer::after {
  top: 3px;
  height: 3px;
  background: var(--red);
}
.footer h4 { color: var(--on-dark); font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; opacity: 0.8; margin-bottom: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(193,18,31,0.3); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(244,244,241,0.7); text-decoration: none; font-size: 14px; transition: color 150ms; cursor: pointer; }
.footer-col a:hover { color: var(--red); }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: rgba(244,244,241,0.5); border-top: 1px solid rgba(193,18,31,0.25); }
.footer-bottom span { text-transform: uppercase; }
.footer-brand { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; margin-bottom: 16px; }
.footer-logo { width: 156px; height: auto; display: block; margin-bottom: 20px; }
.footer-tag { color: rgba(244,244,241,0.7); font-size: 14px; max-width: 36ch; line-height: 1.6; }

.footer-duns-seal {
  grid-column: 3 / 5;
  grid-row: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 97px;
  margin-top: 16px;
}

.footer-duns-seal iframe {
  display: block;
  width: 114px;
  height: 97px;
  border: 0;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  /* Keep both divider lines visible on all screen sizes */
  .footer::before { display: block; height: 3px; top: 0; }
  .footer::after { top: 3px; height: 3px; }
  .footer-duns-seal { grid-column: 1 / 3; grid-row: auto; }
}
.contact-map{
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--rule);
    background: var(--bg-alt);
}

.contact-map iframe{
    display: block;
    width: 100%;
    height: 350px;
}

/* Card primitive */
.card {
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-card);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), box-shadow 300ms, border-color 300ms;
}
.card:hover {
  border-color: var(--rule);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Image slot defaults */
image-slot {
  --slot-bg: var(--bg-alt);
  --slot-border: var(--rule);
  --slot-fg: var(--ink-muted);
  background: var(--bg-alt);
}

/* Striped placeholder for non-image slots */
.placeholder-stripe {
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-alt),
    var(--bg-alt) 8px,
    transparent 8px,
    transparent 16px
  ), var(--bg-card);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Page transition */
.page-enter { animation: pageIn 400ms cubic-bezier(.2,.8,.2,1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tweaks panel positioning override */
.tweaks-panel { z-index: 200 !important; }

/* Form elements */
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms;
  width: 100%;
  resize: vertical;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-bottom-color: var(--accent);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--ink-muted); }

/* Big number display */
.big-num {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 350;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--red);
}

/* Accent dot */
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Engineering visual — abstract */
.eng-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.1;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  overflow: hidden;
}