:root {
  --bg: #05070f;
  --bg-alt: #080c18;
  --surface: #0e1525;
  --text: #eef2fa;
  --muted: #8a97b4;
  --brand: #2f6bff;
  --brand-soft: #4f8cff;
  --brand-2: #36d2ff;
  --border: #1b2440;
  --radius: 4px;            /* sharp, brutalist corners */
  --max: 1180px;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: hidden; overflow-x: clip; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

@media (pointer: fine) { body { cursor: none; } }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
a { color: inherit; text-decoration: none; }

/* ============ Custom cursor ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  border-radius: 50%; mix-blend-mode: difference;
}
.cursor-dot { width: 8px; height: 8px; background: #fff; margin: -4px 0 0 -4px; }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1.5px solid #fff;
  transition: width 0.22s, height 0.22s, margin 0.22s, background 0.22s, opacity 0.22s;
}
.cursor-ring.hovering {
  width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255,255,255,0.12);
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ============ Film grain ============ */
.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0,0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -2%); }
}

/* ============ Scroll progress ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 100;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 14px rgba(54,210,255,0.6);
}

/* ============ Animated background ============ */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; will-change: transform; }
.blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(47,107,255,0.55), transparent 70%); top: -120px; left: -100px; animation: float1 18s ease-in-out infinite; }
.blob-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(54,210,255,0.4), transparent 70%); top: 30%; right: -120px; animation: float2 22s ease-in-out infinite; }
.blob-3 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(109,79,255,0.4), transparent 70%); bottom: -100px; left: 30%; animation: float3 26s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(120px,80px) scale(1.15);} }
@keyframes float2 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-100px,60px) scale(1.1);} }
@keyframes float3 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(80px,-90px) scale(1.2);} }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 20%, black, transparent 80%);
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0; transform: translateY(38px);
  transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1);
  transition-delay: calc(var(--d, 0) * 100ms);
}
.reveal-left { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal.is-visible { opacity: 1; transform: translate(0,0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .blob, .grain, .grid-overlay { animation: none !important; }
  body, body * { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none; }
  html { scroll-behavior: auto; }
}

/* ============ Side index ============ */
.side-index {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 16px;
}
.side-index a {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  transition: color 0.2s;
}
.side-index a::after { content: ""; width: 22px; height: 1px; background: var(--border); transition: width 0.25s, background 0.25s; }
.side-index a:hover, .side-index a.active { color: var(--brand-2); }
.side-index a:hover::after, .side-index a.active::after { width: 40px; background: var(--brand-2); }
.side-index a .lbl {
  opacity: 0; max-width: 0; overflow: hidden; white-space: nowrap; transition: opacity 0.25s, max-width 0.25s;
}
.side-index a:hover .lbl { opacity: 1; max-width: 90px; }
@media (max-width: 980px) { .side-index { display: none; } }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: rgba(5,7,15,0.7); border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(5,7,15,0.92); }
/* While the mobile menu is open, lift the header (which contains the panel) above the
   full-screen grain (z-index 150) and scroll-progress (100) overlays. */
body.menu-open .site-header { z-index: 160; }
.nav { max-width: var(--max); margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo span { color: var(--brand-soft); }
.logo em { color: var(--brand-2); font-style: normal; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { list-style: none; display: flex; gap: 26px; align-items: center; }
.nav-links a { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); position: relative; transition: color 0.2s; }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--brand-soft); transition: width 0.25s ease; }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--brand); color: #fff !important; padding: 9px 18px; transition: box-shadow 0.25s; }
.nav-cta:hover { box-shadow: 0 8px 24px rgba(47,107,255,0.45); }

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle {
  display: none; position: relative; z-index: 2;
  width: 42px; height: 42px; padding: 0; margin: -8px -6px -8px 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform 0.3s ease, opacity 0.2s ease; }
.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; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Ghost numbers ============ */
.ghost-num {
  position: absolute; top: 24px; right: 4%; z-index: 0; pointer-events: none;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(7rem, 22vw, 17rem); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1.5px rgba(79,140,255,0.10);
  user-select: none;
}
/* Keep real content above the decorative ghost number */
.hero > .container, .section > .container { position: relative; z-index: 1; }

