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

:root {
  --bg-dark: #0b0e14;
  --bg-panel: #10141d;
  --text-on-dark: #f0ede8;
  --text-dim: #9aa3b2;
  --accent: #e8a33d;
  --accent-soft: rgba(232, 163, 61, 0.14);
  --cool: #6ea8dc;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: auto; }
body {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--accent); color: var(--bg-dark);
  padding: 12px 20px; border-radius: 8px; text-decoration: none;
  font-family: var(--font-display); font-size: 0.9rem;
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 12px; }
a:focus-visible, .cta-button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; transition: opacity 0.6s ease, visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-brand {
  font-family: var(--font-display); font-size: 5rem; font-weight: 700;
  color: var(--accent); letter-spacing: -0.04em;
}
.loader-brand img { height: 96px; width: auto; display: block; }
.loader-track { width: 220px; height: 2px; background: rgba(255,255,255,0.12); }
#loader-bar { width: 0%; height: 100%; background: var(--accent); transition: width 0.2s ease; }
#loader-percent { font-size: 0.8rem; color: var(--text-dim); letter-spacing: 0.2em; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(4vw, env(safe-area-inset-left)) 14px max(4vw, env(safe-area-inset-right));
  margin: 0 auto; max-width: 100%;
  will-change: max-width, border-radius, background-color;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--text-on-dark); text-decoration: none; letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 12px;
}
.logo-icon { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 14px; align-items: center; }
.nav-links a {
  color: #c3cad6; text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.06em; transition: color 0.25s;
  padding: 12px 8px; /* ≥44px tap target */
}
.nav-links a:hover { color: var(--text-on-dark); }
.nav-lang { border: 1px solid rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; }

/* ---------- Hero ---------- */
.hero-standalone {
  position: relative; height: 100vh; z-index: 10;
  background: var(--bg-dark);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 5vw;
}
.hero-label { margin-bottom: 2rem; }
.hero-heading {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.2rem, 8.6vw, 8.6rem);
  line-height: 0.92; letter-spacing: -0.04em;
  display: flex; flex-wrap: wrap; column-gap: 2.5vw;
  max-width: 95vw;
}
.hero-word { display: inline-block; }
.hero-word.accent { color: var(--accent); }
.hero-tagline {
  margin-top: 2.5rem; max-width: 520px;
  color: var(--text-dim); font-size: 1.1rem; line-height: 1.7;
}
.scroll-indicator {
  position: absolute; bottom: 40px; left: 5vw;
  display: flex; align-items: center; gap: 14px;
  color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase;
}
.scroll-arrow { animation: bob 1.6s ease-in-out infinite; color: var(--accent); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Canvas ---------- */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 1;
  clip-path: circle(0% at 50% 60%);
}
#canvas { width: 100vw; height: 100vh; display: block; }

/* ---------- Dark overlay ---------- */
#dark-overlay {
  position: fixed; inset: 0; z-index: 4;
  background: #05070b; opacity: 0; pointer-events: none;
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  position: fixed; top: 50%; left: 0; z-index: 2;
  width: 100%; overflow: hidden; pointer-events: none;
  transform: translateY(-50%);
  opacity: 0;
}
.marquee-text {
  font-family: var(--font-display); font-weight: 700;
  font-size: 13vw; letter-spacing: -0.03em; white-space: nowrap;
  color: rgba(240, 237, 232, 0.05);
}

/* ---------- Scroll container & sections ---------- */
#scroll-container { position: relative; height: 1100vh; z-index: 5; }

