@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #f1ede6;
  --surface: #e7e1d7;
  --ink: #2a2727;
  --muted: #6b6560;
  --line: #d6cfc3;
  --accent: #2273f3;
  --accent-ink: #1657c2;
  --dark: #1f1d1d;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 500; font-size: 16px; text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: background .2s, color .2s;
}
.button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--ghost { background: transparent; color: var(--ink); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.logo { font-family: var(--serif); font-size: 21px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 15px; text-decoration: none; padding: 8px 14px; border-radius: 999px; white-space: nowrap; color: var(--muted);
}
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--surface); }
.nav .nav__contact { color: var(--bg); background: var(--ink); margin-left: 8px; }
.nav .nav__contact:hover { background: var(--accent); color: #fff; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center;
  padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(56px, 9vw, 112px);
}
.hero__name { font-size: clamp(48px, 8vw, 104px); margin: 14px 0 28px; }
.hero__intro { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; max-width: 36em; color: #3d3a38; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% var(--radius) var(--radius); }

/* categories and cards */
.category { padding-top: 56px; padding-bottom: 40px; scroll-margin-top: 68px; }
.category + .category { border-top: 1px solid var(--line); }
.category__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 36px; }
.category__title { font-size: clamp(32px, 4.4vw, 52px); }
.category__title a { text-decoration: none; }
.category__title a:hover { color: var(--accent); }
.category__blurb { flex-basis: 100%; color: var(--muted); max-width: 34em; }
.count { white-space: nowrap; padding: 3px 11px; border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--ink); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.card { padding-top: 40px; border-top: 1px solid var(--line); }
.card:nth-child(-n+2) { padding-top: 0; border-top: 0; }
.card a { display: block; text-decoration: none; }
.cover {
  aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 18px;
}
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.cover--phones { display: flex; justify-content: center; align-items: flex-start; gap: 4%; padding: 7% 8% 0; }
.cover--phones img { width: 27%; height: auto; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.card a:hover .cover img { transform: scale(1.03); }
.card__kicker { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.card__title { font-size: 28px; margin-bottom: 10px; }
.card a:hover .card__title { color: var(--accent); }
.card__summary { color: #4a4643; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.page-head { padding-top: 40px; }
.page-head + .category { padding-top: 0; }

/* project */
.project__head { padding-top: 40px; padding-bottom: 48px; max-width: 900px; margin-left: auto; margin-right: auto; }
.project__title { font-size: clamp(44px, 7vw, 88px); margin: 12px 0 24px; }
.project__summary { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; color: #3d3a38; margin-bottom: 28px; max-width: 40em; }

.section { padding: 32px 0; }
.section + .section { border-top: 1px solid var(--line); padding-top: 64px; margin-top: 32px; }
.section__text { max-width: calc(900px - 2 * var(--gutter)); margin: 0 auto 40px; }
.section__text h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 8px; }
.section__subtitle { color: var(--muted); font-size: 18px; margin-bottom: 8px; }
.section__text p + p, .section__text h2 + p:not(.section__subtitle), .section__subtitle + p { margin-top: 16px; }

.gallery { display: grid; gap: 28px; }
.row { display: grid; gap: 28px; align-items: start; }
.row--wide { grid-template-columns: 1fr; }
.row--duo { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); align-items: center; }
.row--trio { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.row--wide .shot:not(.shot--mobile) { max-width: 960px; margin: 0 auto; width: 100%; }
.row--phones { grid-template-columns: repeat(auto-fit, minmax(0, 260px)); justify-content: center; }
.row--tiles { grid-template-columns: repeat(auto-fit, minmax(0, 280px)); justify-content: center; }

.shot { margin: 0; }
.shot img, .shot video {
  width: 100%; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px rgba(40,30,20,.10);
}
.shot video { display: block; height: auto; }
.shot--mobile img, .shot--mobile video { border-radius: 22px; border: 6px solid var(--dark); }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.zoom { all: unset; display: block; cursor: zoom-in; border-radius: 10px; }
.zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 72px; padding-bottom: 96px; }
.pager__link {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 28px; border-radius: var(--radius);
  background: var(--surface); text-decoration: none; transition: background .2s, color .2s;
}
.pager__link span { font-size: 14px; color: var(--muted); }
.pager__link strong { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
.pager__link--next { text-align: right; }
.pager__link:hover { background: var(--ink); color: var(--bg); }
.pager__link:hover span { color: #bdb6ad; }

/* footer */
.site-footer { background: var(--dark); color: #f1ede6; padding: clamp(64px, 10vw, 120px) 0 32px; margin-top: 64px; }
.site-footer__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8db5ff; }
.site-footer__title { font-size: clamp(40px, 7vw, 88px); margin: 16px 0 48px; }
.site-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-link {
  display: flex; flex-direction: column; gap: 6px; padding: 28px; border-radius: var(--radius);
  border: 1px solid #45403d; text-decoration: none; transition: background .2s, border-color .2s;
}
.contact-link:hover { background: var(--accent); border-color: var(--accent); }
.contact-link__label { font-size: 14px; color: #bdb6ad; }
.contact-link:hover .contact-link__label { color: #e3ecff; }
.contact-link__value { font-family: var(--serif); font-size: clamp(22px, 2.8vw, 32px); overflow-wrap: anywhere; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 72px; padding-top: 24px; border-top: 1px solid #3a3634; font-size: 14px; color: #a39c94;
}
.site-footer__bottom a { text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(20, 18, 18, .92); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; padding: 56px 16px 16px; cursor: zoom-out; }
.lightbox__close {
  position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer;
}
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__nav[hidden], .lightbox__count:empty { display: none; }
.lightbox__count {
  position: fixed; top: 22px; left: 0; right: 0; margin: 0; text-align: center; pointer-events: none;
  color: #fff; font-size: 14px; letter-spacing: .04em;
}
html:has(.lightbox[open]) { overflow: hidden; }
@media (min-width: 861px) { .lightbox img { padding: 56px 72px 16px; } }

/* tablet and phone */
@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .logo { min-height: 36px; display: flex; align-items: center; }
  .nav { width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 12px; font-size: 14px; background: var(--surface); }
  .nav .nav__contact { margin-left: 0; }
  .category { scroll-margin-top: 110px; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero__photo { width: 200px; order: -1; }
  .cards { grid-template-columns: 1fr; gap: 32px; }
  .card, .card:nth-child(2) { padding-top: 32px; border-top: 1px solid var(--line); }
  .card:first-child { padding-top: 0; border-top: 0; }
  .row--duo, .row--trio { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .row--duo > :first-child, .row--trio > :first-child { grid-column: 1 / -1; }
  .row--duo .shot--mobile { grid-column: 1 / -1; max-width: 220px; justify-self: center; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .row--phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .row--phones > :only-child { grid-column: 1 / -1; max-width: 220px; justify-self: center; width: 100%; }
  .shot--mobile img, .shot--mobile video { border-width: 4px; border-radius: 16px; }
  .row--tiles { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { text-align: left; }
  .site-footer__links { grid-template-columns: 1fr; }
  .contact-link { padding: 22px; }
}

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