:root {
  --bg: #08090B;
  --bg-2: #0D0F12;
  --line: #1A1D22;
  --line-2: #262A31;
  --fg: #E8E9EC;
  --fg-dim: #8A8F99;
  --fg-faint: #4A4F58;
  --accent: oklch(0.86 0.18 200);
  --accent-2: oklch(0.88 0.22 130);
  --accent-glow: oklch(0.86 0.18 200 / 0.18);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
  transition: border-color .3s;
}
nav.top.scrolled { border-color: var(--line-2); }
nav.top .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* ---------- Logo ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.logo-mark::before, .logo-mark::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border: 1px solid var(--accent);
}
.logo-mark::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.logo-mark::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.logo-mark svg { display: block; }
.logo-text { display: flex; align-items: baseline; gap: 6px; }
.logo-text .four { color: var(--accent); font-weight: 700; }
.logo-text .word { color: var(--fg); }

nav.top ul {
  display: flex;
  gap: 28px;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
nav.top ul li a {
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
nav.top ul li a:hover { color: var(--fg); }
nav.top ul li a::before { content: '/ '; color: var(--fg-faint); }
nav.top .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}
nav.top .cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 0 24px var(--accent-glow);
}
nav.top .cta::before { content: '['; color: var(--fg-faint); }
nav.top .cta::after  { content: ']'; color: var(--fg-faint); }

@media (max-width: 800px) {
  nav.top ul { display: none; }
}

/* ---------- Hero ---------- */
section.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}
canvas#bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, var(--bg) 90%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

h1.headline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(48px, 8.5vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  max-width: 14ch;
  text-wrap: balance;
}
h1.headline .accent { color: var(--accent); font-style: italic; font-weight: 400; }
h1.headline .cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.08em;
  transform: translateY(0.05em);
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.subline {
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg-dim);
  max-width: 56ch;
  margin-bottom: 48px;
  line-height: 1.6;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 32px var(--accent-glow);
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-dim);
  border: 1px solid transparent;
  transition: all .2s;
}
.btn-ghost:hover { color: var(--fg); border-color: var(--line-2); }

/* hero meta strip */
.hero-meta {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.hero-meta .inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-meta b { color: var(--fg-dim); font-weight: 500; }

/* ---------- Section chrome ---------- */
section.block {
  position: relative;
  padding: 140px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 80px;
  align-items: end;
}
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  section.block { padding: 96px 0; }
}
.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label .num { color: var(--accent); }
.section-label .bar { flex: 0 0 40px; height: 1px; background: var(--line-2); }
.section-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-title em { color: var(--accent); font-style: italic; font-weight: 400; }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
}
@media (max-width: 800px) {
  .services { grid-template-columns: 1fr; }
}
.service {
  padding: 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .3s, border-color .3s;
  cursor: default;
  overflow: hidden;
}
.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .4s ease;
}
.service:hover { background: var(--bg-2); }
.service:hover::before { width: 100%; }
.service:hover .service-icon { color: var(--accent); border-color: var(--accent); }

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 56px;
}
.service-icon {
  width: 48px; height: 48px;
  border: 1px solid var(--line-2);
  color: var(--fg-dim);
  display: grid; place-items: center;
  transition: all .3s;
  font-family: var(--mono);
}
.service-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
}
.service h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.service p {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}
.service ul {
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}
.service ul li { padding: 4px 10px; border: 1px solid var(--line); margin-right: 6px; }

/* ---------- Why us ---------- */
.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
}
.why-item {
  padding: 40px 32px 40px 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
  position: relative;
}
.why-item:first-child { border-left-color: var(--accent); }
.why-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.why-num::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}
.why-item h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  text-wrap: balance;
}
.why-item p { color: var(--fg-dim); font-size: 15px; line-height: 1.65; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}
.contact-left h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  text-wrap: balance;
}
.contact-left h2 em { color: var(--accent); font-style: italic; }
.contact-direct {
  display: block;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--fg);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 8px;
  width: max-content;
  transition: color .2s, border-color .2s;
}
.contact-direct:hover { color: var(--accent); border-color: var(--accent); }
.contact-meta {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  line-height: 2;
}
.contact-meta b { color: var(--fg-dim); font-weight: 500; }

form.contact {
  display: grid;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
form.contact .row { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { form.contact .row { grid-template-columns: 1fr; } }

form.contact label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
form.contact label .req { color: var(--accent); }
form.contact input,
form.contact textarea,
form.contact select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 8px 0 12px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color .2s;
  outline: none;
}
form.contact textarea { resize: vertical; min-height: 110px; font-family: var(--sans); }
form.contact input:focus,
form.contact textarea:focus,
form.contact select:focus { border-bottom-color: var(--accent); }
form.contact select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-dim) 50%), linear-gradient(135deg, var(--fg-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 16px;
}
.form-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  transition: color .2s;
}
.form-status.ok  { color: var(--accent-2); }
.form-status.err { color: oklch(0.7 0.18 25); }

/* ---------- Footer ---------- */
footer { padding: 64px 0 40px; border-top: 1px solid var(--line); }
footer .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
footer .copy { font-family: var(--mono); font-size: 12px; color: var(--fg-faint); letter-spacing: 0.05em; }
footer .links { display: flex; gap: 24px; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
footer .links a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
