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

:root {
  --bg: #f5f5f5;        /* light grey page */
  --panel: #ffffff;     /* white content column */
  --ink: #403f3e;       /* primary text */
  --muted: #999898;     /* labels / meta */
  --soft: #57554f;      /* body prose */
  --tint: #e9e9e9;      /* hero panel */
  --rule: #dedede;      /* hairline */
  --rule-strong: #bfbfbf;
  --accent: #403f3e;    /* monochrome accent */

  /* spacing scale (8px base) */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;

  --max: 940px;
  --pad: 40px;          /* column side padding */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
b, strong { font-weight: 700; }

/* === ACCESSIBILITY === */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: absolute; top: -100%; left: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 200; font-size: 12px; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* === LAYOUT === */
.wrapper {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  background: var(--panel);
}

/* === MENU === */
#menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  z-index: 100;
}
.brand { display: flex; align-items: center; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.brand__mark { width: 18px; height: 12px; color: var(--accent); margin-right: 10px; }
.brand:hover { text-decoration: none; }

#nav { display: flex; gap: 28px; }
#nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 0;
}
#nav a:hover { color: var(--ink); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }

/* === HERO === */
#index {
  margin: 0 calc(-1 * var(--pad));
  padding: var(--sp-8) var(--pad) var(--sp-7);
  background: var(--tint);
}
#index h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.lead {
  max-width: 60ch;
  margin-top: var(--sp-3);
  font-size: 16px;
  line-height: 1.7;
  color: var(--soft);
}

/* === SECTIONS === */
section { padding: var(--sp-6) 0; }
section:last-of-type { padding-bottom: var(--sp-7); }

.band {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--rule);
}

/* === PROSE / TWO COLUMN === */
.two-col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-6); align-items: start; }
.prose { max-width: 62ch; }
.prose p { margin-bottom: var(--sp-2); }
.prose p:last-child { margin-bottom: 0; }

/* === STEPS === */
.steps { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.steps li { position: relative; padding-left: 40px; }
.steps__n { position: absolute; left: 0; top: 1px; font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* === ITEMS (services / team) === */
.items { display: grid; gap: var(--sp-5); }
.items.three { grid-template-columns: repeat(3, 1fr); }
.items.two { grid-template-columns: repeat(2, 1fr); }
.item h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--sp-1); }
.item h3 a { display: inline-flex; align-items: center; }
.item__face { width: 20px; height: 20px; color: var(--accent); margin-right: 8px; vertical-align: -4px; flex-shrink: 0; }
.item p { color: var(--soft); }
.item .role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--sp-1);
}

/* === TRACK RECORD === */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.stats > div {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: var(--sp-1);
}

.records { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.prose + .records { margin-top: var(--sp-4); }
.records + .prose { margin-top: var(--sp-4); }
.records li {
  display: grid;
  grid-template-columns: 160px 150px 1fr;
  gap: var(--sp-3);
}
.records__id { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.records__id a { color: inherit; }
.records__target { font-weight: 600; }
.records__desc { color: var(--soft); }

/* === CONTACT === */
#contact .prose { max-width: none; text-align: center; }
.email-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.email-link__icon { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
#contact .prose p:last-child { margin-top: var(--sp-3); }

/* === FOOTER === */
#footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: var(--sp-3) 0 var(--sp-6);
  border-top: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.footer__brand { font-family: var(--font-display); color: var(--ink); font-weight: 600; }
#footer a { color: var(--muted); }
#footer a:hover { color: var(--ink); }

/* === RESPONSIVE === */
@media (max-width: 760px) {
  :root { --pad: 20px; }

  /* solid header on mobile — backdrop blur renders poorly on sticky elements there */
  #menu {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-toggle { display: flex; }
  #nav {
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.25);
    display: none;
    padding: 0 var(--pad);
  }
  #nav.open { display: flex; }
  #nav a { padding: 15px 0; }

  #index { padding: var(--sp-7) var(--pad) var(--sp-6); }

  .two-col { grid-template-columns: 1fr; gap: var(--sp-4); }
  .items.three, .items.two { grid-template-columns: 1fr; gap: var(--sp-4); }

  .records li { grid-template-columns: 1fr; gap: 4px; }
  .stats { grid-template-columns: 1fr; gap: var(--sp-3); }

  #footer { flex-direction: column; text-align: center; gap: var(--sp-1); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
