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

:root {
  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --text: #111111;
  --text-secondary: #5F5F5F;
  --border: #D9D6CF;
  --hover: #EFEDE8;
  --container: 1280px;
  --gap: 24px;
  --radius: 28px;
  --radius-btn: 999px;
  --font: 'Poppins', sans-serif;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(247, 245, 240, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 1000;
  box-shadow: none;
  transition: top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              right 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  border-bottom-color: transparent;
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 0 32px;
  background: rgba(247, 245, 240, 0.88);
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.nav-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  transition: background 0.2s;
}

.nav-links a:hover, .nav-links a.active { background: var(--hover); }

/* Anula el fondo en menú móvil */
.nav-mobile-open .nav-links a,
.nav-mobile-open .nav-links a:hover,
.nav-mobile-open .nav-links a.active { background: transparent !important; }
.nav-mobile-open .nav-links a.active { opacity: 0.45; }

.nav-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 4px;
}

.lang-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.lang-btn.active {
  background: var(--text);
  color: var(--bg);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 14px;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
  pointer-events: none;
}

/* ===== HERO HOME ===== */
.hero-home {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: transparent;
}

/* Fixed bg — stays in place as user scrolls, covers full page */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.hero-bg .img-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: #C8C5BD;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Overlay fixed — covers hero + carousel area with subtle tint */
.hero-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.38) 0%,
    rgba(0,0,0,0.12) 30%,
    rgba(0,0,0,0.06) 60%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 56px;
  width: 100%;
}

/* Sections over fixed hero bg need z-index + solid bg */
.composition-section {
  position: relative;
  z-index: 1;
}

.hero-name {
  font-size: clamp(80px, 11vw, 160px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero-tagline {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.6;
}

/* ===== PLACEHOLDER ===== */
.img-placeholder {
  background: var(--hover);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  padding: 12px;
  overflow: hidden;
  position: relative;
}

.img-placeholder .ph-label {
  font-size: 10px;
  color: var(--border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
}

.img-placeholder .ph-id {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
}

/* ===== CAROUSEL ===== */
.carousel-section {
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 64px 0 100px;
}

.carousel-stage {
  position: relative;
  overflow: visible;
}

.carousel-track-outer {
  overflow: hidden;
  padding: 36px 0 48px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  cursor: grab;
  user-select: none;
  padding-left: max(80px, calc((100vw - var(--container)) / 2 + 24px));
  padding-right: max(80px, calc((100vw - var(--container)) / 2 + 24px));
  transition: transform 0.52s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
  touch-action: pan-y;
}
.carousel-track.grabbing {
  cursor: grabbing;
}

.carousel-card {
  flex-shrink: 0;
  width: 300px;
  height: 420px;
  cursor: pointer;
  text-decoration: none;
  color: white;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.38s ease;
}

@media (hover: hover) {
  .carousel-card:hover {
    transform: translateZ(0) translateY(-18px) scale(1.08);
    box-shadow: 0 40px 80px rgba(0,0,0,0.26);
  }
}

.carousel-card-bg {
  position: absolute;
  inset: 0;
  background: #C8C4BC;
  transition: transform 0.5s ease;
}

@media (hover: hover) {
  .carousel-card:hover .carousel-card-bg {
    transform: scale(1.08);
  }
}

.carousel-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-card-bg .ph-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.carousel-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.18) 50%,
    transparent 100%
  );
  z-index: 1;
}

.carousel-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 22px 22px;
  z-index: 2;
}

