:root {
  --pink: #DB2870;
  --lime: #AFCA0B;
  --dark: #3E3E3E;
  --light: #FFFFFF;
  --pink-soft: rgba(219, 40, 112, 0.08);
  --lime-soft: rgba(175, 202, 11, 0.12);
  --gray: #726F76;
  --radius: 22px;
  --max-width: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
  line-height: 1.6;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, auto;
}

a, button, input[type="submit"], .btn {
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
}

h1, h2, h3, .logo-text {
  font-family: 'Poppins', sans-serif;
}

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

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

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Decorative blobs */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
}
.blob-1 { width: 420px; height: 420px; background: var(--pink); top: -120px; left: -100px; }
.blob-2 { width: 380px; height: 380px; background: var(--lime); top: 30%; right: -140px; }
.blob-3 { width: 320px; height: 320px; background: var(--pink); bottom: -100px; left: 20%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(62, 62, 62, 0.06);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo-link {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 92px;
  width: auto;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-weight: 500;
}

.lang-switch {
  display: flex;
  gap: 6px;
}
.lang-btn {
  border: 1.5px solid rgba(62, 62, 62, 0.2);
  background: transparent;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.nav-links a {
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--pink); }

.nav-cta {
  background: var(--dark);
  color: var(--light) !important;
  padding: 10px 22px;
  border-radius: 100px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-cta:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 80px 24px 100px;
  min-height: 78vh;
}

.eyebrow {
  display: inline-block;
  font-weight: 600;
  color: var(--pink);
  background: var(--pink-soft);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--dark);
}
.hero h1 .accent { color: var(--pink); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(219, 40, 112, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(219, 40, 112, 0.42); }

.btn-ghost {
  border: 2px solid var(--dark);
  color: var(--dark);
  background: transparent;
}
.btn-ghost:hover { background: var(--dark); color: var(--light); }

.hero-visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(62, 62, 62, 0.18);
}
.hero-pattern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(62, 62, 62, 0.15);
  animation: float 5s ease-in-out infinite;
  padding: 18px;
}
.hero-card img { width: 100%; height: 100%; object-fit: contain; }
.card-1 { top: 6%; left: 2%; animation-delay: 0s; }
.card-2 { top: 58%; left: 68%; animation-delay: 1.2s; background: var(--lime); }
.card-3 { bottom: 4%; left: 22%; animation-delay: 2.4s; background: var(--pink); }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

/* Mascota de marca (hero-01 / hero-02): siempre por separado, una por página */
.hero-doodle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  animation: doodleFloat 5.5s ease-in-out infinite;
}
.hero-doodle img { width: 100%; height: auto; display: block; }

@keyframes doodleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-4deg); }
}

.doodle-index { width: 118px; top: 0%; right: 1%; animation-delay: .3s; }
.doodle-sobre { width: 150px; top: 6%; right: -30px; animation-delay: .8s; }
.doodle-servicios { width: 110px; top: 4%; left: -20px; animation-delay: 1.1s; }
.doodle-portafolio { width: 140px; top: 2%; left: -10px; animation-delay: 1.6s; }

/* Mascota "sentada" (hero-01) encima de una tarjeta de servicio */
.service-card-perch {
  position: relative;
  overflow: visible;
}
.doodle-sit {
  position: absolute;
  width: 108px;
  top: -66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  animation: doodleFloat 5.5s ease-in-out infinite;
}
.doodle-sit img { width: 100%; height: auto; display: block; }

/* Carita (hero-02) más abajo, asomando en la caja de contacto de servicios */
.doodle-face-cta {
  position: absolute;
  width: 80px;
  top: -30px;
  right: 8%;
  z-index: 5;
  pointer-events: none;
  animation: doodleFloat 5.5s ease-in-out infinite;
  animation-delay: .6s;
}
.doodle-face-cta img { width: 100%; height: auto; display: block; }

/* Carita (hero-02) pequeña sobre la foto de Sobre jo */
.about-photo {
  position: relative;
}
.doodle-face-sobre {
  position: absolute;
  width: 44px;
  top: -12px;
  right: -8px;
  z-index: 5;
  pointer-events: none;
  animation: doodleFloat 5.5s ease-in-out infinite;
}
.doodle-face-sobre img { width: 100%; height: auto; display: block; }

