/* ── Design tokens ───────────────────────── */
:root {
  --bg:     #FAFAF8;
  --ink:    #1F1B17;
  --ink-2:  #6C645B;
  --ink-3:  #9D9589;
  --border: rgba(0, 0, 0, 0.07);
  --blue:   #2B5CE6;
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ────────────────────────────────── */
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geologica', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: none;
  border: none;
  text-decoration: none;
  font-family: 'Geologica', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.75; }
.btn-bracket { color: var(--blue); }

/* ── Site nav ────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 64px;
  background: rgba(250, 250, 248, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-nav__logo {
  width: 22px;
  height: 22px;
  display: block;
}

.site-nav__brand-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav__links {
  list-style: none;
  display: flex;
}

.site-nav__links a {
  font-family: 'Geologica', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s;
}


.site-nav__links a.is-active { color: var(--blue); }

/* ── Page layout ─────────────────────────── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px 32px 96px;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 160px 64px 64px;
}

.page-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.page-h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--ink);
}

.page-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-2);
  font-weight: 300;
  margin-top: 48px;
}

.page-body p { margin-bottom: 24px; }
.page-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--border); }

.page-intro {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  font-weight: 300;
  max-width: 560px;
}

/* ── Services / Expertise grid ───────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 48px 64px;
  min-height: 400px;
  border-bottom: 1px solid var(--border);
}

.service-card:nth-child(even) {
  border-left: 1px solid var(--border);
}

.service-card--full {
  grid-column: 1 / -1;
}

.service-card--full .service-body {
  max-width: 560px;
}

.service-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
  margin-top: 20px;
}

.service-body {
  font-size: 15px;
  line-height: 26px;
  font-weight: 300;
  color: var(--ink-2);
  margin-top: 14px;
  max-width: 420px;
}

.service-tag {
  position: absolute;
  top: 48px;
  right: 64px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover .card-overlay {
  opacity: 1;
}

.overlay-text {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.9;
}

.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Expertise cards (dithering shader header + collapsible) ── */
.expertise-stack {
  border-top: 1px solid var(--border);
  background: #fff;
  position: relative;
  z-index: 99;
}

.expertise-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.expertise-card__shader {
  display: block;
  width: 100%;
  height: 357px;
  background: #fff;
}

.expertise-card[data-shader="dots"] .expertise-card__shader {
  outline: 2px solid var(--accent, #F6AD00);
  outline-offset: -2px;
}
.expertise-card:not([data-shader="dots"]) .expertise-card__shader {
  border-bottom: 3px solid var(--accent, #1A34D6);
}

.expertise-card__band {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 12px 64px;
  background: #fff;
}

.expertise-card__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.expertise-card__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 32px;
  line-height: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #000;
  margin-top: 20px;
}

.expertise-card__desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 26px;
  font-weight: 300;
  color: #000;
  max-width: 560px;
}

.expertise-card__toggle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  outline: 1px solid transparent;
  transition: outline-color 0.2s;
}

.expertise-card.is-open .expertise-card__toggle {
  outline-color: #000;
}

.expertise-card__toggle-bar {
  position: absolute;
  background: #606060;
  transition: opacity 0.2s, transform 0.25s ease;
}

.expertise-card__toggle-bar--h {
  width: 28px;
  height: 2px;
}

.expertise-card__toggle-bar--v {
  width: 2px;
  height: 28px;
}

.expertise-card.is-open .expertise-card__toggle-bar--v {
  opacity: 0;
}

.expertise-card__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px 64px 36px;
  background: #fff;
}

.expertise-card__body[hidden] { display: none; }

.expertise-card__sub {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.expertise-card__sub-label {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-family: 'Geologica', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 14px;
  text-transform: uppercase;
  color: #000;
  background: rgba(255, 255, 255, 0.4);
}

.expertise-card__sub-desc {
  font-size: 15px;
  line-height: 26px;
  font-weight: 300;
  color: #000;
  max-width: 720px;
}

@media (max-width: 768px) {
  .expertise-card__band,
  .expertise-card__body { padding-left: 24px; padding-right: 24px; }
  .expertise-card__shader { height: 220px; }
  .expertise-card__title { font-size: 26px; line-height: 32px; }
}

/* ── Expertise snap (home page single-card scroll) ─────── */
.expertise-snap {
  position: relative;
  height: calc(100vh * var(--exp-count, 1));
  height: calc(100svh * var(--exp-count, 1));
  border-top: 1px solid var(--border);
  background: #fff;
  isolation: isolate;
  z-index: 1;
}

.expertise-snap__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  background: #fff;
  overflow: hidden;
  padding: 88px 0 64px;
  z-index: 2;
}

.expertise-snap__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.expertise-snap .expertise-card {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.expertise-snap .expertise-card.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.expertise-snap .expertise-card.is-open {
  height: 100%;
}

.expertise-snap .expertise-card__shader {
  height: clamp(240px, 42vh, 420px);
  flex-shrink: 0;
}

.expertise-snap .expertise-card.is-open .expertise-card__shader {
  height: clamp(72px, 12vh, 132px);
  height: clamp(72px, 12svh, 132px);
}

.expertise-snap .expertise-card__band {
  flex-shrink: 0;
}

.expertise-snap .expertise-card.is-open .expertise-card__band {
  padding-top: 8px;
  padding-bottom: 8px;
}

.expertise-snap .expertise-card.is-open .expertise-card__title {
  margin-top: 8px;
}

.expertise-snap .expertise-card.is-open .expertise-card__desc {
  margin-top: 8px;
  line-height: 24px;
  max-width: 760px;
}

.expertise-snap .expertise-card__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.expertise-snap .expertise-card.is-open .expertise-card__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  padding-top: 18px;
  padding-bottom: 24px;
}