/* ============ Hero ============ */
.hero { position: relative; padding: 120px 0 130px; z-index: 2; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--brand-2); border: 1px solid var(--border); padding: 6px 14px;
  transform: rotate(-2deg); margin-bottom: 26px; background: rgba(54,210,255,0.04);
}
.eyebrow { font-family: var(--mono); color: var(--muted); letter-spacing: 0.05em; font-size: 0.8rem; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(1.9rem, 9vw, 6.2rem); line-height: 0.92; letter-spacing: -0.045em;
  font-weight: 900; text-transform: uppercase; margin-bottom: 30px;
}
.hero h1 .line { display: block; }
.hero h1 .line:nth-child(2) { color: transparent; -webkit-text-stroke: 1px var(--text); paint-order: stroke fill; }

/* Rotating headline — extra line-height leaves room for accents (É, È) */
.rotator { display: block; height: 1.15em; overflow: hidden; }
.rotator-track { display: flex; flex-direction: column; animation: rotateWords 12s cubic-bezier(0.76,0,0.24,1) infinite; }
.rotator-track span {
  height: 1.15em; line-height: 1.15em; white-space: nowrap;
  background: linear-gradient(100deg, var(--brand-soft), var(--brand-2));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes rotateWords {
  0%,22% { transform: translateY(0); }
  25%,47% { transform: translateY(-1.15em); }
  50%,72% { transform: translateY(-2.3em); }
  75%,97% { transform: translateY(-3.45em); }
  100% { transform: translateY(0); }
}
@keyframes shimmer { to { background-position: 200% center; } }

.lead { color: var(--muted); font-size: 1.2rem; max-width: 600px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 50px; margin-top: 66px; flex-wrap: wrap; }
.stat strong { display: block; font-family: var(--mono); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--brand-2); }
.stat span { color: var(--muted); font-size: 0.9rem; font-family: var(--mono); }

.scroll-hint {
  position: absolute; left: 28px; bottom: 30px; font-family: var(--mono);
  color: var(--muted); font-size: 0.72rem; letter-spacing: 0.15em;
  display: flex; align-items: center; gap: 10px;
}
.scroll-hint span { width: 20px; height: 34px; border: 1.5px solid var(--border); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; border-radius: 2px; background: var(--brand-2); animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0%,100%{opacity:0;transform:translate(-50%,0);} 50%{opacity:1;transform:translate(-50%,10px);} }

/* ============ Buttons ============ */
.btn {
  display: inline-block; padding: 14px 28px; font-family: var(--mono); font-size: 0.85rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  transition: box-shadow 0.25s, border-color 0.2s, background 0.2s, color 0.2s; will-change: transform;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(47,107,255,0.5); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand-soft); background: rgba(47,107,255,0.08); }
.btn-lg { padding: 18px 38px; font-size: 1rem; }

