/**
 * YourTrucks Spain — Caso de estudio UX/UI.
 * Tipografía Viruca + página clara (como Mallorkinas) + acentos de marca.
 * @package Viruca
 */

:root {
  --yt-bg: #FFFFFF;
  --yt-surface: #F5F4EF;
  --yt-surface-2: #EAE9E3;
  --yt-ink: #101114;
  --yt-muted: #6D6F73;
  --yt-body: #3A3C40;
  --yt-line: rgba(16, 17, 20, 0.10);
  --yt-navy: #10243B;
  --yt-blue: #0879C8;
  --yt-orange: #EF8F2F;
  --yt-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --yt-text: 'DM Sans', system-ui, sans-serif;
  --yt-mono: 'JetBrains Mono', monospace;
  --yt-max: 1200px;
  --yt-pad: clamp(20px, 5vw, 80px);
  --yt-ease: cubic-bezier(.16, .8, .28, 1);
  --yt-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body.yt-case-study {
  margin: 0;
  font-family: var(--yt-text);
  font-weight: 400;
  color: var(--yt-body);
  background: var(--yt-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}

.yt-case-study h1,
.yt-case-study h2,
.yt-case-study h3 {
  margin: 0;
  font-family: var(--yt-display);
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--yt-ink);
}
.yt-case-study p { margin: 0; }
.yt-case-study img { max-width: 100%; display: block; height: auto; }
.yt-case-study a { color: inherit; text-decoration: none; }

.yt-case-study .wrap {
  width: 100%;
  max-width: var(--yt-max);
  margin: 0 auto;
  padding: 0 var(--yt-pad);
  min-width: 0;
}

.yt-case-study a:focus-visible,
.yt-case-study button:focus-visible {
  outline: 2px solid var(--yt-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.yt-case-study .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--yt-ease), transform .8s var(--yt-ease);
}
.yt-case-study .reveal.in { opacity: 1; transform: translateY(0); }

.yt-case-study .num {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--yt-mono);
  font-size: 11px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--yt-muted);
}
.yt-case-study .num::before {
  content: ''; width: 18px; height: 2px;
  background: var(--yt-orange); opacity: .9;
}