/* Monigot assegut (hero-01) damunt s'etiqueta de Disseny web */
.tab-perch {
  position: relative;
  display: inline-flex;
}
.doodle-tab-sit {
  position: absolute;
  width: 62px;
  bottom: 100%;
  left: 66%;
  transform: translateX(-50%);
  margin-bottom: -22px;
  z-index: 5;
  pointer-events: none;
  animation: doodleFloat 5.5s ease-in-out infinite;
}
.doodle-tab-sit img { width: 100%; height: auto; display: block; }

@media (max-width: 480px) {
  .doodle-sit { width: 78px; top: -50px; }
  .doodle-tab-sit { width: 46px; }
  .doodle-face-sobre { width: 36px; }
  .hero-visual { height: 190px; }
  .hero-pattern { width: 150px; height: 150px; }
}

/* Ilustraciones halftone (estilo de marca) */
.halftone-graphic {
  width: 108px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}
.halftone-left { margin-left: 0; }
.halftone-float { animation: haloFloat 4.5s ease-in-out infinite; }
.halftone-pulse { animation: haloPulse 2.1s ease-in-out infinite; }
.halftone-wiggle { animation: haloWiggle 3.4s ease-in-out infinite; }

@keyframes haloFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes haloWiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Sections */
.section {
  padding: 100px 0;
}
.section-alt {
  background: linear-gradient(180deg, var(--lime-soft), var(--pink-soft));
}

.section-heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 60px;
}
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-subtitle {
  color: var(--gray);
  font-size: 1.05rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.photo-placeholder {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--light);
  border: 1.5px solid rgba(62, 62, 62, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-weight: 600;
  font-size: 1.1rem;
  overflow: hidden;
}
.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-placeholder img.photo-real {
  object-position: top center;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
}
.stat span {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Services */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.service-card {
  flex: 1 1 calc((100% - 56px) / 3);
  max-width: calc((100% - 56px) / 3);
  box-sizing: border-box;
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: 0 10px 30px rgba(62, 62, 62, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(62, 62, 62, 0.13);
}
.services-cta {
  position: relative;
  overflow: visible;
  margin-top: 56px;
  text-align: center;
  background: linear-gradient(135deg, var(--pink-soft), var(--lime-soft));
  border-radius: var(--radius);
  padding: 50px 30px;
}
.services-cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}
.services-cta-text {
  color: var(--gray);
  max-width: 480px;
  margin: 0 auto 26px;
}

.service-icon {
  font-size: 2rem;
  margin: 0 auto 18px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--pink-soft);
}
.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  font-weight: 600;
}
.service-card p {
  color: var(--gray);
  font-size: 0.98rem;
}

/* Portfolio */
.portfolio-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}
.tab-btn {
  background: #fff;
  border: 2px solid transparent;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  color: var(--gray);
  box-shadow: 0 6px 16px rgba(62,62,62,0.06);
  transition: all 0.2s ease;
}
.tab-btn.active,
.tab-btn:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.portfolio-panel { display: none; }
.portfolio-panel.active { display: block; }

/* Cuadrículas tipo Pinterest (masonry) */
.masonry {
  column-count: 3;
  column-gap: 26px;
}
.masonry > .portfolio-item-wrap,
.masonry > .photo-item,
.masonry > .editorial-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 26px;
}
.photo-grid.masonry { column-count: 3; }
.photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(62, 62, 62, 0.1);
}
.photo-item img {
  width: 100%;
  height: auto;
  display: block;
}
.editorial-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(62, 62, 62, 0.1);
  background: var(--light);
}
.editorial-item img {
  width: 100%;
  height: auto;
  display: block;
}
.editorial-item-title {
  padding: 14px 18px;
  font-weight: 600;
  color: var(--dark);
}
.role-tags-center {
  justify-content: center;
  margin-top: 26px;
}

