/* ============================================
   TOMÁS PEÑA — Editor Audiovisual
   Design tokens + base styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --bg:            #0b0b0a;
  --bg-elevated:   #131210;
  --ink:           #ede7db;
  --ink-muted:     #9c958a;
  --ink-faint:     #514c43;
  --line:          #26241f;
  --rec:           #e63f2e;
  --rec-dim:       #4a231d;

  /* Type */
  --f-display: 'Big Shoulders Display', sans-serif;
  --f-body:    'Inter', sans-serif;
  --f-mono:    'IBM Plex Mono', monospace;

  /* Layout */
  --gutter: clamp(20px, 4vw, 64px);
  --max: 1400px;
  --nav-h: 84px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

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

ul { list-style: none; }

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--rec);
  outline-offset: 3px;
}

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- REC dot (signature element) ---------- */
.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rec);
  flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230,63,46,0.35); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(230,63,46,0); }
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(11,11,10,0.92), rgba(11,11,10,0));
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(11,11,10,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.nav__brand {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
}

.nav__links a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--ink);
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--rec);
  transition: width 0.3s var(--ease);
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}
.nav__toggle span {
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--gutter);
    gap: 24px;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { font-size: 22px; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
}

.hero__stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 30%;
  filter: grayscale(1) contrast(1.08) brightness(0.85);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    var(--bg) 0%,
    var(--bg) 34%,
    rgba(11,11,10,0.86) 46%,
    rgba(11,11,10,0.35) 62%,
    rgba(11,11,10,0.05) 78%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero__name {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.01em;
  font-size: clamp(64px, 12vw, 188px);
  color: var(--ink);
}

.hero__sub {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero__tagline {
  font-family: var(--f-mono);
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero__cta {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink-faint);
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.hero__cta:hover { border-color: var(--rec); gap: 16px; }
.hero__cta svg { width: 14px; height: 14px; }

.hero__frame-tag {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  right: var(--gutter);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(11,11,10,0.55);
  border: 1px solid var(--line);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__scroll {
  position: absolute;
  bottom: 28px; left: var(--gutter);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero__scroll .line {
  width: 1px; height: 26px;
  background: var(--ink-faint);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.1% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 900px) {
  .hero__scrim {
    background: linear-gradient(
      to bottom,
      var(--bg) 0%,
      var(--bg) 38%,
      rgba(11,11,10,0.88) 52%,
      rgba(11,11,10,0.4) 68%,
      rgba(11,11,10,0.05) 85%
    );
  }
  .hero__bg { object-position: 60% 20%; }
  .hero__scroll { display: none; }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section__title {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 0.95;
}

.section__link {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.section__link:hover { color: var(--ink); border-color: var(--rec); }

/* ============================================
   WORK GRID
   ============================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.work-card {
  display: block;
  position: relative;
}

.work-card__frame {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-elevated);
}

.work-card__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transform: scale(1.02);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}

.work-card:hover .work-card__frame img {
  filter: grayscale(0);
  transform: scale(1.06);
}

.work-card__frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,11,10,0.85) 0%, rgba(11,11,10,0.05) 45%);
  pointer-events: none;
}

.work-card__meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.work-card__title {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1;
}

.work-card__tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ABOUT
   ============================================ */
.about__quotes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.about__quote {
  font-family: var(--f-display);
  text-transform: uppercase;
  line-height: 0.95;
}

.about__quote--no {
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 40px);
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--rec-dim);
  text-decoration-thickness: 2px;
}

.about__quote--yes {
  font-weight: 900;
  font-size: clamp(32px, 5.6vw, 72px);
  color: var(--ink);
}

.about__body {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
}

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  height: fit-content;
}

.about__stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.about__stats span:last-child { color: var(--ink); text-align: right; }

.about__text p {
  font-size: clamp(17px, 1.9vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 22px;
  max-width: 58ch;
}

.about__text p strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 800px) {
  .about__body { grid-template-columns: 1fr; }
}

/* ============================================
   SERVICES
   ============================================ */
.services__list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 2fr 3fr auto;
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}

.service-row:hover { background: var(--bg-elevated); }

.service-row__title {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.service-row__desc {
  color: var(--ink-muted);
  font-size: clamp(14px, 1.4vw, 16px);
  max-width: 46ch;
}

.service-row__mark {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-faint);
  justify-self: end;
}

@media (max-width: 700px) {
  .service-row { grid-template-columns: 1fr; gap: 8px; }
  .service-row__mark { display: none; }
}

/* ============================================
   CONTACT / FOOTER
   ============================================ */
.contact {
  padding: clamp(80px, 14vw, 180px) 0 48px;
}

.contact__title {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  font-size: clamp(48px, 9vw, 128px);
  margin-bottom: 32px;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.contact__label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: clamp(15px, 2vw, 19px);
  color: var(--ink-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink-faint);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__email:hover { color: var(--ink); border-color: var(--rec); }

.contact__instagram {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(18px, 2.4vw, 26px);
  background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  background-size: 250% 250%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(214, 41, 118, 0.3));
  transition: background-position 0.6s var(--ease), filter 0.3s var(--ease);
}
.contact__instagram:hover,
.contact__instagram:focus-visible {
  background-position: 100% 50%;
  filter: drop-shadow(0 0 22px rgba(214, 41, 118, 0.55));
}

.contact__row {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.contact__row a:hover { color: var(--ink); }

.contact__clock {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   PROJECT DETAIL PAGE
   ============================================ */
.project-hero {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.project-hero__back {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  transition: color 0.3s var(--ease);
}
.project-hero__back:hover { color: var(--ink); }

.project-hero__title {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  font-size: clamp(48px, 9vw, 120px);
  margin-bottom: 28px;
}

.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.project-hero__meta div { display: flex; flex-direction: column; gap: 6px; }
.project-hero__meta span:first-child { color: var(--ink-faint); }
.project-hero__meta span:last-child { color: var(--ink); font-size: 14px; }

.project-media {
  padding: clamp(40px, 6vw, 72px) 0;
}

.project-media__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
}

.project-media__frame video,
.project-media__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.project-media__note {
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.project-nav {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.project-nav a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.3s var(--ease);
}
.project-nav a:hover { color: var(--ink); }

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
