/* ============================================================
   Sergi Lanau — Portfolio landing (esqueleto)
   Estética inspirada en Essanza: fondo claro, tarjetas redondeadas,
   sección oscura de servicios, tipografía grotesca contundente.
   ============================================================ */

:root {
  --bg: #f1f0ee;
  --surface: #ffffff;
  --ink: #101012;
  --ink-soft: #5c5c60;
  --muted: #b6b6ba;
  --accent: #e0281c;            /* rojo puntual, como Essanza */
  --blue-1: #0d2b52;            /* duotono azul del hero */
  --blue-2: #3f6fb5;
  --blue-3: #9fc2ee;
  --dark: #131316;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font-display: "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;
  --pad-x: clamp(16px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--dark  { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn__dot { color: inherit; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad-x);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav__links { display: flex; gap: 6px; }
.nav__contact-mobile { display: none; }
.nav__links a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background .2s ease;
}
.nav__links a:hover { background: rgba(0,0,0,0.06); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 8px var(--pad-x) 0; }

.hero__card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: min(70vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 36px);
  color: #fff;
}

/* Fondo azul degradado; la foto (recorte con alfa) va POR ENCIMA,
   centrada y más pequeña, y se desvanece por abajo (mask) para que
   el nombre gigante quede sobre el degradado, como en la referencia. */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 70% 20%, var(--blue-3), transparent 60%),
    radial-gradient(100% 100% at 20% 80%, var(--blue-2), transparent 65%),
    linear-gradient(160deg, var(--blue-1), #060d18 90%);
}
.hero__media img.hero__img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 103%;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, rgba(0,0,0,0.5) 82%, rgba(0,0,0,0.18) 100%);
  mask-image: linear-gradient(to bottom, #000 50%, rgba(0,0,0,0.5) 82%, rgba(0,0,0,0.18) 100%);
}
/* La parte inferior de la tarjeta se funde con el fondo de la página,
   de modo que el hero se disuelve en la sección siguiente */
.hero__media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background: linear-gradient(to bottom, rgba(241,240,238,0), rgba(241,240,238,0.18) 40%, rgba(241,240,238,0.75) 72%, #f1f0ee 94%);
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.85rem;
}
.hero__badge {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}
.hero__time { opacity: .85; text-align: right; }

.hero__center {
  max-width: 480px;
  margin: auto auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.hero__tagline { font-size: 1.05rem; text-shadow: 0 1px 12px rgba(0,0,0,.35); }

/* Nombre gigante: degradado vertical (más tenue arriba) y un blur
   suave, para el acabado difuminado de la referencia */
.hero__title {
  position: relative;
  font-size: clamp(3.5rem, 14vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
  line-height: 0.9;
  margin: 0 -10px -0.14em;
  color: var(--bg);   /* mismo color que el fondo de la sección siguiente */
  white-space: nowrap;
}
/* el desenfoque va DETRÁS del nombre: difumina la foto y el fondo,
   no las letras, que quedan nítidas encima */
.hero__title::before {
  content: "";
  position: absolute;
  left: -6%; right: -6%;
  top: -12%; bottom: 0;
  z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
  mask-image: linear-gradient(to bottom, transparent, #000 30%);
  pointer-events: none;
}

/* ---------- Redes ---------- */
.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 22px 0 8px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: transform .15s ease;
}
.social a:hover { transform: translateY(-2px); }
.social__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---------- Secciones genéricas ---------- */
.section { padding: clamp(56px, 8vw, 110px) var(--pad-x); }

.section__head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.section__label::first-letter { color: var(--accent); }
.section__head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 720px;
}
.muted { color: var(--muted); }

/* ---------- Sobre mí ---------- */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}
.about > * { grid-column: 2; }
.about p { max-width: 680px; color: var(--ink-soft); margin-bottom: 20px; }
.about .about__lead { color: var(--ink); font-size: 1.1rem; }
.about .btn { justify-self: start; }

/* ---------- Proyectos ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.project__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  transition: transform .2s ease;
}
.project__media:hover { transform: scale(1.01); }
.project__media img,
.project__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Proyectos en vídeo: fondo + botón de play; al hacer clic se inserta un
   <iframe> (Vimeo/YouTube) que ocupa toda la tarjeta */
.project__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.project__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  color: #fff;
  font-size: 1.1rem;
  padding-left: 4px;
}

.project__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.project__meta h3 { font-size: 1.15rem; font-weight: 700; }
.project__tags { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.project p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 8px; max-width: 520px; }

.project.is-hidden { display: none; }
.projects__more { text-align: center; margin-top: clamp(32px, 5vw, 56px); }

/* ---------- Servicios (sección oscura) ---------- */
.dark {
  background: var(--dark);
  color: #f4f4f4;
  border-radius: var(--radius-lg);
  margin: 0 clamp(8px, 1.5vw, 20px);
  padding: clamp(56px, 8vw, 100px) clamp(24px, 4vw, 64px);
}
.section__head--dark h2 { color: #fff; }
.section__label--dark { color: #a9a9ad; }

.services { display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.service__title { display: flex; align-items: flex-start; gap: 18px; }
.service__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.service__title h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; }
.service__body p { color: #c9c9cd; max-width: 520px; margin-bottom: 18px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  border: 1px solid rgba(255,255,255,0.25);
  color: #e6e6ea;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  grid-template-columns: 220px 1fr;
}
.faq__item {
  grid-column: 2;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  max-width: 720px;
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-soft); }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding: 0 22px 18px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: #f4f4f4;
  margin-top: clamp(24px, 4vw, 48px);
  padding: clamp(56px, 7vw, 90px) var(--pad-x) 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.footer__cta p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 700;
  max-width: 380px;
  margin: 14px 0 22px;
  line-height: 1.25;
}
.footer__links, .footer__contact { display: flex; flex-direction: column; gap: 10px; }
.footer h4 { font-size: 0.85rem; color: #a9a9ad; text-transform: uppercase; letter-spacing: 0.06em; }
.footer__links a:hover, .footer__contact a:hover { color: #fff; text-decoration: underline; }
.footer__links a, .footer__contact a, .footer__contact span { color: #d6d6da; font-size: 0.95rem; }

.footer__name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 15rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.85;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.35);
  margin-bottom: -0.12em;
  user-select: none;
}

.footer__legal {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  font-size: 0.85rem;
  color: #a9a9ad;
}
.footer__legal a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links, .nav__right { display: none; }
  .nav__contact-mobile { display: block; }
  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  .nav__toggle span { width: 24px; height: 2px; background: var(--ink); }
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 16px var(--pad-x) 24px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }

  .section__head, .about, .faq { grid-template-columns: 1fr; }
  .about > *, .faq__item { grid-column: 1; }
  .projects { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__card { min-height: 70vh; }
}
