/* ---------- Tokens ---------- */
:root {
  --ink: #1b1712;
  --paper: #f1eee4;
  --white: #ffffff;
  --red: #e30613;
  --paddock: #4b5e3a;
  --rail: #5b4530;
  --line: rgba(27, 23, 18, 0.14);

  --display: "Big Shoulders Display", sans-serif;
  --body: "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  margin: 0;
}

p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Header / nav ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-logo {
  height: 46px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.site-nav a { text-decoration: none; }
.site-nav > a:not(.nav-cta) {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-nav > a:not(.nav-cta):hover,
.site-nav > a[aria-current="page"] { border-bottom-color: var(--ink); }

.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 9px 18px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--red); }

.nav-toggle {
  display: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  overflow: hidden;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,14,10,0.88) 0%, rgba(17,14,10,0.35) 42%, rgba(17,14,10,0) 68%);
}
.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 32px 44px;
  color: var(--white);
  z-index: 2;
  max-width: 760px;
}
.hero-copy h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); margin-bottom: 18px; }
.hero-copy p { font-size: 1.05rem; max-width: 46ch; color: rgba(255,255,255,0.88); }

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  position: relative;
  height: 38vh;
  min-height: 240px;
  overflow: hidden;
}
.page-banner img { width: 100%; height: 100%; object-fit: cover; }
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,14,10,0.82) 0%, rgba(17,14,10,0.3) 50%, rgba(17,14,10,0) 75%);
}
.page-banner-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 32px 32px;
  color: var(--white);
  max-width: 700px;
  z-index: 2;
}
.page-banner-copy h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 10px; }
.page-banner-copy p { color: rgba(255,255,255,0.85); max-width: 52ch; }

/* ---------- Generic section ---------- */
.section { padding: 64px 32px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.section-head h2 { font-size: 1.9rem; }
.section-tag { font-size: 0.9rem; color: var(--rail); }
.section p.lede { max-width: 66ch; font-size: 1.08rem; }
.section-narrow { max-width: 66ch; }

/* ---------- Stat callout ---------- */
.stat-callout {
  display: flex;
  align-items: center;
  gap: 44px;
  flex-wrap: wrap;
}
.stat-callout-text { flex: 1 1 320px; }
.stat-number {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  color: var(--red);
  line-height: 0.85;
}
.stat-caption {
  font-size: 1.1rem;
  max-width: 36ch;
  color: var(--ink);
  margin-top: 10px;
}
.stat-callout-img {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- Timeline (History page) ---------- */
.timeline {
  position: relative;
  margin-top: 8px;
  padding-left: 4px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 174px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 140px 20px 1fr;
  column-gap: 20px;
  position: relative;
}
.timeline-item + .timeline-item { margin-top: 44px; }
.tl-year {
  text-align: right;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--rail);
  padding-top: 3px;
}
.tl-dot-col { display: flex; justify-content: center; padding-top: 7px; }
.tl-dot {
  width: 11px; height: 11px;
  background: var(--red);
  position: relative;
  z-index: 2;
}
.tl-content h3 { font-size: 1.4rem; margin-bottom: 8px; }
.tl-content p { color: var(--rail); font-size: 0.95rem; max-width: 56ch; }
.tl-content img {
  margin-top: 16px;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.tl-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  max-width: 620px;
}
.tl-photos img {
  margin-top: 0;
  width: calc(33.333% - 6px);
  max-width: none;
  aspect-ratio: 4/3;
  object-fit: cover;
  flex: 1 1 160px;
}

/* ---------- Trusted-by stud list ---------- */
.stud-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4px;
}
.stud-list span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid var(--line);
}
.stud-list span:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

