@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=JetBrains+Mono:wght@500&family=Unbounded:wght@600;700;800&display=swap');

:root {
  --aubergine: #120A1C;
  --violet: #221338;
  --lilac: #F1ECF6;
  --lime: #C2F04B;
  --cyan: #59D6E0;
  --muted: #9B8FAE;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --section-pad: clamp(5rem, 8vw, 8.75rem);
  --shadow-patch: 0 24px 64px rgba(18, 10, 28, 0.55);
  --cable-lime: #C2F04B;
  --cable-cyan: #59D6E0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { opacity: 0.85; }

.surface-aubergine { background: var(--aubergine); color: var(--lilac); }
.surface-lilac { background: var(--lilac); color: var(--aubergine); }
.surface-violet { background: var(--violet); color: var(--lilac); }
.surface-lime { background: var(--lime); color: var(--aubergine); }

/* Patch-cable grain overlay */
.patch-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* Patch-cable decorative rail */
.patch-rail {
  position: relative;
  padding-left: 1.5rem;
}
.patch-rail::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--lime), var(--cyan));
  border-radius: 2px;
}
.patch-rail::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.5rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 2px var(--aubergine);
}

.container { width: min(1180px, 92vw); margin: 0 auto; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}
.mono { font-family: var(--font-mono); font-weight: 500; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 1rem; }
h1 { font-weight: 800; font-size: clamp(2.75rem, 6vw, 5rem); }
h2 { font-weight: 700; font-size: clamp(1.85rem, 4vw, 2.85rem); }
h3 { font-weight: 700; font-size: 1.3rem; }
p { margin: 0 0 1.25rem; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}
.site-header.is-scrolled {
  background: var(--lilac);
  color: var(--aubergine);
  box-shadow: 0 1px 0 rgba(18, 10, 28, 0.08);
}
.site-header.is-scrolled .nav-link { color: var(--aubergine); }
.site-header.is-scrolled .logo { color: var(--aubergine); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4vw;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
}
.nav-list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link { text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: inherit;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 3px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn:hover { filter: brightness(1.06); box-shadow: var(--shadow-patch); transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: var(--aubergine); }
.btn-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* Hero — THE PATCH */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,10,28,0.5) 0%, rgba(18,10,28,0.68) 42%, rgba(18,10,28,0.94) 100%);
  z-index: 1;
}
.hero-cables {
  position: absolute;
  bottom: 22%;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
}
.hero-cables svg { width: 100%; height: 100%; }
.hero-glow {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(194,240,75,0.12) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}
.hero-topbar {
  position: relative;
  z-index: 4;
  padding: 6.5rem 4vw 0;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.hero-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(241,236,246,0.3);
}
.hero-badge {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(194,240,75,0.35);
  align-self: flex-end;
  max-width: 420px;
}
.patch-rail { color: var(--lime); font-size: 0.62rem; opacity: 0.9; }
.hero-topbar .accent { color: var(--cyan); }
.hero-content {
  position: relative;
  z-index: 4;
  padding: 3rem 4vw 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.hero-sub { max-width: 36rem; opacity: 0.9; font-size: 1.05rem; }
.hero-underline {
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  background-size: 0% 3px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 2px;
}
.js .hero-underline.is-drawn { animation: cableDraw 1.3s ease forwards; }
@keyframes cableDraw { to { background-size: 100% 3px; } }
.hero-trust {
  position: relative;
  z-index: 4;
  padding: 1rem 4vw 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  border-top: 1px solid rgba(155,143,174,0.35);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 8.5rem 0 3.5rem;
  position: relative;
}
.page-hero.compact { padding-bottom: 2rem; }
.page-hero img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: var(--shadow-patch);
  margin-top: 2rem;
}

/* Sections */
.section { padding: var(--section-pad) 0; position: relative; }
.section-header { margin-bottom: 3rem; max-width: 42rem; }
.hairline {
  height: 1px;
  background: linear-gradient(90deg, var(--lime), transparent);
  border: none;
  margin: 2rem 0;
}

