/* =========================================
   WARPQUBIT SOFTWARE — Global Styles
   Palette: Black, White, Grid Aesthetic
   ========================================= */

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:     #000000;
  --black-1:   #0a0a0a;
  --black-2:   #111111;
  --black-3:   #1a1a1a;
  --border:    #2a2a2a;
  --border-lt: #3a3a3a;
  --white:     #ffffff;
  --white-70:  rgba(255,255,255,0.7);
  --white-40:  rgba(255,255,255,0.4);
  --white-10:  rgba(255,255,255,0.06);
  --accent:    #ffffff;
  --grid-col:  rgba(255,255,255,0.04);
  --radius:    4px;
  --radius-md: 8px;

  /* Narrative-stage ink tokens (redefined locally by .on-light sections) */
  --ink:        var(--white);
  --ink-70:     var(--white-70);
  --ink-40:     var(--white-40);
  --ink-border: var(--border);
  --ink-border-lt: var(--border-lt);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--black);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* ── Grid Background ──────────────────────
   mix-blend-mode: difference makes the grid self-adjust its visible
   contrast against whatever section color sits behind it, so the same
   overlay reads correctly from the black hero through to the light
   closing section without per-stage overrides. */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: difference;
  background-image:
    linear-gradient(rgba(148,148,148,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,148,148,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Navigation ──────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  filter: invert(0);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-text span:first-child {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-logo-text span:last-child {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--white-40);
  text-transform: uppercase;
}

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

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-70);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--white);
  color: var(--black);
}

/* ── Layout ──────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

.container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  z-index: 1;
}

/* ── Typography ──────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: 16px;
}

h1, h2, h3, h4 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.01em; }
h3 { font-size: clamp(18px, 2.5vw, 24px); }

p { color: var(--ink-70); line-height: 1.75; }

/* ── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--white);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary svg { transition: transform 0.25s cubic-bezier(.4,0,.2,1); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border-lt);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: var(--white);
  background: var(--white-10);
}

/* ── Cards ───────────────────────────────── */
.card {
  background: var(--black-1);
  border: 1px solid var(--border);
  padding: 36px;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: var(--border-lt);
  transform: translateY(-3px);
}

/* ── Dividers ────────────────────────────── */
.divider {
  width: 40px;
  height: 1px;
  background: var(--ink-40);
  margin: 20px 0;
}

/* ── Section Spacing ─────────────────────── */
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 80px 0; }

/* ── Tag ─────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border-lt);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-40);
}

/* ── Footer ──────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--white-40);
  margin-top: 16px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-lt);
  color: var(--white-70);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.footer-social a svg {
  width: 16px;
  height: 16px;
}

.footer-social a:hover {
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-social a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white-40);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--white-70);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--white-40);
}

/* ── Hamburger (mobile) ───────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: 0.3s;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; z-index: 101; position: relative; }
  .container, .container-sm, .footer-inner { padding: 0 24px; }
  .section-pad { padding: 80px 0; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Functional mobile menu: nav wraps to a stacked panel on open. */
  nav.is-open { height: auto; }
  nav.is-open .nav-inner { flex-wrap: wrap; align-items: center; padding-bottom: 20px; }
  nav.is-open .nav-logo { order: 1; }
  nav.is-open .hamburger { order: 2; }
  nav.is-open .nav-links {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-basis: 100%;
    margin-top: 16px;
  }
  nav.is-open .nav-links a {
    display: block;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  nav.is-open .nav-links a::after { display: none; }
  nav.is-open .nav-cta {
    order: 4;
    display: inline-flex;
    flex-basis: 100%;
    justify-content: center;
    margin-top: 16px;
  }

  .hamburger span { transition: transform 0.25s ease, opacity 0.2s ease; }
  .hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ── Accessibility: focus ─────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── Scroll reveal (Emil-Kowalski-style: purposeful, not decorative) ──
   Elements fade + rise into place once, on first intersection. Disabled
   entirely under reduced-motion, where content is simply visible. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.16,.8,.24,1), transform 0.7s cubic-bezier(.16,.8,.24,1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Technical corner marker (hero visual language extended) ───────
   A small crosshair/annotation motif echoing the isometric office
   scene's schematic feel, used sparingly at a couple of section seams. */
.scene-mark {
  position: absolute;
  top: 0;
  left: 40px;
  width: 9px;
  height: 9px;
  pointer-events: none;
  opacity: 0.5;
}
.scene-mark::before,
.scene-mark::after {
  content: '';
  position: absolute;
  background: var(--ink-40);
}
.scene-mark::before { top: 4px; left: 0; width: 9px; height: 1px; }
.scene-mark::after { top: 0; left: 4px; width: 1px; height: 9px; }