/* Nav */
.yt-case-study .yt-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--yt-pad);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .94), rgba(255, 255, 255, 0));
  color: var(--yt-ink);
  font-size: 13px;
  transition: background .3s, padding .3s, box-shadow .3s;
}
.yt-case-study .yt-nav.scrolled {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  padding: 12px var(--yt-pad);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}
.yt-case-study .nav-left {
  display: flex; align-items: center; flex-shrink: 0; color: var(--yt-ink);
}
.yt-case-study .nav-left .v-logo-svg,
.yt-case-study .nav-left .yt-nav__logo {
  height: 22px; width: auto; max-width: 120px; display: block;
  filter: invert(1);
}
.yt-case-study .nav-right {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: nowrap; justify-content: flex-end; min-width: 0;
}
.yt-case-study .nav-right .nav-label {
  display: none;
  font-family: var(--yt-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--yt-muted); white-space: nowrap;
}
@media (min-width: 900px) {
  .yt-case-study .nav-right .nav-label { display: inline; }
}
.yt-case-study .nav-back {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(16, 17, 20, .18);
  border-radius: 100px;
  font-size: 13px;
  color: var(--yt-ink);
  transition: border-color .25s, background .25s;
  white-space: nowrap;
}
.yt-case-study .nav-back:hover {
  border-color: var(--yt-ink);
  background: rgba(16, 17, 20, .04);
}
.yt-controls { display: flex; align-items: center; gap: 10px; }
.yt-lang-switcher { display: flex; align-items: center; gap: 6px; }
.yt-lang-btn {
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  color: rgba(16, 17, 20, .35);
  font-family: var(--yt-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; transition: color .15s ease;
}
.yt-lang-btn:hover { color: var(--yt-ink); }
.yt-lang-btn.is-active { color: var(--yt-blue); }
.yt-lang-sep { color: rgba(16, 17, 20, .25); font-size: 12px; }
@media (max-width: 520px) {
  .yt-case-study .yt-controls { display: none; }
  .yt-case-study .nav-back { padding: 7px 12px; font-size: 12px; }
}

/* Hero — mismo patrón que Mallorkinas */
.yt-case-study .hero {
  position: relative;
  padding: 140px 0 0;
  background: var(--yt-bg);
  overflow: hidden;
  border-bottom: 0;
  min-height: 0;
  display: block;
}
.yt-case-study .hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(8, 121, 200, .08), transparent 42%),
    radial-gradient(circle at 88% 70%, rgba(239, 143, 47, .08), transparent 40%);
  pointer-events: none;
}
.yt-case-study .hero-inner { position: relative; z-index: 2; }
.yt-case-study .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--yt-mono);
  font-size: 11px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--yt-muted);
}
.yt-case-study .kicker::before {
  content: ''; width: 18px; height: 2px;
  background: var(--yt-orange); opacity: .9;
}
.yt-case-study .hero-logo {
  width: min(280px, 70%);
  margin: 22px 0 18px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.yt-case-study .hero-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.yt-case-study .hero-title {
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.05em;
  margin: 0;
  max-width: 14ch;
  color: var(--yt-ink);
}
.yt-case-study .hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 48px;
  align-items: end;
  margin-top: 48px;
}
.yt-case-study .lead {
  font-family: var(--yt-display);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--yt-ink);
  max-width: 34em;
  margin: 0;
}
.yt-case-study .meta {
  border-top: 1px solid var(--yt-line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  padding-top: 16px;
  font-size: 14px;
  color: var(--yt-body);
}
.yt-case-study .meta b {
  display: block;
  font-family: var(--yt-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yt-muted);
  margin-bottom: 6px;
}
.yt-case-study .hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin-top: 36px;
  font-family: var(--yt-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yt-ink);
  border-bottom: 1px solid rgba(16, 17, 20, .25);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.yt-case-study .hero-link:hover {
  color: var(--yt-blue);
  border-color: var(--yt-blue);
}
.yt-case-study .hero-image {
  margin-top: 64px;
  background: var(--yt-surface-2);
  overflow: hidden;
}
.yt-case-study .hero-image video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Sections */
.yt-case-study .sec {
  padding: clamp(72px, 9vw, 130px) 0;
  border-bottom: 1px solid var(--yt-line);
  background: var(--yt-bg);
}
.yt-case-study .body {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--yt-body);
  max-width: 38em;
  margin-top: 16px;
}
.yt-case-study .body-small {
  font-size: 14px;
  line-height: 1.55;
  color: var(--yt-muted);
  max-width: 28em;
  margin: 0;
}
.yt-case-study .section-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 48px;
}
.yt-case-study .section-head h2 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: .98;
  margin-top: 14px;
}

/* Overview */
.yt-case-study .overview-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr .8fr;
  gap: clamp(32px, 4vw, 64px);
}
.yt-case-study .overview h3 {
  font-size: clamp(20px, 2vw, 26px);
  margin-top: 14px;
}
.yt-case-study .meta-col {
  border-left: 1px solid var(--yt-line);
  padding-left: 28px;
}
.yt-case-study .meta-row { margin-bottom: 22px; }
.yt-case-study .meta-row:last-child { margin-bottom: 0; }
.yt-case-study .meta-row strong {
  display: block;
  font-family: var(--yt-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--yt-muted);
  margin-bottom: 8px;
}
.yt-case-study .meta-row span {
  font-size: 14px;
  color: var(--yt-body);
  display: block;
  line-height: 1.4;
}

