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

:root {
  --bg-0: #080808;
  --bg-1: #0d0d0d;
  --bg-2: #111111;
  --bg-card: #141414;
  --bg-card-hover: #181818;
  --border: #1c1c1c;
  --border-hover: #2e2e2e;
  --red: #c8271e;
  --red-bright: #e83020;
  --red-dim: #7a1810;
  --red-glow-sm: rgba(200, 39, 30, 0.12);
  --red-glow-md: rgba(200, 39, 30, 0.22);
  --red-glow-lg: rgba(200, 39, 30, 0.4);
  --text-white: #f0f0f0;
  --text-silver: #b8b8b8;
  --text-muted: #606060;
  --text-dim: #333333;
  --font-heading: 'Orbitron', monospace;
  --font-mono: 'Share Tech Mono', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 70px;
  --ease: 0.2s ease;
  --ease-slow: 0.4s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-0);
  color: var(--text-silver);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--red); }
::selection { background: var(--red); color: #fff; }

/* ── TYPE ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--text-white);
  line-height: 1.15;
  letter-spacing: 0.04em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1rem, 1.8vw, 1.2rem); }

p { color: var(--text-silver); line-height: 1.75; }

a { color: var(--red); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--red-bright); }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.75rem; }
section { padding: 6rem 0; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--ease), border-color var(--ease), backdrop-filter var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,8,8,0.94);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

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

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 46px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2.25rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-silver);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: color var(--ease);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  color: var(--red) !important;
  border: 1px solid var(--red);
  padding: 5px 16px !important;
  letter-spacing: 0.1em;
  transition: background var(--ease), color var(--ease) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--red) !important; color: #fff !important; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text-silver); transition: transform var(--ease), opacity var(--ease); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem; list-style: none;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.2rem; color: var(--text-silver);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-mobile-menu a:hover { color: var(--red); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: none; cursor: pointer;
  transition: all var(--ease);
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.45s;
}
.btn-primary:hover { background: var(--red-bright); color: #fff; box-shadow: 0 0 22px var(--red-glow-md); }
.btn-primary:hover::before { left: 100%; }

.btn-outline {
  background: transparent; color: var(--text-silver);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); background: var(--red-glow-sm); }

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh; /* iOS Safari: excludes address bar */
  min-height: 580px;
  display: flex; align-items: center; overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-scanline {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.025) 2px, rgba(0,0,0,0.025) 4px);
  pointer-events: none; z-index: 1;
}

.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem; color: var(--red);
  letter-spacing: 0.3em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--red); }

.hero-title { font-weight: 900; color: var(--text-white); margin-bottom: 1.25rem; }
.hero-title .red { color: var(--red); }

.hero-typewriter {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 1.8em;
}
.hero-typewriter .typed { color: var(--text-silver); }
.hero-typewriter .cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--red); margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.72s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  font-size: 1rem; color: var(--text-muted);
  max-width: 520px; margin-bottom: 2.5rem; line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  animation: scrollFloat 2s ease-in-out infinite;
}
.hero-scroll .line { width: 1px; height: 28px; background: linear-gradient(to bottom, var(--red-dim), transparent); }
@keyframes scrollFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(5px); } }

/* ── SECTION HEADER ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--red);
  letter-spacing: 0.3em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.section-label::before { content: ''; display: inline-block; width: 18px; height: 1px; background: var(--red); }

.section-title span { color: var(--red); }
.section-sub { color: var(--text-muted); max-width: 520px; margin-top: 0.6rem; line-height: 1.75; }
.section-header { margin-bottom: 3rem; }

/* ── PHILOSOPHY ── */
.philosophy {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.philosophy-card {
  padding: 2rem 1.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  transition: border-color var(--ease), box-shadow var(--ease);
  overflow: hidden;
}
.philosophy-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 0; background: var(--red);
  transition: height var(--ease-slow);
}
.philosophy-card:hover { border-color: var(--red-dim); box-shadow: 0 0 30px var(--red-glow-sm); }
.philosophy-card:hover::before { height: 100%; }

.phi-icon { font-size: 1.6rem; color: var(--red); margin-bottom: 1.25rem; }

.phi-title {
  font-family: var(--font-heading);
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.phi-text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; }

/* ── SERVICE CARDS ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}

.service-card {
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-left: 3px solid var(--red-dim);
  transition: all var(--ease);
  position: relative;
}
.service-card:hover {
  border-left-color: var(--red);
  background: var(--bg-card-hover);
  box-shadow: -4px 0 0 var(--red), 0 0 28px var(--red-glow-sm);
  transform: translateX(3px);
}

.svc-icon { font-size: 1.4rem; color: var(--red); margin-bottom: 1rem; }

.svc-title {
  font-family: var(--font-heading);
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-white); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 0.7rem;
}
.svc-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; }

.svc-bullets {
  margin-top: 1.25rem; list-style: none;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.svc-bullets li {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 0.5rem; line-height: 1.5;
}
.svc-bullets li::before { content: '>'; color: var(--red); flex-shrink: 0; font-size: 0.7rem; margin-top: 1px; }

.services-cta { text-align: center; margin-top: 3rem; }

/* ── ABOUT ── */
.about { background: var(--bg-0); }

.about-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 5rem; align-items: center;
}

.about-logo-wrap { display: flex; justify-content: center; align-items: center; }
.about-logo-wrap img {
  width: 100%; max-width: 360px;
  filter: drop-shadow(0 0 50px var(--red-glow-md));
}

