:root {
  --bg: #ffffff;
  --ink: #0a0b0d;
  --ink-70: rgba(10, 11, 13, 0.66);
  --ink-45: rgba(10, 11, 13, 0.45);
  --line: #e7e7ea;
  --line-strong: #d6d6db;
  --accent: #4088e6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(64, 136, 230, 0.1);
  --accent-border: rgba(64, 136, 230, 0.4);
  --dark: #0a0b0d;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 22px 50px -30px rgba(20, 40, 90, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
h1,
h2,
h3,
h4,
.btn,
.pill,
.nav {
  font-family: 'Inter', sans-serif;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
section,
main,
footer {
  padding: 4.5rem clamp(1.25rem, 6vw, 6rem);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.2rem clamp(1.25rem, 6vw, 6rem);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  justify-self: start;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand .dot {
  color: var(--accent);
}
.nav-burger,
.nav-here {
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav-links a {
  color: var(--ink-70);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-links a.active {
  color: var(--ink);
  font-weight: 800;
}
.nav-cta {
  color: var(--accent) !important;
}

/* Hero centrado estilo EcomFlow */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem clamp(1.25rem, 6vw, 6rem) 3.5rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 92% 6%, rgba(64, 136, 230, 0.09), transparent 62%),
    radial-gradient(40% 45% at 6% 90%, rgba(64, 136, 230, 0.07), transparent 60%);
}
.hero-dots {
  position: absolute;
  width: 320px;
  height: 300px;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(64, 136, 230, 0.4) 2px, transparent 2px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}
.hero-dots-l {
  left: -70px;
  top: 30px;
}
.hero-dots-r {
  right: -70px;
  top: 120px;
}
.hero-split {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
}
.hero-main h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.hero-main h1 .accent {
  color: var(--accent);
}
.hero-main .hero-hook {
  margin: 1.4rem 0 0;
  color: var(--ink-70);
  max-width: 33rem;
}
.hero-main .hero-hook + .hero-hook {
  margin-top: 0.8rem;
}
.hero-main .hero-actions {
  margin-top: 2rem;
}
.hero-photo img {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-70);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  margin-bottom: 1.4rem;
  background: #fff;
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fbf71;
  box-shadow: 0 0 0 4px rgba(47, 191, 113, 0.15);
}
.hero-text h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.hero-text h1 .accent {
  color: var(--accent);
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.btn-nav {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}
.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.lang-btn {
  background: none;
  border: none;
  padding: 2px;
  border-radius: 5px;
  line-height: 0;
  filter: grayscale(1);
  opacity: 0.45;
  transition:
    filter 0.2s var(--ease),
    opacity 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.lang-btn:hover {
  filter: none;
  opacity: 0.85;
}
.lang-btn.is-active {
  filter: none;
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-border);
}
.flag {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  display: block;
}

/* Bocadillos flotantes sobre la foto */
.hero-photo {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}
.chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--ink-70);
  box-shadow: 0 18px 42px -12px rgba(20, 40, 90, 0.5);
  animation: floaty 6s ease-in-out infinite;
  white-space: nowrap;
}
.chip strong {
  color: var(--ink);
  font-weight: 800;
}
.chip-1 {
  top: 3%;
  left: -24%;
}
.chip-2 {
  top: 42%;
  right: -26%;
  animation-delay: -2s;
}
.chip-3 {
  bottom: 2%;
  left: -19%;
  animation-delay: -4s;
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    0 14px 30px -12px rgba(64, 136, 230, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 40px -12px rgba(64, 136, 230, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: #fff;
}
.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-dark-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-dark-ghost:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(64, 136, 230, 0.2);
  transform: translateY(-2px);
}

/* Logos marquee */
.logos {
  padding-top: 1rem;
  padding-bottom: 3rem;
}
.logos-title {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 2rem;
}
.marquee {
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  width: max-content;
  animation: marq 50s linear infinite;
}
@keyframes marq {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.marquee-track img {
  height: 34px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  opacity: 0.75;
}

/* Work cards */
.work {
  background: #f5f8fd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
.work-sub {
  color: var(--ink-70);
  margin: 0.6rem auto 2.6rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}
.card-thumb {
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f6f7f9;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.card-thumb-logo {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  height: 175px;
}
.card-thumb-logo img {
  width: auto;
  height: auto;
  max-height: 58px;
  max-width: 55%;
  object-fit: contain;
}
.card-year {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-45);
}
.card-body {
  padding: 1.5rem 1.7rem 1.7rem;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.card-logo {
  height: 26px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.badge {
  font-family: 'Inter', sans-serif;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}
.card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}
.card-body > p {
  color: var(--ink-70);
  font-size: 0.93rem;
}

/* Experience */
.exp-head {
  max-width: 1400px;
  margin: 0 auto 2.4rem;
}
.exp-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.exp-sub {
  color: var(--ink-70);
  margin: 0 0 0.9rem;
}
.exp-media {
  display: flex;
  gap: 1.2rem;
  align-items: stretch;
  margin-top: 1.6rem;
}
.exp-photo {
  width: 44%;
  max-width: 250px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
}
.exp-media .exp-extra {
  flex: 1;
  margin-top: 0;
}
.timeline {
  list-style: none;
  border-left: 2px solid var(--line);
  padding-left: 1.8rem;
  display: grid;
  gap: 2rem;
}
.timeline li {
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1.8rem - 7px);
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.project-timeline {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}
.tl-year {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.year-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  align-items: start;
}
.pcard {
  font-family: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}
.pcard-banner {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  height: 118px;
  border-bottom: 1px solid var(--line);
}
.pcard-logo {
  width: auto;
  height: auto;
  max-height: 46px;
  max-width: 62%;
  object-fit: contain;
}
.pcard-content {
  display: block;
  padding: 1rem 1.2rem 1.2rem;
}
.pcard-titlerow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}
.pcard-chev {
  color: var(--ink-45);
  flex: none;
  transition: transform 0.3s var(--ease);
}
.pcard.open .pcard-chev {
  transform: rotate(180deg);
}
.pcard-title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.pcard-org {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-45);
  margin-top: 0.25rem;
}
.pcard-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.pcard.open .pcard-body {
  grid-template-rows: 1fr;
}
.pcard-inner {
  min-height: 0;
  overflow: hidden;
}
.pcard-text {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-70);
  padding-top: 0.7rem;
}
.pcard .badge {
  display: inline-block;
  margin-top: 0.7rem;
}
@media (hover: hover) {
  .exp-timeline li {
    padding: 1rem 1.2rem;
    margin: -1rem -1.2rem;
    border-radius: 14px;
    transition:
      background 0.25s var(--ease),
      box-shadow 0.25s var(--ease),
      transform 0.25s var(--ease);
  }
  .exp-timeline li::before {
    left: calc(-0.6rem - 7px);
    top: 1.45rem;
  }
  .exp-timeline li:hover {
    background: rgba(64, 136, 230, 0.05);
    box-shadow: 0 18px 36px -24px rgba(20, 40, 90, 0.5);
    transform: translateY(-2px);
  }
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.tl-head h3 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tl-when {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.tl-org {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-45);
  margin: 0.15rem 0 0.4rem;
}
.timeline p:not(.tl-org) {
  color: var(--ink-70);
  font-size: 0.93rem;
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.tl-tag {
  font-family: 'Inter', sans-serif;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.exp-extra {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1.8rem;
}
.exp-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
}
.exp-block h4 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.exp-sub strong {
  color: var(--ink);
  font-weight: 700;
}
.exp-block p {
  color: var(--ink-70);
  font-size: 0.92rem;
}
.exp-block-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.exp-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.exp-strong {
  color: var(--accent);
  font-weight: 700;
}

/* Testimonials */
.testimonials {
  background: #f5f8fd;
  border-top: 1px solid var(--line);
}
.testimonials > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
.twrap {
  position: relative;
  max-width: 1400px;
  margin: 2.4rem auto 0;
}
.tmarquee {
  overflow: hidden;
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tmarquee-track {
  display: flex;
  gap: 1.4rem;
  width: max-content;
}
.tarrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(20, 40, 90, 0.5);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.tarrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tarrow-left {
  left: -10px;
}
.tarrow-right {
  right: -10px;
}
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem;
  display: flex;
  gap: 1.2rem;
  align-items: stretch;
  width: 520px;
  flex: none;
  cursor: pointer;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.quote:hover {
  border-color: var(--accent-border);
  box-shadow: 0 18px 36px -24px rgba(20, 40, 90, 0.5);
  transform: translateY(-2px);
}
.quote-photo {
  width: 200px;
  min-height: 250px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}
.quote-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
}
.quote blockquote {
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.55;
  margin: auto 0;
}
.quote-who strong {
  display: block;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}
.quote-who em {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-45);
}

/* Footer */
.footer {
  background: var(--dark);
  color: #fff;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}
.footer-brand .dot {
  color: var(--accent);
}
.footer-links {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.25s var(--ease);
}
.footer-links a:hover {
  color: #fff;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .card,
  .chip,
  .marquee-track,
  .tmarquee-track {
    transition: none;
    animation: none;
  }
}

/* Responsive */
@media (max-width: 860px) {
  .btn-nav {
    display: none;
  }
  .hero-dots {
    display: none;
  }
  .exp-grid {
    grid-template-columns: 1fr;
  }
  .exp-photo {
    display: none;
  }
  /* Una sola columna: la de la foto exigia 280px minimo y sacaba la pagina de la pantalla */
  .hero-split {
    grid-template-columns: 1fr;
  }
  /* La foto va DEBAJO del texto: arriba se comia la pantalla entera
     y el titular quedaba fuera de vista al abrir */
  .hero-actions {
    justify-content: center;
  }
  .hero-photo {
    margin-top: 2.6rem;
  }
  .hero-photo img {
    max-width: 230px;
  }
  /* Las chapas flotan a los lados como en escritorio, con separaciones
     ajustadas para que no se salgan en moviles estrechos */
  .chip {
    font-size: 0.66rem;
    padding: 0.45rem 0.7rem;
  }
  /* Colocadas para no tapar la cara: la de arriba montada sobre el borde
     superior, la del medio a la altura del brazo, la de abajo a caballo
     entre la foto y el fondo */
  .chip-1 {
    top: -5%;
    left: -22%;
  }
  .chip-2 {
    top: 58%;
    right: -20%;
  }
  .chip-3 {
    bottom: -4%;
    left: -16%;
  }
  .cards,
  .quotes,
  .exp-extra {
    grid-template-columns: 1fr;
  }
  .card-thumb {
    height: 190px;
  }
  .tmarquee {
    -webkit-mask-image: none;
    mask-image: none;
    /* Deja respirar la sombra de la tarjeta en vez de cortarla a ras */
    overflow: clip;
    overflow-clip-margin: 18px;
  }
  /* Ancho exacto del marco, medido por JS: 100vw incluye la barra de
     desplazamiento y hacia que la tarjeta se saliera de la pantalla */
  .quote {
    width: var(--quote-w, calc(100vw - 2 * clamp(1.25rem, 6vw, 6rem)));
  }
  .quote blockquote {
    font-size: 0.92rem;
    line-height: 1.55;
  }
  /* Cuadrada y centrada: las fotos son unas verticales y otras horizontales,
     y la caja estrecha estirada a la altura de la tarjeta las destrozaba */
  .quote {
    align-items: center;
  }
  .quote-photo {
    width: 130px;
    height: 130px;
    min-height: 0;
    align-self: center;
    object-position: center;
  }
  /* Cabecera de una fila: menu, marca, seccion actual e idiomas */
  .nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
  }
  .nav-burger {
    display: inline-flex;
    flex: none;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }
  .nav-brand {
    flex: none;
    font-size: clamp(0.88rem, 3.6vw, 1rem);
    white-space: nowrap;
  }
  /* Rotulo con la seccion en la que estas; vacio en la portada */
  .nav-here {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 16rem);
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(0.6rem, 2.7vw, 0.78rem);
    color: var(--ink-70);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-actions {
    flex: none;
    margin-left: auto;
    gap: 0.6rem;
  }
  /* Los enlaces pasan a panel desplegable bajo la cabecera */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.3rem 1.1rem 0.7rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open .nav-links {
    display: flex;
  }
  .nav-links a {
    padding: 0.75rem 0;
  }
  /* Flechas del carrusel DEBAJO de la tarjeta, para que no la tapen */
  .twrap {
    padding-bottom: 3.4rem;
  }
  .tarrow {
    top: auto;
    bottom: 0;
    transform: none;
    width: 40px;
    height: 40px;
  }
  .tarrow-left {
    left: calc(50% - 48px);
  }
  .tarrow-right {
    right: calc(50% - 48px);
  }
  .tarrow {
    width: 38px;
    height: 38px;
  }
}

/* Modal de testimonio */
[hidden] {
  display: none !important;
}
.tmodal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.tmodal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.55);
}
.tmodal-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.6rem;
  width: min(760px, 100%);
  max-height: 92vh;
  padding: 1.6rem;
  animation: tmodal-in 0.25s var(--ease);
}
@keyframes tmodal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tmodal-photo {
  width: 280px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
}
.tmodal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
  padding-right: 2.4rem;
}
.tmodal-quote {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  margin: auto 0;
}
.tmodal-who strong {
  display: block;
  font-family: 'Inter', sans-serif;
}
.tmodal-who em {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-45);
}
.tmodal-projects {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.tmodal-projects-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 0.55rem;
}
.tmodal-projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tmodal-projcard {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.tmodal-projcard:hover {
  border-color: var(--accent-border);
  box-shadow: 0 10px 24px -18px rgba(20, 40, 90, 0.5);
}
.tmodal-projcard-logo {
  width: 56px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 8px;
}
.tmodal-projcard-logo img {
  max-width: 44px;
  max-height: 26px;
  object-fit: contain;
}
.tmodal-projcard-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.tmodal-projcard-info strong {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.tmodal-projcard-info em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-45);
}
.tmodal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tmodal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
body.tmodal-open {
  overflow: hidden;
}

