/* ------------------------------------------------------------------
   Ape Production — minimal production-house layout
   ------------------------------------------------------------------ */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --accent: #c9a962;
  --border: rgba(255, 255, 255, 0.18);
  --overlay: rgba(0, 0, 0, 0.55);
  --font: "Poppins", system-ui, sans-serif;
  --space-section: clamp(4rem, 10vw, 7rem);
  --container: min(1120px, 92vw);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), transparent);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.logo {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 769px) {
  .nav {
    font-size: 0.8rem;
    gap: clamp(1rem, 3vw, 2rem);
    flex-wrap: nowrap;
  }
}

.nav a {
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: #1a1a1a;
  background-image: url("https://source.unsplash.com/1600x900/?film,cinematic");
  background-size: cover;
  background-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 6rem 1.5rem 4rem;
  max-width: 48rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__subtitle {
  margin: 0 0 2.25rem;
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  font-weight: 300;
  color: rgba(245, 245, 245, 0.88);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.btn--hero:hover,
.btn--hero:focus-visible {
  background: var(--text);
  color: var(--bg);
  outline: none;
}

/* Sections */
.section {
  padding-block: var(--space-section);
}

.section__title {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--accent);
}

/* About */
.about {
  border-top: 1px solid var(--border);
}

.about__text {
  margin: 0;
  max-width: 42rem;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Services */
.services {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.service-card {
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.service-card:hover {
  border-color: rgba(201, 169, 98, 0.45);
  transform: translateY(-2px);
}

.service-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-card__title::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-bottom: 1rem;
  background: var(--accent);
  opacity: 0.85;
}

.service-card__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Portfolio */
.portfolio {
  border-top: 1px solid var(--border);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (min-width: 1024px) {
  .portfolio__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.portfolio__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #1f1f1f;
}

.portfolio__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}

.portfolio__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 50%);
  opacity: 0.85;
  transition: opacity 0.35s var(--ease);
}

.portfolio__item:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

.portfolio__item:hover::after {
  opacity: 1;
}

.portfolio__label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.9;
}

/* Contact */
.contact {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.contact__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 300;
}

.contact__list li {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.contact__list li:last-child {
  margin-bottom: 0;
}

.contact__list a {
  color: var(--text);
  border-bottom: 1px solid transparent;
}

.contact__list a:hover {
  color: var(--accent);
  border-bottom-color: rgba(201, 169, 98, 0.5);
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav {
    justify-content: flex-start;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
  }
}
