/* ============================================
   filmistoasd — film student, Toronto
   Brutalist magazine: oversized serif, diagonal
   split, rotating section colors, one-shot motion
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  line-height: 1.5;
  background: #0a0a0a;
  color: #f0f0f0;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }

/* --- DESIGN TOKENS --- */
:root {
  --bg-section-1: #0a0a0a;
  --bg-section-2: #e10600;
  --bg-section-3: #003c8a;
  --bg-section-4: #f4ff33;
  --signal: #e10600;
  --text-light: #f0f0f0;
  --text-dark: #0a0a0a;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Bricolage Grotesque', system-ui, sans-serif;
}

/* --- KWAKU ATTRIBUTION (free tier) --- */
.attribution {
  position: fixed;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  opacity: 0.4;
  font-family: var(--font-body);
  z-index: 100;
  mix-blend-mode: difference;
  color: #fff;
}
.attribution a { color: inherit; text-decoration: none; }
.attribution a:hover { opacity: 0.8; }

/* ============================================
   NAV — slides from top
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  z-index: 50;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  mix-blend-mode: difference;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav--visible {
  transform: translateY(0);
}
.nav__loc {
  opacity: 0.6;
}

/* ============================================
   HERO — diagonal split screen
   ============================================ */
.hero {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.hero__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 4rem 4rem;
  background: var(--bg-section-1);
  color: var(--text-light);
  clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
  z-index: 2;
}
.hero__right {
  flex: 1;
  background: var(--bg-section-2);
  color: var(--text-light);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 22rem);
  font-weight: 700;
  line-height: 0.85;
  margin-bottom: -0.3em;
  letter-spacing: -0.03em;
  font-variation-settings: 'wght' 700, 'SOFT' 50;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--bg-section-2);
  width: 0;
  /* typed effect via JS adding class */
}
.hero__name--typed {
  animation: typeIn 1.2s steps(12, end) forwards;
  border-right-color: transparent;
}
@keyframes typeIn {
  from { width: 0; }
  to { width: 100%; }
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 1.2s;
}
.hero__tagline--visible {
  opacity: 0.7;
  transform: translateY(0);
}

/* Accent block — signature color reveal on scroll */
.hero__accent-block {
  width: 60%;
  height: 40%;
  background: var(--signal);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  animation: revealFromLeft 800ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 60%;
  opacity: 0.3;
  transform-origin: left center;
}
@keyframes revealFromLeft {
  from {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    opacity: 0;
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

/* ============================================
   INDEX — expandable entries (tap to reveal)
   ============================================ */
.index {
  background: var(--bg-section-3);
  color: var(--text-light);
  padding: 6rem 2rem 8rem;
}
.index__inner {
  max-width: 900px;
  margin: 0 auto;
}
.index__entry {
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 0.5rem 0;
  transition: background 0.2s;
}
.index__entry[open] {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin: 0 -1rem;
}
.index__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.3;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-variation-settings: 'wght' 600;
}
.index__title::-webkit-details-marker {
  display: none;
}
.index__title::before {
  content: '▶';
  font-size: 0.7em;
  transition: transform 0.3s ease;
  opacity: 0.5;
  font-family: var(--font-body);
}
.index__entry[open] > .index__title::before {
  transform: rotate(90deg);
}
.index__body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  padding: 0 0 1.5rem 1.5rem;
  color: rgba(255,255,255,0.85);
  max-width: 650px;
}
.index__meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  font-weight: 500;
}

/* ============================================
   CONTACT — full-bleed yellow section
   ============================================ */
.contact {
  background: var(--bg-section-4);
  color: var(--text-dark);
  padding: 6rem 2rem 8rem;
}
.contact__inner {
  max-width: 600px;
  margin: 0 auto;
}
.contact__heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 2.5rem;
  font-variation-settings: 'wght' 700;
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.contact__field input,
.contact__field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--text-dark);
  background: transparent;
  color: var(--text-dark);
  border-radius: 0;
  outline: none;
  transition: background 0.2s;
}
.contact__field input:focus,
.contact__field textarea:focus {
  background: rgba(0,0,0,0.06);
}
.contact__submit {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border: 2px solid var(--text-dark);
  background: var(--text-dark);
  color: var(--bg-section-4);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.contact__submit:hover {
  background: transparent;
  color: var(--text-dark);
}
.contact__status {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
  }
  .hero__left {
    clip-path: none;
    padding: 5rem 1.5rem 2rem;
    min-height: 60vh;
  }
  .hero__right {
    min-height: 30vh;
  }
  .hero__name {
    font-size: clamp(3rem, 22vw, 6rem);
    white-space: normal;
    border-right: none;
    width: auto;
    animation: none;
  }
  .hero__name--typed {
    animation: none;
    width: auto;
  }
  .hero__tagline {
    transition-delay: 0s;
  }
  .nav {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
  }
  .index {
    padding: 4rem 1.25rem 6rem;
  }
  .contact {
    padding: 4rem 1.25rem 6rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .nav {
    transform: translateY(0);
  }
  .hero__name {
    width: auto;
    border-right: none;
    animation: none;
  }
  .hero__tagline {
    opacity: 0.7;
    transform: translateY(0);
    transition: none;
  }
  .hero__accent-block {
    animation: none;
    opacity: 0.6;
  }
  .index__title::before {
    transition: none;
  }
}