/* Challenge */
.yt-case-study .challenge-grid {
  display: grid;
  grid-template-columns: .85fr 1.65fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.yt-case-study .challenge h2 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: .95;
  margin-top: 14px;
}
.yt-case-study .challenge-copy {
  font-family: var(--yt-display);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--yt-ink);
  max-width: 34em;
  margin: 0;
}
.yt-case-study .challenge-copy strong { font-weight: 700; color: var(--yt-navy); }

/* Images */
.yt-case-study .image-section {
  padding: var(--yt-pad) 0;
  border-bottom: 1px solid var(--yt-line);
  background: var(--yt-bg);
}
.yt-case-study .full-image {
  width: 100%;
  border-radius: var(--yt-radius);
  overflow: hidden;
  background: var(--yt-surface-2);
}
.yt-case-study .full-image img {
  width: 100%;
  height: auto;
  display: block;
}
.yt-case-study .pair-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.yt-case-study .pair-images .full-image {
  width: 100%;
  min-width: 0;
}
.yt-case-study .pair-images .full-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Split */
.yt-case-study .split {
  border-bottom: 1px solid var(--yt-line);
  background: var(--yt-bg);
  padding: clamp(48px, 6vw, 80px) 0;
}
.yt-case-study .split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}
.yt-case-study .split-media {
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--yt-surface-2);
  border-radius: var(--yt-radius);
}
.yt-case-study .split-media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.yt-case-study .split-copy {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.yt-case-study .split-copy h2 {
  margin: 12px 0 18px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  max-width: 14ch;
}
.yt-case-study .mini-features {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  max-width: 640px;
}
.yt-case-study .mini-feature {
  border-top: 1px solid var(--yt-line);
  padding-top: 14px;
}
.yt-case-study .mini-feature strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--yt-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--yt-ink);
}
.yt-case-study .mini-feature span {
  font-size: 13px;
  color: var(--yt-muted);
  line-height: 1.45;
}

/* Features */
.yt-case-study .feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--yt-line);
}
.yt-case-study .feature-card {
  padding: 28px 24px 32px 0;
  margin-right: 24px;
  border-bottom: 1px solid var(--yt-line);
}
.yt-case-study .feature-card:nth-child(3n+2),
.yt-case-study .feature-card:nth-child(3n+3) {
  padding-left: 24px;
  border-left: 1px solid var(--yt-line);
}
.yt-case-study .feature-card:nth-child(3n) { margin-right: 0; }
.yt-case-study .feature-card .step,
.yt-case-study .process-row .step {
  font-family: var(--yt-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--yt-orange);
}
.yt-case-study .feature-card h3 {
  margin: 28px 0 10px;
  font-size: clamp(18px, 1.8vw, 22px);
}
.yt-case-study .feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--yt-muted);
  max-width: 34em;
  line-height: 1.5;
}

/* Process */
.yt-case-study .process-grid { border-top: 1px solid var(--yt-line); }
.yt-case-study .process-row {
  display: grid;
  grid-template-columns: 72px 1fr 1.4fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--yt-line);
  align-items: start;
}
.yt-case-study .process-row h3 {
  font-size: 17px;
  font-weight: 600;
}
.yt-case-study .process-row p {
  margin: 0;
  color: var(--yt-muted);
  font-size: 14px;
  max-width: 42em;
  line-height: 1.5;
}

