/* ---------- Tokens ---------- */
:root {
  --bg: #0b0d0f;
  --bg-raised: #15181b;
  --bg-raised-2: #1b1f23;
  --border: #272c30;
  --border-soft: #1e2226;
  --text: #eef0f2;
  --text-secondary: #a2aab1;
  --text-muted: #6d757c;
  --accent: #3fd0c9;
  --accent-strong: #2bb8b1;
  --accent-ink: #06211f;
  --radius: 14px;
  --container: 1120px;
  --header-h: 76px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

section { scroll-margin-top: var(--header-h); }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 16px; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.center { text-align: center; }

.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.kicker.center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 13, 15, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand img { border-radius: 8px; }
.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.brand-sub {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  cursor: pointer;
  display: flex;
  gap: 4px;
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-sep { color: var(--text-muted); }
.lang-opt { padding: 0 2px; }
.lang-opt[data-active="true"] { color: var(--accent); font-weight: 700; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 7px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
}
.hero-bg svg { width: 100%; height: 100%; }
.trace-lines path {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}
.trace-dots circle { fill: var(--accent); opacity: 0.55; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-lead {
  font-size: 1.1rem;
  max-width: 54ch;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 32px;
}

.badge-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.badge-row li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--bg-raised);
}

.hero-logo {
  display: flex;
  justify-content: center;
}
.hero-logo img {
  width: min(360px, 90%);
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(63, 208, 201, 0.08));
}

/* ---------- About ---------- */
.about { padding: 96px 0; border-top: 1px solid var(--border-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.about-card dl { margin: 0; }
.about-card div + div { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border-soft); }
.about-card dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.about-card dd { margin: 0; font-weight: 500; color: var(--text); }

/* ---------- Services ---------- */
.services { padding: 96px 0; border-top: 1px solid var(--border-soft); }
.services h2 { max-width: 640px; margin-left: auto; margin-right: auto; }

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

.service-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Center a lone card on the last row instead of leaving it flush left */
.service-card:last-child:nth-child(3n+1) { grid-column: 2; }

.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 0.94rem; margin-bottom: 0; }

/* ---------- Why ---------- */
.why {
  padding: 80px 0;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-raised);
}
.why-inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}
.why p { font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact { padding: 96px 0; }
.contact-lead {
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}

.contact-methods {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 32px 20px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-card-static { cursor: default; }

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-value { font-weight: 600; }

/* ---------- 404 ---------- */
.page-notfound { min-height: 100vh; display: flex; flex-direction: column; }
.page-notfound main { flex: 1; display: flex; }
.notfound { flex: 1; display: flex; align-items: center; }
.notfound-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  text-align: center;
}
.notfound-code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.9;
  margin: 0 0 20px;
}
.notfound .hero-lead { margin-left: auto; margin-right: auto; }
.notfound .hero-ctas { justify-content: center; margin-bottom: 0; }
.notfound-path { margin: 0 0 20px; }
.notfound-path code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: 999px;
  padding: 6px 14px;
}
.notfound-path code:empty { display: none; }

/* ---------- Legal / long-form text ---------- */
.legal { padding: 72px 0 96px; }
.legal-inner { max-width: 760px; }
.legal h1 { margin-bottom: 8px; }
.legal-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.legal-lead {
  font-size: 1.08rem;
  color: var(--text);
  padding: 20px 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.legal h2 {
  font-size: 1.35rem;
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.legal h3 { font-size: 1.02rem; margin: 26px 0 8px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; color: var(--text-secondary); }
.legal li { margin-bottom: 8px; }
.legal li strong, .legal p strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal a:hover { color: var(--accent-strong); }

@media (max-width: 720px) {
  .legal { padding: 48px 0 64px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand span:first-child { color: var(--text-secondary); font-weight: 600; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { order: -1; margin-bottom: 8px; }
  .hero-logo img { width: 200px; }
  .about-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:last-child:nth-child(3n+1) { grid-column: auto; }
  .service-card:last-child:nth-child(2n+1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 10px);
  }
  .contact-methods { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 20px 24px 28px;
    gap: 18px;
  }
  .service-grid { grid-template-columns: 1fr; }
  .service-card:last-child:nth-child(2n+1) { grid-column: auto; width: auto; }
  .hero { padding: 56px 0 64px; }
  .about, .services, .contact, .why { padding: 64px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