.scroll-section {
  position: absolute; left: 0; right: 0;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.scroll-section .section-inner { pointer-events: auto; }

.align-left { padding-left: 5vw; padding-right: 55vw; }
.align-right { padding-left: 55vw; padding-right: 5vw; }
.align-left .section-inner, .align-right .section-inner { max-width: 40vw; }

.section-label {
  display: block; font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
}
.section-heading {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 4.5vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1.4rem;
}
.section-body { color: #c9d0db; font-size: 1.05rem; line-height: 1.75; }

/* readability over live video frames */
.section-content .section-inner {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 6px 28px rgba(0, 0, 0, 0.55);
}
.section-note {
  margin-top: 1.2rem; font-size: 0.85rem; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- Service lists ---------- */
.service-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 0.4rem; }
.service-item h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.15rem;
  color: var(--accent); margin-bottom: 0.35rem; letter-spacing: 0.01em;
}
.service-item p { color: #c9d0db; font-size: 0.98rem; line-height: 1.65; }

/* ---------- Department grid ---------- */
.section-grid { z-index: 6; align-items: center; padding: 0 6vw; }
.grid-head { width: 100%; text-align: center; margin-bottom: 3rem; }
.grid-head .section-label { margin-bottom: 0; font-size: 0.85rem; }
.dept-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; width: 100%; max-width: 1240px; margin: 0 auto;
}
.dept-card {
  border: 1px solid rgba(240, 237, 232, 0.1);
  background: rgba(16, 20, 29, 0.72);
  border-radius: 14px; padding: 20px 22px;
  transition: border-color 0.25s;
}
.dept-card:hover { border-color: rgba(232, 163, 61, 0.55); }
.dept-card h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem;
  color: var(--text-on-dark); margin-bottom: 0.4rem;
}
.dept-card p { color: var(--text-dim); font-size: 0.82rem; line-height: 1.5; }

/* ---------- Stats ---------- */
.section-stats { z-index: 6; align-items: center; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 5vw; padding: 0 8vw; width: 100%;
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 5rem); color: var(--text-on-dark);
  letter-spacing: -0.03em;
}
.stat-suffix {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem); color: var(--accent);
}
.stat-label {
  display: block; margin-top: 0.7rem; color: var(--text-dim);
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
}

/* ---------- CTA ---------- */
.cta-button {
  display: inline-block; margin-top: 2rem;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  color: var(--bg-dark); background: var(--accent);
  padding: 16px 38px; border-radius: 40px; text-decoration: none;
  letter-spacing: 0.04em; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(232,163,61,0.3); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 6;
  background: #05070b;
  border-top: 1px solid rgba(240, 237, 232, 0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 26px max(5vw, env(safe-area-inset-left))
           calc(26px + env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-right));
  color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.03em;
}
.footer-note { color: var(--text-dim); }
.footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
.footer-heart { color: var(--accent); }
.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;
}

/* ---------- Reduced motion: static flowing page ---------- */
body.reduced #scroll-container { height: auto; }
body.reduced .scroll-section {
  position: static !important; transform: none !important;
  visibility: visible !important; min-height: 0;
  padding-top: 10vh; padding-bottom: 10vh;
}
body.reduced .canvas-wrap {
  position: relative; height: 70vh; clip-path: none !important;
}
body.reduced #canvas { height: 70vh; }
body.reduced .marquee-wrap, body.reduced #dark-overlay { display: none; }
body.reduced .scroll-arrow { animation: none; }
body.reduced .section-stats { background: #05070b; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  #scroll-container { height: 550vh; }
  .align-left, .align-right { padding: 0 7vw; }
  .align-left .section-inner, .align-right .section-inner {
    max-width: 100%;
    background: rgba(11, 14, 20, 0.82);
    padding: 24px; border-radius: 12px;
  }
  .hero-heading { font-size: clamp(3rem, 16vw, 6rem); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8vw 4vw; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats-grid { padding: 0 4vw; }
  .dept-card { padding: 14px 16px; }
  .section-grid { padding: 0 5vw; }
  .nav-links a:not(.nav-lang) { display: none; }
}

@media (max-height: 500px) {
  .hero-heading { font-size: clamp(1.8rem, 13vh, 3.4rem); }
  .hero-label { margin-bottom: 0.8rem; }
  .hero-tagline { margin-top: 1rem; font-size: 0.95rem; max-width: 60vw; }
  .scroll-indicator { display: none; }
}

@media (max-width: 480px) {
  .section-heading { font-size: 2.05rem; overflow-wrap: break-word; }
}

@media (max-width: 400px) {
  .stat-number { font-size: 2.1rem; }
  .stat-suffix { font-size: 1.3rem; }
  .stats-grid { gap: 6vw 3vw; padding: 0 3vw; }
}

/* ---------- Footer legal links ---------- */
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--dim2, #9aa3b2); text-decoration: none; }
.footer-links a:hover { color: var(--text, #f0ede8); }
