/* Tipografías corporativas: títulos en MB Corpo A Title Cond, cuerpo en MB Corpo S Title */
@font-face {
  font-family: 'MB Corpo A Title Cond';
  src: url('../fonts/MBCorpoATitleCond-Regular-Web.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MB Corpo S Title';
  src: url('../fonts/MBCorpoSTitle-Regular-Web.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MB Corpo S Title';
  src: url('../fonts/MBCorpoSTitle-Light-Web.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #0E0E0E;
  --text: #FFFFFF;
  --text-soft: #D6D6D6;
  --text-card: #BFBFBF;
  --text-nav: #C9C9C9;
  --text-muted: #9A9A9A;
  --text-faint: #8F8F8F;
  --line: rgba(255, 255, 255, 0.14);
  --font-title: 'MB Corpo A Title Cond', Georgia, serif;
  --font-text: 'MB Corpo S Title', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Mientras pide el nombre no se puede bajar: sin scroll y sin las secciones de abajo */
html.is-ask,
html.is-ask body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.is-ask .services,
.is-ask .site-footer {
  display: none;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: 0.82;
}

.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;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* El saludo recibe el foco por JS para los lectores de pantalla; no es interactivo, no lleva contorno */
h1[tabindex="-1"]:focus {
  outline: none;
}

button,
input {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Cabecera: logo sobre degradado negro ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter) 56px;
  padding-top: max(22px, env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.brand__star {
  display: block;
  width: 42px;
  height: 42px;
  animation: aparecer 1s var(--ease-out) both;
}

.site-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
  transition: opacity 0.6s ease 0.6s, visibility 0s linear 0.6s;
}

.is-ask .site-nav {
  opacity: 0;
  visibility: hidden;
  transition: none;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-nav);
}

/* Subrayado que crece desde la izquierda */
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0.24em;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover {
  opacity: 1;
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- Textos comunes ---------- */

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #DEDEDE;
}

.eyebrow--muted {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--text-muted);
}

.lead {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  color: #C6C6C6;
}

.lead--hero {
  margin-top: 16px;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.btn:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  padding: 0 36px;
  border: none;
  background: #FFFFFF;
  color: #000000;
}

.btn--primary:hover {
  background: #E4E4E4;
}

.btn--ghost {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: #FFFFFF;
}

.link-btn {
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.link-btn:hover {
  color: var(--text-soft);
}

.link-btn--center {
  display: block;
  margin: 18px auto 0;
  min-height: 44px;
}

.link-btn--change {
  margin-top: 20px;
  min-height: 44px;
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template: 1fr / 1fr;
  min-height: clamp(640px, 100vh, 1000px);
  min-height: clamp(640px, 100svh, 1000px);
  overflow: hidden;
  background: var(--bg);
}

.is-ask .hero {
  height: 100vh;
  height: 100svh;
  min-height: 0;
}

/* Fondo de la pantalla del nombre: negro con dos luces suaves que se mueven lento */
.hero__glow {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.is-ask .hero__glow {
  display: block;
  animation: encender 2s ease both;
}

.hero__glow::before,
.hero__glow::after {
  content: '';
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
}

.hero__glow::before {
  top: -38vmax;
  left: -26vmax;
  background: radial-gradient(circle, rgba(70, 140, 175, 0.22) 0%, rgba(70, 140, 175, 0) 62%);
  animation: deriva-a 18s ease-in-out infinite alternate;
}

.hero__glow::after {
  bottom: -44vmax;
  right: -30vmax;
  background: radial-gradient(circle, rgba(214, 150, 98, 0.16) 0%, rgba(214, 150, 98, 0) 62%);
  animation: deriva-b 22s ease-in-out infinite alternate;
}

/* z-index: 0 crea una capa propia: la foto animada queda debajo de sus velos y todo debajo del texto */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.is-ask .hero__media {
  display: none;
}

/* Al entrar, la foto se abre desde un recuadro al centro hasta ocupar toda la portada */
.is-welcome .hero__media {
  animation: revelar 1.6s var(--ease-out) both;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
}

.is-welcome .hero__media img {
  animation: acercar 2.8s var(--ease-out) both;
}

.hero__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Oscurece la izquierda y la parte baja, donde va el texto, sin tapar la fachada */
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.30) 38%, rgba(0, 0, 0, 0) 66%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.08) 34%, rgba(0, 0, 0, 0.45) 62%, rgba(0, 0, 0, 0.92) 100%);
}

