/* === LAYOUT === */

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: 800px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 1), 1fr);
  gap: var(--grid-gap);
}

@media (min-width: 768px) {
  .grid {
    --columns: 2;
  }
}

@media (min-width: 1280px) {
  .grid {
    --columns: 3;
  }
}

/* Section */
.section {
  padding-block: var(--space-xl);
}

.section--lg {
  padding-block: var(--space-2xl);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: calc(var(--space-lg) + 0.18em);
}

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

.hero--short {
  min-height: 60vh;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  z-index: 0;
  opacity: 0.6;
}

/* Homepage showreel: hidden until it has jumped to its random start */
.hero__media[data-random-start] {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero__media[data-random-start].is-ready {
  opacity: 0.6;
}

/* For renders where the subject sits low in the frame */
.hero__media--low {
  object-position: center 75%;
}

.hero__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 20%, #2a1a3e 40%, #16213e 60%, #1a0a2a 80%, #0a0a0a 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

/* Light sweep - projector beam scanning across hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: lightSweep 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lightSweep {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 50% 0%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 100%; }
}

.hero__overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.8) 0%, transparent 50%, rgba(10, 10, 10, 0.3) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero--short .hero__overlay {
  min-height: 60vh;
}

.hero__content {
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
  margin-bottom: var(--space-md);
}

.hero__logo {
  display: block;
  width: clamp(240px, 50vw, 420px);
  height: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-lg);
}

.hero__tagline {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #ffffff;
  margin-bottom: calc(var(--space-lg) * 1.5);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Breathing glow on hero logo after entrance */
@keyframes heroBreathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
  50% { transform: scale(1.015); filter: drop-shadow(0 0 20px var(--color-accent-glow)); }
}

.hero__logo--animate {
  animation: heroBreathe 6s ease-in-out infinite;
}

/* Full bleed */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Visually hidden (accessible) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Padding top for pages (account for fixed nav) */
.page-content {
  padding-top: var(--nav-height);
}

/* For upright (9:16) renders in the wide hero: keep the face in frame */
.hero__media--face {
  object-position: center 30%;
}

/* Two columns from tablet up, never three (e.g. the four service cards as 2x2) */
@media (min-width: 768px) {
  .grid.grid--two {
    --columns: 2;
    grid-auto-rows: 1fr;
  }
}
