/* Stitchline — shared styles. Editorial calm: warm paper, serif headlines, one indigo accent. */

:root {
  --paper: #f6f3ec;
  --paper-2: #efeadf;
  --ink: #1d1f22;
  --muted: #5b5d61;
  --rule: #ddd6c8;
  --accent: #2b4a7e;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h1 em, h2 em { font-style: italic; color: var(--accent); }

p { margin: 0 0 1em; }

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

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 38em; }

.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 500 0.95rem/1 var(--sans);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* Nav */
.nav { border-bottom: 1px solid var(--rule); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.logo em { font-style: italic; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); }
.logo .seam {
  display: inline-block;
  width: 3.5px;
  height: 1.3em;
  margin: 0 0.2em 0 0.22em;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 5px, transparent 5px 9px);
}
.logo:hover .seam { background: repeating-linear-gradient(to bottom, var(--ink) 0 5px, transparent 5px 9px); }

/* Homepage load: the seam stitches top to bottom, then "line" slides in. */
.logo--animate .seam { animation: stitch-down 0.7s steps(7, end) 0.15s both; }
.logo--animate em { animation: line-in 0.6s cubic-bezier(.2,.7,.2,1) 0.85s both; }
.logo--animate .word { animation: word-in 0.5s ease-out both; }
@keyframes stitch-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes line-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes word-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .logo--animate .seam, .logo--animate em, .logo--animate .word { animation: none; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"]:not(.btn) { color: var(--accent); }
.nav-links .btn { padding: 0.6em 1.1em; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.5em 1em;
  font: 500 0.9rem var(--sans);
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .nav-links { display: none; }
  .js .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 18px;
    padding: 8px 0 24px;
  }
  .nav-links { gap: 18px; flex-wrap: wrap; }
}

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section--alt { background: var(--paper-2); }
.section--tight { padding-top: clamp(40px, 6vw, 72px); }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: 0.6rem; }

.hero { padding: clamp(64px, 12vw, 150px) 0 clamp(56px, 9vw, 110px); }
.hero h1 { max-width: 19em; margin-bottom: 1.6rem; }

/* Services list (home) */
.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.svc-list li { border-bottom: 1px solid var(--rule); }
.svc-list li:nth-child(odd) { border-right: 1px solid var(--rule); }
.svc-list li:last-child:nth-child(odd) { border-right: 0; }
.svc-list a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 4px 12px;
  padding: 28px 24px 28px 0;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.svc-list li:nth-child(even) a { padding-left: 28px; }
.svc-list .num { font-size: 0.85rem; color: var(--muted); padding-top: 0.35em; font-variant-numeric: tabular-nums; }
.svc-list h3 { transition: color 0.2s; }
.svc-list p { grid-column: 2; margin: 0; color: var(--muted); }
.svc-list a:hover h3 { color: var(--accent); }

@media (max-width: 720px) {
  .svc-list { grid-template-columns: 1fr; }
  .svc-list li:nth-child(odd) { border-right: 0; }
  .svc-list li:nth-child(even) a { padding-left: 0; }
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px;
  counter-reset: step;
}
.steps li { border-top: 1px solid var(--ink); padding-top: 18px; }
.steps .num {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.3rem; margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* Split block: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Team */
.team-strip { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.faces { display: flex; }
.faces img {
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid var(--paper-2);
  margin-left: -14px;
}
.faces img:first-child { margin-left: 0; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; max-width: 34em; } }
.person img { width: 148px; height: 148px; border-radius: 50%; margin-bottom: 24px; }
.person .eyebrow { margin-bottom: 0.4rem; }
.person h3 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.person .cred { color: var(--muted); margin-bottom: 1.2rem; }
.person .leads { border-top: 1px solid var(--rule); padding-top: 14px; font-size: 0.95rem; }
.person .leads b { display: block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }

/* Services page */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(28px, 6vw, 96px);
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.service:first-of-type { border-top: 0; }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } }
.service .num { font-family: var(--serif); font-size: 1.1rem; color: var(--muted); display: block; margin-bottom: 0.6rem; }
.service h2 { margin-bottom: 1rem; }
.stage {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.3em 0.9em;
}
.service .illo { margin-top: 2rem; color: var(--ink); max-width: 360px; }
.service .illo svg { width: 100%; height: auto; display: block; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 1.6rem; border-top: 1px solid var(--rule); padding-top: 1.2rem; }
@media (max-width: 520px) { .io { grid-template-columns: 1fr; } }
.io b { display: block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.io p { margin: 0; }
.note { margin-top: 1.4rem; padding-left: 16px; border-left: 2px solid var(--accent); }

/* Contact */
.contact-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.contact-rows li { border-bottom: 1px solid var(--rule); }
.contact-rows a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 0;
  color: var(--ink);
  text-decoration: none;
}
.contact-rows .label { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; min-width: 9em; }
.contact-rows .value { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 2rem); overflow-wrap: anywhere; }
.contact-rows a:hover .value { color: var(--accent); }

.contact-band { background: var(--ink); color: var(--paper); }
.contact-band h2 { max-width: 18em; }
.contact-band h2 em { color: #9db4dc; }
.contact-band p { color: #c9c4b8; }
.contact-band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact-band .btn:hover { background: #9db4dc; border-color: #9db4dc; color: var(--ink); }
.contact-band .btn--ghost { background: transparent; color: var(--paper); }
.contact-band .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.contact-band :focus-visible { outline-color: #9db4dc; }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 48px 0 40px; font-size: 0.92rem; color: var(--muted); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .footer .wrap { grid-template-columns: 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer .logo { margin-bottom: 12px; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 8px; }

/* Redirect stubs */
.stub { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }

/* Gentle reveal on scroll */
.reveal-on .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-on .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; }
