/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DESIGN TOKENS ── */
:root {
  --black:   #0A0A0A;
  --white:   #F5F5F0;
  --red:     #E53935;
  --grey:    #555555;
  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --pad-x: clamp(24px, 5vw, 56px);
}

/* ── BASE ── */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── NAV ── */
#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--pad-x);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 0.2s;
}
#main-nav.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.logo-link {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--black);
  line-height: 1;
}
.logo-link--light { color: #fff; }
.logo-period { color: var(--red); }
.nav-links {
  display: flex;
  gap: 36px;
  font-family: var(--font-head);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.nav-links a {
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  opacity: 1;
  color: var(--red);
  border-bottom-color: var(--red);
}
.nav-rule {
  height: 2px;
  background: var(--red);
  margin: 0 var(--pad-x);
}

/* ── HERO ── */
.hero {
  padding: 20px var(--pad-x) 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: end;
}
.hero-label {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  text-transform: uppercase;
}
.text-red { color: var(--red); }
.hero-copy {
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--grey);
  max-width: 440px;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-main {
  display: inline-block;
  background: var(--black);
  color: #fff;
  font-family: var(--font-head);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 16px 28px;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background 0.2s;
}
.btn-main:hover { background: var(--red); }
.btn-main:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--black);
  font-family: var(--font-head);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 14px 24px;
  text-transform: uppercase;
  border: 2px solid var(--black);
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-ghost:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* Hero visual */
.hero-visual { position: relative; }
.hero-num {
  position: absolute;
  top: -20px;
  right: -20px;
  font-family: var(--font-head);
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 900;
  color: rgba(229, 57, 53, 0.07);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  z-index: 1;
}
.hero-card--placeholder {
  background: linear-gradient(160deg, #0d0808, #1a0d0d, #080810);
}
.hero-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 55%);
}
.hero-card__info {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 2;
}
.hero-card__cat {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-card__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* ── FILTER BAR ── */
.filter-section { padding: 0 var(--pad-x); }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
}
.filter-btn {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 24px;
  background: transparent;
  color: var(--black);
  border: none;
  border-right: 1px solid #ddd;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.filter-btn:last-child { border-right: none; }
.filter-btn.active { background: var(--black); color: #fff; }
.filter-btn:not(.active):hover { color: var(--red); }
.filter-btn:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

/* ── PORTFOLIO ── */
.portfolio { padding: 48px var(--pad-x); }
.portfolio__header { margin-bottom: 28px; }
.portfolio__label {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #aaa;
  text-transform: uppercase;
}
.portfolio__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

/* ── PROJECT CARD ── */
.proj-card { position: relative; overflow: hidden; cursor: pointer; background: #111; }
.proj-card--wide  { grid-column: span 2; }

.proj-card__inner {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.proj-card--wide .proj-card__inner  { aspect-ratio: 21 / 9; }
.proj-card--portrait .proj-card__inner { aspect-ratio: 9 / 12; }

.proj-card__bg {
  position: absolute;
  inset: 0;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.proj-card:hover .proj-card__bg { transform: scale(1.03); }

.proj-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.05) 60%, transparent 100%);
  z-index: 2;
}
.proj-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.proj-card:hover .proj-card__play { opacity: 1; }
.play-icon {
  display: block;
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 16px solid #fff;
  margin-left: 4px;
}
.proj-card__info { position: relative; z-index: 3; }
.proj-card__cat {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.proj-card__title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* Hover video */
.proj-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}
.proj-card:hover .proj-card__video { opacity: 1; }

/* Hidden state for filter */
.proj-card[hidden] { display: none; }

/* ── ABOUT ── */
.about {
  padding: 72px var(--pad-x);
  border-top: 2px solid var(--red);
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.about__headline {
  font-family: var(--font-head);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  text-transform: uppercase;
}
.about__slogan {
  font-family: var(--font-head);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.3px;
  margin-bottom: 20px;
  line-height: 1.3;
}
.about__text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--grey);
  margin-bottom: 32px;
}
.about__stats { display: flex; gap: 36px; }
.stat__num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}
.stat__label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── CONTACT ── */
.contact {
  background: var(--black);
  padding: 72px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.contact__headline {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
}
.contact__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--grey);
  margin-top: 12px;
}
.btn-contact {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 20px 36px;
  text-transform: uppercase;
  border: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-contact:hover { opacity: 0.85; }
.btn-contact:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ── FOOTER ── */
footer {
  background: var(--black);
  border-top: 1px solid #1e1e1e;
  padding: 24px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-inverted {
  filter: invert(1) brightness(10) saturate(0);
}
.footer__copy {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--grey);
}

/* ── VIDEO MODAL ── */
.video-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  width: 900px;
}
.video-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
.video-modal__inner {
  position: relative;
  background: var(--black);
}
.video-modal__close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.video-modal__close:hover { opacity: 1; }
.video-modal__close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.video-modal__embed {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}
.video-modal__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── CARD KEYBOARD FOCUS ── */
.proj-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

/* ── TABLET (≤ 900px) ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-visual {
    max-width: 560px;
  }
  .hero-num {
    font-size: clamp(60px, 15vw, 100px);
    top: -10px;
    right: -10px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ── MOBILE (≤ 640px) ── */
@media (max-width: 640px) {
  /* NAV */
  #main-nav {
    padding: 12px var(--pad-x);
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav-links {
    width: 100%;
    gap: 20px;
    font-size: 7px;
    letter-spacing: 1.5px;
  }

  /* HERO */
  .hero {
    padding: 16px var(--pad-x) 40px;
    gap: 24px;
  }
  .hero-headline {
    font-size: clamp(36px, 10vw, 52px);
    letter-spacing: -1px;
  }
  .hero-copy {
    font-size: 13px;
  }
  .hero-num {
    display: none;
  }
  .hero-visual {
    max-width: 100%;
  }

  /* FILTER BAR */
  .filter-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .filter-section::-webkit-scrollbar {
    display: none;
  }
  .filter-bar {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    padding: 0 var(--pad-x);
    border-top: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
  }
  .filter-btn {
    padding: 12px 18px;
    font-size: 7px;
  }

  /* PORTFOLIO */
  .portfolio {
    padding: 32px var(--pad-x);
  }
  .portfolio__grid {
    grid-template-columns: 1fr;
  }
  .proj-card--wide {
    grid-column: span 1;
  }
  .proj-card--wide .proj-card__inner {
    aspect-ratio: 16 / 9;
  }
  .proj-card--portrait .proj-card__inner {
    aspect-ratio: 16 / 9;
  }

  /* ABOUT */
  .about {
    padding: 48px var(--pad-x);
    gap: 32px;
  }
  .about__stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  /* CONTACT */
  .contact {
    flex-direction: column;
    align-items: flex-start;
    padding: 48px var(--pad-x);
    gap: 28px;
  }
  .contact__headline {
    font-size: clamp(24px, 7vw, 36px);
  }

  /* FOOTER */
  footer {
    flex-direction: column;
    gap: 12px;
    padding: 20px var(--pad-x);
    align-items: flex-start;
  }

  /* VIDEO MODAL */
  .video-modal {
    max-width: 100vw;
    width: 100%;
    margin: 0;
    align-self: flex-end;
  }
  .video-modal__close {
    top: -40px;
  }
}
