/* Stick By Stick: one stylesheet, token-driven. Type: major-third scale. Space: 8pt grid. */

:root {
  /* Color: red passes 4.5:1 with white text (pure #ff0000 does not) */
  --red: #e00000;
  --red-dark: #b80000;
  --ink: #161616;
  --ink-soft: #4a4a4a;
  --line: #e7e4e0;
  --surface: #f7f5f2;
  --white: #ffffff;

  --font-display: "Crimson Pro", Georgia, serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 1.7rem + 4vw, 4.5rem);

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }

/* Layout primitives */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section:not(.band) + .section:not(.band) { padding-top: 0; }
.section-head { margin-bottom: var(--s-6); }

.split { display: grid; gap: var(--s-4); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }

/* Vertical rhythm: heading to text 24px, label to heading 16px, text to action 32px */
.flow > * + * { margin-top: var(--s-3); }
.flow > .eyebrow + * { margin-top: var(--s-2); }
.flow > .btn, .flow > .project-link { margin-top: var(--s-4); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-dark);
}

.skip {
  position: absolute; left: var(--s-2); top: -4rem;
  background: var(--white); color: var(--ink); padding: var(--s-1) var(--s-2);
  border-radius: 6px; z-index: 10; font-weight: 600;
}
.skip:focus { top: var(--s-2); }

/* Buttons and links */
.btn {
  display: flex; width: fit-content; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem;
  font: 600 var(--step--1)/1 var(--font-body);
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border-radius: 999px; border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #000; }
.btn-ghost { border-color: rgb(255 255 255 / 0.7); color: var(--white); min-height: 2.5rem; padding: 0.5rem 1.125rem; }
.btn-ghost:hover { background: var(--white); color: var(--red); border-color: var(--white); }

.project-link {
  display: flex; width: fit-content; gap: 0.4em;
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--red);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.project-link:hover { color: var(--red-dark); }

/* Header and hero */
.site-header { background: var(--red); color: var(--white); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-3); }
.nav-logo { display: block; padding-block: var(--s-1); }
.nav-logo img { width: clamp(140px, 8vw + 100px, 184px); }
.nav-links { display: flex; align-items: center; gap: var(--s-4); list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 500; font-size: var(--step--1); letter-spacing: 0.04em; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .nav-links li:not(:last-child) { display: none; } }

.hero { padding-block: var(--s-6) var(--section); }
.hero h1 { max-width: 18ch; }
.lead { max-width: 34rem; font-size: var(--step-1); line-height: 1.5; }

/* Results */
.results { background: var(--surface); border-bottom: 1px solid var(--line); }
.results ul {
  list-style: none; margin-block: 0; padding: var(--s-5) 0;
  display: grid; gap: var(--s-3) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.results strong { display: block; font: 600 var(--step-3)/1 var(--font-display); }
.results span { display: block; margin-top: var(--s-1); color: var(--ink-soft); font-size: var(--step--1); }

/* Services */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4);
}
.services li {
  padding-block: var(--s-2); border-top: 1px solid var(--line);
  font-weight: 600; font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase;
}
.services li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.75rem; vertical-align: middle; background: var(--red); border-radius: 50%; }

/* Work */
.section .flow > p:not(.eyebrow) { color: var(--ink-soft); }
.projects { display: grid; gap: var(--s-7); }
.project { align-items: center; }
.project img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
@media (min-width: 900px) { .project:nth-child(even) img { order: 2; } }

.tags { list-style: none; margin-bottom: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.tags li {
  padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--step--1); line-height: 1.3; color: var(--ink-soft); background: var(--white);
}

/* Process */
.process { background: var(--ink); color: var(--white); }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.steps li { counter-increment: step; border-top: 1px solid rgb(255 255 255 / 0.2); padding-top: var(--s-3); }
.steps li::before { content: "0" counter(step); display: block; font: 600 var(--step-2)/1 var(--font-display); color: #ff5c5c; }
.steps h3 { margin-top: var(--s-2); font: 600 var(--step-1)/1.3 var(--font-body); letter-spacing: 0; }
.steps p { margin-top: var(--s-1); color: rgb(255 255 255 / 0.75); }

/* Contact */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); }
@media (min-width: 900px) { .contact > .flow { position: sticky; top: var(--s-5); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-4); font-size: var(--step--1); color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2) var(--s-4); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.site-footer a { display: inline-block; padding-block: 0.25rem; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }

/* Legal pages */
.page-head { padding-block: var(--s-6) var(--s-6); }
.page-head h1 { font-size: var(--step-3); }
.prose { max-width: 46rem; padding-block: var(--s-6) var(--section); }
.prose h2 { font-size: var(--step-2); margin-top: var(--s-6); }
.prose h3 { font: 600 var(--step-0)/1.4 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; margin-top: var(--s-5); }
.prose p, .prose ul, .prose ol, .prose table { margin-top: var(--s-2); }
.prose :is(h2, h3) + * { margin-top: var(--s-3); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--s-1); }
.prose ol > li > strong:first-child { display: block; }
.prose a { text-decoration-color: var(--red); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface); font-weight: 600; }
.prose > :first-child { margin-top: 0; }
