/* ============================================================
   Sverit — Public Site Styles
   ============================================================ */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  /* Colors — sourced directly from Figma "Desktop - 2" */
  --color-bg:        #0b121b;   /* page background */
  --color-surface:   #111c28;   /* cards, elevated surfaces */
  --color-glass:     rgba(234, 233, 223, 0.10); /* frosted glass fills */
  --color-glass-border: rgba(234, 233, 223, 0.18);
  --color-border:    rgba(234, 233, 223, 0.12);
  --color-text:      #eae9df;   /* primary text — warm off-white */
  --color-muted:     rgba(234, 233, 223, 0.65);
  --color-accent:    #94b3ff;   /* periwinkle accent */

  /* Typography */
  --font-display: 'BentonSans Medium', 'Inter', system-ui, sans-serif;
  --font-body:    'BentonSans Regular', 'Inter', system-ui, sans-serif;
  --font-label:   'TWK Everett', 'Inter', system-ui, sans-serif;
  --font-size-base: 1rem;
  --line-height: 1.65;

  /* Layout */
  --max-width:  1440px;
  --content-width: 1286px;  /* inner content strip from Figma */
  --nav-height: 80px;       /* space above fixed nav */
  --section-px: clamp(1.5rem, 5vw, 4rem);
  --section-py: clamp(4rem, 8vw, 7rem);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ── Base ─────────────────────────────────────────────────── */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; }

/* ── Page wrapper ────────────────────────────────────────── */
/* No padding-top — hero fills 100vh behind absolute nav */
.site-main {
  width: 100%;
  overflow-x: hidden;
}

/* ── Container — centered content column ──────────────────── */
/* Matches Figma's 1286px content strip, centred within 1440px canvas */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-px);
  padding-block: var(--section-py);
}

/* Flush variant — no vertical padding */
.container--flush {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

/* ── Typography ───────────────────────────────────────────── */
/* Bracket-style label: [ Technology at a glance ] */
.section-label {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.875rem;
  color: var(--color-text);
  opacity: 0.7;
  margin-bottom: 1.25rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 4.5vw, 3.9375rem); } /* Figma: 63px */
h2 { font-size: clamp(1.5rem, 2.5vw, 1.875rem); margin-bottom: 1.25rem; } /* Figma: 30px */
h3 { font-size: 1.0625rem; } /* Figma: 17px */

body, p, li { font-family: var(--font-body); }
p { color: var(--color-muted); }

/* ── Nav — floating centered pill (Figma: 678px × 60px) ──── */
.site-header {
  position: absolute;        /* sits over hero, not pushing content down */
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 1.3rem 2rem;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: min(678px, 100%);
  height: 60px;
  padding: 0 1.75rem;
  border-radius: 7px;
  background: var(--color-glass);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  box-shadow: 4px 4px 4px 3px rgba(0, 0, 0, 0.05);
  border: 0.5px solid var(--color-glass-border);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}
.nav-logo img { height: 36px; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.nav-link:hover,
.nav-link.active { opacity: 1; }

/* "Contact us" pill button inside nav */
.nav-cta {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 7px;
  background: linear-gradient(135deg, #0b121b, #0b121b);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  border: 0.5px solid var(--color-glass-border);
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.75; }

/* ── Hero ─────────────────────────────────────────────────── */
.section-hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg,
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Conic vignette overlay matching Figma mix-blend-multiply */
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, #0b121b 100%);
  mix-blend-mode: multiply;
  opacity: 0.85;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.2;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.9375rem); /* Figma: 63px */
  line-height: 1.1;
  color: var(--color-text);
  max-width: 16ch;
  margin: 0;
}

/* Glass CTA button — "Get in touch ↗" */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 7px;
  background: var(--color-glass);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  border: 0.5px solid var(--color-glass-border);
  box-shadow: 4px 4px 4px 3px rgba(0, 0, 0, 0.05);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-glass:hover { background: rgba(234, 233, 223, 0.18); }

.btn-glass .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  background: #0b121b;
  font-size: 0.9rem;
}

/* ── Stats strip — 5 glass boxes across full hero width ───── */
.section-stats {
  position: relative;
  background: transparent;  /* falls at hero bottom — no bg of its own */
  margin-top: -5.5rem;      /* overlap bottom of hero */
  z-index: 10;
}

