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

:root {
  --navy: #14213D;
  --navy-deep: #0B1426;
  --steel: #3A6EA5;
  --steel-light: #5B9BD5;
  --ink: #1B2433;
  --muted: #5B6577;
  --line: #E3E7EE;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --on-dark: #C9D2E0;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--steel); }
a:hover { color: var(--navy); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 20; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(11, 20, 38, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: rgba(255,255,255,.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--mono); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { font-family: var(--mono); font-size: 15px; text-decoration: none; color: var(--on-dark); padding: 10px 14px; border-radius: 8px; position: relative; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--steel-light); border-radius: 2px; }

/* Type */
h1, h2, h3 { font-family: var(--mono); color: var(--navy); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 600; }
h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.accent { color: var(--steel-light); }

/* Sections */
section { padding: 96px 0; position: relative; }
.soft { background: var(--bg-soft); }

/* Dark hero */
.hero { background: var(--navy-deep); color: #fff; padding: 168px 0 112px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; z-index: -2; mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.hero h1 { color: #fff; }
.hero .lead { color: var(--on-dark); }
.hero .eyebrow { color: var(--steel-light); }
.hero .wrap { display: flex; align-items: center; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.hero-text { flex: 1 1 520px; }
.hero-art { flex: 0 0 340px; width: 340px; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero.small { padding: 152px 0 80px; }

.threads-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.threads-bg path { fill: none; stroke: rgba(91,155,213,.16); stroke-width: 1.2; animation: drift 14s ease-in-out infinite alternate; }
.threads-bg path:nth-child(2n) { animation-duration: 18s; stroke: rgba(255,255,255,.07); }
.threads-bg path:nth-child(3n) { animation-duration: 22s; }
@keyframes drift { from { transform: translateY(-14px); } to { transform: translateY(14px); } }

.draw line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.2s cubic-bezier(.6,.1,.2,1) forwards; }
.draw line:nth-child(2) { animation-delay: .25s; }
.draw line:nth-child(3) { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pulse { animation: pulse 3.2s ease-in-out 1.8s infinite; transform-origin: center; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; font-weight: 600; text-decoration: none; padding: 14px 22px; border-radius: 10px; min-height: 48px; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--steel); color: #fff; box-shadow: 0 8px 24px -10px rgba(58,110,165,.8); }
.btn-primary:hover { background: #2F5C8C; color: #fff; transform: translateY(-1px); }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-deep); color: #fff; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* Tag strip */
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; padding: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: 13px; color: var(--on-dark); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 14px; }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 48px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--navy), var(--steel-light)); transition: width .4s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(20,33,61,.35); border-color: #CFD6E2; }
.card:hover::before { width: 100%; }
.card p { color: var(--muted); margin: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-soft); display: grid; place-items: center; margin-bottom: 20px; color: var(--steel); }
.card .num { font-family: var(--mono); font-size: 13px; color: var(--steel); position: absolute; right: 24px; top: 28px; }

/* Split feature */
.split { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.split > * { flex: 1 1 420px; min-width: 0; }
.screen { background: var(--navy-deep); border-radius: 16px; padding: 20px; box-shadow: 0 30px 60px -30px rgba(11,20,38,.6); }
.screen-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.screen-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 14px; min-height: 84px; }
.tile .bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); margin-bottom: 10px; }
.tile .bar.w60 { width: 60%; } .tile .bar.w40 { width: 40%; } .tile .bar.w80 { width: 80%; }
.tile.wide { grid-column: span 2; }
.tile.accent-tile { background: rgba(58,110,165,.25); border-color: rgba(91,155,213,.35); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 8px; }
.spark i { flex: 1; background: var(--steel-light); border-radius: 3px 3px 0 0; opacity: .85; animation: grow 1.4s ease-out both; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--on-dark); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 100% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } }
.check { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.check li::before { content: ""; flex: 0 0 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--steel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: s; position: relative; }
.steps li { padding-top: 28px; counter-increment: s; position: relative; }
.steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: 13px; color: #fff; background: var(--navy); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 48px; left: 40px; right: -24px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--steel); }
.steps p { color: var(--muted); margin: 0; }

/* Service blocks */
.service { display: flex; gap: 48px; flex-wrap: wrap; padding: 48px 0; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
.service h2 { flex: 1 1 280px; font-size: 26px; display: flex; gap: 14px; align-items: baseline; }
.service h2 small { font-size: 14px; color: var(--steel); font-weight: 500; }
.service .body { flex: 2 1 480px; }
.service ul { padding-left: 20px; margin: 0; color: var(--muted); }
.service li { margin-bottom: 8px; }

/* Contact */
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 32px; max-width: 620px; box-shadow: 0 30px 60px -40px rgba(20,33,61,.4); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 20px 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.contact-list a, .contact-list .value { font-family: var(--mono); font-weight: 600; color: var(--navy); text-decoration: none; }
.contact-list a:hover { color: var(--steel); }

/* CTA band */
.cta { background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.cta::after { content: ""; position: absolute; right: -60px; top: -40px; width: 360px; height: 360px; background: url("mark-wit.svg") center/contain no-repeat; opacity: .06; z-index: -1; transform: rotate(-8deg); }
.cta h2 { color: #fff; }
.cta p { color: var(--on-dark); }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--navy-deep); padding: 40px 0; font-size: 14px; color: var(--on-dark); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer .mono { font-family: var(--mono); }
.site-footer .brand span { font-size: 18px; }
.site-footer .brand img { width: 26px; height: 26px; }


/* Language switch */
.lang { font-family: var(--mono); font-size: 13px; color: var(--on-dark); text-decoration: none; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 6px 10px; margin-left: 8px; }
.lang:hover { color: #fff; border-color: #fff; }

/* Prose pages (privacy, terms) */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin-top: 40px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 20px; }
.prose .muted { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 820px; margin-top: 40px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { font-family: var(--mono); font-weight: 600; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--steel); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--muted); }

/* Case */
.case { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-wrap: wrap; }
.case .case-side { background: var(--navy-deep); color: #fff; padding: 36px; flex: 1 1 300px; }
.case .case-side h3 { color: #fff; }
.case .case-side p { color: var(--on-dark); }
.case .case-body { padding: 36px; flex: 2 1 420px; }
.case dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin: 0; }
.case dt { font-family: var(--mono); font-size: 13px; color: var(--steel); margin-bottom: 6px; }
.case dd { margin: 0; color: var(--muted); }
.tag-dark { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--steel-light); border: 1px solid rgba(91,155,213,.4); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }

/* About */
.about-grid { display: flex; gap: 56px; flex-wrap: wrap; align-items: flex-start; }
.about-grid > * { flex: 1 1 380px; min-width: 0; }
.fact { border-left: 3px solid var(--steel); padding-left: 18px; margin-bottom: 24px; }
.fact strong { font-family: var(--mono); color: var(--navy); display: block; margin-bottom: 4px; }
.fact span { color: var(--muted); }

/* 404 */
.notfound { min-height: 70vh; display: flex; align-items: center; }

/* Footer links */
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--on-dark); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.footer-links a:hover { color: #fff; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  section { padding: 64px 0; }
  .site-header { background: rgba(11, 20, 38, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .site-header .wrap { min-height: 60px; padding-top: 8px; padding-bottom: 8px; gap: 4px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin: 0 -10px; }
  .nav a { padding: 10px; white-space: nowrap; }
  .hero, .hero.small { padding: 150px 0 64px; }
  .hero-art { display: none; }
  .steps li::after { display: none; }
  .contact-card { padding: 4px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .draw line { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}