/* Visor de proyecto estilo Upwork */
.pmodal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.pmodal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.6);
}
.pmodal-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: calc(100vw - 40px);
  max-width: 1720px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: tmodal-in 0.25s var(--ease);
}
.pmodal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.6rem;
  border-bottom: 1px solid var(--line);
}
.pmodal-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pmodal-org {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-45);
}
.pmodal-close {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pmodal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pmodal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.6rem;
}
.pmodal-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 2rem;
}
.pmodal-grid.no-media {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
.pmodal-side {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding-top: 0.9rem;
  padding-right: 0.6rem;
}
.pmodal-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.55rem;
}
.pmodal-desc p {
  font-size: 0.95rem;
  color: var(--ink-70);
  margin-bottom: 0.7rem;
}
.pmodal-desc h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0.5rem 0 0.35rem;
}
.pmodal-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.pmodal-media {
  position: relative;
  min-height: 0;
  display: flex;
}
.pmodal-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.pmodal-stage img,
.pmodal-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pmodal-stage video {
  background: #000;
}
.parrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(20, 40, 90, 0.5);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.parrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.parrow-left {
  left: 14px;
}
.parrow-right {
  right: 14px;
}
.pmodal-count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-70);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.pmodal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem 0;
}
.pmodal-tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 1rem 0.35rem 0.35rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink-70);
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.pmodal-tab:hover {
  border-color: var(--accent-border);
  color: var(--ink);
}
.pmodal-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 0 10px 24px -18px rgba(20, 40, 90, 0.55);
}
.pmodal-tab-thumb {
  width: 58px;
  height: 40px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}
