/* mantvydas.photography — site stylesheet
   Tokens and rules pulled from the brand book (brand-files/brandbook.html, page 27 "Site"). */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,600;0,800;1,400&display=swap');

:root {
  --ink: #201e1d;
  --ground: #f3f2f2;
  --surface: #eae9e9;
  --signal: #ec3013;
  --signal-600: #dd2b0f;
  --signal-700: #ae1800;
  --muted: #6f6a68;
  --muted-2: #4a4645;
  --divider: #d8d5d3;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --font: 'Archivo', system-ui, sans-serif;
  --container: 1180px;
}

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

html { color-scheme: light; }

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

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

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

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
::selection { background: rgba(236, 48, 19, 0.3); }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* — wordmark (used standalone, e.g. in the footer) — */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wordmark .domain {
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* — topbar (social links) — */
.topbar {
  background: var(--ink);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--space-4);
  padding-block: 8px;
}
.topbar-inner a {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.topbar-inner a:hover { color: var(--signal); border-color: var(--signal); }

/* — header — */
.site-header {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.site-header::before {
  /* scrim so the nav stays legible over whatever the photo is doing */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32, 30, 29, 0.5), rgba(32, 30, 29, 0) 55%);
  z-index: 1;
  pointer-events: none;
}

.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.site-nav a {
  padding-bottom: 5px;
  border-bottom: 3px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current='page'] {
  color: #fff;
  font-weight: 600;
  border-bottom-color: var(--signal);
}

/* — wordmark panel, positioned per the brand book's mark geometry:
   flush left, lifted 0.11 × frame height off the bottom — */
.brand-panel {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 11%;
  display: inline-flex;
  background: var(--ink);
  padding: 22px 28px 20px 24px;
}
.wordmark-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.wordmark-stack .name {
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.wordmark-stack .domain {
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.85);
}

/* — buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease;
}
.btn-primary {
  background: var(--signal);
  color: #fff;
  padding: 11px 16px 11px 18px;
}
.btn-primary:hover { background: var(--signal-600); }
.btn-primary:active { background: var(--signal-700); }
.btn-primary svg { transition: transform 120ms ease; }
.btn-primary:hover svg { transform: translateX(2px); }

/* — hero / index — */
.hero {
  padding-block: var(--space-16) var(--space-8);
}
.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  max-width: 14ch;
}
.hero-kicker {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: var(--space-8);
}
.hero-strip figure { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.hero-strip img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--divider);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  font-size: 12px;
  color: var(--muted);
}

/* — gallery — */
.gallery {
  padding-block: var(--space-12);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 3px solid var(--ink);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-6);
}
.section-head h2 { font-size: 24px; }
.section-head .section-note {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6) var(--space-4);
}
.frame {
  display: block;
  color: inherit;
}
.frame figure {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}
.frame.portrait figure { aspect-ratio: 2 / 3; }
.frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 120ms ease;
}
.frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 13px;
}
.frame .cap-place {
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
.frame .cap-tag {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  flex: none;
}
.frame:hover .cap-place,
.frame:focus-visible .cap-place {
  color: var(--signal);
  border-color: var(--signal);
}

/* — highlights carousel — */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  transition: opacity 120ms ease;
}
.carousel-slide.active { opacity: 1; z-index: 1; }
.carousel-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.carousel-slide .cs-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(32,30,29,0) 60%, rgba(32,30,29,0.65) 100%);
}
.carousel-slide .cs-caption {
  position: absolute;
  left: var(--space-6);
  bottom: var(--space-6);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.cs-dots {
  position: absolute;
  z-index: 2;
  right: var(--space-6);
  top: var(--space-6);
  display: flex;
  gap: 8px;
}
.cs-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.cs-dot:hover { background: rgba(255,255,255,0.7); }
.cs-dot.active { background: var(--signal); transform: scale(1.25); }

/* — galleries (index of covers -> per-category detail view) — */
.galleries {
  padding-block: var(--space-12);
  border-top: 2px solid var(--divider);
}

/* — index: one cover card per category — */
.gallery-index[hidden] { display: none; }
.gallery-index:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.gallery-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--surface);
}
.gallery-card figure { position: absolute; inset: 0; margin: 0; }
.gallery-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}
.gallery-card .gc-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(32,30,29,0) 45%, rgba(32,30,29,0.75) 100%);
}
.gallery-card .gc-label {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  text-align: left;
}
.gallery-card .gc-count {
  position: absolute;
  right: var(--space-3);
  top: var(--space-3);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.gallery-card:hover img,
.gallery-card:focus-visible img { transform: scale(1.04); }
.gallery-card:hover .gc-label,
.gallery-card:focus-visible .gc-label { color: var(--signal); }

/* — detail: back link + one category's photos — */
.gallery-detail { margin-top: var(--space-2); }
.gallery-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: var(--space-6);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 120ms ease;
}
.gallery-back:hover { color: var(--signal); }

