:root {
  --bg: #fbf9f0;
  --bg-strong: #f2eee0;
  --text: #000;
  --muted: rgba(0, 0, 0, 0.6);
  --accent: #f2e84e;
  --radius: 24px;
  --pill-radius: 48px;
  --section-gap: clamp(6rem, 12vw, 12rem);
  --page-gutter: min(4vw, 2rem);
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-strong: #1e1e1c;
  --text: #f0ede4;
  --muted: rgba(240, 237, 228, 0.55);
  --accent: #f2e84e;
}

[data-theme="dark"] .pill-light,
[data-theme="dark"] .pill-accent {
  color: #000;
}

[data-theme="dark"] .pill-outline {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .footer-wordmark {
  color: #000;
}

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

html {
  scroll-behavior: smooth;
  background: #2a3a30;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, -8%); }
  50% { transform: translate(3%, 6%); }
  75% { transform: translate(-7%, 2%); }
}

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

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

.section-inner {
  width: min(1180px, calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #2a3a30;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.hero-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--page-gutter);
}

.brand-mark,
h1,
h2,
.footer-wordmark {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.6px;
}

.brand-mark {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  flex: 1;
  color: #fff;
}

.nav-logo {
  flex: 0 0 auto;
  display: flex;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-context {
  flex: 1;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.theme-toggle {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.hero-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  height: 100%;
  padding: 0 var(--page-gutter);
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  color: #fff;
}

.hero-copy {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255, 255, 255, 0.8);
}

.pill-light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.hero-photo-meta {
  position: absolute;
  z-index: 5;
  bottom: 2.5rem;
  left: 2.5rem;
  right: 2.5rem;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-arrow {
  position: absolute;
  z-index: 5;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0.5rem;
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Main content layer (sits above yellow footer) ── */
.main-content {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding-top: var(--section-gap);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  /* Rounded bottom to reveal yellow footer beneath */
  border-radius: 0 0 clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px);
}

/* ── Shared ────────────────────────────────────── */
.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--pill-radius);
  font-size: 0.98rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.28s ease, background-color 0.28s ease, color 0.28s ease;
}

.pill-button:hover,
.pill-button:focus-visible {
  transform: translateY(-2px);
}

.pill-accent {
  background: var(--accent);
}

.pill-outline {
  background: rgba(0, 0, 0, 0.03);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.pill-light-outline {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* ── Sections ──────────────────────────────────── */
.section-block + .section-block {
  margin-top: var(--section-gap);
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  text-align: center;
  justify-items: center;
}

h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
}

.section-desc {
  margin: -0.75rem auto 2rem;
  max-width: 52rem;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

/* ── Marquee (Collections) ─────────────────────── */
.marquee-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  padding: 1rem 0;
}

.marquee-row {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  animation: marquee-left 28s linear infinite;
}

.marquee-reverse .marquee-content {
  animation-name: marquee-right;
  animation-duration: 32s;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.marquee-item {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.marquee-item:hover {
  opacity: 0.5;
}

.marquee-sep {
  color: var(--muted);
  font-size: 0.6em;
  user-select: none;
}

/* ── Gallery Wall ──────────────────────────────── */
.gallery-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.gallery-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transition-delay: calc(var(--stagger, 0) * 0.12s);
}

.gallery-card.card-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-link {
  display: block;
  color: inherit;
}

.gallery-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 5;
  background: linear-gradient(110deg, var(--bg-strong) 30%, var(--bg) 50%, var(--bg-strong) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.gallery-link:hover .gallery-media img {
  transform: scale(1.03);
}

/* Hover overlay with title */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 1.15rem;
  opacity: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.55));
  transition: opacity 0.3s ease;
}

.card-overlay-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.overlay-title {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
}

.overlay-action {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-link:hover .card-overlay,
  .gallery-link:focus-visible .card-overlay {
    opacity: 1;
  }
}

/* Mobile: always show caption below */
.card-caption {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.15rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.caption-arrow {
  color: var(--muted);
}

/* ── Footer CTA ────────────────────────────────── */
.footer-cta {
  text-align: center;
  display: grid;
  gap: 3.5rem;
  justify-items: center;
  margin-top: var(--section-gap);
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.cta-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-cta p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ── Footer Credit ─────────────────────────────── */
.footer-credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-credit p {
  margin: 0;
}

.footer-credit a {
  transition: color 0.2s ease;
}

.footer-credit a:hover {
  color: var(--text);
}

.back-to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-strong);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background-color 0.2s ease;
}

.back-to-top:hover {
  background: color-mix(in srgb, var(--bg-strong) 70%, var(--text));
}

/* ── Footer (yellow, revealed on scroll) ───────── */
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--accent);
  overflow: hidden;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--page-gutter);
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
}

.footer-tagline {
  font-style: italic;
  font-family: "Instrument Serif", serif;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  transition: opacity 0.2s ease;
}

.footer-social a:hover {
  opacity: 0.6;
}

.footer-wordmark-wrap {
  padding: 0 var(--page-gutter);
  padding-bottom: 4rem;
  padding-top: 2rem;
  overflow: hidden;
}

.footer-wordmark {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 0.85;
  font-size: clamp(7rem, 24vw, 34rem);
  text-align: center;
  color: var(--text);
  pointer-events: none;
}

/* ── Scroll Reveal ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-wall {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .section-inner {
    width: min(1180px, calc(100% - 1.4rem));
  }

  .nav-context {
    display: none;
  }

  .gallery-wall {
    grid-template-columns: 1fr;
  }

  .card-overlay {
    display: none;
  }

  .card-caption {
    display: flex;
  }

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

  .pill-button {
    width: 100%;
  }

  .footer-bar {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 560px) {

  .hero-photo-meta {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-arrow {
    animation: none;
  }
}