/* ============ Marquee ============ */
.marquee-section { position: relative; z-index: 2; padding: 26px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(8,12,24,0.5); }
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 34px; width: max-content; align-items: center; animation: scrollMarquee 30s linear infinite; }
.marquee-track span { font-weight: 900; font-size: 1.7rem; text-transform: uppercase; letter-spacing: -0.01em; color: var(--text); }
.marquee-track .m-out { color: transparent; -webkit-text-stroke: 1px var(--brand-soft); }
.marquee-track .m-dot { color: var(--brand-2); font-size: 1rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollMarquee { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { position: relative; padding: 110px 0; z-index: 2; overflow: hidden; }
.section-alt { background: rgba(8,12,24,0.55); }
.kicker { font-family: var(--mono); color: var(--brand-2); font-size: 0.78rem; letter-spacing: 0.1em; margin-bottom: 16px; }
.section-title { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; line-height: 1; margin-bottom: 14px; }
.section-sub { color: var(--muted); margin-bottom: 52px; font-size: 1.1rem; max-width: 600px; }

/* ============ Cards (services) ============ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--border); background: var(--bg); }
.card {
  background: var(--bg); padding: 34px 30px; position: relative; overflow: hidden;
  box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border);
  transition: background 0.3s, transform 0.3s;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(160px 160px at var(--mx,50%) var(--my,0%), rgba(47,107,255,0.16), transparent 60%); opacity: 0; transition: opacity 0.25s; }
.card:hover { background: var(--surface); }
.card:hover::before { opacity: 1; }
.card-no { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); opacity: 0.5; }
.card-icon { font-size: 2rem; margin-bottom: 16px; color: var(--brand-2); position: relative; transition: transform 0.3s; }
.card-icon svg { width: 34px; height: 34px; display: block; }
.card:hover .card-icon { transform: translateY(-4px) scale(1.1); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; position: relative; }
.card p { color: var(--muted); font-size: 0.97rem; position: relative; }

/* ============ Sites réalisés ============ */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; perspective: 1000px; }
.site-card {
  display: block; background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s; will-change: transform;
}
.site-card:hover { border-color: var(--brand-soft); box-shadow: 0 24px 50px rgba(0,0,0,0.5); }
.site-preview { height: 200px; position: relative; overflow: hidden; background: #0c1424; display: flex; align-items: flex-end; padding: 16px; }
.site-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.site-card:hover .site-preview img { transform: scale(1.05); }
.site-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,9,18,0.85) 0%, rgba(5,9,18,0.1) 45%, transparent 70%); }
.site-domain { position: relative; z-index: 1; font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: #fff; background: rgba(0,0,0,0.45); padding: 5px 12px; backdrop-filter: blur(4px); }
.site-body { padding: 24px; }
.site-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.site-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.site-link { font-family: var(--mono); color: var(--brand-soft); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; transition: letter-spacing 0.2s; display: inline-block; }
.site-card:hover .site-link { letter-spacing: 0.15em; }

/* ============ Témoignages ============ */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.testimonial { background: var(--surface); border: 1px solid var(--border); padding: 32px; position: relative; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.testimonial::before { content: "\201C"; position: absolute; top: 2px; right: 22px; font-size: 5.5rem; line-height: 1; color: var(--brand); opacity: 0.16; font-family: Georgia, serif; }
.testimonial:hover { transform: translateY(-6px); border-color: var(--brand-soft); box-shadow: 0 18px 44px rgba(0,0,0,0.45); }
.stars { color: #ffc94d; letter-spacing: 2px; margin-bottom: 16px; font-size: 0.95rem; }
.testimonial blockquote { color: var(--text); font-size: 1.02rem; margin-bottom: 24px; }
.testimonial figcaption { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.9rem; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; color: #fff; font-size: 0.9rem; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.testimonial figcaption strong { color: var(--text); }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.about-grid p { color: var(--muted); margin-bottom: 16px; }
.about-grid strong { color: var(--text); }
.facts { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.facts li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 10px; color: var(--muted); font-family: var(--mono); font-size: 0.88rem; }
.facts strong { color: var(--text); }
.about-terminal {
  border: 1px solid var(--border); background: #0a0f1c; font-family: var(--mono);
  overflow: hidden; box-shadow: 0 24px 50px rgba(0,0,0,0.35);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.about-terminal:hover { transform: translateY(-5px); border-color: var(--brand-soft); box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #070b15; }
.term-dots { display: flex; gap: 7px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; }
.term-dots i:nth-child(1) { background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { color: var(--muted); font-size: 0.78rem; }
.term-body { padding: 24px 22px 28px; font-size: 0.9rem; line-height: 1.95; }
.term-line { color: var(--text); }
.term-prompt { color: var(--brand-2); margin-right: 8px; }
.term-out { color: var(--muted); margin-bottom: 6px; }
.term-ok { color: var(--brand-2); }
.term-caret { color: var(--brand-2); animation: blink 1.1s steps(2) infinite; }
.term-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.term-tag { border: 1px solid var(--border); color: var(--brand-soft); padding: 4px 10px; font-size: 0.72rem; transition: border-color 0.2s, color 0.2s; }
.about-terminal:hover .term-tag { border-color: rgba(79,140,255,0.4); }

/* Terminal typewriter — JS hides the body and replays it on reveal.
   Without JS / with reduced motion the content just shows normally. */
.about-terminal.is-playing .term-body > * { opacity: 0; }
.about-terminal.is-playing .term-body > *.t-in { opacity: 1; transition: opacity 0.35s ease; }
.term-line.t-typing::after { content: "_"; color: var(--brand-2); animation: blink 1.1s steps(2) infinite; }

/* Live availability status + ticking Swiss clock */
.term-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; flex: none; }
.term-status.is-online .status-dot { background: #28c840; animation: pulse-dot 2.2s ease-out infinite; }
.term-status.is-online .status-text { color: var(--brand-2); }
.term-status.is-offline .status-text { color: var(--muted); }
.status-sep { color: var(--border); }
.status-clock { color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(40,200,64,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(40,200,64,0); }
  100% { box-shadow: 0 0 0 0 rgba(40,200,64,0); }
}
@media (prefers-reduced-motion: reduce) {
  .term-status .status-dot { animation: none; }
}

/* Confetti celebration on successful form submit */
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 250; }

/* ============ FAQ ============ */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.faq-item { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.faq-item summary {
  list-style: none; padding: 20px 22px;
  display: flex; align-items: center; gap: 14px;
  font-weight: 700; font-size: 1.02rem; color: var(--text);
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+"; font-family: var(--mono); color: var(--brand-2);
  font-size: 1.4rem; line-height: 1; flex: none; transition: transform 0.3s ease;
}
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--brand-2); }
.faq-item .faq-a { padding: 0 22px 22px 50px; color: var(--muted); }
.faq-item .faq-a p { margin: 0; }
@media (max-width: 720px) { .faq-item .faq-a { padding-left: 22px; } }

/* ============ Contact ============ */
.contact-section { text-align: center; }
.contact { text-align: center; }
.big-cta { font-size: clamp(2.4rem, 9vw, 6rem); }
.contact .section-sub { margin: 0 auto 30px; }

/* Terminal-styled contact form — mirrors .about-terminal */
.contact-term {
  max-width: 560px; margin: 36px auto 0; text-align: left;
  border: 1px solid var(--border); background: #0a0f1c; font-family: var(--mono);
  overflow: hidden; box-shadow: 0 24px 50px rgba(0,0,0,0.35);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.contact-term:hover { border-color: var(--brand-soft); box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.contact-term .term-body { display: flex; flex-direction: column; gap: 14px; }
.contact-term .term-line { margin-bottom: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-key { color: var(--brand-2); font-size: 0.74rem; letter-spacing: 0.04em; }
.field-key::before { content: "$ "; color: var(--muted); }
.contact-term input,
.contact-term select,
.contact-term textarea {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--text);
  background: #070b15; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 13px; transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-term textarea { resize: vertical; min-height: 72px; }
.contact-term input::placeholder,
.contact-term textarea::placeholder { color: var(--muted); opacity: 0.7; }
.contact-term input:focus,
.contact-term select:focus,
.contact-term textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,0.15);
}
.field-select { position: relative; display: block; }
.field-select::after {
  content: "▾"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--brand-2); pointer-events: none; font-size: 0.8rem;
}
.contact-term select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }

/* Custom themed dropdown — JS enhances the native <select> into this.
   The native control is hidden but still submits + works without JS. */
.dd { position: relative; }
.dd-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: inherit; font-size: 0.9rem; color: var(--text); text-align: left;
  background: #070b15; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 13px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.dd-trigger:hover { border-color: var(--brand-soft); }
.dd-trigger:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,0.15); }
.dd.open .dd-trigger { border-color: var(--brand); }
.dd-arrow { color: var(--brand-2); font-size: 0.8rem; transition: transform 0.2s; }
.dd.open .dd-arrow { transform: rotate(180deg); }

.dd-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 4px; list-style: none;
  background: #0a0f1c; border: 1px solid var(--brand); border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  max-height: 240px; overflow: auto;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.dd.open .dd-list { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-option {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.86rem; color: var(--muted);
  padding: 9px 11px; border-radius: 2px; cursor: pointer;
}
.dd-option::before { content: "›"; color: var(--border); }
.dd-option.is-active { background: rgba(47,107,255,0.12); color: var(--text); }
.dd-option.is-active::before { color: var(--brand-2); }
.dd-option[aria-selected="true"] { color: var(--brand-2); }
.dd-option[aria-selected="true"]::after { content: "✓"; margin-left: auto; color: var(--brand-2); }
@media (prefers-reduced-motion: reduce) {
  .dd-list, .dd-arrow { transition: none; }
}

.contact-send { align-self: flex-start; margin-top: 6px; font-family: var(--mono); }
.contact-status { font-family: var(--mono); font-size: 0.82rem; margin: 0; }
.contact-status:empty { display: none; }
.contact-status.is-pending { color: var(--muted); }
.contact-status.is-ok { color: var(--brand-2); }
.contact-status.is-err { color: #ff5f57; }

/* Honeypot — kept in the DOM but away from humans + assistive tech */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Direct channels (WhatsApp + click-to-copy email) */
.contact-direct { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.contact-channel {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.84rem; color: var(--text);
  background: #0a0f1c; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 18px; cursor: pointer; text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.contact-channel:hover { border-color: var(--brand); color: var(--brand-soft); }
.contact-channel .chan-key { color: var(--brand-2); }
.contact-channel .chan-key::before { content: "$ "; color: var(--muted); }
.contact-channel.copied { border-color: var(--brand-2); color: var(--brand-2); }

/* ============ Footer ============ */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.footer-mid { color: var(--brand-2); }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .section { padding: 88px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-terminal { max-width: 480px; width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; z-index: 61; }
  .nav-links {
    /* Use viewport units for height so the panel is not constrained by the header's
       backdrop-filter containing block (which collapses it to header height). */
    position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; z-index: 60;
    width: min(80vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 30px; padding: 90px 34px;
    background: rgba(5,7,15,0.97); backdrop-filter: blur(14px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1rem; }
  .nav-cta { display: block; width: 100%; text-align: center; padding: 12px 18px; }

  .hero { padding: 40px 0 56px; }
  .hero h1 { margin-bottom: 22px; }
  .hero-stats { gap: 24px 34px; margin-top: 36px; }
  .scroll-hint { display: none; }
  .section { padding: 72px 0; }
  .marquee-track span { font-size: 1.4rem; }
  .marquee-track { gap: 24px; }
  .footer-inner { justify-content: center; text-align: center; }
  .contact-send { align-self: stretch; text-align: center; }
  .contact-direct { flex-direction: column; }
  .contact-channel { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .nav { padding: 16px 18px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 3rem); }
  .badge { margin-bottom: 18px; }
  .eyebrow { margin-bottom: 16px; }
  .lead { font-size: 1.05rem; margin-bottom: 26px; }
  .section-sub { font-size: 1rem; margin-bottom: 40px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-stats { gap: 22px 28px; }
  .stat strong { font-size: 2rem; }
  .btn-lg { padding: 15px 20px; font-size: 0.78rem; }
  .ghost-num { font-size: clamp(6rem, 30vw, 11rem); }
  .card { padding: 30px 24px; }
}

/* Lock background scroll while the mobile menu is open */
body.menu-open { overflow: hidden; }

/* ============ Live preview lightbox ============ */
/* z-index sits above grain (150) + header (160) but below the custom cursor (200) */
.preview-lb {
  position: fixed; inset: 0; z-index: 180; display: none;
  align-items: center; justify-content: center; padding: 34px;
  background: rgba(3,5,11,0.82); backdrop-filter: blur(8px);
}
.preview-lb.open { display: flex; }
.preview-lb.open .browser { animation: lbIn 0.35s cubic-bezier(0.22,1,0.36,1); }
@keyframes lbIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.browser {
  width: 100%; max-width: var(--max); height: min(82vh, 820px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  transition: max-width 0.4s cubic-bezier(0.22,1,0.36,1);
}
.browser.mobile { max-width: 400px; }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #0a0f1c; }
.browser-dots { display: flex; gap: 7px; flex: none; }
.browser-dots i { width: 12px; height: 12px; border-radius: 50%; }
.browser-dots i:nth-child(1) { background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; }
.browser-dots i:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1; font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); padding: 7px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.browser-toggle {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 7px 12px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.browser-toggle:hover { color: var(--text); border-color: var(--brand-soft); }
.browser-toggle.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }
.browser-btn {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 1rem; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); width: 34px; height: 34px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.browser-btn:hover { color: #fff; border-color: var(--brand-soft); }
#previewClose:hover { border-color: #ff5f57; }
.browser-stage { flex: 1; position: relative; background: #fff; overflow: hidden; }
.browser-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.browser-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted); background: var(--surface);
}
body.preview-open { overflow: hidden; }
/* The custom dot+ring can't follow the cursor across the iframe boundary, so it
   freezes at the edge. Hide it and fall back to the native cursor while open. */
body.preview-open { cursor: auto; }
body.preview-open .cursor-dot,
body.preview-open .cursor-ring { display: none; }

@media (max-width: 720px) {
  /* Full-screen on phones: the embedded site renders its own mobile layout at this width */
  .preview-lb { padding: 0; }
  .browser, .browser.mobile { height: 100%; max-width: none; border: 0; }
  /* Pad below a notch / status bar so the close button stays reachable */
  .browser-bar { gap: 10px; padding: 12px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .browser-dots { display: none; }      /* free up width for the URL */
  .browser-toggle { display: none; }    /* desktop/mobile switch is meaningless at phone width */
  .browser-url { font-size: 0.72rem; }
  .browser-btn { width: 40px; height: 40px; font-size: 1.1rem; }  /* >=40px tap targets */
  .browser-stage { -webkit-overflow-scrolling: touch; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-lb.open .browser { animation: none; }
  .browser { transition: none; }
}
