/* styles.css */

/* Color system — one committed accent, near-black base. */
:root {
  --bg: #ffffff;
  --bg-alt: #f2f3f5;
  --text: #2b2e33;
  --text-muted: #6b7078;
  --navy: #1f2a44;
  --accent: #b9bbc7;       /* blue, close to the logo outline */
  --accent-dim: #dfe3f5;   /* light tint for dividers/borders */
  --accent-muted: #6f7bc9; /* softer blue for small text */
  --hero-bg: #eceef1;
  --header-height: 88px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Archivo', sans-serif;
}

/* General Styles */
body {
  font-family: 'Archivo', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
}

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

/* Section labels — left-aligned, editorial tag */
.section-label {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  text-align: left;
  margin: 0 0 40px 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  text-transform: uppercase;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Header — transparent over the hero; .scrolled (added by
   script.js) brings back a solid background over content sections. ===== */
header {
  background: transparent;
  backdrop-filter: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 24px 0;
}
.logo {
  font-size: 1.3rem;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

/* Nav — thin, spaced, minimal, small square bullets */
nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}
nav ul li a {
  font-family: 'Archivo', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}
nav ul li a::after {
  content: '';
  width: 4px;
  height: 4px;
  background: currentColor;
  flex-shrink: 0;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--text);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav ul {
    position: absolute;
    top: 100%;
    left: -120%;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    width: 200px;
    padding: 20px;
    transition: left 0.3s ease-in-out;
    z-index: 999;
  }
  nav ul.active {
    left: 0;
  }
}

/* Hamburger → × Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

hr.divider {
  border: 0;
  height: 1px;
  background-color: var(--accent);
  margin: 40px auto;
  width: 90%;
}

/* ===== Reels Section — asymmetric grid =====
   Rows alternate wide/narrow: [2][1] / [1][2] / [2][1] */
.reels {
  padding: 120px 0 100px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 480px;
  gap: 20px;
}

.cell-1 { grid-column: span 2; grid-row: span 1; }
.cell-2 { grid-column: span 1; grid-row: span 1; }
.cell-3 { grid-column: span 1; grid-row: span 1; }
.cell-4 { grid-column: span 2; grid-row: span 1; }
.cell-5 { grid-column: span 2; grid-row: span 1; }
.cell-6 { grid-column: span 1; grid-row: span 1; }

/* Medium screens: same pairing pattern, shorter rows */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 320px;
  }
}

/* Mobile: single-column stack, equal sizing */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
  .gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}
.gallery-item picture { display: block; width: 100%; height: 100%; }
.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.1);
}
.gallery-item:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* Teaser video layer, sits over the static card image.
   Shown when script.js adds .is-playing (hover on desktop,
   scrolled-into-view on touch devices). */
.gallery-item .card-video,
.team-media .card-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.gallery-item.is-playing .card-video,
.team-media.is-playing .card-video {
  opacity: 1;
}

/* Placeholder cell (optional) — visually distinct, not clickable-looking */
.gallery-item.placeholder {
  cursor: default;
}
.gallery-item.placeholder img {
  filter: grayscale(1) brightness(0.5);
}
.gallery-item.placeholder .overlay {
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
}
.gallery-item.placeholder .overlay p {
  color: var(--accent-muted);
  letter-spacing: 0.1em;
}

.overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 20px;
  background: rgba(255, 255, 255, 0.85);
  transition: bottom 0.3s;
  z-index: 2;
}
.overlay h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  margin: 0 0 8px 0;
  color: var(--text);
  text-transform: uppercase;
}
.overlay p {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
}
.gallery-item:hover .overlay {
  bottom: 0;
}

/* ===== "Watch" cue — top-right of each reel card =====
   Idle: small play icon. Hover (desktop): expands to "Preview · click
   to watch full video". After the teaser ends: turns red and reads
   "Watch full video". */
.watch-cue {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 15px;
  box-sizing: border-box;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  transition: background 0.3s ease;
  opacity: 0;
  transition: background 0.3s ease, opacity 0.3s ease;
}
.cue-text {
  max-width: 0;
  padding-left: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.35s ease, padding-left 0.35s ease, opacity 0.35s ease;
}

/* Desktop: expand on hover */
/* @media (hover: hover) {
  .gallery-item:hover .cue-text {
    max-width: 320px;
    padding-left: 10px;
    opacity: 1;
  }
} */

/* Teaser finished: red pill with a "Watch full video" prompt */
.gallery-item.teaser-done .watch-cue {
  background: var(--accent);
  color: #fff;
  opacity: 1;
  /* animation: cue-pulse 1.6s ease-out 2; */
}
.gallery-item.teaser-done .cue-text {
  max-width: 320px;
  padding-left: 10px;
  opacity: 1;
}
@keyframes cue-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 79, 184, 0.7); }
  100% { box-shadow: 0 0 0 18px rgba(61, 79, 184, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item.teaser-done .watch-cue {
    animation: none;
  }
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 76px 0 24px; /* room for the close button above the video */
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1001;
}
.modal-content {
  position: relative;
  margin: auto; /* centers in the flex modal; scrolls safely if too tall */
  /* 16:9 video sized to leave ~260px for close button + synopsis */
  width: min(92vw, calc((100vh - 260px) * 16 / 9));
  max-width: 1600px;
}
.modal-info {
  color: #fff;
  padding-top: 20px;
}
.modal-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.modal-genre {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
}
.modal-synopsis {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.close-modal {
  position: absolute;
  top: -64px;
  right: 0;
  width: 56px;
  height: 56px;
  color: white;
  font-size: 52px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.3s, transform 0.2s;
}
.close-modal:hover {
  opacity: 0.7;
  transform: scale(1.1);
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
@media (max-width: 768px) {
  .close-modal {
    top: -60px;
    right: 0;
    font-size: 44px;
  }
}

/* End-of-video screen: "Play again" + "Back to Work" */
.end-screen {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(13, 13, 15, 0.92);
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.end-screen.show {
  display: flex;
}
.end-btn {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 6px;
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.end-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.end-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}
.end-btn-primary:hover {
 background: #5566cc;
 border-color: #5566cc;
}

/* Team Section */
.team {
  padding: 100px 0 140px;
}
.team-grid {
  display: block;
}
.team-member {
  text-align: left;
  font-family: 'Archivo', sans-serif;
  display: flex;
  align-items: center;
  gap: 60px;
}
.team-copy {
  flex: 1;
  min-width: 280px;
}
.team-member h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 12px 0;
  text-transform: uppercase;
}
.team-member h3 {
  font-weight: 500;
  color: var(--text);
  margin: 0 0 16px 0;
}
.team-member p {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
}
.team-media {
  position: relative;
  width: 340px;
  height: 340px;
  flex-shrink: 0;
  border-radius: 5%;
  overflow: hidden;
}
.team-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-media .card-video {
  border-radius: 0;
}

@media (max-width: 768px) {
  .team-member {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .team-media {
    width: 100%;
    max-width: 340px;
    height: 340px;
  }
}

/* Footer */
footer {
  padding: 50px 0;
  text-align: center;
  background: #08080a;
  color: var(--text-muted);
  font-family: 'Archivo', sans-serif;
  font-size: 0.85rem;
}