/* Página de detalle editorial */
.editorial-back-wrap {
  text-align: center;
  margin-top: 34px;
}
.editorial-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  padding: 10px 22px;
  border: 1.5px solid var(--pink);
  border-radius: 100px;
  transition: background 0.2s ease, color 0.2s ease;
}
.editorial-back-link:hover {
  background: var(--pink);
  color: #fff;
}
.editorial-cover-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Lightbox para ampliar fotos (Shooting) */
#panel-fotos .photo-item {
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#panel-fotos .photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(62, 62, 62, 0.18);
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 30px;
}
.lightbox.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  transition: background 0.2s ease;
}
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
@media (max-width: 640px) {
  .lightbox-arrow { width: 38px; height: 38px; font-size: 1.3rem; }
  .lightbox-close { width: 36px; height: 36px; font-size: 1.3rem; top: 14px; right: 14px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* Tira animada de palabras (inicio) */
.marquee-strip {
  width: 100%;
  overflow: hidden;
  background: var(--dark);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
}
.marquee-track span:not(.marquee-dot) {
  display: inline-block;
  white-space: nowrap;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  padding: 0 18px;
}
.marquee-dot {
  color: var(--lime);
  font-size: 1rem;
}
.marquee-strip:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 640px) {
  .marquee-track span:not(.marquee-dot) { font-size: 1rem; padding: 0 12px; }
}

/* Diseño web: mockups de portátil y móvil */
.webproject-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.webproject-note {
  text-align: center;
  max-width: 640px;
  margin: 40px auto 0;
  color: var(--gray);
  font-size: 0.95rem;
  font-style: italic;
}
.webproject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 56px;
}
.webproject-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 10px 30px rgba(62, 62, 62, 0.08);
}
.webproject-card h3 {
  text-align: center;
  margin-bottom: 28px;
}
.webproject-devices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  flex-wrap: wrap;
}

/* Portátil */
.device-laptop {
  flex: 1 1 400px;
  max-width: 620px;
}
.device-laptop-lid {
  background: linear-gradient(160deg, #3c3c3c, #161616);
  border-radius: 18px 18px 6px 6px;
  padding: 18px 18px 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
  box-sizing: border-box;
}
.device-laptop-cam {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #585858;
  margin: 0 auto 12px;
}
.device-laptop-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 900;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
}
.device-laptop-base {
  width: 114%;
  margin: 0 0 0 -7%;
  height: 24px;
  background: linear-gradient(180deg, #e4e4e4, #a8a8a8);
  border-radius: 0 0 14px 14px;
  position: relative;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}
.device-laptop-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: rgba(0, 0, 0, 0.16);
  border-radius: 0 0 8px 8px;
}

/* Teléfono móvil */
.device-phone {
  flex: 0 1 240px;
  max-width: 240px;
}
.device-phone-body {
  background: linear-gradient(160deg, #3c3c3c, #1c1c1c);
  border-radius: 34px;
  padding: 11px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
  box-sizing: border-box;
}
.device-phone-notch {
  width: 58px;
  height: 17px;
  background: #1c1c1c;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 6px;
}
.device-phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
}
/* Los móviles con capturas reales (rodogener.com, RESPIR) mantienen la
   proporción original de las fotos: el marco se adapta a la foto, no al revés. */
.device-phone-screen--rodogener { aspect-ratio: 780 / 1481; }
.device-phone-screen--respir { aspect-ratio: 780 / 1441; }

/* Carrusel de capturas dentro del marco de móvil (rodogener.com, RESPIR) */
/* Selector con doble clase a propósito: gana en especificidad a .carousel
   (que fija aspect-ratio:4/5) sin depender del orden de las reglas. */
.carousel.device-phone-carousel {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.device-phone-carousel .carousel-arrow {
  width: 26px;
  height: 26px;
  font-size: 0.85rem;
}
.device-phone-carousel .carousel-arrow.prev { left: 6px; }
.device-phone-carousel .carousel-arrow.next { right: 6px; }
.device-phone-carousel .carousel-dots {
  bottom: 8px;
  gap: 4px;
}
.device-phone-carousel .carousel-dots span {
  width: 5px;
  height: 5px;
}

/* Viewport virtual escalado por JS: fuerza formato escritorio/móvil real, sin zoom ni desbordes */
.device-screen-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
}
.device-screen-frame iframe,
.device-screen-frame img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.device-screen-frame img {
  object-fit: cover;
  object-position: top center;
}

