/* ============================================================
   Descorche, LLC — descorche.media
   Palette: black & white, like the logo. No blue — client request.
   ============================================================ */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mulish";
  src: url("/assets/fonts/mulish-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0a0a;
  --ink-soft: #161616;
  --black: #000;
  --white: #fff;
  --paper: #fff;
  --gray-100: #f4f4f6;
  --gray-300: #d8d8de;
  --gray-600: #5f5f5f;
  --head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Mulish", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 { font-family: var(--head); line-height: 1.15; }

.container {
  width: min(1120px, 100% - 2 * var(--pad));
  margin-inline: auto;
}

.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }

.section--dark {
  background: linear-gradient(160deg, #121212 0%, var(--black) 100%);
  color: var(--white);
}

.kicker {
  display: block;
  font-family: var(--head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}
.section--dark .kicker { color: rgba(255, 255, 255, 0.55); }

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 46ch;
  color: var(--gray-600);
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section--dark .section-intro { color: rgba(255, 255, 255, 0.75); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 2px solid var(--white);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn--solid { background: var(--white); color: var(--ink); }
.btn--solid:hover { background: transparent; color: var(--white); }

.btn--ghost { background: transparent; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

.btn--ink {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn--ink:hover { background: transparent; color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
}
.site-header.scrolled {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.brand img { height: 2.6rem; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.nav a {
  font-family: var(--head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 1; }
.nav .btn { padding: 0.5rem 1.3rem; font-size: 0.85rem; opacity: 1; }
.nav a.btn--solid { color: var(--ink); }
.nav a.btn--solid:hover { color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 26rem; box-shadow: 0 20px 30px rgba(0,0,0,0.4); }
  .nav a { padding: 1rem; opacity: 1; }
  .nav .btn { margin: 0.75rem 1.5rem 1.25rem; border-radius: 999px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 255, 255, 0.07), transparent),
    linear-gradient(165deg, #141414 0%, #060606 70%, var(--black) 100%);
  color: var(--white);
  padding: 6.5rem var(--pad) 4rem;
}

.hero__inner { width: min(880px, 100%); }

.hero h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 30ch;
  margin: 0 auto 0.75rem;
}

.hero__tagline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 48ch;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Video ---------- */

.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--black);
}
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }

.hero__video {
  margin: 0 auto 2rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Servicios ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.service {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
}

.service__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.service::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 15%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.25));
  transition: background 0.4s ease;
}

.service:hover .service__bg,
.service:focus-within .service__bg {
  transform: scale(1.06);
  filter: grayscale(30%) contrast(1.05);
}

.service__body { padding: 1.5rem; width: 100%; }

.service__icon { width: 2.2rem; height: 2.2rem; margin-bottom: 0.6rem; }

.service h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.service p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

@media (hover: hover) {
  .service p {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.45s ease;
  }
  .service:hover p,
  .service:focus-within p { max-height: 10rem; opacity: 1; }
}

/* ---------- Equipo ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.person {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.person:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, 0.3); }

.person img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}
.person:hover img { filter: grayscale(0%); }

.person__body { padding: 1.4rem 1.25rem 1.6rem; }

.person h3 { font-size: 1.25rem; font-weight: 800; }

.person .role {
  font-size: 0.85rem;
  font-family: var(--head);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.35rem;
}

.team-cta { text-align: center; }

/* ---------- Trabajos ---------- */

.works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.1rem;
}

.work {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--ink);
  display: block;
  width: 100%;
}

.work img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.work:hover img { transform: scale(1.05); }

.work figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1.2rem 0.9rem;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  text-align: left;
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 92vw);
  margin: auto; /* the global reset removes the UA margin that centers <dialog> */
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }
.lightbox img { border-radius: var(--radius); max-height: 82vh; width: auto; max-width: 100%; margin-inline: auto; }
.lightbox figcaption {
  color: var(--white);
  text-align: center;
  font-family: var(--head);
  font-weight: 600;
  padding-top: 0.8rem;
}
.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--body);
}

/* ---------- Contacto ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-aside p { color: var(--gray-600); max-width: 40ch; }

.contact-aside .email-link {
  display: inline-block;
  font-family: var(--head);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  margin-top: 1.25rem;
}

.socials { display: flex; gap: 0.9rem; margin-top: 1.75rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.socials a:hover { background: var(--ink); color: var(--white); transform: translateY(-3px); }
.socials svg { width: 1.15rem; height: 1.15rem; }

.section--dark .socials a { color: var(--white); }
.section--dark .socials a:hover { background: var(--white); color: var(--ink); }

.form { display: grid; gap: 1.1rem; }

.form label.field span {
  display: block;
  font-family: var(--head);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 0.2s;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form textarea { min-height: 8.5rem; resize: vertical; }

.form fieldset {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.form fieldset legend {
  font-family: var(--head);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.form .btn { justify-self: start; }

.form-status {
  font-weight: 700;
  min-height: 1.5rem;
}
.form-status.ok { color: #0a7a3d; }
.form-status.error { color: #b00020; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.75rem 0;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer .brand { font-size: 1.05rem; }
.site-footer .brand img { height: 2.2rem; }
.site-footer .socials { margin-top: 0; }
.site-footer .socials a { color: rgba(255, 255, 255, 0.8); width: 2.4rem; height: 2.4rem; }
.site-footer .socials a:hover { background: var(--white); color: var(--black); }

/* ---------- Página Equipo ---------- */

.page-hero {
  padding: 9rem 0 4rem;
  background: linear-gradient(165deg, #141414 0%, var(--black) 100%);
  color: var(--white);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bio {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.bio + .bio { margin-top: clamp(3.5rem, 8vw, 6rem); }
.bio:nth-of-type(even) .bio__photo { order: 2; }
@media (max-width: 820px) {
  .bio { grid-template-columns: 1fr; }
  .bio:nth-of-type(even) .bio__photo { order: 0; }
}

.bio__photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bio__photo img { width: 100%; object-fit: cover; }

.bio h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; }
.bio .role {
  font-family: var(--head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin: 0.5rem 0 1.25rem;
}
.bio p { color: var(--gray-600); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .service p { max-height: none; opacity: 1; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