/* ---------- Service cards ---------- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  margin-top: 8px;
}
.service-card { background: var(--paper); padding-bottom: 28px; }
.service-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 20px; }
.service-card .card-body { padding: 0 26px; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.service-card p { opacity: 0.85; margin-bottom: 14px; }
.service-card ul { margin: 0; padding-left: 18px; font-size: 0.92rem; color: var(--rail); }
.service-card ul li { margin-bottom: 4px; }
.service-card .card-link { display: inline-block; margin-top: 14px; font-size: 0.9rem; border-bottom: 1px solid var(--ink); text-decoration: none; }
.service-card .card-link:hover { color: var(--red); border-color: var(--red); }

/* long-form service section (services page) */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 32px;
  border-bottom: 1px solid var(--line);
}
.service-detail:nth-child(even) .service-detail-media { order: 2; }
.service-detail-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.service-detail-media-pair {
  display: flex;
  gap: 8px;
}
.service-detail-media-pair img {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.service-detail-copy h2 { font-size: 1.9rem; margin-bottom: 14px; }
.service-detail-copy p { margin-bottom: 14px; max-width: 52ch; }
.service-detail-copy ul { padding-left: 20px; color: var(--rail); font-size: 0.95rem; }
.service-detail-copy ul li { margin-bottom: 6px; }

/* ---------- Work preview grid (home) ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 3px;
  background: var(--ink);
  margin-top: 8px;
}
.preview-grid a { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; }
.preview-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.preview-grid a:hover img { transform: scale(1.045); }
.preview-grid a::before {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--red); opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.preview-grid a:hover::before { opacity: 1; }
.view-all-link { display: inline-block; margin-top: 20px; font-size: 0.95rem; border-bottom: 1px solid var(--ink); text-decoration: none; }
.view-all-link:hover { color: var(--red); border-color: var(--red); }

/* ---------- Gallery grid + lightbox ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3px;
  background: var(--ink);
}
.gallery-grid button {
  position: relative; padding: 0; border: 0; margin: 0; cursor: pointer;
  background: var(--ink); aspect-ratio: 16/9; overflow: hidden;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-grid button:hover img, .gallery-grid button:focus-visible img { transform: scale(1.045); }
.gallery-grid button::before {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--red);
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.gallery-grid button:hover::before, .gallery-grid button:focus-visible::before { opacity: 1; }
.gallery-grid button:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }

.lightbox {
  position: fixed; inset: 0; background: rgba(17,14,10,0.94);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.lightbox.is-open { display: flex; }
.lb-img { max-width: 88vw; max-height: 84vh; object-fit: contain; border: 1px solid rgba(255,255,255,0.12); }
.lb-close, .lb-nav { position: absolute; background: transparent; border: 0; color: var(--white); cursor: pointer; font-family: var(--body); line-height: 1; }
.lb-close { top: 20px; right: 28px; font-size: 2.2rem; padding: 6px; }
.lb-close:hover { color: var(--red); }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 12px 18px; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }
.lb-nav:hover { color: var(--red); }
.lb-counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* ---------- About page ---------- */
.placeholder-note { font-style: italic; color: var(--rail); }
.team-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.team-member { border: 1px solid var(--line); padding: 22px 24px; min-width: 220px; flex: 1 1 220px; }
.team-member h3 { font-size: 1.2rem; margin-bottom: 6px; }
.team-member a { display: block; color: var(--rail); text-decoration: none; font-size: 0.95rem; }
.team-member a:hover { color: var(--red); }

.process-list { display: flex; margin-top: 8px; border-top: 1px solid var(--line); }
.process-step { flex: 1; padding: 28px 24px; border-right: 1px solid var(--line); }
.process-step:last-child { border-right: none; }
.process-num { font-family: var(--display); font-weight: 900; font-size: 2rem; color: var(--red); line-height: 1; margin-bottom: 10px; }
.process-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.process-step p { font-size: 0.92rem; color: var(--rail); }

/* ---------- Contact ---------- */
.contact-band { background: var(--ink); color: var(--paper); padding: 76px 32px; }
.contact-band-inner { max-width: 620px; }
.contact-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; color: var(--white); }
.contact-band p { font-size: 1.05rem; color: rgba(241,238,228,0.82); margin-bottom: 30px; }
.contact-details { display: flex; flex-wrap: wrap; gap: 16px; }
.contact-link { border: 1px solid rgba(241,238,228,0.4); padding: 12px 20px; text-decoration: none; font-size: 0.95rem; color: var(--paper); transition: border-color 0.2s ease, color 0.2s ease; }
.contact-link:hover { border-color: var(--red); color: var(--white); }

.contact-page-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; }
.contact-page-details { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.contact-page-link { border: 1px solid var(--line); padding: 16px 20px; text-decoration: none; color: var(--ink); font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.contact-page-link:hover { border-color: var(--red); color: var(--red); }
.contact-note { background: var(--white); border: 1px solid var(--line); padding: 26px 28px; }
.contact-note h3 { font-size: 1.1rem; margin-bottom: 10px; }
.contact-note p { font-size: 0.92rem; color: var(--rail); margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 22px 32px; font-size: 0.82rem; color: var(--rail); background: var(--paper);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .service-detail-media { order: 0; }
  .process-list { flex-direction: column; }
  .process-step { border-right: none; border-bottom: 1px solid var(--line); }
  .contact-page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 18px 20px;
    gap: 14px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-cta { margin-top: 6px; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 18px; }
  .hero-copy, .page-banner-copy, .section, .contact-band, .site-footer { padding-left: 18px; padding-right: 18px; }
  .hero { height: 64vh; }
  .gallery-grid, .preview-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lb-nav { font-size: 2.2rem; padding: 8px 10px; }
  .stud-list { flex-direction: column; gap: 14px; }
  .stud-list span { border-right: none; margin-right: 0; padding-right: 0; }
  .timeline::before { left: 74px; }
  .timeline-item { grid-template-columns: 60px 20px 1fr; column-gap: 12px; }
  .tl-year { font-size: 0.85rem; }
  .tl-content h3 { font-size: 1.2rem; }
}
