/* ============================================================
   ELLE PROJECTS — v02
   style.css
   ============================================================ */

/* ── Custom Properties ───────────────────────────────────── */
:root {
  --bg:            #0a0a0a;
  --surface:       #111111;
  --accent:        #CF7A82;
  --marquee-bg:    #C8796E;
  --text:          #ffffff;
  --text-muted:    #888888;
  --border:        rgba(255, 255, 255, 0.08);

  --font-display:  'Playfair Display', Georgia, serif;
  --font-ui:       'Montserrat', system-ui, sans-serif;

  --radius-pill:   100px;
  --nav-h:         72px;
  --transition:    0.3s ease;
  --reveal-dist:   32px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Utilities ───────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-dist));
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav__logo:hover {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--accent); }

.nav__links .btn-pill {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
}
.nav__links .btn-pill:hover {
  background: #b86570;
  transform: translateY(-1px);
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  padding: 2rem 5%;
  z-index: 99;
  list-style: none;
  flex-direction: column;
  gap: 1.5rem;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Hero ────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0,0,0,0.8) 50%,
    rgba(10,10,10,0.85) 100%
  );
  z-index: 1;
}

/* ── Film grain ───────────────────────────────────────────
   SVG feTurbulence noise tile, rapidly repositioned to
   simulate analogue film grain over the hero video.
   pointer-events: none keeps all clicks/taps functional.
   ──────────────────────────────────────────────────────── */
#hero::after {
  content: '';
  position: absolute;
  /* oversized so edge artefacts never show during animation */
  inset: -150px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: film-grain 0.65s steps(1) infinite;
}

@keyframes film-grain {
  0%   { transform: translate(0,    0); }
  11%  { transform: translate(-6%,  -4%); }
  22%  { transform: translate(4%,    7%); }
  33%  { transform: translate(-4%,  -7%); }
  44%  { transform: translate(7%,    4%); }
  55%  { transform: translate(-4%,   5%); }
  66%  { transform: translate(5%,   -4%); }
  77%  { transform: translate(-5%,   7%); }
  88%  { transform: translate(6%,   -5%); }
  100% { transform: translate(-2%,   3%); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 1.5rem;
}

.hero__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 1.6rem;
}

.hero__h1 em {
  font-style: italic;
  font-weight: 400;
  display: block;
}

.hero__subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn--filled {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}
.btn--filled:hover { background: #b86570; border-color: #b86570; }

.btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.06);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}
.hero__scroll svg {
  width: 28px;
  height: 28px;
  color: rgba(255,255,255,0.5);
}

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

/* ── Selected Projects ───────────────────────────────────── */
#projects {
  padding: 6rem 0;
}

.projects__header {
  margin-bottom: 2.5rem;
}

.projects__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.projects__header h2 strong {
  font-weight: 700;
}

.projects__header h2 .accent { color: var(--accent); }

.projects__header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-tab {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.filter-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Grid */
.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Card */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  aspect-ratio: 4/5;
  cursor: pointer;
}

.project-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover .project-card__thumb { transform: scale(1.04); }
.project-card:hover .project-card__video { opacity: 1; }

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8) 0%,
    rgba(0,0,0,0.2) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-card__overlay { opacity: 1; }

.project-card__info {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.project-card:hover .project-card__info {
  opacity: 1;
  transform: translateY(0);
}

.project-card__category {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
}


/* ── About ───────────────────────────────────────────────── */
#about {
  padding: 7rem 0;
  background: var(--surface);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.about__copy .section-label {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin-bottom: 0.75rem;
}

.about__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.about__heading em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}

.about__body {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 520px;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.pillar {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.pillar__num {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.pillar__name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ── Marquee ─────────────────────────────────────────────── */
.marquee {
  background: var(--marquee-bg);
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  gap: 0;
  animation: marquee-scroll 25s linear infinite;
}

.marquee__item {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  padding: 0 2rem;
}

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

/* ── Contact / Footer ────────────────────────────────────── */
#contact {
  padding: 7rem 0 4rem;
  background: var(--bg);
}

.contact__header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact__header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  color: var(--accent);
  transition: opacity var(--transition);
}
.contact__email:hover { opacity: 0.8; }

.contact__social-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: color var(--transition);
}
.contact__social-link:hover { color: var(--text); }

/* Footer row */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__logo a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer__logo a:hover {
  opacity: 1;
}

.footer__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer__social a {
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.footer__social a:hover { color: var(--text); }
.footer__social svg { width: 18px; height: 18px; }

.footer__copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Video Modal ─────────────────────────────────────────── */
dialog#video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  border: none;
  padding: 2rem 1.5rem;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  overflow-y: auto;
}
dialog#video-modal[open] {
  display: flex;
}

.modal__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  z-index: 10;
}
.modal__close svg { width: 1.1rem; height: 1.1rem; }
.modal__close:hover { color: #fff; background: rgba(255,255,255,0.15); }

.modal__inner {
  width: min(90vw, 1200px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal__header {
  text-align: center;
}
.modal__header .modal__label {
  margin-bottom: 0.5rem;
}
.modal__headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}

.modal__video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
}

/* ── Responsive — Tablet ─────────────────────────────────── */
@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__inner {
    grid-template-columns: 60% 40%;
    gap: 3rem;
  }

  .about__inner .pillars {
    align-self: center;
    margin-top: 180px;
  }
}

/* ── Responsive — Desktop ────────────────────────────────── */
@media (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 340px;
    align-items: start;
  }

  /* Masonry-style span pattern */
  .project-card { aspect-ratio: unset; height: 100%; }

  .project-card--tall { grid-row: span 2; }

  /* Pattern: col1 tall | col2 short | col3 tall | then offset */
  .project-card:nth-child(1) { grid-row: span 2; }
  .project-card:nth-child(3) { grid-row: span 2; }
  .project-card:nth-child(7) { grid-row: span 2; }
  .project-card:nth-child(9) { grid-row: span 2; }
}

/* ── Mobile nav ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* On mobile, disable hover video — tap opens modal */
  .project-card__video { display: none; }
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .marquee__track { animation-play-state: paused; }
  .reveal { opacity: 1; transform: none; }
}