.carousel-card-num {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.55;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

.carousel-card-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.carousel-card-cat {
  font-size: 12px;
  opacity: 0.65;
  font-weight: 400;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: rgba(247,245,240,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

@media (hover: hover) {
  .carousel-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  }
}

.carousel-btn::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-right: 2.5px solid var(--text);
  border-top: 2.5px solid var(--text);
  flex-shrink: 0;
}

.carousel-btn-prev {
  left: max(8px, calc((100vw - var(--container)) / 2 - 8px));
}

.carousel-btn-prev::before {
  transform: rotate(-135deg) translateX(2px);
}

.carousel-btn-next {
  right: max(8px, calc((100vw - var(--container)) / 2 - 8px));
}

.carousel-btn-next::before {
  transform: rotate(45deg) translateX(-2px);
}

.carousel-btn:disabled {
  opacity: 0.18;
  cursor: default;
  pointer-events: none;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: var(--bg);
  padding: 64px 0 0;
  overflow: hidden;
}

.footer-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-big-name {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--bg);
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-big-name:hover { opacity: 1; }

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 16px;
  flex-shrink: 0;
}

.footer-question {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  max-width: 360px;
  opacity: 0.75;
}

.footer-email,
.footer-phone {
  font-size: 17px;
  font-weight: 700;
  color: var(--bg);
  text-decoration: none;
  opacity: 0.9;
  border-bottom: 1px solid rgba(247,245,240,0.3);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.footer-email:hover,
.footer-phone:hover { opacity: 1; }

.footer-cta { font-size: 14px; opacity: 0.5; }

.footer-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.btn-light {
  background: var(--bg);
  color: var(--text);
}

.btn-light:hover { background: var(--hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(17,17,17,0.25);
}

.btn-outline:hover { background: rgba(17,17,17,0.05); }

.btn-outline-light {
  background: transparent;
  color: var(--bg);
  border: 1px solid rgba(247,245,240,0.4);
}

.btn-outline-light:hover { background: rgba(247,245,240,0.1); }

.footer-copy {
  font-size: 12px;
  opacity: 0.25;
  padding: 20px 0;
  border-top: 1px solid rgba(247,245,240,0.08);
}

/* ===== SECTION PADDING ===== */
.section { padding: 56px 0; }
.section-sm { padding: 20px 0; }

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

/* ===== PROJECT HERO ===== */
.project-hero {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 40px;
}

.project-meta {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.project-title {
  font-size: clamp(72px, 9vw, 130px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.project-intro {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ===== TECH BLOCK ===== */
.tech-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.tech-item { display: flex; flex-direction: column; gap: 6px; }

.tech-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tech-value {
  font-size: 15px;
  font-weight: 600;
}

/* ===== TOOL LOGOS ===== */
.tool-logos {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
}

.tool-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ===== CONCEPT CARD (FinancePlus hover) ===== */
.concept-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: default;
}

.concept-img-base {
  width: 100%;
  display: block;
}

.concept-img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.42s ease;
}

.concept-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 20px 22px;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.42s ease;
}

@media (hover: hover) {
  .concept-card:hover .concept-img-hover { opacity: 1; }
  .concept-card:hover .concept-card-label { opacity: 1; }
}

@media (hover: none) {
  .concept-card { cursor: pointer; }
  .concept-card-label { opacity: 1; }
  .concept-card.tapped .concept-img-hover { opacity: 1; }
}

/* ===== CONTACT FORM ===== */
.contacto-form {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

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

.form-group textarea {
  min-height: 140px;
}

.form-error {
  font-size: 13px;
  color: #c0392b;
  padding: 10px 14px;
  background: rgba(192,57,43,0.08);
  border-radius: 8px;
}

.form-success {
  font-size: 14px;
  color: #27ae60;
  padding: 12px 16px;
  background: rgba(39,174,96,0.08);
  border-radius: 8px;
}

/* ===== PROJECT NAV ===== */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.project-nav-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.2s, transform 0.2s;
}

@media (hover: hover) {
  .project-nav-link:hover { background: var(--hover); transform: translateY(-2px); }
}

.project-nav-link .nav-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.project-nav-link.next {
  flex-direction: row;
  text-align: right;
}

.project-nav-link.next .nav-text { align-items: flex-end; }

.project-nav-dir {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.project-nav-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.project-nav-link {
  position: relative;
  overflow: hidden;
}

.project-nav-chevron {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.project-nav-chevron::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text);
  border-top: 1.5px solid var(--text);
  transition: border-color 0.2s;
}

.project-nav-link.prev .project-nav-chevron::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.project-nav-link.next .project-nav-chevron::before {
  transform: translate(-60%, -50%) rotate(45deg);
}

@media (hover: hover) {
  .project-nav-link:hover .project-nav-chevron {
    background: var(--text);
    border-color: var(--text);
  }
  .project-nav-link:hover .project-nav-chevron::before {
    border-color: var(--bg);
  }
}

/* ===== GRIDS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* ===== COMPOSICIÓN HOME ===== */
.composition-section {
  width: 100%;
  height: clamp(400px, 65vh, 800px);
  overflow: hidden;
  position: relative;
}

.composition-section .img-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: #DEDAD3;
}

.composition-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== SOBRE ===== */
.sobre-hero-label {
  font-size: clamp(60px, 14.5vw, 210px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sobre-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 64px;
  align-items: start;
}

.sobre-bio p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.enfoque-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.enfoque-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}

.enfoque-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.enfoque-card-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== LOGO CAROUSEL ===== */
.logo-carousel-outer {
  overflow: hidden;
  position: relative;
}

.logo-carousel-track {
  display: flex;
  gap: 16px;
  animation: logo-scroll 22s linear infinite;
  width: max-content;
}

.logo-carousel-outer:hover .logo-carousel-track { animation-play-state: paused; }

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.logo-chip {
  flex-shrink: 0;
  height: 52px;
  padding: 0 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.logo-chip-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--hover);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-chip-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ===== CONTACTO ===== */
.contacto-hero-label {
  font-size: clamp(60px, 14.5vw, 200px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 680px;
}

.contacto-lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.contacto-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contacto-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}

.contacto-link:first-child { border-top: 1px solid var(--border); }

.contacto-link:hover { opacity: 0.7; }

.contacto-link-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.6;
}

.contacto-link-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* ===== QUALITES BAND ===== */
.qualities-band {
  background: var(--text);
  color: var(--bg);
  padding: 28px 0;
  overflow: hidden;
  border-radius: 20px;
}

.qualities-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: scroll-left 30s linear infinite;
  width: max-content;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.qualities-track span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 32px;
  text-transform: uppercase;
}

