:root {
  --paper: #f4f1ea;
  --ink: #16140f;
  --muted: #5d584d;
  --rule: #d9d3c5;
  --accent: #c2410c;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

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

.site-header,
main > section,
.site-footer {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.wordmark {
  font: 400 1.6rem/1 var(--serif);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--accent); font-style: italic; margin-left: 0.25em; }

.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-header nav a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-header nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(4rem, 14vh, 9rem) clamp(4rem, 12vh, 8rem); }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font: 400 clamp(3rem, 9vw, 7.5rem)/0.98 var(--serif);
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.hero h1 em { color: var(--accent); }

.lede {
  max-width: 38rem;
  margin-top: 2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 2.5rem;
  padding: 0.95rem 1.6rem;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}
.cta span { transition: transform 0.2s; }
.cta:hover { background: #a3360a; }
.cta:hover span { transform: translateX(4px); }
.cta:active { transform: scale(0.98); }

/* Sections */
.work, .services, .contact { border-top: 1px solid var(--rule); padding-block: clamp(3.5rem, 10vh, 6.5rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 2.5rem;
}
.section-head p { color: var(--muted); }

h2 { font: 400 clamp(2.25rem, 5vw, 3.75rem)/1.05 var(--serif); letter-spacing: -0.02em; }

/* Work */
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.work-card figure { margin: 0; }
.frame { overflow: hidden; border-radius: 6px; background: var(--rule); aspect-ratio: 8 / 5; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.work-card:hover .frame img { transform: scale(1.03); }
.work-card figcaption { margin-top: 1rem; }
.work-card h3 { font: 400 1.6rem/1.2 var(--serif); }
.work-card p { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

/* Services */
.services h2 { margin-bottom: 2.5rem; }
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
}
.service-list li { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.num { font-size: 0.85rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.service-list h3 { font: 400 1.9rem/1.15 var(--serif); margin: 0.6rem 0 0.75rem; }
.service-list p { color: var(--muted); }

/* Contact */
.contact { text-align: center; padding-block: clamp(5rem, 16vh, 9rem); }
.contact h2 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.contact p { color: var(--muted); margin-top: 1rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Reveal on scroll: rises in, replays when it comes back. Only with motion allowed. */
.motion .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.motion .reveal.in { opacity: 1; transform: none; }
.motion .hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.motion .hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.motion .hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.motion .work-card:nth-child(2) { transition-delay: 0.08s; }
.motion .work-card:nth-child(3) { transition-delay: 0.16s; }
.motion .service-list li:nth-child(2) { transition-delay: 0.08s; }
.motion .service-list li:nth-child(3) { transition-delay: 0.16s; }