/* Numbers */
.yt-case-study .numbers { background: var(--yt-surface); }
.yt-case-study .numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.yt-case-study .number {
  padding: 0 28px;
  border-left: 1px solid var(--yt-line);
}
.yt-case-study .number:first-child {
  padding-left: 0;
  border-left: 0;
}
.yt-case-study .number strong {
  display: block;
  font-family: var(--yt-display);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 600;
  color: var(--yt-navy);
  margin-bottom: 10px;
}
.yt-case-study .number span {
  font-family: var(--yt-mono);
  font-size: 11px;
  color: var(--yt-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Gallery */
.yt-case-study .gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.yt-case-study .gallery-card {
  border-radius: var(--yt-radius);
  overflow: hidden;
  background: var(--yt-surface-2);
}
.yt-case-study .gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-case-study .gallery-card.big { min-height: 500px; }
.yt-case-study .gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.yt-case-study .gallery-side .gallery-card { min-height: 240px; }

/* CTA */
.yt-case-study .cta { border-bottom: 0; }
.yt-case-study .cta h2 {
  font-size: clamp(40px, 6vw, 88px);
  line-height: .95;
  letter-spacing: -.045em;
  margin: 14px 0 36px;
  max-width: 16ch;
}
.yt-case-study .cta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}
.yt-case-study .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid rgba(16, 17, 20, .28);
  border-radius: 100px;
  font-family: var(--yt-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yt-ink);
  white-space: nowrap;
  transition: background .25s, border-color .25s, color .25s;
}
.yt-case-study .btn:hover {
  background: var(--yt-navy);
  border-color: var(--yt-navy);
  color: #fff;
}

/* Footer */
.yt-case-study .yt-footer {
  padding: 28px 0 32px;
  border-top: 1px solid var(--yt-line);
  background: var(--yt-bg);
}
.yt-case-study .foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.yt-case-study .ownership {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--yt-muted);
  font-size: 12px;
}
.yt-case-study .ownership strong {
  color: var(--yt-ink);
  font-family: var(--yt-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 11px;
}
.yt-case-study .footer-link {
  font-family: var(--yt-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--yt-muted);
  border-bottom: 1px solid rgba(16, 17, 20, .2);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.yt-case-study .footer-link:hover {
  color: var(--yt-blue);
  border-color: var(--yt-blue);
}

/* Responsive */
@media (max-width: 950px) {
  .yt-case-study .hero-grid,
  .yt-case-study .overview-grid,
  .yt-case-study .challenge-grid,
  .yt-case-study .split-inner,
  .yt-case-study .pair-images,
  .yt-case-study .gallery-grid { grid-template-columns: 1fr; }
  .yt-case-study .hero-grid { gap: 28px; margin-top: 36px; }
  .yt-case-study .pair-images .full-image img {
    aspect-ratio: 16 / 9;
  }
  .yt-case-study .meta-col {
    border-left: 0;
    border-top: 1px solid var(--yt-line);
    padding-left: 0;
    padding-top: 24px;
  }
  .yt-case-study .split-media { min-height: auto; }
  .yt-case-study .split-media img {
    height: auto;
    max-height: none;
  }
  .yt-case-study .feature-list { grid-template-columns: 1fr 1fr; }
  .yt-case-study .feature-card { margin-right: 0; }
  .yt-case-study .feature-card:nth-child(3n+2),
  .yt-case-study .feature-card:nth-child(3n+3) {
    padding-left: 0;
    border-left: 0;
  }
  .yt-case-study .feature-card:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--yt-line);
  }
  .yt-case-study .process-row { grid-template-columns: 55px 1fr; }
  .yt-case-study .process-row p { grid-column: 2; }
  .yt-case-study .numbers-grid { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .yt-case-study .number:nth-child(3) { border-left: 0; padding-left: 0; }
  .yt-case-study .gallery-card.big { min-height: auto; }
  .yt-case-study .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }
  .yt-case-study .gallery-side .gallery-card { min-height: auto; }
  .yt-case-study .cta-row { flex-direction: column; align-items: flex-start; }
  .yt-case-study .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .yt-case-study .hero { padding-top: 110px; }
  .yt-case-study .hero-image video { aspect-ratio: 4 / 5; }
  .yt-case-study .hero-logo { width: min(220px, 78%); }
  .yt-case-study .feature-list { grid-template-columns: 1fr; }
  .yt-case-study .feature-card,
  .yt-case-study .feature-card:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
  .yt-case-study .gallery-side { grid-template-columns: 1fr; }
  .yt-case-study .mini-features { grid-template-columns: 1fr; }
  .yt-case-study .foot-inner { flex-direction: column; align-items: flex-start; }
  .yt-case-study .number { padding: 0 14px; }
}
