/* Barbaro — first draft. Colours follow the shield: black, ivory, and the logo red. */

:root {
  --bg: #090909;
  --bg-raised: #111111;
  --bg-tile: #161616;
  --cream: #f3efe6;
  --cream-soft: #c9c3b5;
  --muted: #8d887e;
  --line: rgba(243, 239, 230, 0.12);
  --line-strong: rgba(243, 239, 230, 0.22);
  --accent: #db0f1a;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 38rem;
  --page: min(1120px, calc(100% - 2.5rem));
  --header-h: 3.75rem;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

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

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--cream);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--cream);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--cream);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--cream);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  font-weight: 500;
}

.skip-link:focus {
  top: 1rem;
}

/* Header
   ------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 1.25rem;
  background: rgba(9, 9, 9, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
}

.brand span {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.15rem;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-soft);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--cream);
}

/* Hero
   ---- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h));
  padding: 3.5rem 1.25rem 4.5rem;
}

.hero-logo {
  width: min(20rem, 72vw);
  height: auto;
  margin: 0 auto;
}

.hero-name {
  margin: 1.75rem 0 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.hairline {
  display: block;
  width: 2rem;
  height: 1px;
  margin: 1.05rem auto 0;
  background: var(--accent);
}

.hero-tag {
  margin: 1.05rem 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
}

/* Sections
   -------- */

.section {
  padding: 5.5rem 0 5rem;
  border-top: 1px solid var(--line);
}

.section-inner {
  width: var(--page);
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: var(--measure);
  width: min(var(--measure), calc(100% - 2.5rem));
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h1,
.section h2 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
}

.about .prose,
.prose {
  margin-top: 1.75rem;
  max-width: var(--measure);
}

.prose p,
.lede,
.card-notes,
.footer-note,
.footer-fine {
  color: var(--cream-soft);
}

.prose p {
  margin: 0 0 1.1rem;
  font-size: 1.125rem;
  line-height: 1.75;
}

.prose p:last-child {
  margin-bottom: 0;
}

.lede {
  max-width: 40rem;
  margin: 1.35rem 0 2.75rem;
  font-size: 1.05rem;
}

/* Gallery
   ------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 2rem 1.35rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  min-width: 0;
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-tile);
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

button.card-media {
  cursor: zoom-in;
  width: 100%;
  color: inherit;
}

button.card-media:hover img,
button.card-media:focus-visible img {
  transform: scale(1.03);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card.is-placeholder .card-media {
  background:
    linear-gradient(180deg, #181818 0%, #101010 100%);
  border-bottom: 1px dashed var(--line-strong);
}

.card-watermark {
  width: 38% !important;
  height: auto !important;
  object-fit: contain !important;
  opacity: 0.22;
}

.card-badge {
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-soft);
  border: 1px solid var(--line-strong);
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
  background: rgba(9, 9, 9, 0.55);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem 1.2rem 1.45rem;
  flex: 1;
}

.card-name {
  font-size: 1.7rem;
  font-weight: 500;
}

.card-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-notes {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.noscript {
  margin-top: 1.5rem;
  color: var(--muted);
}

code {
  font-size: 0.9em;
}

/* Footer / contact
   ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 5.5rem 0 3.5rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer h2 {
  margin-bottom: 2rem;
}

.footer-shield {
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 1.15rem;
}

.footer-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-note {
  margin: 0.7rem 0 0;
}

.footer-fine {
  margin: 2.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  max-width: 26rem;
  color: var(--muted);
}

.footer-copy {
  margin: 1.5rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Lightbox
   -------- */

.lightbox {
  width: min(52rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 2.5rem 1.5rem 1.5rem;
  border: 1px solid var(--line-strong);
  background: #0c0c0c;
  color: var(--cream);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-close,
.lightbox-nav {
  appearance: none;
  background: none;
  border: 0;
  color: var(--cream-soft);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.35rem 0.2rem;
}

.lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: var(--cream);
}

.lightbox-nav[hidden] {
  display: none;
}

.lightbox-caption {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Responsive
   ---------- */

@media (max-width: 640px) {
  :root {
    --page: calc(100% - 2rem);
    --header-h: 3.4rem;
  }

  body {
    font-size: 1rem;
  }

  .site-header {
    padding: 0 0.9rem;
  }

  .brand span {
    font-size: 0.95rem;
    letter-spacing: 0.22em;
  }

  .site-nav {
    gap: 0.75rem;
  }

  .site-nav a {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .hero {
    min-height: calc(100svh - var(--header-h));
    padding: 2.5rem 1rem 3.25rem;
  }

  .hero-logo {
    width: min(16.5rem, 78vw);
  }

  .section {
    padding: 3.75rem 0 3.5rem;
  }

  .section-inner.narrow {
    width: var(--page);
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-name {
    font-size: 1.5rem;
  }

  .prose p {
    font-size: 1.05rem;
  }

  .site-footer {
    padding: 3.75rem 0 2.75rem;
  }
}

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

  .card-media img {
    transition: none;
  }
}
