/* ─────────────────────────────────────────────────────────────
   Kiricode — modern grotesque, editorial structure, OKLCH theme
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;

  /* Neutrals — tinted toward the brand hue (deep blue, 252°) */
  --bg:           light-dark(oklch(98.5% 0.004 250), oklch(13% 0.008 250));
  --surface:      light-dark(oklch(96.5% 0.006 250), oklch(17% 0.010 250));
  --rule:         light-dark(oklch(88% 0.010 250),   oklch(28% 0.012 250));
  --rule-soft:    light-dark(oklch(93% 0.008 250),   oklch(22% 0.010 250));

  /* Text */
  --text:         light-dark(oklch(20% 0.020 250),   oklch(95% 0.008 250));
  --text-muted:   light-dark(oklch(44% 0.018 250),   oklch(70% 0.014 250));

  /* Accent — deep mature blue (not the AI cyan) */
  --accent:       light-dark(oklch(40% 0.135 252),   oklch(76% 0.130 252));
  --accent-fg:    light-dark(oklch(98.5% 0.004 250), oklch(13% 0.008 250));

  /* Typography */
  --font-sans:    'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spatial scale */
  --space-1:  0.5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2.5rem;
  --space-5:  4rem;
  --space-6:  6rem;
  --space-7:  9rem;

  --measure:  62ch;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* ── A11y primitives ── */
.skip {
  position: absolute;
  top: 0.5rem; left: 0.5rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-150%);
  transition: transform 0.18s ease;
  z-index: 100;
}
.skip:focus { transform: translateY(0); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Layout ── */
.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* ── Links ── */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in oklch, var(--accent) 50%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.18s ease, color 0.18s ease;
}
a:hover {
  text-decoration-color: var(--accent);
}

/* ── Header ── */
.site-header {
  padding: clamp(1rem, 2.2vw, 1.5rem) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.wordmark {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
  line-height: 1;
}
.wordmark:hover { color: var(--accent); }

.primary-nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
}
.primary-nav a {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0;
  letter-spacing: -0.005em;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.3rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a:hover::after { opacity: 1; }

/* ── Hero ── */
.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  position: relative;
  padding-left: 1.5rem;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--accent);
}

.headline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.2vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 16ch;
  text-wrap: balance;
}
.headline-accent {
  color: var(--accent);
}

.hero-lede {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

/* Capabilities row */
.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--rule-soft);
}
.capabilities li {
  position: relative;
  padding: 0.25rem clamp(0.75rem, 1.6vw, 1.1rem);
}
.capabilities li:first-child {
  padding-left: 0;
}
.capabilities li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.55;
  transform: translateY(-50%);
}

/* ── Generic block (sections) ── */
.block {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--rule);
}

.block .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 880px) {
  .block .wrap {
    grid-template-columns: 200px 1fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }
  .block .section-eyebrow {
    grid-column: 1;
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
  .block .section-content {
    grid-column: 2;
  }
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  position: relative;
  padding-left: 1.5rem;
}
.section-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--accent);
}

.section-heading {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
  max-width: 30ch;
  text-wrap: balance;
}

.prose-block p {
  max-width: var(--measure);
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  font-size: 1.04rem;
}
.prose-block p:last-child { margin-bottom: 0; }

/* ── Services ── */
.services-list {
  display: flex;
  flex-direction: column;
}
.services-list > li {
  display: grid;
  grid-template-columns: clamp(3rem, 5vw, 4.5rem) 1fr;
  gap: clamp(1rem, 2.2vw, 1.75rem);
  padding: clamp(1.4rem, 2.5vw, 1.85rem) 0;
  border-top: 1px solid var(--rule-soft);
  align-items: baseline;
}
.services-list > li:first-child {
  border-top: none;
  padding-top: 0;
}
.services-list > li:last-child {
  padding-bottom: 0;
}

.services-numeral {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  letter-spacing: -0.02em;
  color: var(--accent);
  font-feature-settings: "tnum" 1, "ss01";
  line-height: 1;
}

.services-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.18rem, 1.9vw, 1.35rem);
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.services-body p {
  margin: 0;
  color: var(--text-muted);
  max-width: var(--measure);
  font-size: 1rem;
}

/* ── Contact ── */
.contact-lede {
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-4);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.contact-list a {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 500;
  padding: 0.5rem 0;
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
}
.contact-list a:hover {
  text-decoration-color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.footer-mark {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.footer-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .headline { letter-spacing: -0.03em; }
  .section-heading { max-width: none; }

  .primary-nav { gap: 0.9rem; }
  .primary-nav a { font-size: 0.85rem; }
}

/* ── Selection ── */
::selection {
  background: color-mix(in oklch, var(--accent) 25%, transparent);
  color: var(--text);
}
