/* ============================================
   STUDIO — Photographer & Filmmaker Agency
   Design system inspired by Restarts.es
   ============================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { min-height: 100vh; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }
ul, ol { list-style: none; }

/* ---------- Variables ---------- */
:root {
  --bg: #0a0a0a;
  --bg-soft: #121212;
  --bg-card: #161616;
  --fg: #f2f2ec;
  --fg-dim: #8a8a82;
  --fg-mute: #555550;
  --accent: #ff4b1f;
  --border: rgba(242, 242, 236, 0.08);
  --border-strong: rgba(242, 242, 236, 0.18);

  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --max-w: 1680px;
  --pad-x: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Typography ---------- */
.display, h1, h2, h3 {
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

h1.hero-title {
  font-size: clamp(54px, 11vw, 200px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.88;
}

h2.section-title {
  font-size: clamp(40px, 7vw, 120px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
}

h3 { font-size: clamp(24px, 2.4vw, 36px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  font-weight: 500;
}

.lead {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.35;
  color: var(--fg);
  max-width: 60ch;
}

p { color: var(--fg-dim); max-width: 65ch; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: var(--fg);
}

/* ---------- Layout helpers ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding-inline: var(--pad-x); }
.section   { padding-block: clamp(80px, 12vw, 180px); }
.grid      { display: grid; }
.flex      { display: flex; }
.divider   { height: 1px; background: var(--border); width: 100%; }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference;
  color: #fff;
  transition: background 0.4s var(--ease);
}
.header.scrolled {
  mix-blend-mode: normal;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.logo .dot { color: var(--accent); }

.nav { display: flex; gap: 36px; align-items: center; }
.nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: #fff; }

.status-dot {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.status-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1ed16f;
  box-shadow: 0 0 0 0 rgba(30, 209, 111, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(30, 209, 111, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(30, 209, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 209, 111, 0); }
}

.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 100px var(--pad-x) 60px;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: -1;
}
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.15) 50%, rgba(10,10,10,0.85) 100%);
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}
.hero-meta {
  display: flex; justify-content: space-between; align-items: end;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 40px;
}
.hero-meta .lead { max-width: 32ch; }

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 40px;
  background: currentColor;
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; }
  50%      { transform: scaleY(1);    transform-origin: top; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.05em;
}
.marquee-track {
  display: inline-flex; gap: 60px;
  animation: marquee 40s linear infinite;
  padding-left: 60px;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track span::before {
  content: '◇';
  color: var(--accent);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Works grid ---------- */
.works-header {
  display: flex; justify-content: space-between; align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}

.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  color: var(--fg-dim);
  transition: all 0.3s var(--ease);
}
.filter-btn:hover { color: var(--fg); border-color: var(--fg); }
.filter-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px 24px;
}

.work-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.work-card.span-6 { grid-column: span 6; }
.work-card.span-7 { grid-column: span 7; }
.work-card.span-5 { grid-column: span 5; }
.work-card.span-12 { grid-column: span 12; }

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-card);
}
.work-card.tall .work-media { aspect-ratio: 4 / 5; }
.work-card.wide .work-media { aspect-ratio: 21 / 9; }

.work-media img, .work-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.6s var(--ease);
  filter: saturate(0.85);
}
.work-card:hover .work-media img,
.work-card:hover .work-media video {
  transform: scale(1.04);
  filter: saturate(1.15);
}

.work-info {
  padding-top: 16px;
  display: flex; justify-content: space-between; align-items: start;
  gap: 16px;
}
.work-title {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.work-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: end;
  padding: 24px;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,0.7) 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.work-card:hover .work-overlay { opacity: 1; }
.work-overlay-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: var(--accent);
  color: var(--bg);
  padding: 6px 12px;
  border-radius: 100px;
  font-weight: 600;
}

/* ---------- Services ---------- */
.services-list {
  border-top: 1px solid var(--border);
}
.service-item {
  display: grid;
  grid-template-columns: 80px 1fr 200px auto;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: padding 0.4s var(--ease);
}
.service-item:hover { padding-left: 16px; }
.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.service-name {
  font-size: clamp(28px, 3.5vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.service-desc {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.4;
}
.service-arrow {
  font-size: 24px;
  color: var(--fg-dim);
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}
.service-item:hover .service-arrow { transform: translateX(8px); color: var(--accent); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.about-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-card);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text .lead { margin-block: 24px 32px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.stat-num {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  margin-top: 8px;
}

/* ---------- Contact / CTA ---------- */
.cta {
  text-align: center;
  padding-block: clamp(120px, 18vw, 240px);
  position: relative;
}
.cta-mail {
  display: inline-block;
  font-size: clamp(40px, 7vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  position: relative;
  padding-bottom: 8px;
  background: linear-gradient(currentColor, currentColor) bottom left / 0% 2px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.cta-mail:hover { background-size: 100% 2px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 80px;
  align-items: start;
}
.contact-block h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  margin-bottom: 16px;
  font-weight: 500;
}
.contact-block a, .contact-block li {
  display: block;
  font-size: clamp(20px, 1.8vw, 28px);
  margin-bottom: 8px;
  font-weight: 500;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.contact-block a:hover { color: var(--accent); transform: translateX(4px); }

/* ---------- Form ---------- */
.form { display: grid; gap: 20px; max-width: 560px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field {
  display: flex; flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  padding: 12px 0;
  color: var(--fg);
  font: inherit;
  font-size: 18px;
  outline: none;
  transition: border-color 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 32px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--bg); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px var(--pad-x) 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.footer .socials { display: flex; gap: 24px; }
.footer .socials a:hover { color: var(--fg); }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: 200px var(--pad-x) 80px;
  border-bottom: 1px solid var(--border);
}
.page-header .eyebrow { margin-bottom: 24px; display: block; }
.page-header h1 {
  font-size: clamp(56px, 12vw, 200px);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 0.9;
}
.page-header .lead { margin-top: 32px; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: var(--bg);
    z-index: 99;
  }
  .nav.is-open a { font-size: 32px; }
  .menu-toggle {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 101;
    position: relative;
  }
  .header .status-dot { display: none; }

  .works-grid { grid-template-columns: repeat(6, 1fr); gap: 24px; }
  .work-card.span-6, .work-card.span-7, .work-card.span-5 { grid-column: span 6; }

  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat-num { font-size: 36px; }

  .service-item {
    grid-template-columns: 50px 1fr auto;
    grid-template-areas:
      "num name arrow"
      ".   desc desc";
    gap: 12px 16px;
  }
  .service-num  { grid-area: num; }
  .service-name { grid-area: name; }
  .service-desc { grid-area: desc; }
  .service-arrow{ grid-area: arrow; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Subsection (Films / Photography inside Trabajos) ---------- */
.subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 48px;
}
.subsection-title {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 12px;
}

/* ---------- WhatsApp button ---------- */
.btn-whatsapp {
  background: #1ed16f;
  color: #0a0a0a;
  padding: 20px 36px;
  font-size: 15px;
}
.btn-whatsapp svg { flex-shrink: 0; }
.btn-whatsapp:hover {
  background: #25e87f;
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* ---------- Section anchor offset for fixed header ---------- */
section[id] {
  scroll-margin-top: 80px;
}

@media (max-width: 720px) {
  .subsection-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