.pmodal-tab-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pmodal-tab-thumb.logo-fallback img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 55%;
  object-fit: contain;
}
.pmodal-related {
  flex: none;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.pmodal-related-list {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}
.pmodal-relcard {
  flex: none;
  width: 216px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.pmodal-relcard-thumb {
  display: grid;
  place-items: center;
  height: 100px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--accent-soft);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.pmodal-relcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pmodal-relcard-thumb.logo-fallback img {
  width: auto;
  height: auto;
  max-width: 60%;
  max-height: 42%;
  object-fit: contain;
}
.pmodal-relcard:hover .pmodal-relcard-thumb {
  border-color: var(--accent-border);
  box-shadow: 0 12px 26px -18px rgba(20, 40, 90, 0.5);
}
.pmodal-relcard-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}
.pmodal-relcard-org {
  font-size: 0.78rem;
  color: var(--ink-45);
}
@media (max-width: 860px) {
  .pmodal {
    padding: 0.6rem;
  }
  .pmodal-card {
    width: 100%;
    height: 96vh;
  }
  .pmodal-body {
    overflow-y: auto;
  }
  .pmodal-grid,
  .pmodal-grid.no-media {
    display: flex;
    flex-direction: column;
    flex: none;
    min-height: auto;
  }
  .pmodal-tabs {
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .pmodal-side {
    overflow: visible;
    min-height: auto;
    flex: none;
    order: 2;
  }
  .pmodal-media {
    order: 1;
    height: 40vh;
    flex: none;
  }
}
@media (max-width: 860px) {
  .tmodal-card {
    flex-direction: column;
    overflow: auto;
    padding: 1.2rem;
  }
  /* Las fotos son verticales (320x400): a su proporcion natural y centrada,
     asi no se recorta nada y tampoco se come la pantalla */
  .tmodal-photo {
    width: 100%;
    max-width: 190px;
    height: auto;
    align-self: center;
  }
  /* Orden en movil: cita primero, luego quien lo dice */
  .tmodal-quote {
    order: 1;
    margin: 0;
    font-size: 1.05rem;
  }
  .tmodal-who {
    order: 2;
  }
  .tmodal-projects {
    order: 3;
  }
}

/* Cursor propio + halo celeste que sigue al puntero */
html,
body {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 2v16.2l4.2-3.7 2.5 5.9 2.8-1.2-2.5-5.8 5.7-.6z' fill='%234088e6' stroke='%23ffffff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E")
      5 2,
    auto;
}
a,
button,
.quote {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 2v16.2l4.2-3.7 2.5 5.9 2.8-1.2-2.5-5.8 5.7-.6z' fill='%23ffffff' stroke='%234088e6' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E")
      5 2,
    pointer;
}
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
}
@media (hover: none) {
  .cursor-glow {
    display: none;
  }
}