.stats-inner {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.stat-item {
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 7px;
  background: var(--color-glass);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  border: 0.5px solid var(--color-glass-border);
  box-shadow: 4px 4px 4px 3px rgba(0, 0, 0, 0.05);
}

.stat-value {
  display: block;
  font-family: var(--font-body);
  font-size: 3.125rem; /* Figma: 50px */
  line-height: 1;
  color: var(--color-text);
  margin-bottom: 0.9rem;
}

.stat-label {
  display: block;
  font-family: var(--font-label);
  font-size: 1rem;
  color: var(--color-text);
  opacity: 0.8;
  text-transform: uppercase;
}

/* ── Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s;
}
.btn-primary {
  background: rgba(234, 233, 223, 0.1);
  color: var(--color-text);
  border-color: var(--color-glass-border);
}
.btn-primary:hover { opacity: 0.75; }
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-glass-border);
}
.btn-outline:hover { opacity: 0.75; }

/* ── Engineering / About section ─────────────────────────── */
.section-engineering { padding-block: var(--section-py); }
.engineering-grid {
  display: grid;
  grid-template-columns: 1fr 36rem;
  gap: 5rem;
  align-items: start;
}
@media (max-width: 900px) { .engineering-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ── Proven at Scale ──────────────────────────────────────── */
.section-proven { padding-block: var(--section-py); }
.proven-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.proven-col h3 { margin-bottom: 0.75rem; }
.proven-link {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  opacity: 0.7;
}
.proven-link:hover { opacity: 1; }
@media (max-width: 900px) { .proven-columns { grid-template-columns: 1fr; } }

/* ── Projects ─────────────────────────────────────────────── */
.section-projects { padding-block: var(--section-py); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 1100px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--color-surface);
  border: 0.2px solid var(--color-glass-border);
  border-radius: 5px;
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(12px);
}
.project-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.project-year {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--color-muted);
}
.project-sector {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--color-muted);
  opacity: 0.7;
}
.project-city {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
}
.project-capacity-val {
  font-family: var(--font-label);
  font-size: 1.125rem;
  color: var(--color-text);
  margin-top: auto;
  padding-top: 1rem;
}

/* ── Section glowing divider line (Figma: Vector9) ────── */
.section-divider {
  height: 1px;
  max-width: var(--content-width);
  margin-inline: auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 179, 255, 0.25) 30%,
    rgba(234, 233, 223, 0.18) 50%,
    rgba(148, 179, 255, 0.25) 70%,
    transparent 100%
  );
}

/* ── Glowing ellipse orb (Figma: Glowing Elipse — mix-blend: color-dodge) ── */
/* Anchored at the BOTTOM of the zero-height element — glow radiates upward only */
.glow-blob {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 5;
}
.glow-blob::before {
  content: '';
  position: absolute;
  bottom: 0;                    /* anchor bottom edge at the element's position */
  left: 50%;
  transform: translateX(-50%);  /* horizontal centre only — no vertical shift */
  width: min(1400px, 100vw);
  height: 415px;
  background: radial-gradient(
    ellipse at 50% 100%,         /* origin at bottom-centre → light goes upward */
    rgba(148, 179, 255, 0.13) 0%,
    rgba(0,    40, 103, 0.06) 42%,
    transparent                  70%
  );
  mix-blend-mode: color-dodge;
  filter: blur(55px);
}