.expertise-snap .expertise-card.is-open .expertise-card__sub {
  gap: 10px;
}

.expertise-snap .expertise-card.is-open .expertise-card__sub-desc {
  line-height: 24px;
}

.expertise-snap__counter {
  position: absolute;
  top: 88px;
  right: 64px;
  z-index: 5;
  font-family: 'Geologica', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  mix-blend-mode: difference;
}

.expertise-snap__counter-current {
  color: #fff;
}

.expertise-snap__nav {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

.expertise-snap__nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Geologica', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  text-align: left;
}

.expertise-snap__nav-marker {
  width: 18px;
  height: 2px;
  background: rgba(0, 0, 0, 0.25);
  transition: width 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.expertise-snap__nav-item.is-active {
  color: var(--nav-color);
  font-weight: 400;
}

.expertise-snap__nav-item.is-active .expertise-snap__nav-marker {
  width: 32px;
  background: var(--nav-color);
}

@media (max-width: 768px) {
  .expertise-snap__sticky { padding: 72px 0 16px; }
  .expertise-snap__counter { right: 24px; top: 80px; }
  .expertise-snap .expertise-card__shader { height: clamp(200px, 36vh, 320px); }
  .expertise-snap .expertise-card.is-open .expertise-card__shader {
    height: clamp(64px, 12vh, 100px);
    height: clamp(64px, 12svh, 100px);
  }
  .expertise-snap .expertise-card.is-open .expertise-card__body {
    gap: 18px 24px;
    padding-top: 18px;
    padding-bottom: 24px;
  }
  .expertise-snap__nav { display: none; }
}

@media (max-width: 560px) {
  .expertise-snap .expertise-card.is-open .expertise-card__body {
    grid-template-columns: 1fr;
  }
}

/* ── Selected work section ───────────────── */
.selected-work {
  border-top: 1px solid var(--border);
  padding-bottom: 96px;
  z-index: 99;
  background-color: white;
  position: relative;
}

.work-header {
  padding: 72px 64px 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.work-heading {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 48px;
  line-height: 52px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.work-footer {
  padding: 40px 64px 0;
  display: flex;
  justify-content: center;
}

/* ── Work cards ──────────────────────────── */
.work-card {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.work-card:last-child {
  border-right: none;
}

.work-card-media {
  aspect-ratio: 3 / 4;
  background: #ECECE7;
  overflow: hidden;
  position: relative;
}

.work-card-media img,
.work-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.work-card-video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.6s ease;
}

.work-card:hover .work-card-media img,
.work-card:hover .work-card-media video {
  transform: scale(1.03);
}

.work-card--has-video:hover .work-card-media img,
.work-card--has-video:hover .work-card-placeholder {
  opacity: 0;
}

.work-card--has-video:hover .work-card-video {
  opacity: 1;
}

.work-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.work-card-info {
  padding: 20px 28px 36px;
}

.work-card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 22px;
  line-height: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}

.work-card-summary {
  font-size: 13px;
  line-height: 20px;
  font-weight: 300;
  color: var(--ink-2);
}

.work-card-meta {
  margin-top: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── CTA ─────────────────────────────────── */
.cta {
  border-top: 1px solid var(--border);
  padding: 144px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  position: relative;
  z-index: 999;
  background-color: var(--bg);
}

.cta-copy { max-width: 700px; }

.cta-headline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 86px;
  line-height: 84px;
  letter-spacing: -0.045em;
  font-weight: 300;
  color: var(--ink);
}

.cta-body {
  margin-top: 24px;
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 16px;
  line-height: 28px;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 380px;
}

/* ── Footer ──────────────────────────────── */
footer {
  padding: 32px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(237,232,223,0.07);
  position: relative;
  z-index: 999;
  background-color: var(--bg);
}

footer span {
  font-family: 'Geologica';
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Mobile ──────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { padding: 14px 20px; }
  .site-nav__brand-name { font-size: 16px; }
  .site-nav__links { gap: 18px; }
  .site-nav__links a { font-size: 10px; letter-spacing: 0.12em; }

  .page { padding: 120px 24px 64px; }
  .page-header { padding: 120px 24px 48px; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 36px 24px; min-height: auto; }
  .service-card:nth-child(even) { border-left: none; }
  .service-tag { top: 36px; right: 24px; }

  .work-header {
    padding: 48px 24px 32px;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .work-heading { font-size: 36px; line-height: 40px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { border-right: none; border-bottom: 1px solid var(--border); }
  .work-card:last-child { border-bottom: none; }
  .work-footer { padding: 32px 24px 0; justify-content: flex-start; }

  .cta {
    padding: 80px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  .cta-headline { font-size: 52px; line-height: 52px; }
  .cta-body { max-width: 100%; }

  footer {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