.device-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: rgba(62, 62, 62, 0.06);
  color: var(--gray);
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
}

/* Estado vacío (pestañas sin contenido aún) */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}
.empty-state-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
}
.empty-state p {
  font-size: 1.05rem;
}

/* Carousels */
.carousel-grid {
  gap: 28px;
}
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--dark);
  box-shadow: 0 10px 30px rgba(62,62,62,0.1);
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  font-size: 1rem;
  color: var(--dark);
  z-index: 2;
  transition: background 0.2s ease;
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dots span.active {
  background: #fff;
  transform: scale(1.3);
}
.carousel-label {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.9);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(62,62,62,0.18);
  z-index: 2;
}

/* Wrapper de cada pieza de portafolio + etiquetas de rol */
.portfolio-item-wrap {
  display: flex;
  flex-direction: column;
}
.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.role-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 100px;
  white-space: nowrap;
}
.role-idea { background: var(--lime-soft); color: #5C6B06; }
.role-foto,
.role-grabacion,
.role-diseno,
.role-produccion { background: var(--pink-soft); color: var(--pink); }
.role-edicion { background: rgba(62, 62, 62, 0.08); color: var(--dark); }

/* Video grid */
.video-grid {
  gap: 22px;
}
.video-grid.masonry { column-count: 4; column-gap: 22px; }
.video-grid.masonry > .portfolio-item-wrap { margin-bottom: 22px; }
.video-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--dark);
  cursor: image-set(url('assets/img/cursor-star.png') 1x, url('assets/img/cursor-star-2x.png') 2x) 8 18, url('assets/img/cursor-star.png') 8 18, pointer;
  box-shadow: 0 10px 30px rgba(62,62,62,0.1);
}
.video-item video,
.video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(62,62,62,0.25);
  transition: opacity 0.2s ease;
}
.video-play span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: var(--pink);
}
.video-play span::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--pink);
  margin-left: 3px;
}
.video-item.playing .video-play { opacity: 0; pointer-events: none; }

.video-grid-wide {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
}
.video-item-wide {
  aspect-ratio: 16 / 9;
}