/* ===== SWITCH LIGHT/DARK (Estable) ===== */
.mockup-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.mockup-switch-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.toggle-switch.dark { background: var(--text); }

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch.dark::after { transform: translateX(24px); }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  background: #FAFAF8;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox-inner .img-placeholder {
  min-width: 320px;
  min-height: 480px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(0,0,0,0.35); }

/* ===== POSTER GRID ===== */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.poster-item {
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s;
}

@media (hover: hover) {
  .poster-item:hover { transform: translateY(-4px); }
}

.poster-item .img-placeholder {
  border-radius: 0;
}

.poster-caption {
  padding: 12px 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

/* ===== VIDEO PLACEHOLDER ===== */
.video-placeholder {
  background: #1a1a1a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-weight: 500;
}

.video-placeholder .play-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ===== MACBOOK FRAME ===== */
.macbook-frame {
  background: #1d1d1f;
  border-radius: 16px;
  padding: 32px 32px 0;
  position: relative;
}

.macbook-screen {
  background: #000;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.macbook-notch {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

.macbook-notch::after {
  content: '';
  width: 120px;
  height: 18px;
  background: #1d1d1f;
  border-radius: 0 0 12px 12px;
}

.macbook-base {
  height: 20px;
  background: #2a2a2c;
  border-radius: 0 0 4px 4px;
  margin: 0 -20px;
}

/* ===== SCROLL PADDING ===== */
body { padding-top: 0; }

/* ===== SELECTION ===== */
::selection { background: var(--text); color: var(--bg); }

/* ===== MOCKUP CAROUSEL (Estable) ===== */
.mockup-carousel-section {
  padding: 4px 0 72px;
}

.mockup-carousel-stage {
  position: relative;
  overflow: visible;
}

.mockup-carousel-stage .carousel-track {
  padding-left: 0;
  padding-right: 0;
}

.mockup-track-outer {
  overflow: hidden;
  padding: 24px 0 40px;
  /* ventana exacta de 4 tarjetas: 4×280 + 3×20 = 1180px */
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.mockup-carousel-stage .carousel-btn-prev {
  left: max(8px, calc((100vw - 1180px) / 2 - 56px));
}
.mockup-carousel-stage .carousel-btn-next {
  right: max(8px, calc((100vw - 1180px) / 2 - 56px));
}

.mockup-slide {
  flex-shrink: 0;
  position: relative;
}

/* ===== DUAL ITEM — hover reveal + modal ===== */
.dual-item {
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
}

/* Casquillera label grid — show full bottle on hover */
.casq-labels-grid .dual-item { background: var(--bg); }
.casq-labels-grid .dual-back img { object-fit: contain !important; }

.dual-front,
.dual-back {
  width: 100%;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dual-back {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
}

@media (hover: hover) {
  .dual-item:hover .dual-front { opacity: 0; }
  .dual-item:hover .dual-back  { opacity: 1; transform: scale(1); }
}

/* hint icon */
.dual-item::after {
  content: '⊕';
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 4;
}
.dual-item:hover::after { opacity: 1; }

/* ===== DUAL MODAL ===== */
.dual-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.dual-modal--open {
  opacity: 1;
  pointer-events: all;
}

.dual-modal-wrap {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}

.dual-modal-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.dual-modal-side {
  flex: 1;
  min-width: 0;
}

.dual-modal-side img,
.dual-modal-side .img-placeholder {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.dual-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 4px 8px;
}
.dual-modal-close:hover { color: var(--text); }

@media (max-width: 640px) {
  .dual-modal-body { flex-direction: column; }
  .dual-modal-wrap { padding: 28px 16px; }
}

/* ===== ENTRANCE ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }

/* Hero name stagger */
.hero-name-anim {
  opacity: 0;
  transform: translateY(48px);
  animation: heroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-tagline-anim {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.4s forwards;
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Hover card shadow */
.carousel-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

/* Subtle image hover */
img, .img-placeholder {
  transition: transform 0.3s ease;
}

/* Page fade in */
.page-fade {
  animation: pageFade 0.5s ease forwards;
}

@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== LAPTOP 1200 ===== */
@media (max-width: 1280px) {
  :root { --container: 1080px; }

  .hero-name { font-size: clamp(60px, 8vw, 110px); }
  .project-title { font-size: clamp(60px, 7.5vw, 100px); }
  .sobre-grid { grid-template-columns: 380px 1fr; gap: 48px; }
}

/* ===== TABLET 768 ===== */
@media (max-width: 1024px) {
  :root { --container: 680px; }

  .navbar { padding: 0 24px; }
  .navbar.scrolled { width: calc(100% - 40px); }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero-name { font-size: clamp(52px, 10vw, 90px); }

  .project-title { font-size: clamp(52px, 8vw, 88px); }
  .sobre-grid { grid-template-columns: 1fr; gap: 40px; }
  .sobre-hero-label { font-size: clamp(52px, 8vw, 90px); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .enfoque-grid { grid-template-columns: 1fr 1fr; }

  .tech-block { gap: 28px; padding: 28px; }

  .project-nav { grid-template-columns: 1fr 1fr; }
}

/* ===== MOBILE 390 ===== */
@media (max-width: 640px) {
  :root { --container: 342px; --gap: 16px; }

  .navbar {
    width: calc(100% - 32px);
    padding: 0 20px;
    height: 60px;
    top: 16px;
    border-radius: 30px;
  }

  .hero-name { font-size: clamp(44px, 14vw, 72px); }
  .hero-tagline { font-size: 14px; }

  .project-title { font-size: clamp(40px, 12vw, 64px); }
  .project-intro { font-size: 14px; }

  .sobre-hero-label { font-size: clamp(44px, 14vw, 72px); }
  .enfoque-grid { grid-template-columns: 1fr; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .tech-block { flex-direction: column; gap: 20px; padding: 24px; }

  .project-nav { grid-template-columns: 1fr; }
  .project-nav-link.next { text-align: left; }

  .footer-big-name { font-size: clamp(40px, 14vw, 72px); }

  .section { padding: 56px 0; }

  .carousel-track {
    padding-left: calc((100vw - 300px) / 2);
    padding-right: calc((100vw - 300px) / 2);
  }
  .carousel-btn-prev { left: 16px; }
  .carousel-btn-next { right: 16px; }

  .sobre-grid { gap: 28px; }
}

/* ===== MOCKUP CAROUSEL — 3 tarjetas (900–1180px) ===== */
@media (max-width: 1180px) {
  .mockup-track-outer {
    max-width: 900px; /* 3 × 280 + 2 × 20 */
  }
  .mockup-carousel-stage .carousel-track {
    padding-left: 0;
    padding-right: 0;
  }
  .mockup-carousel-stage .carousel-btn-prev {
    left: max(8px, calc((100vw - 900px) / 2 - 56px));
  }
  .mockup-carousel-stage .carousel-btn-next {
    right: max(8px, calc((100vw - 900px) / 2 - 56px));
  }
}

/* ===== MOCKUP CAROUSEL — 1 tarjeta (≤900px) ===== */
@media (max-width: 900px) {
  .mockup-track-outer {
    max-width: 280px;
  }
  .mockup-carousel-stage .carousel-track {
    gap: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .mockup-carousel-stage .carousel-btn-prev {
    left: max(8px, calc((100vw - 280px) / 2 - 56px));
  }
  .mockup-carousel-stage .carousel-btn-next {
    right: max(8px, calc((100vw - 280px) / 2 - 56px));
  }
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 768px) {
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .footer-content {
    align-items: flex-start;
    text-align: left;
  }
  .footer-btns { justify-content: flex-start; }
}

/* ===== MOBILE NAV OPEN ===== */
.nav-mobile-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 88px;
  left: 16px;
  right: 16px;
  background: rgba(247,245,240,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  z-index: 999;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  animation: menuSlideDown 0.28s cubic-bezier(0.33,1,0.68,1) both;
}

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-mobile-open .nav-links a {
  font-size: 17px;
  font-weight: 600;
  padding: 14px 16px;
  width: 100%;
  border-radius: 12px;
  background: none !important;
  color: var(--text);
}

.nav-mobile-open .nav-links a.active {
  color: var(--text);
  opacity: 0.45;
}

/* Hamburger → X */
.nav-mobile-open .nav-menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-open .nav-menu-btn span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-mobile-open .nav-menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop tap to close */
.nav-mobile-open::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 998;
}

.nav-mobile-close { display: none; }

/* ===== TOUCH ACTIVE STATES ===== */
@media (hover: none) {
  /* Main carousel cards */
  .carousel-card:active {
    transform: translateZ(0) translateY(-8px) scale(1.04);
    box-shadow: 0 20px 50px rgba(0,0,0,0.22);
  }
  .carousel-card:active .carousel-card-bg { transform: scale(1.04); }

  /* Arrow buttons */
  .carousel-btn:active {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  }

  /* Project nav links */
  .project-nav-link:active { background: var(--hover); transform: translateY(-2px); }
  .project-nav-link:active .project-nav-chevron { background: var(--text); border-color: var(--text); }
  .project-nav-link:active .project-nav-chevron::before { border-color: var(--bg); }

  /* Poster cards */
  .poster-item:active { transform: translateY(-4px); }

  /* Buttons */
  .btn-light:active { background: var(--hover); }
  .btn-outline:active { background: rgba(17,17,17,0.05); }
  .btn-outline-light:active { background: rgba(247,245,240,0.1); }

  /* Footer links */
  .footer-big-name:active { opacity: 1; }
  .footer-email:active, .footer-phone:active { opacity: 1; }
}

/* ===== SCREEN READER ONLY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