.hero__ask,
.hero__welcome {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}

/* Sin JS, o si ya entró antes: bienvenida. Con .is-ask: pantalla del nombre. */
.hero__ask {
  display: none;
}

.is-ask .hero__ask {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--gutter) 48px;
}

.is-ask .hero__welcome {
  display: none;
}

.no-js .link-btn--change {
  display: none;
}

.ask-card {
  width: 100%;
  max-width: 460px;
  padding: 48px 44px 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: aparecer 0.9s var(--ease-out) 0.2s both;
}

.ask-card .eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--text-soft);
}

.ask-card__title {
  margin: 14px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.ask-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.field-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field {
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field::placeholder {
  color: #949494;
}

.field:focus {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.10);
}

.hero__welcome {
  align-self: end;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px var(--gutter) 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.hero__welcome .btn {
  text-shadow: none;
}

/* La bienvenida entra en cascada mientras se abre la foto */
.is-welcome .hero__welcome > * {
  animation: aparecer 0.9s var(--ease-out) 0.55s both;
}

.is-welcome .hero__welcome > :nth-child(2) { animation-delay: 0.63s; }
.is-welcome .hero__welcome > :nth-child(3) { animation-delay: 0.71s; }
.is-welcome .hero__welcome > :nth-child(4) { animation-delay: 0.79s; }
.is-welcome .hero__welcome > :nth-child(5) { animation-delay: 0.87s; }

.hero__title {
  margin: 18px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

/* ---------- Servicios ---------- */

.services {
  padding: 96px var(--gutter) 104px;
}

.services .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.services__intro {
  max-width: 720px;
}

.services__title {
  margin: 14px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.08;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 250px;
  padding: 36px 32px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.4);
  background: #141414;
}

.card__icon {
  color: var(--text);
}

.card__kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
}

.card__text {
  margin: 0;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-card);
}

.card__more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card__more svg {
  transition: transform 0.2s ease;
}

.card:hover .card__more svg {
  transform: translate(3px, -3px);
}

/* ---------- Aparición al hacer scroll ---------- */
/* .reveal-ready lo pone main.js: si el JS no carga, todo se ve sin animación. */

.reveal-ready [data-reveal]:not(.cards) {
  opacity: 0;
}

/* opacity: 1 explícito: si las animaciones están desactivadas, el bloque igual se ve */
.reveal-ready [data-reveal].is-visible:not(.cards) {
  opacity: 1;
  animation: aparecer 0.9s var(--ease) both;
}

.reveal-ready .cards[data-reveal] .card {
  opacity: 0;
}

.reveal-ready .cards[data-reveal].is-visible .card {
  opacity: 1;
  animation: aparecer 0.9s var(--ease) both;
}

.reveal-ready .cards.is-visible .card:nth-child(2) { animation-delay: 0.12s; }
.reveal-ready .cards.is-visible .card:nth-child(3) { animation-delay: 0.24s; }

/* ---------- Pie ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter) 44px;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__brand,
.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand--footer {
  font-family: var(--font-title);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.site-footer__place {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
}

.site-footer__nav a {
  font-size: 13px;
  color: var(--text-nav);
}

.site-footer__nav a:hover {
  opacity: 1;
  color: var(--text);
}

.site-footer__legal {
  margin-top: 28px;
  margin-bottom: 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Animaciones ---------- */

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes revelar {
  0% {
    clip-path: inset(24% 20% round 28px);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 round 0);
    opacity: 1;
  }
}