.category-grid[hidden] { display: none; }
.category-grid .gallery-item figure {
  aspect-ratio: var(--ar, 3 / 2);
  cursor: pointer;
}

/* — aerial note — */
.aerial {
  padding-block: var(--space-12);
  border-top: 2px solid var(--divider);
}
.aerial-row {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  flex-wrap: wrap;
}
.aerial-row figure {
  flex: 1 1 380px;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  min-width: 280px;
}
.aerial-row img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.aerial-carousel {
  flex: 1 1 380px;
  min-width: 280px;
}
.aerial-copy {
  flex: 1 1 320px;
  min-width: 260px;
}
.aerial-copy p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  max-width: 46ch;
}

/* — prints / licence — */
.prints {
  padding-block: var(--space-12);
  border-top: 2px solid var(--divider);
}
.terms {
  display: grid;
  gap: 0;
}
.terms-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--divider);
  padding: var(--space-3) 0;
  font-size: 14px;
}
.terms-row span:last-child { font-weight: 600; }

/* — footer / contact — */
.site-footer {
  border-top: 3px solid var(--ink);
  padding-block: var(--space-8);
}
.footer-credit {
  font-size: 18px;
  font-weight: 600;
  border-bottom: 3px solid var(--signal);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  display: inline-block;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer-tagline {
  font-size: 15px;
  color: var(--muted-2);
  max-width: 40ch;
}
.footer-contact {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.footer-contact a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
.footer-contact a:hover { color: var(--signal); border-color: var(--signal); }
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--divider);
}
.footer-social a {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.footer-social a:hover { color: var(--signal); border-color: var(--signal); }
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-3);
  border-top: 1px solid var(--divider);
  font-size: 11px;
  color: var(--muted);
}

/* — lightbox — */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(32, 30, 29, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox:not([hidden]) { display: flex; }
.lb-figure {
  margin: 0;
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.lb-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.lb-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-align: center;
}
.lb-close, .lb-nav {
  position: fixed;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-2);
  transition: color 120ms ease;
}
.lb-close:hover, .lb-nav:hover { color: var(--signal); }
.lb-close { top: var(--space-4); right: var(--space-4); }
.lb-prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--space-4); top: 50%; transform: translateY(-50%); }

/* — responsive — */
@media (max-width: 860px) {
  .site-header { height: 170px; }
  .site-nav { gap: var(--space-3); font-size: 12px; padding-inline: var(--space-4); }
  .brand-panel { padding: 16px 20px 14px 18px; }
  .wordmark-stack .name { font-size: 26px; }
  .wordmark-stack .domain { font-size: 13px; }
  .wrap { padding-inline: var(--space-4); }
  .hero { padding-block: var(--space-8) var(--space-6); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .gallery-index:not([hidden]) { grid-template-columns: repeat(3, 1fr); }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-contact { text-align: left; }
}

@media (max-width: 540px) {
  .site-header { height: 130px; }
  .site-nav a:not([aria-current='page']):not(:last-child) { display: none; }
  .brand-panel { padding: 12px 16px 10px 14px; }
  .wordmark-stack { gap: 4px; }
  .wordmark-stack .name { font-size: 19px; }
  .wordmark-stack .domain { font-size: 10px; }
  .grid { grid-template-columns: 1fr; }
  .hero-strip { grid-template-columns: 1fr; }
  .gallery-index:not([hidden]) { grid-template-columns: repeat(2, 1fr); }
  .hero-row { align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
}