/* Patch bay grid */
.patch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.patch-card {
  padding: 1.75rem;
  border: 1px solid rgba(194,240,75,0.22);
  position: relative;
  background: rgba(34,19,56,0.45);
}
.patch-card::before {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(89,214,224,0.5);
}
.patch-num {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.patch-label { font-size: 0.88rem; opacity: 0.85; }

/* Signal stages */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stage-card {
  padding: 1.75rem 1.5rem;
  background: rgba(34,19,56,0.55);
  border: 1px solid rgba(241,236,246,0.08);
  box-shadow: var(--shadow-patch);
  position: relative;
}
.stage-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  opacity: 0.4;
}
.stage-num { font-family: var(--font-mono); color: var(--cyan); font-size: 0.78rem; margin-bottom: 0.75rem; }

/* Module rail */
.module-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}
.module-card {
  padding: 2rem 1.75rem;
  background: var(--violet);
  border-left: 3px solid var(--lime);
  position: relative;
  box-shadow: var(--shadow-patch);
}
.module-serial {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 3.25rem;
  opacity: 0.05;
  line-height: 1;
}

/* Work cards */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.work-card { overflow: hidden; box-shadow: var(--shadow-patch); background: var(--violet); }
.work-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.work-card-body { padding: 1.75rem; }
.work-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(194,240,75,0.18); padding: 1.5rem 0; }
.faq-q { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; margin-bottom: 0.75rem; }

/* Forms */
.form-grid { display: grid; gap: 1.25rem; max-width: 36rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(18,10,28,0.18);
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 3px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-check { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.9rem; }
.form-check input { margin-top: 0.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Service blocks */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}
.service-block:nth-child(even) { direction: rtl; }
.service-block:nth-child(even) > * { direction: ltr; }
.service-block img { border-radius: 3px; box-shadow: var(--shadow-patch); }
.service-price { font-family: var(--font-mono); color: var(--lime); font-size: 0.88rem; margin-top: 1rem; }

/* Legal prose */
.legal-prose { max-width: 46rem; }
.legal-prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.legal-prose ul, .legal-prose ol { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.legal-prose li { margin-bottom: 0.5rem; }

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(194,240,75,0.15);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(155,143,174,0.25);
  font-size: 0.78rem;
  opacity: 0.8;
}
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { text-decoration: none; }
.disclaimer { font-size: 0.76rem; line-height: 1.55; margin-top: 1.5rem; opacity: 0.72; }

/* CTA band */
.cta-band { text-align: center; padding: var(--section-pad) 4vw; }
.cta-band h2 { margin-bottom: 1rem; }

/* Photo layouts */
.photo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.photo-single img { width: 100%; border-radius: 3px; box-shadow: var(--shadow-patch); }

/* Cable divider */
.cable-divider {
  height: 48px;
  margin: 2rem 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 48'%3E%3Cpath d='M0 24 Q50 12 100 24 T200 24 T300 24 T400 24' stroke='%23C2F04B' stroke-width='2' fill='none' opacity='0.35'/%3E%3Ccircle cx='0' cy='24' r='4' fill='%23C2F04B'/%3E%3Ccircle cx='400' cy='24' r='4' fill='%2359D6E0'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.25rem 4vw;
  box-shadow: 0 -8px 32px rgba(18,10,28,0.35);
  display: none;
  background: var(--lilac);
  color: var(--aubergine);
}
.cookie-banner.is-visible { display: block; }
.cookie-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-panel { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(18,10,28,0.1); width: 100%; }
.cookie-panel.is-open { display: block; }

/* Reveal */
.js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .reveal:not(.is-visible) {
    opacity: 0.92;
    transform: translateY(14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .hero-underline { background-size: 100% 3px !important; }
}

/* 404 */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8rem 4vw 4rem; }

/* Thanks */
.thanks-page { min-height: 60vh; display: flex; align-items: center; padding: 8rem 4vw 4rem; }

/* Legal hub */
.legal-links { display: grid; gap: 1rem; max-width: 32rem; }
.legal-links a {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(194,240,75,0.25);
  text-decoration: none;
  transition: border-color 0.2s;
}
.legal-links a:hover { border-color: var(--lime); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: 1rem 4vw 1.5rem;
    background: var(--lilac);
    color: var(--aubergine);
    gap: 1rem;
  }
  .nav-list.is-open { display: flex; }
  .hero { min-height: 82vh; }
  .patch-grid, .stage-grid, .module-rail, .work-grid, .service-block, .footer-grid, .photo-duo { grid-template-columns: 1fr; }
  .service-block:nth-child(even) { direction: ltr; }
}
