:root {
  --bg: #0b0b0f;
  --bg-2: #111118;
  --bg-3: #15151f;
  --fg: #ececf2;
  --muted: #9b9bab;
  --muted-2: #c4c4d0;
  --line: #1f1f2a;
  --line-2: #2a2a3a;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 800px at 8% -10%,  rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(1000px 700px at 110% 5%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(124, 92, 255, 0.10), transparent 60%),
    var(--bg);
}

/* ============================ NAV ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 40px);
  background: rgba(11, 11, 15, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: color 160ms ease;
}

.nav-links a:hover { color: var(--fg); }

@media (max-width: 560px) {
  .nav-links { display: none; }
}

/* ============================ LAYOUT ============================ */
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 36px) 48px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}

/* ============================ LOGO / BRAND ============================ */
.logo { display: block; }
.logo-xs { width: 26px; height: 26px; }
.logo-sm { width: 32px; height: 32px; }
.logo-lg {
  width: clamp(72px, 12vw, 96px);
  height: clamp(72px, 12vw, 96px);
  margin-bottom: 24px;
}

.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark-sm { font-size: 15px; }

.wordmark .dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================ HERO ============================ */
.hero {
  padding-top: clamp(32px, 6vw, 56px);
  padding-bottom: clamp(40px, 7vw, 72px);
}

h1 {
  font-size: clamp(34px, 5.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff 0%, #c5c5d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  font-weight: 600;
}

h3 {
  font-size: 16.5px;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
}

h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
}

.lede {
  font-size: clamp(16.5px, 2.1vw, 19px);
  line-height: 1.6;
  color: var(--muted-2);
  margin: 0 0 32px;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================ BLOCKS ============================ */
.block {
  margin-top: clamp(64px, 10vw, 104px);
  padding-top: clamp(48px, 7vw, 72px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.block-lede {
  color: var(--muted-2);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 60ch;
}

.block p {
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 16px;
}

/* ============================ ABOUT CALLOUTS ============================ */
.callouts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.callouts li {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted-2);
}

.callouts strong {
  display: block;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ============================ SERVICE CARDS ============================ */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.005));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px 20px;
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
}

.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01));
}

.card-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 255, 0.10);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  margin-bottom: 14px;
}

.card-icon svg { width: 20px; height: 20px; }

.card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* ============================ TIMELINE ============================ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--line);
}

.entry {
  position: relative;
  padding: 4px 0 28px 28px;
}

.entry::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px var(--bg);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.entry-year {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted-2);
}

.entry-tag {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg-2);
}

.entry-body p {
  margin: 4px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

/* ============================ STACK ============================ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px 32px;
  margin-top: 12px;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips li {
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted-2);
  white-space: nowrap;
}

/* ============================ CTA ============================ */
.cta {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  padding: 12px 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, filter 160ms ease;
  cursor: pointer;
}

.cta:hover {
  border-color: #3a3a50;
  background: var(--bg-3);
  transform: translateY(-1px);
}

.cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.cta.primary {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0b0f;
  font-weight: 600;
}

.cta.primary:hover {
  filter: brightness(1.06);
}

.cta.primary:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.cta.ghost {
  background: transparent;
}

/* ============================ FORM ============================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin-top: 8px;
}

.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .form .row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field span em {
  font-style: normal;
  color: var(--muted);
  opacity: 0.7;
  font-size: 12px;
  margin-left: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.field input::placeholder,
.field textarea::placeholder { color: #6c6c7a; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-2); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #4d4d6a;
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.20);
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-status { margin: 0; font-size: 14px; color: var(--muted); }
.form-status.ok  { color: #4ade80; }
.form-status.err { color: #f87171; }

/* ============================ FOOTER ============================ */
.foot {
  margin-top: clamp(64px, 10vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.foot .sep { opacity: 0.5; }

/* ============================ A11Y ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .card { transition: none; }
  .logo circle animate { display: none; }
}