.about-text p { margin-bottom: 1.1rem; font-size: 0.95rem; }

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 2rem;
}
.stat { padding: 1.25rem; border: 1px solid var(--border); background: var(--bg-card); }
.stat-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: var(--red); line-height: 1; margin-bottom: 0.3rem; }
.stat-lbl { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase; }

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  padding-top: calc(var(--nav-h) + 4.5rem);
  padding-bottom: 3.5rem;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: linear-gradient(90deg, transparent, var(--red-dim), transparent);
}
.page-hero-bg {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    linear-gradient(var(--red-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--red-dim) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── CTA BAND ── */
.cta-band {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-band .section-label { justify-content: center; }
.cta-inner { max-width: 620px; margin: 0 auto; }
.cta-inner p { color: var(--text-muted); margin: 0.75rem 0 2rem; }

/* ── CONTACT ── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 4rem; align-items: start;
}

.contact-info-block { margin-bottom: 2rem; }
.contact-info-block h3 { font-size: 0.88rem; margin-bottom: 1.25rem; }

.c-detail { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.25rem; }
.c-detail-icon { color: var(--red); font-size: 0.9rem; margin-top: 2px; flex-shrink: 0; }
.c-lbl { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.2rem; }
.c-val { font-size: 0.875rem; color: var(--text-silver); }
.c-val a { color: var(--text-silver); }
.c-val a:hover { color: var(--red); }

/* ── FORM ── */
.form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.f-group { display: flex; flex-direction: column; gap: 0.45rem; }
.f-group.full { grid-column: 1 / -1; }

.f-label {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
}
.f-label .req { color: var(--red); }

.f-input, .f-select, .f-textarea {
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-silver);
  font-family: var(--font-mono); font-size: 0.875rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  border-radius: 0; width: 100%; -webkit-appearance: none;
}
.f-input:focus, .f-select:focus, .f-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow-sm);
}
.f-input::placeholder, .f-textarea::placeholder { color: var(--text-dim); }
.f-select option { background: var(--bg-2); color: var(--text-silver); }

.f-textarea { resize: vertical; min-height: 150px; max-height: 420px; }

.char-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); text-align: right; transition: color var(--ease); }
.char-count.warn { color: #c8831e; }
.char-count.over { color: var(--red); }

.form-footer {
  margin-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.form-note { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); }

.btn-submit { min-width: 180px; }

.form-status {
  margin-top: 1.25rem; padding: 1rem;
  border: 1px solid; font-family: var(--font-mono); font-size: 0.82rem; display: none;
}
.form-status.success { border-color: #1e6b3a; background: rgba(30,107,58,0.1); color: #3ddc84; display: block; }
.form-status.error { border-color: var(--red-dim); background: var(--red-glow-sm); color: var(--red-bright); display: block; }

.honeypot { display: none !important; position: absolute; left: -9999px; visibility: hidden; }

/* ── FOOTER ── */
.footer { background: var(--bg-1); border-top: 1px solid var(--border); padding: 4rem 0 1.75rem; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }

.footer-logo img { height: 50px; margin-bottom: 1rem; }
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); max-width: 280px; line-height: 1.75; }

.f-heading { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.25rem; }

.f-links { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.f-links a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--ease); }
.f-links a:hover { color: var(--red); }

.f-contact-item { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.f-contact-item i { color: var(--red); font-size: 0.72rem; }
.f-contact-item a { color: var(--text-muted); transition: color var(--ease); }
.f-contact-item a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.f-copy { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.f-copy span { color: var(--red); }

/* ── ANIMATIONS ── */
.fade-up { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* stagger delays */
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ── RESPONSIVE ── */

/* Tablet / large mobile */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-logo-wrap { order: -1; }
  .about-logo-wrap img { max-width: 240px; }

  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  section { padding: 3.5rem 0; }
  .container { padding: 0 1.25rem; }

  /* Hero */
  .hero-content { padding-top: 2rem; } /* push content down from nav */
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.2em; margin-bottom: 1rem; }
  .hero-desc { font-size: 0.9rem; margin-bottom: 2rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-scroll { display: none; } /* not useful on touch */

  /* Section headers */
  .section-header { margin-bottom: 2rem; }

  /* Cards — force single column on small screens */
  .services-grid { grid-template-columns: 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }

  /* Stats grid stays 2-col but tighter */
  .about-stats { gap: 0.75rem; }
  .stat { padding: 1rem; }
  .stat-num { font-size: 1.6rem; }

  /* Page hero */
  .page-hero { padding-top: calc(var(--nav-h) + 2.5rem); padding-bottom: 2rem; }

  /* Form */
  .form-wrap { padding: 1.5rem 1.25rem; }
  .form-grid { grid-template-columns: 1fr; }
  .f-group.full { grid-column: 1; }
  .form-footer { flex-direction: column; align-items: stretch; }
  .btn-submit { width: 100%; justify-content: center; }

  /* iOS: prevent auto-zoom on input focus (must be >= 16px) */
  .f-input, .f-select, .f-textarea { font-size: 16px; }

  /* Touch targets: minimum 44px height */
  .f-input, .f-select { min-height: 44px; }
  .btn { min-height: 44px; padding: 0.75rem 1.5rem; }
  .nav-hamburger { padding: 10px; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }

  /* Footer */
  .footer { padding: 3rem 0 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; margin-bottom: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero-title { font-size: 2rem; }
  .nav-logo img { height: 38px; }
}

/* Landscape mobile: shorten hero so content isn't cut off */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { height: auto; min-height: unset; padding: 6rem 0 3rem; }
  .hero-scroll { display: none; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .hero-scroll { animation: none; }
  .hero-typewriter .cursor { animation: none; opacity: 1; }
  #hero-canvas { display: none; }
}
