:root {
  --paper: #eff1f5;
  --ink: #12161f;
  --ink-muted: #5b6478;
  --line-faint: #d6dbe4;
  --line-strong: #aeb6c4;
  --signal: #1e43d6;
  --signal-deep: #16309e;
  --brass: #a9814b;

  --font-display: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --spine-w: 100px;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
  color: var(--ink-muted);
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

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

/* Section grid: spine + content */

.section-grid {
  position: relative;
  border-bottom: 1px solid var(--line-faint);
}

.section-grid::before,
.section-grid::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 9px;
  height: 9px;
  z-index: 1;
}

.section-grid::before {
  left: 24px;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.section-grid::after {
  right: 24px;
  border-right: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.section-grid-inner {
  display: grid;
  grid-template-columns: var(--spine-w) 1fr;
  gap: 48px;
  align-items: start;
}

.spine {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 40px 16px 40px 0;
  border-right: 1px solid var(--line-strong);
  min-height: 220px;
}

.spine::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  right: -1px;
  width: 8px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line-strong) 0,
    var(--line-strong) 1px,
    transparent 1px,
    transparent 16px
  );
}

.spine-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--signal);
}

.spine-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(239, 241, 245, 0.88);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line-faint);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--signal);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--signal-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-small {
  padding: 9px 16px;
  font-size: 0.85rem;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

/* Hero */

.hero-inner {
  padding: 96px 0 80px;
  max-width: 720px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 600px;
  margin-bottom: 34px;
}

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

/* Signature measurement moment */

.measure {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
}

.measure-svg {
  width: 100%;
  max-width: 460px;
  height: 24px;
  overflow: visible;
  flex-shrink: 1;
}

.measure-line {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.5;
}

.measure-tick {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.5;
}

.measure-arrow {
  fill: var(--ink);
  opacity: 0.5;
}

.measure-line-open {
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-dasharray: 2 3;
  opacity: 0.9;
}

.measure-point {
  fill: var(--brass);
}

.measure-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brass);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Why section */

.why-inner {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.why-text h2 {
  font-size: 1.7rem;
  margin-bottom: 20px;
}

.why-text p {
  margin-bottom: 16px;
}

.why-text p:last-child {
  margin-bottom: 0;
}

.why-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.why-points li {
  display: flex;
  gap: 16px;
}

.point-num {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--signal);
  font-size: 0.85rem;
  padding-top: 3px;
  flex-shrink: 0;
}

.why-points h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.why-points p {
  font-size: 0.95rem;
}

/* Services */

.services-inner {
  padding: 80px 0;
}

.section-head {
  max-width: 560px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
}

.service-card {
  background: var(--paper);
  padding: 32px 30px;
  transition: background-color 0.15s ease;
}

.service-card:last-child {
  grid-column: 1 / -1;
}

.service-card:hover {
  background: rgba(30, 67, 214, 0.045);
}

.service-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--signal);
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.service-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.95rem;
}

/* Contact */

.contact-inner {
  padding: 88px 0;
  max-width: 560px;
}

.contact-inner h2 {
  font-size: 1.9rem;
  margin-bottom: 16px;
}

.contact-inner > p:first-of-type {
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-note {
  margin-top: 22px;
  font-size: 0.88rem;
}

/* Footer */

.site-footer {
  padding: 40px 0;
}

.footer-inner {
  text-align: left;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-note {
  max-width: 480px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-muted);
  opacity: 0.85;
  font-family: var(--font-display);
}

/* Responsive: spine collapses to a horizontal strip */

@media (max-width: 760px) {
  .section-grid-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .spine {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
    padding: 16px 0;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
  }

  .spine::after {
    top: auto;
    bottom: -1px;
    left: 0;
    right: 0;
    width: auto;
    height: 8px;
    background-image: repeating-linear-gradient(
      to right,
      var(--line-strong) 0,
      var(--line-strong) 1px,
      transparent 1px,
      transparent 16px
    );
  }

  .why-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 64px 0 56px;
  }

  .services-inner {
    padding: 56px 0;
  }

  .contact-inner {
    padding: 64px 0;
  }

  .measure-svg {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