/* PDF gallery */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.pdf-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(62,62,62,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pdf-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(62,62,62,0.14);
}
.pdf-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.pdf-cover img { width: 100%; height: 100%; object-fit: cover; }
.pdf-info {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pdf-info h4 { font-size: 1.05rem; font-weight: 600; }
.pdf-info span { color: var(--gray); font-size: 0.85rem; }
.pdf-badge {
  background: var(--pink);
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Page banner (páginas internas) */
.page-banner {
  position: relative;
  padding: 56px 0 8px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.page-banner h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

/* Resumen de servicios (Inicio) */
.services-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 44px;
}
.service-chip {
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 14px;
  box-shadow: 0 8px 20px rgba(62, 62, 62, 0.06);
  flex: 1 1 calc(33.333% - 14px);
  max-width: calc(33.333% - 14px);
  box-sizing: border-box;
}
.service-chip .service-icon {
  margin: 0;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.service-chip h3 {
  font-size: 1rem;
  font-weight: 600;
}
.services-cta {
  text-align: center;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-links {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(62,62,62,0.06);
  transition: transform 0.2s ease;
}
.contact-links a:hover { transform: translateX(6px); }
.contact-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--lime-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-links small { color: var(--gray); font-weight: 400; }

.contact-form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 10px 30px rgba(62,62,62,0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1.5px solid rgba(62, 62, 62, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--pink);
}
.form-note {
  font-size: 0.9rem;
  color: var(--lime);
  min-height: 20px;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { height: 68px; }
.footer-socials {
  display: flex;
  gap: 20px;
}
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.footer-socials svg {
  width: 22px;
  height: 22px;
  display: block;
}
.footer-socials a:hover { color: var(--lime); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.82rem;
}
.footer-legal a {
  color: rgba(255, 255, 255, 0.65);
}
.footer-legal a:hover { color: var(--lime); }
.footer-copyright {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* Páginas legales */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
}
.legal-page h2 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.2rem;
}
.legal-page h2:first-child { margin-top: 0; }
.legal-page p,
.legal-page li {
  color: var(--gray);
  line-height: 1.7;
}
.legal-page ul {
  margin: 10px 0 10px 20px;
}
.legal-page a { color: var(--pink); }
.legal-updated {
  margin-top: 40px;
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-visual { height: 240px; order: -1; }
  .hero-pattern { width: 200px; height: 200px; }
  .hero-actions { margin-bottom: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .service-card { flex-basis: calc((100% - 28px) / 2); max-width: calc((100% - 28px) / 2); }
  .service-chip { flex-basis: calc(50% - 10px); max-width: calc(50% - 10px); }
  .masonry { column-count: 2; }
  .video-grid.masonry { column-count: 3; }
  .pdf-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid > * { min-width: 0; }

  /* Portafolio: quitar el monigote sentado en la etiqueta Diseño web */
  .doodle-tab-sit { display: none; }

  /* Portafolio: Shooting en 2 columnas (no 3, se ven muy pequeñas) */
  #panel-fotos .photo-grid.masonry { column-count: 2; }

  /* Portafolio: Editorial en 1 columna, cajas grandes */
  #panel-editorial .photo-grid.masonry { column-count: 1; }

  /* Portafolio: Redes Sociales, más margen entre cajas */
  #panel-branding .carousel-grid.masonry { column-gap: 20px; }
  #panel-branding .carousel-grid.masonry > .portfolio-item-wrap { margin-bottom: 28px; }

  /* Portafolio: Diseño web, solo formato móvil (se quita el portátil) */
  .webproject-grid { grid-template-columns: 1fr; gap: 32px; }
  .webproject-card { padding: 24px 16px; }
  .webproject-devices { justify-content: center; }
  .device-laptop { display: none; }

  /* Servicios: quitar el monigote sentado y dar margen a la caja de contacto */
  .doodle-sit { display: none; }
  .services-cta { margin-bottom: 24px; }
  .device-phone { flex: 0 1 100%; max-width: 260px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .logo-img { height: 68px; }
  .footer-logo { height: 52px; }
  .nav-toggle { display: flex; }
  .nav-right { gap: 12px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--light);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 30px;
    gap: 18px;
    display: none;
    border-bottom: 1px solid rgba(62,62,62,0.06);
  }
  .nav-links.open { display: flex; }
  .service-card { flex-basis: 100%; max-width: 100%; }
  .service-chip { flex-basis: 100%; max-width: 100%; }
  .masonry { column-count: 1; }
  .video-grid.masonry { column-count: 2; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-bottom { align-items: center; }
  .footer-legal { justify-content: center; }
  .footer-socials { justify-content: center; }

  .carousel-grid,
  .photo-grid,
  .pdf-grid {
    padding: 0 14px;
  }
  .video-grid {
    gap: 16px;
    padding: 0 10px;
  }

  /* Un poco más de aire alrededor de todo el contenido en móvil */
  .container { padding: 0 28px; }

  /* Sobre mí: estadísticas una al lado de la otra, número arriba y texto abajo */
  .about-stats {
    justify-content: center;
    gap: 22px;
    margin-bottom: 24px;
  }
  .stat {
    text-align: center;
  }
  .stat strong {
    font-size: 1.4rem;
  }
  .stat span {
    font-size: 0.8rem;
  }

  /* Apartado de contacto: todo más compacto y fluido para que quepa en cualquier móvil */
  .contact-grid { gap: 28px; }
  .contact-form {
    padding: clamp(16px, 6vw, 24px);
    gap: 12px;
  }
  .contact-form input,
  .contact-form textarea {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  .contact-links { gap: 10px; }
  .contact-links a { padding: 12px 14px; gap: 10px; }
  .contact-icon { width: 38px; height: 38px; font-size: 1.15rem; }
}
