/* Public site styles. Admin-specific components live in admin.css. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/Outfit-Latin-c6b412a5.woff2") format("woff2");
}

:root {
  --background-color: #121210;
  --surface-color: #1a1a17;
  --bold-text-color: #f3f0e8;
  --text-color: #d2cfc6;
  --subtle-text-color: #8e8b83;
  --line-color: rgba(243, 240, 232, 0.14);
  --accent-color: #d8a36b;
  --navbar-height: 5.5rem;
  --container-width: 60rem;
  --wide-container-width: 90rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background-color);
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--bold-text-color);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #fff;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--accent-color);
  color: #121210;
}

#admin-bar {
  background: #242421;
  border-bottom: 1px solid var(--line-color);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.6rem 1rem;
  text-align: center;
}

#admin-bar .header-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

#admin-bar a {
  color: var(--text-color);
}

.site-header {
  background: rgba(18, 18, 16, 0.92);
  border-bottom: 1px solid var(--line-color);
  height: var(--navbar-height);
  position: relative;
  z-index: 20;
}

.site-header__inner {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--wide-container-width);
  padding: 0 2rem;
}

.site-brand {
  align-items: baseline;
  display: inline-flex;
  gap: 0.8rem;
  text-decoration: none;
}

.site-brand__name {
  color: var(--bold-text-color);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-brand__descriptor {
  color: var(--subtle-text-color);
  font-size: 0.75rem;
  font-weight: 350;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

main.container {
  margin: 0 auto;
}

.eyebrow {
  color: var(--accent-color);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.18em;
  line-height: 1.4;
  margin: 0;
  text-transform: uppercase;
}

/* Album index */

.albums-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 5rem auto;
  max-width: var(--wide-container-width);
  padding: 0 1rem;
}

.album-card {
  aspect-ratio: 16 / 9;
  color: inherit;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.album-card .image-wrapper,
.album-card .image-wrapper picture,
.album-card .image-wrapper img {
  display: block;
  height: 100%;
  width: 100%;
}

.album-card .image-wrapper {
  background: var(--surface-color);
  height: 100%;
}

.album-card .image-wrapper img {
  object-fit: cover;
  transition: filter 300ms ease, transform 600ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.album-card:hover .image-wrapper img,
.album-card:focus-visible .image-wrapper img {
  filter: brightness(1.06);
  transform: scale(1.02);
}

.album-card .overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0) 100%);
  bottom: 0;
  left: 0;
  padding: 1.5rem;
  position: absolute;
  right: 0;
}

.album-card .overlay h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.3rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.album-card .overlay time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Album detail */

.album-page__main {
  max-width: none;
}

.post .post-header {
  background: var(--surface-color);
  height: max(38rem, calc(100svh - var(--navbar-height)));
  margin: 0 0 clamp(6rem, 10vw, 10rem);
  min-height: 38rem;
  overflow: hidden;
  position: relative;
}

.post .post-header .cover-image {
  height: 100%;
  inset: 0;
  margin: 0;
  position: absolute;
  width: 100%;
}

.post .post-header .cover-image picture,
.post .post-header .cover-image img {
  display: block;
  height: 100%;
  width: 100%;
}

.post .post-header .cover-image img {
  filter: saturate(0.9) brightness(0.72);
  object-fit: cover;
}

