@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-variable.woff2') format('woff2');
}
/* Hero fotográfico TodAps — portada completa, responsive y ligera. */
#tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
  --hero-ink: #0c0c09;
  --hero-surface: #f4f4f1;
  --hero-blue: #0099d5;
  position: relative;
  isolation: isolate;
  min-height: 100svh !important;
  margin-top: 0;
  padding: 0 !important;
  overflow: hidden;
  background: var(--hero-surface) !important;
}

@supports (height: 100dvh) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child { min-height: 100dvh !important; }
}

html.dark #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
  background: var(--hero-surface) !important;
}

.hero-photo-cover::before,
.hero-photo-cover::after {
  display: none !important;
}

.hero-photo-media {
  position: absolute;
  inset: 0;
}

.hero-photo-media {
  z-index: 0;
  display: block;
  overflow: hidden;
  background: var(--hero-surface);
}

.hero-photo-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.hero-photo-cover .hero-minimal-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(100%, 80rem);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(23rem, .86fr) !important;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem) !important;
}

@supports (height: 100dvh) {
  .hero-photo-cover .hero-minimal-shell { min-height: 100dvh; }
}

.hero-photo-cover .hero-minimal-copy {
  grid-column: 2;
  width: 100%;
  max-width: 35rem;
  justify-self: end;
  color: var(--hero-ink);
}

.hero-photo-cover .hero-title,
html.dark .hero-photo-cover .hero-title {
  max-width: 35rem !important;
  margin: 0 !important;
  color: var(--hero-ink) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(3.75rem, 6.2vw, 6.35rem) !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
  text-wrap: balance;
}

.hero-photo-cover .hero-emphasis,
html.dark .hero-photo-cover .hero-emphasis {
  color: var(--hero-blue) !important;
}

.hero-photo-cover .hero-actions {
  width: max-content;
  margin-top: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

#tab-inicio .hero-photo-cover .hero-primary-cta {
  min-height: 54px;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-family: "Open Sans", Inter, Arial, sans-serif;
  font-weight: 700;
}

#tab-inicio .hero-photo-cover .hero-primary-cta {
  flex: none;
  width: auto;
  min-width: 15rem;
  background: var(--hero-ink) !important;
  color: #fff !important;
}

#tab-inicio .hero-photo-cover .hero-primary-cta:hover {
  background: var(--hero-blue) !important;
}

/* Wordmark oficial sin placa: un halo blanco mínimo lo mantiene legible sobre la foto. */
.td-brand { min-width: 0; }

.td-brand img.td-brand-wordmark {
  width: clamp(9rem, 12vw, 10.75rem);
  height: auto;
  max-height: 48px;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .92)) drop-shadow(0 3px 8px rgba(255, 255, 255, .62));
}

/* En Home, la cabecera pertenece a la fotografía: no ocupa otra franja. */
html:not([data-active-route])[data-initial-route="inicio"] .td-site-header,
html[data-active-route="inicio"] .td-site-header {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  z-index: 90;
  margin: 0;
  transform: translateX(-50%);
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html:not([data-active-route])[data-initial-route="inicio"] body > main,
html[data-active-route="inicio"] body > main {
  padding-top: 0 !important;
}

@media (max-width: 960px) and (orientation: portrait) {
  .td-brand img.td-brand-wordmark { width: clamp(8.5rem, 39vw, 9.65rem); max-height: 44px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  html:not([data-active-route])[data-initial-route="inicio"] .td-header-actions,
  html[data-active-route="inicio"] .td-header-actions {
    display: none;
  }

  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child,
  .hero-photo-cover .hero-minimal-shell {
    min-height: 100svh !important;
  }

  .hero-photo-cover .hero-minimal-shell {
    padding: 32px 2rem calc(5.25rem + env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, .95fr) !important;
    align-items: start;
  }

  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title {
    font-size: clamp(2.05rem, 4.25vw, 2.3rem) !important;
    line-height: 1 !important;
  }
  .hero-photo-cover .hero-actions { margin-top: .6rem; }
  #tab-inicio .hero-photo-cover .hero-primary-cta {
    min-height: 42px;
    padding: .5rem .6rem !important;
    font-size: .72rem !important;
  }
}

/* Texto del hero en blanco sobre fondo nocturno (2026-10-02) */
html.dark #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
  --hero-ink: #ffffff;
}
html.dark #tab-inicio .hero-photo-cover .hero-primary-cta {
  background: #0099d5 !important;
}

/* Wordmark TodAps en blanco sobre fondo oscuro (2026-10-02) */
html.dark .td-brand img.td-brand-wordmark {
  filter: brightness(0) invert(1);
}

