/* ============================================================
   CPStudio — Editorial Dark Luxury
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #000000;
  --white: #ffffff;
  --grey-100: #f5f5f5;
  --grey-300: #999999;
  --grey-500: #555555;
  --grey-800: #1a1a1a;
  --serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sans:  'Helvetica Neue', Helvetica, Arial, sans-serif;
  --transition: 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --- Theme Toggle Button --- */
#theme-toggle {
  position: fixed;
  top: 1.4rem;
  left: 1.5rem;
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: opacity 0.3s, color 0.3s;
  opacity: 0.6;
}

#theme-toggle:hover { opacity: 1; }

#theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: opacity 0.3s, transform 0.4s;
}

/* Light mode: show sun, hide moon */
#theme-toggle .icon-sun  { display: block; }
#theme-toggle .icon-moon { display: none; }

/* Dark mode: show moon, hide sun */
html[data-theme="dark"] #theme-toggle .icon-sun  { display: none; }
html[data-theme="dark"] #theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] #theme-toggle { color: var(--white); }

/* =============================================
   DARK MODE
   ============================================= */
html[data-theme="dark"] body {
  background: #0a0a0a;
  color: #f0f0f0;
}

html[data-theme="dark"] .nav.scrolled {
  background: rgba(10,10,10,0.92);
  border-bottom-color: rgba(255,255,255,0.07);
}