.post .post-header::after {
  background:
    linear-gradient(90deg, rgba(8, 8, 7, 0.72) 0%, rgba(8, 8, 7, 0.2) 55%, rgba(8, 8, 7, 0.06) 100%),
    linear-gradient(0deg, rgba(8, 8, 7, 0.62) 0%, transparent 45%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.post .post-header .banner-content {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  margin: 0 auto;
  max-width: var(--wide-container-width);
  padding: 4rem 2rem 6rem;
  position: relative;
  text-align: left;
  z-index: 2;
}

.post .post-header .banner-content .eyebrow {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.post .post-header .banner-content h1 {
  color: #fff;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 380;
  letter-spacing: -0.06em;
  line-height: 0.88;
  margin: 0;
  max-width: 12ch;
  text-wrap: balance;
}

.post .post-header .banner-content .subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 350;
  line-height: 1.45;
  margin: 1.75rem 0 0;
  max-width: 32rem;
}

.album-scroll-cue {
  align-items: center;
  bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 0.68rem;
  gap: 0.8rem;
  letter-spacing: 0.14em;
  position: absolute;
  text-decoration: none;
  text-transform: uppercase;
}

.album-scroll-cue svg {
  transition: transform 180ms ease;
}

.album-scroll-cue:hover svg {
  transform: translateY(0.25rem);
}

.post > .content {
  margin: 0 auto;
  max-width: min(var(--container-width), calc(100vw - 3rem));
}

.content-block-container {
  margin: 0;
}

.post .content section {
  margin: 0 0 clamp(3rem, 7vw, 6rem);
}

.content-block-container img {
  display: block;
  height: auto;
  max-width: 100%;
  transition: filter 220ms ease;
}

.content-block-container a:hover img {
  filter: brightness(1.05);
}

.content-block-paragraph {
  color: var(--text-color);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  font-weight: 350;
  line-height: 1.85;
  margin: 0 auto;
  max-width: 42rem;
}

.content-block-paragraph h1,
.content-block-paragraph h2,
.content-block-paragraph h3,
.content-block-paragraph h4,
.content-block-paragraph h5,
.content-block-paragraph h6 {
  color: var(--bold-text-color);
  font-weight: 420;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
}

.content-block-paragraph h1,
.content-block-paragraph h2 {
  font-size: clamp(1.5rem, 3.33vw, 3rem);
}

.content-block-paragraph h3,
.content-block-paragraph h4,
.content-block-paragraph h5,
.content-block-paragraph h6 {
  font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.content-block-paragraph p {
  margin: 0 0 1.4rem;
}

.content-block-image {
  text-align: center;
}

.content-block-image picture,
.content-block-image img {
  margin: 0 auto;
}

.image-caption,
.gallery-caption {
  color: var(--subtle-text-color);
  font-size: 0.78rem;
  font-weight: 350;
  letter-spacing: 0.025em;
  line-height: 1.5;
  margin: 1rem auto 0;
  max-width: 40rem;
  text-align: center;
}

.gallery {
  display: flow-root;
  overflow: visible;
  text-align: center;
}

.gallery-row {
  align-items: center;
  display: flex;
  gap: clamp(0.5rem, 1.2vw, 1rem);
  justify-content: center;
}

.gallery figure {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}

.gallery figure a,
.gallery figure picture {
  display: block;
}

.gallery figure img {
  max-height: 42rem;
  object-fit: contain;
  width: auto;
}

.album-back-link {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin: clamp(7rem, 13vw, 13rem) auto 0;
  max-width: var(--wide-container-width);
  padding: 0 2rem 2.25rem;
}

.album-back-link a {
  align-items: center;
  display: inline-flex;
  font-size: 0.8rem;
  gap: 0.7rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.album-back-link a svg {
  transition: transform 180ms ease;
}

.album-back-link a:hover svg {
  transform: translateX(-0.25rem);
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line-color);
  color: var(--subtle-text-color);
  display: flex;
  font-size: 0.68rem;
  justify-content: space-between;
  letter-spacing: 0.12em;
  margin: 0 auto;
  max-width: var(--wide-container-width);
  padding: 2rem;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.pswp__img {
  object-fit: contain;
}

.pswp__custom-caption {
  background: rgba(0, 0, 0, 0.75);
  bottom: 0;
  color: #fff;
  font-size: 16px;
  left: 0;
  line-height: 1.4;
  max-height: 30%;
  overflow-y: auto;
  padding: 12px 16px;
  position: absolute;
  right: 0;
  text-align: center;
}

@media (max-width: 760px) {
  :root {
    --navbar-height: 4.75rem;
  }

  .site-header__inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-brand__descriptor {
    display: none;
  }

  .albums-grid {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }

  .post .post-header {
    height: calc(100svh - var(--navbar-height));
    margin-bottom: 5rem;
    min-height: 34rem;
  }

  .post .post-header::after {
    background:
      linear-gradient(90deg, rgba(8, 8, 7, 0.55), rgba(8, 8, 7, 0.1)),
      linear-gradient(0deg, rgba(8, 8, 7, 0.72), transparent 62%);
  }

  .post .post-header .banner-content {
    justify-content: flex-end;
    padding: 4rem 1rem 6rem;
  }

  .post .post-header .banner-content h1 {
    font-size: clamp(3.6rem, 18vw, 6rem);
  }

  .post .post-header .banner-content .subtitle {
    font-size: 1rem;
    margin-top: 1.25rem;
    max-width: 24rem;
  }

  .post > .content {
    max-width: calc(100vw - 2rem);
  }

  .post .content section {
    margin-bottom: 3.5rem;
  }

  .gallery-row {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery figure img {
    height: auto;
    max-height: none;
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .album-back-link {
    justify-content: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

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

  .album-card .image-wrapper img,
  .album-scroll-cue svg,
  .album-back-link a svg {
    transition: none;
  }
}
