/* ==========================================================
   TIMAEUS — black / white / blue / grey
   ========================================================== */

:root {
  --bg: #000000;
  --ink: #f2f4f8;
  --ink-dim: #9aa3b2;
  --ink-faint: #565e6b;
  --blue: #2f7bff;
  --blue-soft: #5ea2ff;
  --line: rgba(255, 255, 255, 0.08);
  --sans: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
  --container: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow { max-width: 820px; }

.section { padding: 56px 0 64px; position: relative; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, #1a56e8 100%);
  border: 1px solid rgba(94, 162, 255, 0.55);
  box-shadow: 0 0 24px rgba(47, 123, 255, 0.35), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(47, 123, 255, 0.55), 0 14px 34px rgba(0, 0, 0, 0.5);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 162, 255, 0.6);
  color: var(--blue-soft);
}

.btn-nav {
  padding: 9px 18px;
  font-size: 0.78rem;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, #1a56e8 100%);
  border: 1px solid rgba(94, 162, 255, 0.55);
}
.btn-nav:hover { box-shadow: 0 0 24px rgba(47, 123, 255, 0.5); }

/* ---------- section headers ---------- */

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--blue-soft);
  text-transform: uppercase;
}

.section-head { max-width: 640px; margin-bottom: 48px; }

.section-title {
  margin-top: 14px;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-sub {
  margin-top: 14px;
  color: var(--ink-dim);
  font-size: 1rem;
  max-width: 56ch;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand-mark { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* socials slide into the banner once you scroll down */
.nav-socials {
  display: flex;
  gap: 8px;
  margin-right: 6px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.nav.scrolled .nav-socials {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink-dim);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.nav-social svg { width: 14px; height: 14px; }
.nav-social:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.nav-contact {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-contact:hover { color: var(--ink); }

/* ---------- hero ---------- */

/* the 3D scene is a fixed backdrop; every section scrolls over it */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* darkens the backdrop as you scroll so content stays readable.
   Solid black: on a long page the top of the viewport needs the same
   dimming as the bottom, or grid lines cut across every section. */
.scene-dim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: #000;
}

/* anchor targets land below the fixed nav */
section[id] { scroll-margin-top: 92px; }

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 50% at 50% 44%, transparent 35%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 25%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  /* leave the upper half of the viewport to the 3D solid */
  padding: 46vh 28px 70px;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-mark {
  width: 108px;
  height: 108px;
  margin-bottom: 34px;
  filter: drop-shadow(0 0 26px rgba(47, 123, 255, 0.55))
          drop-shadow(0 0 70px rgba(47, 123, 255, 0.25));
}
.hero-mark[hidden] { display: none; }

h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.12em;
  text-indent: 0.12em; /* optically recenters the tracked-out caps */
}

/* ---------- hacker glitch on the wordmark ---------- */

.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--blue-soft);
  animation: glitchA 7s infinite steps(1);
}

.glitch::after {
  color: #ffffff;
  animation: glitchB 7s infinite steps(1);
}

@keyframes glitchA {
  0%     { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  91.5%  { opacity: 0.85; transform: translate(-0.06em, 0.02em); clip-path: inset(8% 0 58% 0); }
  92.5%  { opacity: 0.85; transform: translate(0.05em, -0.01em); clip-path: inset(62% 0 6% 0); }
  93.5%  { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  100%   { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
}

@keyframes glitchB {
  0%     { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  92%    { opacity: 0.7; transform: translate(0.06em, -0.02em); clip-path: inset(38% 0 34% 0); }
  93%    { opacity: 0.7; transform: translate(-0.04em, 0.015em); clip-path: inset(76% 0 2% 0); }
  94%    { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  100%   { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
}

.cursor {
  display: inline-block;
  margin-left: 0.08em;
  color: var(--blue-soft);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  margin-top: 18px;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-sub {
  margin-top: 16px;
  max-width: 520px;
  color: var(--ink-dim);
  font-size: 1.02rem;
}

.hero-cta {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- statement ---------- */

.statement {
  padding: 0 0 90px;
  text-align: center;
}

.statement-text {
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.statement-text span {
  color: var(--blue-soft);
  text-shadow: 0 0 26px rgba(47, 123, 255, 0.45);
}

/* ---------- profile card ---------- */

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  padding: 56px 60px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(105deg, #000 0%, #000 32%, #050f28 55%, #0b2a6e 78%, #1a56e8 105%);
  border: 1px solid rgba(94, 162, 255, 0.18);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(26, 86, 232, 0.12);
}

/* faint grid crossing the card, like the profile backdrop */
.card-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
}

.card-left, .card-right { position: relative; }

.card-mark {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 0 22px rgba(47, 123, 255, 0.5));
}

.card-left h2 {
  margin-top: 22px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.14em;
}

.card-left p {
  margin-top: 14px;
  color: var(--ink-dim);
  font-size: 0.95rem;
  max-width: 34ch;
}

.card-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-tagline {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.card-copy {
  margin-top: 14px;
  color: #b7c4dd;
  font-size: 0.95rem;
  max-width: 44ch;
}

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  padding: 34px 30px 38px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 162, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(26, 86, 232, 0.1);
}

.service-index {
  position: absolute;
  top: 26px; right: 28px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.service-icon {
  width: 34px; height: 34px;
  color: var(--blue-soft);
  filter: drop-shadow(0 0 10px rgba(47, 123, 255, 0.5));
}

.service-card h3 {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-card > p:not(.service-index) {
  margin-top: 12px;
  color: var(--ink-dim);
  font-size: 0.94rem;
}

.service-list {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--ink-dim);
  line-height: 2;
}
.service-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--blue-soft);
}

/* ---------- capabilities ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.stat {
  padding: 26px 28px;
  border-radius: 18px;
  border: 1px solid rgba(94, 162, 255, 0.16);
  background: linear-gradient(160deg, rgba(11, 42, 110, 0.28), rgba(0, 0, 0, 0.2));
}

.stat-num {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-soft);
  text-shadow: 0 0 30px rgba(47, 123, 255, 0.45);
}

.stat-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 36px;
}

.cap h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-left: 16px;
  border-left: 2px solid var(--blue);
}

.cap p {
  margin-top: 10px;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--ink-dim);
}

/* ---------- process ---------- */

.process {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-step {
  padding: 28px 26px 32px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
}

.step-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--blue-soft);
}
.step-num::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.process-step h3 {
  margin-top: 16px;
  font-size: 1.05rem;
  font-weight: 600;
}

.process-step div p {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

/* ---------- faq ---------- */

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease;
}
.faq-item[open] { border-color: rgba(94, 162, 255, 0.3); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-marker {
  position: relative;
  flex-shrink: 0;
  width: 14px; height: 14px;
}
.faq-marker::before,
.faq-marker::after {
  content: "";
  position: absolute;
  background: var(--blue-soft);
  transition: transform 0.25s ease;
}
.faq-marker::before { top: 6px; left: 0; width: 14px; height: 2px; }
.faq-marker::after { top: 0; left: 6px; width: 2px; height: 14px; }
.faq-item[open] .faq-marker::after { transform: scaleY(0); }

.faq-item > p {
  padding: 0 22px 20px;
  color: var(--ink-dim);
  font-size: 0.94rem;
  max-width: 62ch;
}
.faq-item a { color: var(--blue-soft); text-decoration: none; }
.faq-item a:hover { text-decoration: underline; }

/* ---------- final cta ---------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 40px 76px;
  border-radius: 24px;
  border: 1px solid rgba(94, 162, 255, 0.18);
  background: linear-gradient(180deg, #000 0%, #050f28 55%, #0b2a6e 130%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 80px rgba(26, 86, 232, 0.12);
}
.cta-panel > * { position: relative; }
.cta-panel .card-grid { position: absolute; }

.cta-title {
  margin-top: 16px;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cta-sub {
  margin: 16px auto 0;
  max-width: 46ch;
  color: #b7c4dd;
  font-size: 1rem;
}

.cta-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  padding: 56px 0 70px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.footer-brand p {
  margin-top: 18px;
  max-width: 34ch;
  color: var(--ink-dim);
  font-size: 0.92rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-head {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.footer-col a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }

.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-nous {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-nous:hover {
  color: var(--ink);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.footer-usa {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.footer-usa svg {
  width: 24px;
  height: 13px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .glitch::before, .glitch::after { animation: none; opacity: 0; }
  .cursor { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .nav-links { display: none; }
  .service-grid, .stat-strip { grid-template-columns: 1fr; }
  .cap-grid, .process { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .section { padding: 40px 0 48px; }
  .profile-card {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 44px 34px;
  }
  .card-left p { max-width: none; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 640px) {
  .nav-contact { display: none; }
  .nav-socials { display: none; } /* even at opacity 0 they'd push the button off-screen */
  .nav-inner { padding: 14px 20px; gap: 14px; }
  .btn-nav { padding: 8px 15px; font-size: 0.72rem; }
  .cap-grid, .process { grid-template-columns: 1fr; }
  .cta-panel { padding: 56px 26px 60px; }
}

@media (max-width: 480px) {
  .hero-mark { width: 84px; height: 84px; }
  .hero-cta .btn { width: 100%; }
}