/* ── Contact ─────────────────────────────────────────────── */
.section-contact { padding-block: var(--section-py); }
.contact-inner {
  max-width: 560px;          /* matches Figma glass box width ~537px */
  margin-inline: auto;
  padding-inline: var(--section-px);
}
.contact-intro {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
  margin-top: 0.75rem;
  margin-bottom: 2.5rem;
}
.contact-box {
  max-width: 537px;
  margin-inline: auto;
  background: var(--color-surface);
  border: 0.2px solid var(--color-glass-border);
  border-radius: 38px;
  backdrop-filter: blur(50px);
  padding: 2.5rem 3rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-form input,
.contact-form textarea {
  background: linear-gradient(
    180deg,
    rgba(234, 233, 223, 0.02) 0%,
    rgba(0, 40, 103,   0.02) 35%,
    rgba(148, 179, 255, 0.02) 70%,
    rgba(255, 248, 248, 0.02) 100%
  );
  box-shadow: inset 0 0 0 50px #0b121b;  /* dark fill — mirrors Figma inset shadow */
  border: 0.2px solid var(--color-glass-border);
  border-radius: 10px;
  color: var(--color-text);
  padding: 0 1.25rem;
  height: 60px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  width: 100%;
  -webkit-appearance: none;
}
.contact-form textarea {
  height: 110px;
  padding: 1rem 1.25rem;
  resize: none;
  box-shadow: inset 0 0 0 80px #0b121b;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--color-muted); opacity: 0.5; font-size: 0.875rem; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(234, 233, 223, 0.4);
}
.contact-form button {
  margin-top: 0.25rem;
  height: 55px;
  border-radius: 10px;
  background: transparent;
  border: 0.2px solid var(--color-glass-border);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.contact-form button:hover { background: rgba(234, 233, 223, 0.06); }
.form-feedback { font-family: var(--font-label); font-size: 0.85rem; min-height: 1.2em; color: var(--color-muted); margin-top: 0.25rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  padding-block: 0 3rem;
}
.footer-inner {
  max-width: calc(var(--content-width) + 2 * var(--section-px));
  margin-inline: auto;
  padding: 1.75rem 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  background: var(--color-surface);
  border: 0.01px solid var(--color-glass-border);
  border-radius: 10px;
  backdrop-filter: blur(50px);
}
.footer-logo img { height: 46px; width: auto; opacity: 0.9; }
.footer-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-left: auto;
}
.footer-nav a {
  font-family: var(--font-body);
  color: var(--color-text);
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.footer-nav a:hover { opacity: 1; }
.footer-cta a {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  opacity: 1;
}

/* ── Engineering section ──────────────────────────────────── */
.section-engineering { background: var(--color-bg); }

.engineering-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.engineering-text h2 { margin-bottom: 1rem; }
.engineering-text h3 { margin-top: 2rem; margin-bottom: 0.75rem; }

/* "International Consortium ↗" — inline arrow badge */
.eng-h3 { display: flex; align-items: center; gap: 0.6rem; }
.eng-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  background: var(--color-glass);
  border: 0.5px solid var(--color-glass-border);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.eng-intro,
.eng-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
}
.eng-body { margin-top: 0.75rem; }

/* World map panel */
.map-panel {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  border: 0.2px solid var(--color-glass-border);
  aspect-ratio: 516 / 435;    /* exact Figma dimensions */
  background: var(--color-surface);
}

.map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.5;
  mix-blend-mode: color-dodge;
}

/* Placeholder when no map image uploaded yet */
.map-panel--empty .map-img { display: none; }
.map-panel--empty::after {
  content: 'Map';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .engineering-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .map-panel { aspect-ratio: 16 / 9; }
}

/* ── Proven at Scale ──────────────────────────────────────── */
.section-proven { background: var(--color-bg); }

.proven-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.proven-col h3 { margin-bottom: 0.75rem; }
.proven-col p  { font-size: 1rem; line-height: 1.65; }

.proven-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.proven-link:hover { opacity: 1; }

/* Project photos strip — 3 equal rounded images */
.proven-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.proven-photo {
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 384 / 281;   /* Figma photo ratio */
}

.proven-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.proven-photo-placeholder {
  width: 100%; height: 100%;
  background: var(--color-surface);
  border: 0.5px solid var(--color-glass-border);
  border-radius: 7px;
}

@media (max-width: 900px) {
  .proven-columns { grid-template-columns: 1fr; gap: 2rem; }
  .proven-photos  { grid-template-columns: 1fr; }
}

/* Nav — scrolled state (JS adds .scrolled) */
.site-header.scrolled .nav-pill {
  background: rgba(11, 18, 27, 0.85);
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

/* ── Hamburger button — hidden on desktop, shown on mobile ───── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }

  /* Hide links, show hamburger */
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
  transform-origin: center;
}
/* X state */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile nav drawer ────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    position: fixed;   /* stays visible while drawer is open */
    padding: 1rem;
  }
  .nav-pill {
    width: 100%;
    position: relative;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11, 18, 27, 0.97);
    border: 0.5px solid var(--color-glass-border);
    border-radius: 7px;
    backdrop-filter: blur(20px);
    padding: 0.5rem 0;
    z-index: 200;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links .nav-link,
  .nav-links .nav-cta {
    display: block;
    padding: 0.875rem 1.5rem;
    width: 100%;
    border-radius: 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
  }
  .nav-links .nav-link:hover,
  .nav-links .nav-cta:hover { background: rgba(234,233,223,0.06); }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — additional responsive tweaks
   ════════════════════════════════════════════════════════ */

/* Stats — centre lone 5th card across both columns */
@media (max-width: 768px) {
  .stat-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Stats — single column + less overlap on very small phones */
@media (max-width: 480px) {
  .section-stats { margin-top: -2.5rem; }
  .stats-inner   { grid-template-columns: 1fr; }
  /* reset span so 1-col grid isn't broken */
  .stat-item:last-child:nth-child(odd) { grid-column: auto; }
  .stat-value { font-size: 2.5rem; }
}

/* Footer — stack logo + nav vertically on small screens */
@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
  }
  .footer-nav {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
  }
}

/* Contact box — tighter padding on narrow screens */
@media (max-width: 520px) {
  .contact-box {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
}
