/* ============================================================
   Vector 4 — Layout: reset, container, nav, footer
   ============================================================ */

/* ── Page loader ─────────────────────────────────────────── */
#v4-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
#v4-loader.v4-loader--out {
  opacity: 0;
  pointer-events: none;
}
#v4-loader-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Skip link (a11y) ────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -200%;
  left: var(--sp-4);
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-6);
  border-radius: var(--r-pill);
  z-index: 1000;
  transition: top var(--dur-fast);
}
.skip-link:focus { top: var(--sp-4); }

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Page wrapper (offsets fixed nav) ───────────────────── */
.page-wrapper { padding-top: var(--nav-h); }

/* ── Section ─────────────────────────────────────────────── */
.section { padding-block: var(--section-pad); }

/* ════════════════════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: height var(--dur-base) var(--ease);
}

/* frosted glass bg — fades in on scroll */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
  z-index: -1;
}
.site-header.scrolled::before { opacity: 1; }

.site-header.scrolled::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}

/* ── Nav inner ───────────────────────────────────────────── */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

/* ── Logo ─────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-logo:hover,
.nav-logo:focus-visible { opacity: 0.75; outline: none; }
.nav-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

/* ── Desktop links ───────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--sp-4), 3vw, var(--sp-10));
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  position: relative;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
  color: var(--text);
  outline: none;
}
.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after { width: 100%; }
.nav-link[aria-current="page"] { color: var(--accent); }
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

/* ── Hamburger ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease),
              opacity var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) 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(-7px) rotate(-45deg); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

/* ── Mobile drawer ───────────────────────────────────────── */
.nav-drawer {
  position: fixed;
  inset-block-start: var(--nav-h);
  inset-inline: 0;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--gutter) var(--sp-6);
  z-index: 99;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer .nav-link {
  font-size: var(--fs-sm);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.nav-drawer .nav-link:last-child { border-bottom: none; }

/* ── Breakpoint ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.site-footer {
  padding-block: var(--sp-16) var(--sp-12);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0;
}

.footer-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.footer-address {
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.9;
}
.footer-address a {
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
.footer-address a:hover { color: var(--text); }
.footer-address a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
.footer-social + .footer-social {
  margin-top: var(--sp-4);
}
.footer-social:hover,
.footer-social:focus-visible { color: var(--text); }
.footer-social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.footer-social strong {
  font-weight: 600;
  color: var(--text);
}
.footer-social__platform {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-social__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.footer-social__handle {
  padding-left: 20px;
}

.footer-col--right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--dur-fast) var(--ease);
}
.footer-logo img {
  height: 24px;
  width: auto;
  display: block;
}
.footer-logo:hover,
.footer-logo:focus-visible { opacity: 0.75; }
.footer-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

.footer-copy {
  font-size: var(--fs-label);
  color: var(--text-muted);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .footer-col--right {
    align-items: flex-start;
    text-align: left;
  }
}
