/* ─────────────────────────────────────────
   Sem Kramer — Design System

   Typography: single family (Work Sans) carrying the whole site,
   varying only by weight/tracking/case — the Avenir treatment on
   ludovicoeinaudi.com does the same. Tracking tightens as size grows:
   wide (+0.15-0.22em) on small uppercase UI text, near-zero on large
   display type, where extra tracking just reads as gappy rather than
   refined. Loaded via <link> in <head>, not @import, so the browser
   discovers and fetches it in parallel with the page instead of after
   parsing this stylesheet.
   ───────────────────────────────────────── */

/* Tokens */
:root {
  --bg:        #0e0d0b;
  --bg-raise:  #161513;
  --text:      #e8e3db;
  --text-muted:#c7c2b9;
  --accent:    #c9a96e;
  --font-display: 'Work Sans', system-ui, sans-serif;
  --font-sans:  'Work Sans', system-ui, sans-serif;
  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
  --gutter:    clamp(1.5rem, 5vw, 3.5rem);
  --section-gap: clamp(7rem, 10vw, 11rem);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  font-weight: 300;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.038;
}

/* ── Layout ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-gap) 0; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 13, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 227, 219, 0.06);
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease-expo);
}

.site-header.is-visible { transform: translateY(0); }

.site-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.site-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.25s;
}

.site-nav a:hover { color: var(--text); }

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-toggle {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.25s;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(232,227,219,0.18);
  border-radius: 100px;
}

.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 1.8rem;
  height: 1.8rem;
}

.nav-toggle span {
  display: block;
  width: 1.3rem;
  height: 1px;
  background: var(--text);
  will-change: transform, opacity;
  /* transform and opacity must land in the same frame — mismatched
     durations left a window where the middle bar had already faded
     but the outer two hadn't finished rotating into the X yet, which
     read as a stray line through it. */
  transition: transform 0.25s var(--ease-expo), opacity 0.25s var(--ease-expo);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Hero ── */
.hero {
  position: relative;
  /* No min-height: a 600px floor overflowed the screen in landscape on a phone
     (viewport ~390px tall) and pushed the hero-footer out of view, and any
     floor is dead anyway once the height is a definite 100svh.
     100vh first so browsers without svh (Chrome <108, Safari <15.4) still get
     a full-viewport hero instead of dropping the only height rule they parse. */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);   /* the video fades up out of black */
}

/* Page fade-in on load */
body {
  animation: pageFadeIn 0.5s ease forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Hero video: oversized container ── */
.hero-bg {
  position: absolute;
  top: -60px; left: -60px; right: -60px; bottom: -60px;
  will-change: transform;
  pointer-events: none;
}

/* The clip itself fades up from black in the first 3s, baked into the
   file — no CSS reveal timing needed on top of it. */
.hero-bg video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%;
  height: 56.25vw;   /* 16:9 */
  min-height: 100%;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  z-index: 1;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(to bottom,
      rgba(14,13,11,0.25) 0%,
      rgba(14,13,11,0.15) 40%,
      rgba(14,13,11,0.65) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 5;
  padding: var(--gutter);
  width: 100%;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.54rem, 6.65vw, 5.95rem);
  font-weight: 200;
  font-style: normal;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;   /* one row, always */
}

/* Bottom-center of the video. Positioned relative to .hero (not
   .hero-footer), since .hero-footer is a flex row already claimed by the
   scroll cue and centered independently. bottom is a % of .hero's own
   height (its containing block), so this tracks 100svh at any size. */
.unmute-btn {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.unmute-btn:hover,
.unmute-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-footer {
  position: absolute;
  bottom: 2.5rem;
  left: 0; right: 0;
  z-index: 5;
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;   /* bigger tap target than the 1px line alone */
}

.scroll-cue-arrow {
  width: 2.75rem;
  height: 0.85rem;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Section label ── */
.section-label {
  font-family: var(--font-sans);
  font-weight: 400;   /* some of these are h2 now — keep them from going bold */
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.85s var(--ease-expo),
    transform 0.85s var(--ease-expo);
}

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

/* ── Bio ── */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.bio-image img {
  width: 100%;
  height: clamp(500px, 80vh, 750px);
  object-fit: cover;
  object-position: 87% 49%;
  border-radius: 3px;
}

.bio-text { padding-top: 1rem; }

.bio-statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.32;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 2rem;
}

.body-text {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  max-width: 48ch;
}

.body-text:last-of-type { margin-bottom: 0; }

.bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 2.5rem;
}