html[data-theme="dark"] .nav-links a { color: rgba(255,255,255,0.6); }
html[data-theme="dark"] .nav-links a:hover { color: #fff; }
html[data-theme="dark"] .nav-hamburger span { background: #fff; }
html[data-theme="dark"] .nav-logo-img { filter: brightness(0) invert(1); }

html[data-theme="dark"] .hero-slide img { filter: brightness(0.45); }

html[data-theme="dark"] .manifesto { background: #0a0a0a; border-bottom-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .manifesto-lead { color: #f0f0f0; }
html[data-theme="dark"] .manifesto-body p { color: rgba(255,255,255,0.55); }

html[data-theme="dark"] #proyectos { background: #0a0a0a; }
html[data-theme="dark"] .estudio-main-title { color: #f0f0f0; }
html[data-theme="dark"] .section-label { color: #777; }

html[data-theme="dark"] #estudio { background: #0a0a0a; }
html[data-theme="dark"] .estudio-col-body { border-top-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] .estudio-col-title { color: #f0f0f0; }
html[data-theme="dark"] .estudio-col-body p { color: rgba(255,255,255,0.5); }

html[data-theme="dark"] #noticias { background: #0a0a0a; }
html[data-theme="dark"] .noticia-card { border-bottom-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .noticia-card:first-child { border-top-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .noticia-title { color: #f0f0f0; }
html[data-theme="dark"] .noticia-date { color: #777; }
html[data-theme="dark"] .noticia-excerpt { color: rgba(255,255,255,0.5); }
html[data-theme="dark"] .noticia-link { color: rgba(255,255,255,0.35); }
html[data-theme="dark"] .noticia-card:hover .noticia-link { color: #fff; }

html[data-theme="dark"] #contacto { background: #111; }
html[data-theme="dark"] .contacto-info-label { color: #f0f0f0; }
html[data-theme="dark"] .contacto-detail-label { color: #777; }
html[data-theme="dark"] .contacto-detail p,
html[data-theme="dark"] .contacto-detail a { color: rgba(255,255,255,0.65); }
html[data-theme="dark"] .form-group label { color: #777; }
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea { color: #f0f0f0; border-bottom-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group textarea:focus { border-bottom-color: #fff; }
html[data-theme="dark"] .btn-submit { background: #f0f0f0; color: #0a0a0a; }
html[data-theme="dark"] .btn-outline { border-color: rgba(255,255,255,0.3); color: #f0f0f0; }
html[data-theme="dark"] .btn-outline:hover { background: #fff; color: #000; }
html[data-theme="dark"] .divider { background: rgba(255,255,255,0.1); }

html[data-theme="dark"] .reveal { --reveal-color: #f0f0f0; }
html[data-theme="dark"] .title-scroll { color: #f0f0f0; }

html[data-theme="dark"] footer { background: #000; }
html[data-theme="dark"] .footer-logo-img { filter: brightness(0) invert(1); }
html[data-theme="dark"] .footer-socials a { color: rgba(255,255,255,0.4); }
html[data-theme="dark"] .footer-socials a:hover { color: #fff; }
html[data-theme="dark"] .footer-bottom { color: rgba(255,255,255,0.25); }
html[data-theme="dark"] .footer-bottom a:hover { color: rgba(255,255,255,0.6); }

html[data-theme="dark"] .nav-mobile { background: #0a0a0a; }
html[data-theme="dark"] .nav-mobile a { color: rgba(255,255,255,0.8); }

html[data-theme="dark"] .splash-logo-img { filter: brightness(0) invert(1); }
html[data-theme="dark"] #splash { background: #0a0a0a; }

/* --- Splash / Loader --- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splash-hide 0s 4.5s forwards;
}

@keyframes splash-hide {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

.splash-logo-img {
  height: clamp(36px, 5vw, 52px);
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0;
  animation: splash-in 1s 0.3s forwards, splash-out 0.8s 3.5s forwards;
}

@keyframes splash-in { to { opacity: 1; } }
@keyframes splash-out { to { opacity: 0; } }

html[data-theme="dark"] #splash { background: #0a0a0a; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 2.5rem 0;
  transition: background var(--transition);
}

.nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Logo row */
.nav-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 1rem;
  position: relative;
}

.nav-logo {
  display: flex;
  justify-content: center;
}

.nav-logo-img {
  height: 34px;
  width: auto;
  filter: brightness(0);
  transition: opacity 0.3s;
}

.nav-logo-img:hover { opacity: 0.7; }

/* Dropdown links row */
.nav-links-row {
  width: 100%;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.22,1,0.36,1),
              opacity 0.35s ease;
  display: flex;
  justify-content: center;
}

/* Show on nav hover */
.nav:hover .nav-links-row {
  max-height: 60px;
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
  padding: 0.6rem 0 1rem;
}

.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--black); }

/* Botón Zona Cliente (destacado) */
.nav-links a.nav-zona {
  border: 1px solid rgba(0,0,0,0.35);
  padding: 0.45rem 0.95rem;
  border-radius: 2px;
  color: var(--black);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav-links a.nav-zona:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
html[data-theme="dark"] .nav-links a.nav-zona {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
html[data-theme="dark"] .nav-links a.nav-zona:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.nav-links li:has(.nav-zona) { display: flex; align-items: center; }

/* Botón Zona Cliente en hero */
.hero-nav-bottom a.hero-nav-zona {
  border: 1px solid rgba(255,255,255,0.5);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}
.hero-nav-bottom a.hero-nav-zona:hover {
  background: var(--white);
  color: var(--black);
}

/* Hamburger (mobile only) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
  position: absolute;
  right: 0;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s, visibility 0.4s;
}

.nav-mobile.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-mobile a {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: rgba(0,0,0,0.75);
  transition: color 0.3s;
}

.nav-mobile a:hover { color: var(--black); }

/* --- Hero --- */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 2;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 2rem 2rem 7rem;
}

.hero-tagline {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.hero-subtitle {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* Hero nav bottom */
.hero-nav-bottom {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.hero-nav-bottom a {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}

.hero-nav-bottom a:hover { color: var(--white); }

.hero-nav-bottom .sep {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.25);
}

/* Slider dots */
.slider-dots {
  position: absolute;
  right: 2.5rem;
  bottom: 2.5rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-dot {
  width: 2px;
  height: 20px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.3s, height 0.3s;
  border: none;
}

.slider-dot.active {
  background: var(--white);
  height: 32px;
}

/* --- Section Base --- */
section {
  padding: 7rem 0;
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.1);
  margin: 4rem 0;
}

/* --- Reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Defensive rule: split-text reveals */
.reveal[data-split] { opacity: 1; transform: none; }

/* Stagger delays */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ===================== MANIFESTO ===================== */
.manifesto {
  background: var(--white);
  padding: 6rem 0 5rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.manifesto-lead {
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--black);
  max-width: 75%;
  margin: 0 auto 2.5rem;
  text-align: justify;
}

.manifesto-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 4rem;
  max-width: 75%;
  margin: 0 auto;
}

.manifesto-body p {
  font-size: 0.78rem;
  line-height: 1.85;
  color: rgba(0,0,0,0.6);
  text-align: justify;
}

/* last paragraph spans both columns if odd count */
.manifesto-body p:last-child:nth-child(odd) {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .manifesto-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .manifesto-body p:last-child:nth-child(odd) {
    grid-column: span 1;
  }
}

/* ===================== PROYECTOS ===================== */
#proyectos {
  background: var(--white);
}

.proyectos-header {
  text-align: left;
  padding: 5rem 0 3rem;
}

.btn-outline {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.3);
  padding: 0.75rem 2rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-outline:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Uniform grid */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.proyecto-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.proyecto-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.proyecto-card:hover img {
  transform: scale(1.04);
}

.proyecto-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
}

.proyecto-card:hover .proyecto-overlay {
  opacity: 1;
}

.proyecto-cat {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.4rem;
  transform: translateY(12px);
  transition: transform var(--transition) 0.05s;
}

.proyecto-name {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  transform: translateY(12px);
  transition: transform var(--transition);
}

.proyecto-card:hover .proyecto-cat,
.proyecto-card:hover .proyecto-name {
  transform: translateY(0);
}

.proyectos-footer {
  text-align: center;
  margin-top: 3rem;
  padding-bottom: 1rem;
}

/* ===================== ESTUDIO ===================== */
#estudio {
  background: var(--white);
  padding: 0 0 6rem;
}

.estudio-header {
  text-align: left;
  padding: 5rem 0 3rem;
}

.estudio-main-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--black);
  text-transform: uppercase;
}

/* Scroll in/out animation for section titles */
.title-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.title-scroll.in {
  opacity: 1;
  transform: translateY(0);
}

.title-scroll.out {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.4s ease-in,
              transform 0.4s ease-in;
}

.estudio-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.estudio-col {
  display: block;
  color: inherit;
  cursor: pointer;
}

.estudio-col-img {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  position: relative;
}

.estudio-col-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: brightness(0.75);
}

.estudio-col:hover .estudio-col-img img {
  transform: scale(1.04);
  filter: brightness(0.6);
}

/* Caption inside image */
.estudio-col-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
}

.estudio-col-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}

/* Description below image — hidden by default */
.estudio-col-body {
  padding: 1.2rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s cubic-bezier(0.22,1,0.36,1),
              max-height 0.45s cubic-bezier(0.22,1,0.36,1);
}

.estudio-col:hover .estudio-col-body {
  opacity: 1;
  max-height: 160px;
}

.estudio-col-body p {
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(0,0,0,0.55);
}

html[data-theme="dark"] .estudio-col-body { border-top-color: rgba(255,255,255,0.1); }
html[data-theme="dark"] .estudio-col-body p { color: rgba(255,255,255,0.5); }

.estudio-col-arrow {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s 0.1s, transform 0.35s 0.1s cubic-bezier(0.22,1,0.36,1);
}

.estudio-col:hover .estudio-col-arrow {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="dark"] .estudio-col-arrow { color: rgba(255,255,255,0.5); }

@media (max-width: 768px) {
  .estudio-cols { grid-template-columns: repeat(2, 1fr); }
  .estudio-main-title { font-size: clamp(1.8rem, 10vw, 3rem); }
}
@media (max-width: 480px) {
  .estudio-cols { grid-template-columns: 1fr; }
}

/* ===================== NOTICIAS ===================== */
#noticias {
  background: var(--white);
}

/* ===================== SERVICIOS ===================== */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3.5rem;
  row-gap: 2.75rem;
}

.servicio-card {
  display: flex;
  flex-direction: column;
}

.servicio-num {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--grey-500);
  margin-bottom: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.servicio-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.servicio-text {
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(0,0,0,0.55);
  margin-bottom: 0.85rem;
}
html[data-theme="dark"] .servicio-text { color: rgba(255,255,255,0.5); }

.servicio-link {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--black);
  margin-top: auto;
  transition: opacity 0.3s ease;
}
html[data-theme="dark"] .servicio-link { color: #fff; }
.servicio-link::after {
  content: ' →';
  opacity: 0.5;
  transition: padding-left 0.3s ease;
}
.servicio-link:hover::after { padding-left: 0.3rem; }

/* --- Servicio expandible: Regularización / Legalización --- */
.servicio-card--expand {
  position: relative;
  cursor: pointer;
}
.servicio-card--expand .servicio-title { cursor: pointer; }

/* Pequeño indicador "+" en la esquina */
.servicio-card--expand::after {
  content: '+';
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--grey-500);
  transition: transform 0.3s ease, color 0.3s ease;
}
.servicio-card--expand:hover::after,
.servicio-card--expand:focus-within::after {
  transform: rotate(45deg);
  color: var(--black);
}
html[data-theme="dark"] .servicio-card--expand:hover::after,
html[data-theme="dark"] .servicio-card--expand:focus-within::after { color: #fff; }

/* Panel desplegable */
.servicio-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: min(560px, 92vw);
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.16);
  border-radius: 4px;
  padding: 1.75rem;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
html[data-theme="dark"] .servicio-dropdown {
  background: #111;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.servicio-card--expand:hover .servicio-dropdown,
.servicio-card--expand:focus-within .servicio-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.servicio-subtable {
  list-style: none;
  counter-reset: sub;
  margin: 0;
  padding: 0;
}
.servicio-subtable li {
  counter-increment: sub;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
html[data-theme="dark"] .servicio-subtable li { border-bottom-color: rgba(255,255,255,0.08); }
.servicio-subtable li:first-child { padding-top: 0; }
.servicio-subtable li:last-child { border-bottom: none; padding-bottom: 0; }

.servicio-subtable .sub-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}
.servicio-subtable .sub-title::before {
  content: counter(sub) ". ";
  color: var(--grey-500);
  font-weight: 600;
}
.servicio-subtable .sub-desc {
  font-size: 0.76rem;
  line-height: 1.7;
  color: rgba(0,0,0,0.55);
  margin: 0;
}
html[data-theme="dark"] .servicio-subtable .sub-desc { color: rgba(255,255,255,0.5); }

@media (max-width: 900px) {
  .servicios-grid { grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; }
}
@media (max-width: 560px) {
  .servicios-grid { grid-template-columns: 1fr; }
  .servicio-dropdown { width: 100%; }
}

.noticias-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.noticia-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 0.3s;
}

.noticia-card:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}

.noticia-card:hover .noticia-title {
  color: rgba(255,255,255,0.65);
}

.noticia-img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  overflow: hidden;
  flex-shrink: 0;
}

.noticia-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.noticia-card:hover .noticia-img img {
  transform: scale(1.06);
}

.noticia-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}

.noticia-date {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.noticia-title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 900;
  line-height: 1.3;
  transition: color 0.3s;
}

.noticia-excerpt {
  font-size: 0.825rem;
  line-height: 1.7;
  color: rgba(0,0,0,0.5);
  max-width: 60ch;
}

.noticia-link {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
  transition: color 0.3s;
  align-self: flex-start;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.noticia-link::after {
  content: '→';
  display: inline-block;
  transition: transform 0.3s;
}

.noticia-card:hover .noticia-link {
  color: var(--black);
}

.noticia-card:hover .noticia-link::after {
  transform: translateX(4px);
}

/* ===================== CONTACTO ===================== */
#contacto {
  background: var(--grey-100);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contacto-info-label {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 3rem;
  letter-spacing: 0.03em;
}

.contacto-detail {
  margin-bottom: 2rem;
}

.contacto-detail-label {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.4rem;
}

.contacto-detail p,
.contacto-detail a {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(0,0,0,0.65);
  transition: color 0.3s;
}

.contacto-detail a:hover { color: var(--white); }

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  color: var(--black);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.6rem 0;
  outline: none;
  transition: border-color 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--black);
}

.form-group textarea {
  resize: none;
  height: 100px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--grey-300);
}

/* Form status */
#form-status {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  min-height: 1.2em;
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--black);
  border-top: none;
  padding: 4rem 0 2.5rem;
  text-align: center;
}

.footer-logo-img {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  margin: 0 auto 2rem;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.footer-socials a {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s;
}

.footer-socials a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
}

.footer-bottom a {
  color: inherit;
  transition: color 0.3s;
}

.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 960px) {
  .nav-links-row { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }

  .proyectos-grid { columns: 2; }
  .estudio-grid { grid-template-columns: 1fr; }
  .contacto-grid { grid-template-columns: 1fr; gap: 3.5rem; }
}

@media (max-width: 640px) {
  section { padding: 4.5rem 0; }

  .container { padding: 0 1.25rem; }

  .nav { padding: 1.25rem 1.25rem; }
  .nav.scrolled { padding: 0.85rem 1.25rem; }

  .proyectos-grid { columns: 1; }

  .noticia-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .noticia-img {
    width: 100%;
    height: 180px;
  }

  /* En móvil ocultamos la navegación inferior del hero:
     se solapaba con el título y bloqueaba los toques.
     El menú ☰ (arriba) ya cubre la navegación. */
  .hero-nav-bottom { display: none; }

  /* Centrar bien el título del hero en móvil */
  .hero-content {
    justify-content: center;
    padding: 2rem 1.5rem;
  }
  .hero-title { margin-bottom: 1.25rem; }

  .slider-dots { right: 1.25rem; bottom: 1.5rem; }

  .estudio-block { padding: 2rem 1.5rem; }

  /* En móvil no hay "hover": mostrar siempre el nombre del proyecto */
  .proyecto-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0) 70%);
  }
  .proyecto-cat,
  .proyecto-name { transform: translateY(0); }
}

/* ===================== PRIVACIDAD: HONEYPOT + CONSENTIMIENTO ===================== */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.25rem 0 1.5rem;
}
.form-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 15px; height: 15px;
  flex-shrink: 0;
  accent-color: var(--black);
  cursor: pointer;
}
html[data-theme="dark"] .form-consent input[type="checkbox"] { accent-color: #fff; }
.form-consent label {
  font-size: 0.7rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}
.form-consent a { color: rgba(255,255,255,0.85); text-decoration: underline; text-underline-offset: 2px; }

/* ===================== BANNER DE COOKIES (RGPD) ===================== */
.cookie-banner {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner.visible { opacity: 1; transform: translateY(0); }
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.4rem;
}
.cookie-banner-text {
  font-size: 0.72rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.cookie-banner-text a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.cookie-btn {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.cookie-btn--reject:hover { border-color: #fff; }
.cookie-btn--accept {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.cookie-btn--accept:hover { background: rgba(255,255,255,0.85); }

@media (max-width: 560px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 1rem; }
  .cookie-banner-actions { justify-content: flex-end; }
}