/* Transicion circular de tema (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* Hero en computadora: el título deja libre la oreja del gato (1280 / 1440 / 1920). */
@media (min-width: 961px) and (orientation: landscape) {
  .hero-photo-cover .hero-minimal-shell { width: min(100%, 92rem); }
  .hero-photo-cover .hero-minimal-copy { max-width: min(24rem, 100%); }
  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title {
    max-width: 24rem !important;
    font-size: clamp(3.1rem, 4.9vw, 5.6rem) !important;
  }
}
@media (min-width: 1700px) and (orientation: landscape) {
  .hero-photo-cover .hero-minimal-copy { max-width: min(27rem, 100%); }
  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title { max-width: 27rem !important; font-size: clamp(4.8rem, 4.4vw, 5.4rem) !important; }
}

/* ---------- Hero: qué hace TodAps ---------- */
.hero-photo-cover .hero-subtitle {
  margin: 1.1rem 0 0;
  max-width: 23rem;
  color: #2b3542;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -.01em;
  text-wrap: pretty;
}
html.dark .hero-photo-cover .hero-subtitle { color: #dbe4ee; }
.hero-photo-cover .hero-subtitle + .hero-actions { margin-top: 1.35rem; }

@media (min-width: 961px) and (orientation: landscape) {
  .hero-photo-cover .hero-subtitle { max-width: min(24rem, 100%); }
}
@media (min-width: 1700px) and (orientation: landscape) {
  .hero-photo-cover .hero-subtitle { max-width: 27rem; font-size: 1.1875rem; }
}
@media (max-width: 960px) and (orientation: portrait) {
  .hero-photo-cover .hero-subtitle { max-width: 21rem; font-size: 1rem; margin-top: .85rem; }
  .hero-photo-cover .hero-subtitle + .hero-actions { margin-top: 1rem; }
}


/* 4-nov: legibilidad con fuente local o de sistema; JPEG sin dependencia de JS. */
.hero-photo-cover .hero-title, html.dark .hero-photo-cover .hero-title {
  letter-spacing: -.045em !important;
  line-height: 1 !important;
}
.hero-location { white-space: nowrap; }
#tab-inicio .hero-photo-cover .hero-primary-cta { font-size: .875rem !important; }
#tab-inicio .hero-photo-cover .hero-primary-cta:hover,
html.dark #tab-inicio .hero-photo-cover .hero-primary-cta { background: #0079ad !important; color: #fff !important; }
html.dark #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child { --hero-surface: #101721; }
@media (max-width: 960px) and (orientation: portrait) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
  }
  #tab-inicio .hero-photo-cover .hero-minimal-shell {
    order: 0;
    min-height: 0;
    width: 100%;
    display: block;
    padding: calc(96px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  }
  #tab-inicio .hero-photo-cover .hero-minimal-copy { width: 100%; max-width: 35rem; margin-inline: auto; }
  #tab-inicio .hero-photo-cover .hero-title, html.dark #tab-inicio .hero-photo-cover .hero-title {
    font-size: clamp(2.625rem, 11.8vw, 4.8rem) !important;
    max-width: 35rem !important;
  }
  #tab-inicio .hero-photo-cover .hero-subtitle { margin-top: 16px; max-width: 32rem; }
  #tab-inicio .hero-photo-cover .hero-actions { margin-top: 20px; width: 100%; }
  #tab-inicio .hero-photo-cover .hero-primary-cta { min-height: 50px; min-width: 0; max-width: 100%; padding: 12px 20px !important; font-size: 14px !important; white-space: normal; }
  #tab-inicio .hero-photo-cover .hero-photo-media {
    order: 1;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1.2;
    margin-top: 28px;
  }
  #tab-inicio .hero-photo-cover .hero-photo-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
  @media (min-width: 390px) {
    #tab-inicio .hero-photo-cover .hero-minimal-shell { padding-inline: max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-left)); }
    #tab-inicio .hero-photo-cover .hero-actions { margin-top: 24px; }
    #tab-inicio .hero-photo-cover .hero-photo-media { margin-top: 32px; }
  }
}

/* Orden solicitado: fotografía primero, después título, descripción y CTA. */
@media (max-width: 960px) and (orientation: portrait) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child { padding-top: calc(76px + env(safe-area-inset-top)) !important; }
  #tab-inicio .hero-photo-cover .hero-photo-media { order: 0; margin-top: 0; }
  #tab-inicio .hero-photo-cover .hero-minimal-shell { order: 1; padding: 24px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); }
  @media (min-width: 390px) { #tab-inicio .hero-photo-cover .hero-minimal-shell { padding-inline: max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-left)); } }
}