@keyframes acercar {
  from {
    transform: scale(1.18);
    filter: brightness(0.55);
  }
  to {
    transform: none;
    filter: none;
  }
}

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

@keyframes deriva-a {
  to {
    transform: translate(14vmax, 10vmax) scale(1.08);
  }
}

@keyframes deriva-b {
  to {
    transform: translate(-12vmax, -8vmax) scale(1.12);
  }
}

/* ---------- Mobile: foto arriba y contenido debajo ---------- */

@media (max-width: 720px) {
  .site-header {
    justify-content: center;
    padding: 18px 20px 44px;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .brand__star {
    width: 36px;
    height: 36px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    display: block;
    min-height: 0;
  }

  .is-ask .hero {
    display: flex;
    flex-direction: column;
  }

  .hero__media {
    position: relative;
    height: 380px;
  }

  .hero__media::before {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 50%, #000000 100%);
  }

  .is-ask .hero__ask {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 96px 26px 32px;
  }

  .ask-card {
    max-width: none;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .ask-card__title {
    margin-top: 12px;
    font-size: 40px;
  }

  .ask-form {
    margin-top: 26px;
  }

  .link-btn--center {
    margin-top: 12px;
  }

  .hero__welcome {
    padding: 4px 26px 8px;
    text-shadow: none;
  }

  .hero__welcome .eyebrow {
    font-size: 11px;
    letter-spacing: 0.4em;
    color: var(--text-soft);
  }

  .hero__title {
    margin-top: 12px;
    font-size: 46px;
    line-height: 1.04;
  }

  .lead--hero {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.55;
    color: #C6C6C6;
  }

  .cta-row {
    flex-direction: column;
    align-self: stretch;
    gap: 12px;
    margin-top: 28px;
  }

  .btn {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
  }

  .btn--ghost {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.45);
  }

  .link-btn--change {
    align-self: center;
    margin-top: 10px;
  }

  .services {
    padding: 64px 26px 72px;
  }

  .services .container {
    gap: 32px;
  }

  .card {
    min-height: 0;
    padding: 28px 24px 24px;
  }

  .site-footer {
    padding: 32px 26px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-ready [data-reveal],
  .reveal-ready .cards[data-reveal] .card {
    opacity: 1 !important;
  }
}

/* "Mercedes-Benz" y la dirección no se cortan en el medio */
.nowrap {
  white-space: nowrap;
}

/* Dirección completa donde entra en una línea; la corta en celular (ver media query) */
.addr-short {
  display: none;
}

/* ---------- Cómo llegar: elegir Google Maps o Waze ---------- */

html:has(.route-dialog[open]) {
  overflow: hidden;
}

.route-dialog {
  width: min(460px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  background: #0B0B0B;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.route-dialog[open] {
  animation: aparecer 0.45s var(--ease-out) both;
}

.route-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.route-dialog[open]::backdrop {
  animation: encender 0.3s ease both;
}

.route-dialog__inner {
  position: relative;
  padding: 36px 32px 30px;
}

.route-dialog__title {
  margin: 12px 0 0;
  padding-right: 32px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
}

.route-dialog__addr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 300;
  color: var(--text-card);
}

.route-dialog__addr svg {
  flex: none;
}

.route-dialog__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.route-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 116px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.route-option:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.10);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.route-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.route-dialog__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* En celular: hoja que sube desde abajo */
@media (max-width: 720px) {
  .addr-long {
    display: none;
  }

  .addr-short {
    display: inline;
  }

  .route-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: auto 0 0;
    border-bottom: none;
    border-radius: 24px 24px 0 0;
  }

  .route-dialog[open] {
    animation: subir 0.45s var(--ease-out) both;
  }

  .route-dialog__inner {
    padding: 30px 24px 24px;
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  }

  .route-dialog__title {
    font-size: 30px;
  }
}

@keyframes subir {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