.bio-links a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
  padding-bottom: 0.1rem;
  transition: color 0.25s, border-color 0.25s;
}

.bio-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ── Projects ── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 200;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.005em;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 5vw, 5rem);
  align-items: start;
}

.projects-grid .body-text { max-width: 42ch; }

.projects-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: clamp(2.5rem, 4vw, 4rem);
}

.projects-photos img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: opacity 0.4s;
}

.projects-photos img:hover { opacity: 0.85; }

/* ── Live ── */
.live-section { background: var(--bg); }

.live-quote {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 5.5rem);
  font-weight: 200;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--text);
  border: none;
  padding: 0;
  margin: 0 0 clamp(2rem, 3vw, 3rem);
  max-width: 20ch;
}

.live-body { max-width: 620px; }
.live-body .body-text { max-width: 52ch; }

.live-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(4rem, 6vw, 6rem);
}

.live-photos .col:nth-child(2) {
  padding-top: clamp(3rem, 6vw, 6rem);
}

.live-photos img {
  width: 100%;
  height: clamp(450px, 70vh, 700px);
  object-fit: cover;
  border-radius: 2px;
}

/* ── Press ── */
.press-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(3rem, 5vw, 6rem);
  align-items: start;
}

.press-image img {
  width: 100%;
  height: clamp(500px, 75vh, 750px);
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
}

.press-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7rem);
  font-weight: 200;
  font-style: normal;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: clamp(2rem, 3vw, 3rem);
}

.press-text { padding-top: 0.5rem; }
.press-text .body-text { max-width: 44ch; }

.press-links { margin-top: 2.5rem; }

.press-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(232, 227, 219, 0.1);
  transition: color 0.25s;
}

.press-link:first-child { border-top: 1px solid rgba(232, 227, 219, 0.1); }
.press-link:hover { color: var(--accent); }

.press-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: clamp(3rem, 4vw, 4rem);
}

.press-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ── Contact ── */
.contact-section {
  text-align: center;
  padding: clamp(8rem, 14vw, 14rem) 0;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 4.5rem);
  font-weight: 200;
  font-style: normal;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--text);
  text-decoration: none;
  margin: 1.5rem 0 1rem;
  transition: color 0.3s;
  border-bottom: 1px solid rgba(201,169,110,0.25);
  padding-bottom: 0.15em;
}

.contact-email:hover { color: var(--accent); border-color: var(--accent); }

.contact-sub {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid rgba(232,227,219,0.07);
  padding: 2rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer span,
.site-footer a {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

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

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: rgba(232,227,219,0.07);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bio-grid,
  .projects-grid,
  .press-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .bio-image img,
  .press-image img {
    height: clamp(350px, 60vw, 520px);
  }

  .projects-photos {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-photos img { height: 240px; }

  .live-photos {
    grid-template-columns: 1fr;
  }

  .live-photos .col:nth-child(2) { padding-top: 0; }

  .live-photos img { height: clamp(320px, 60vw, 480px); }

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

  .hero-title { font-size: clamp(1.4rem, 7.35vw, 4.55rem); }
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .hero-title {
    font-size: clamp(1.6rem, 8.5vw, 4.6rem);
    color: #fff;
  }

  /* Dropdown panel anchored to the fixed header, which is its containing
     block — no hardcoded header-height offset to keep in sync. */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.5rem 0 1.5rem;
    background: rgba(14, 13, 11, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 227, 219, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease-expo), transform 0.3s var(--ease-expo), visibility 0.3s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a { font-size: 0.8rem; }

  /* Comfortable tap targets: these sit at 19-29px tall from line-height alone.
     Padding rather than font-size, so nothing about the type changes. */
  .site-nav a, .site-footer a { padding-block: 0.6rem; }
  /* Bio links keep their tight bottom padding — the underline is a border-bottom,
     so padding-block would push it ~10px away from the text. */
  .bio-links a { padding-block: 0.6rem 0.1rem; }

  .projects-photos { grid-template-columns: repeat(2, 1fr); }

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

  .contact-email { font-size: clamp(1.8rem, 8vw, 3rem); }
}
