:root {
  --bg: #05080d;
  --surface: #0a1019;
  --line: rgba(120, 220, 255, .14);
  --ink: #e8f1f7;
  --muted: #8a9bab;
  --accent: #3ee0ff;
  --accent-2: #b8ff5a;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
:where(a, video, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 12px 16px; background: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* Background and navigation */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.scanline { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 4vw, 48px); background: rgba(5, 8, 13, .96); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; min-height: 44px; }
.logo img { display: block; width: clamp(130px, 22vw, 218px); height: auto; }
.nav nav { display: flex; gap: clamp(12px, 3vw, 28px); align-items: center; font-size: .9rem; color: var(--muted); }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; }
.nav nav a:hover { color: var(--ink); }

/* Hero and sections */
.hero {
  min-height: 83vh; min-height: 83svh; max-width: var(--max); margin: 0 auto;
  padding: 110px var(--gutter) 60px;
  display: flex; flex-direction: column; justify-content: center;
}
.tag { color: var(--accent); margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; flex: none; background: var(--accent-2); border-radius: 50%; box-shadow: 0 0 12px var(--accent-2); }
h1 { font-size: clamp(2.65rem, 8vw, 6.4rem); line-height: 1; font-weight: 700; letter-spacing: -.04em; }
h1 .accent { display: block; color: var(--accent); text-shadow: 0 0 40px rgba(62,224,255,.22); }
.lead { max-width: 610px; margin-top: 28px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.23rem); }
.cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; min-height: 44px;
  background: var(--accent); color: #001018; font-weight: 700;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn:hover { background: var(--ink); }
.btn:focus-visible { box-shadow: inset 0 0 0 3px var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover, .btn.ghost:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.section { max-width: var(--max); margin: 0 auto; padding: clamp(38px, 7vw, 92px) var(--gutter); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.section-note { margin-left: auto; color: var(--muted); white-space: nowrap; }
.idx { color: var(--accent); }
h2 { font-size: clamp(1.55rem, 4vw, 2.8rem); letter-spacing: -.02em; }
h3 { font-size: 1.6rem; margin-bottom: 12px; letter-spacing: -.01em; line-height: 1.2; }

/* Showreel */
.video-frame { position: relative; padding: clamp(5px, 1.25vw, 14px); }
.corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--accent); pointer-events: none; }
.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reel-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line); }
.reel-description { margin-top: 8px; color: var(--muted); max-width: 68ch; }
.reel-description summary { min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--ink); }
.reel-description p { padding-bottom: 12px; }

/* Project case studies */
.product { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(22px, 5vw, 72px); align-items: center; }
.product + .product { margin-top: clamp(48px, 8vw, 110px); }
.product.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.product.flip .product-media { order: 2; }
.product-media { perspective: 900px; }
.product-media img { display: block; width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); transition: transform .15s ease-out; }
.kicker { color: var(--accent); margin-bottom: 12px; }
.product-body p:not(.kicker) { color: var(--muted); }
.spec { margin-top: 26px; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .72rem; }
.spec dt { color: var(--muted); }

/* Contact */
.contact .sec-head { margin-bottom: 16px; }
.contact-email { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; overflow-wrap: anywhere; }
.contact .cta { margin-top: 12px; }

footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter);
  border-top: 1px solid var(--line); color: var(--muted);
}

@media (max-width: 800px) {
  .product, .product.flip { grid-template-columns: minmax(0, 1fr); }
  .product.flip .product-media { order: 0; }
}
@media (max-width: 360px) {
  .logo img { width: 110px; }
  .nav nav { gap: 8px; font-size: .8rem; }
  .sec-head { column-gap: 10px; }
  .section-note { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-media img { transition: none; }
}
