/* ─── 1. @font-face — Founders Grotesk (local system install → falls back to Helvetica Neue) ── */
/* When licensed WOFF2 files are acquired, replace src: local() with src: url('/fonts/founders-grotesk-*.woff2') */
@font-face {
  font-family: 'Founders Grotesk';
  src: local('Founders Grotesk Light'), local('FoundersGrotesk-Light');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Founders Grotesk';
  src: local('Founders Grotesk'), local('FoundersGrotesk-Regular');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── 2. Google Fonts — Cormorant Garamond (body serif) ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* ─── 3. CSS Custom Properties ────────────────────────────────────────────────────────────── */
:root {
  /* Color system */
  --bg-primary:   #0d0d0d;
  --bg-surface:   #141414;
  --bg-elevated:  #1e1e1e;
  --border:       #2a2a2a;
  --text-muted:   #666666;
  --text-body:    #a8a8a0;
  --text-heading: #f0ede6;
  --text-logo:    #ffffff;

  /* Typography */
  --font-display: 'neue-haas-grotesk-display', 'Founders Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body:    'Cormorant Garamond', 'Freight Text Pro', Georgia, serif;

  /* Type scale */
  --text-nav:     12px;
  --text-body-sz: 16px;
  --text-project: 14px;
  --text-section: 28px;
  --text-hero:    68px;

  /* Layout */
  --site-max:     1280px;
  --site-pad:     40px;
  --nav-h:        64px;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:   200ms;
  --dur-reveal: 600ms;
}

/* ─── 4. Reset ─────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { background: none; border: none; cursor: pointer; }

/* ─── 5. Base / Body ───────────────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: var(--text-body-sz);
  background: var(--bg-primary);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  overflow-x: hidden;
}

/* ─── 6. Page Load Overlay ─────────────────────────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  pointer-events: none;
}

/* ─── 7. Custom Cursor ─────────────────────────────────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--text-heading);
  border-radius: 50%;
  pointer-events: none;
  z-index: 400;
  transform: translate(-50%, -50%);
  transition: width  150ms var(--ease-out),
              height 150ms var(--ease-out),
              opacity 200ms;
  will-change: transform;
  opacity: 0;
}
#cursor.cursor--hover {
  width: 13px;
  height: 13px;
}

/* ─── 8. Navigation ────────────────────────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--site-pad);
  z-index: 100;
  transition: transform var(--dur-fast) var(--ease-out),
              opacity   var(--dur-fast) var(--ease-out);
}

/* Inner pages (no hero): solid background so nav is legible over content */
body:not(.has-hero) #site-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

#site-nav.nav--hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.nav-logo {
  display: block;
  line-height: 0;
}
.nav-logo__img {
  height: 14px;
  width: auto;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.9;
}
.nav-logo__img:hover {
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast);
}
.nav-links a:hover {
  color: var(--text-heading);
}
.nav-links .active a {
  color: var(--text-heading);
}

/* ─── 9. Hero (homepage only) ──────────────────────────────────────────────────────────────── */
.site-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
}

.site-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.45);
}

.site-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 var(--site-pad) 64px;
  opacity: 0; /* Revealed by GSAP on page load */
}

.site-hero__eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.site-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-heading);
  line-height: 1.05;
  max-width: 800px;
}

/* ─── 10. Section Header (category pages) ──────────────────────────────────────────────────── */
.section-header {
  padding: calc(var(--nav-h) + 60px) var(--site-pad) 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3px;
}

.section-header__label {
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-heading);
  text-transform: uppercase;
}

/* ─── 11. Project Grid ─────────────────────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  padding-bottom: 3px;
}

/* Size modifiers */
.project-item--lg   { grid-column: span 8; }
.project-item--sm   { grid-column: span 4; }
.project-item--md   { grid-column: span 6; }
.project-item--full { grid-column: span 12; }

/* Item */
.project-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
}

.project-item__link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.project-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.72);
  transition: filter var(--dur-reveal) var(--ease-out);
}

.project-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.project-item__link:hover .project-item__img {
  filter: brightness(1);
}
.project-item__link:hover .project-item__overlay {
  opacity: 1;
}

.project-item__title {
  font-family: var(--font-display);
  font-size: var(--text-project);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-logo);
  line-height: 1.3;
}

.project-item__meta {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ─── 12. Project Detail Pages ─────────────────────────────────────────────────────────────── */
.project-detail {
  padding-top: calc(var(--nav-h) + 32px);
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: var(--site-pad);
  padding-right: var(--site-pad);
  padding-bottom: 120px;
}

.project-detail__header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.project-back {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color var(--dur-fast);
}
.project-back:hover { color: var(--text-heading); }

.project-detail__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.1;
}

.project-detail__meta {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Responsive video embed */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 48px;
  background: #000;
}
.video-wrapper.ratio-42 { padding-bottom: 41.78%; }
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-description {
  font-family: var(--font-body);
  font-size: var(--text-body-sz);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 40px;
  max-width: 680px;
}
.project-description p { margin-bottom: 16px; }
.project-description a {
  color: var(--text-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-credits {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 56px;
  white-space: pre-wrap;
}

.section-label {
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: 56px;
}

/* ─── Image Gallery ────────────────────────────────────────────────────────────────────────── */
.image-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 3px;
}
.image-gallery img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.image-full { margin-bottom: 3px; }
.image-full img {
  width: 100%;
  display: block;
}

/* ─── 13. About Page ───────────────────────────────────────────────────────────────────────── */
.about-content {
  padding: 0 0 120px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding-top: 16px;
}
.about-portraits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.about-portraits img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top;
}
.about-text {
  font-family: var(--font-body);
  font-size: var(--text-body-sz);
  font-weight: 400;
  line-height: 1.85;
  color: var(--text-body);
}
.about-text p { margin-bottom: 20px; }
.about-text a {
  color: var(--text-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}
.about-text a:hover { color: var(--text-logo); }

/* ─── 14. Footer ───────────────────────────────────────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--site-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
}
.footer-wordmark {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-right {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-right a {
  color: var(--text-body);
  transition: color var(--dur-fast);
}
.footer-right a:hover { color: var(--text-heading); }

/* ─── 15. Utilities ────────────────────────────────────────────────────────────────────────── */
.spacer { height: 40px; }

/* picture elements are layout-transparent — children inherit full box context */
picture { display: contents; }

/* ─── 16. Mobile ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --site-pad:  20px;
    --text-hero: 40px;
    --nav-h:     56px;
  }

  /* Cursor off on touch */
  #cursor { display: none; }
  body { cursor: auto; }

  /* Nav */
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 11px; letter-spacing: 0.1em; }

  /* Hero */
  .site-hero__content { padding-bottom: 48px; }
  .site-hero__title { font-size: var(--text-hero); }

  /* Grid — all items full width on mobile */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .project-item--lg,
  .project-item--sm,
  .project-item--md,
  .project-item--full {
    grid-column: span 1;
  }

  /* Project detail */
  .project-detail__title { font-size: 24px; }

  /* Image gallery */
  .image-gallery { grid-template-columns: 1fr; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-portraits { grid-template-columns: 1fr 1fr; }

  /* Section header */
  .section-header {
    padding: calc(var(--nav-h) + 40px) var(--site-pad) 32px;
  }
  .section-header__title { font-size: 22px; }

  /* Footer */
  #site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
