/* =========================================================
   4EVER BARBER STYLE — Base: tokens, reset, tipografía, utilidades
   Paleta derivada del logo (cromo sobre negro) y de la foto
   del local (beige cálido, madera, cuero, verde oliva, luz ámbar).
   ========================================================= */

/* =========================================================
   TIPOGRAFÍAS, SERVIDAS DESDE AQUÍ

   Antes se cargaban desde fonts.googleapis.com, y eso significa que la IP de
   CADA visitante llegaba a Google solo por abrir la página. En el EEE —el
   salón está en Liechtenstein— eso es una cesión de datos a un tercero que hay
   que declarar, y que ha dado problemas reales. Alojándolas aquí desaparece:
   no sale ni una petición a Google.

   De paso se quita una dependencia externa del camino crítico: si Google Fonts
   va lento, la página ya no se queda esperando a que llegue la tipografía.

   Son fuentes VARIABLES: un solo archivo por familia y subconjunto cubre todos
   los pesos, por eso `font-weight` lleva un rango y no un número. Los cuatro
   archivos suman 92 KB.

   No se descarga el subconjunto cirílico: la web es alemán, español e inglés.

   Cinzel y Jost están bajo licencia SIL Open Font, que permite alojarlas.
   Actualizarlas es volver a bajarlas de Google Fonts y sustituir los .woff2.
   ========================================================= */

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/jost-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- Superficies oscuras --- */
  --ink:        #0B0B0C;
  --charcoal:   #141416;
  --graphite:   #1E1E21;
  --graphite-2: #26262A;

  /* --- Texto --- */
  --sand:       #E8DED2;
  --taupe:      #B8A48E;
  --taupe-dim:  #8C7F71;

  /* --- Materiales del local --- */
  --wood:       #5A4433;
  --leather:    #6B4A38;
  --olive:      #6B7245;
  --olive-lo:   #4E5432;

  /* --- Luz cálida: acento principal --- */
  --amber:      #E8B15C;
  --amber-lo:   #C9913F;
  --amber-glow: rgba(232, 177, 92, 0.18);

  /* --- Cromo del logo --- */
  --chrome: linear-gradient(
    160deg,
    #FFFFFF 0%,
    #C3C7CC 26%,
    #6E7378 48%,
    #EDF0F2 68%,
    #9AA0A6 88%,
    #DDE1E4 100%
  );

  /* --- Líneas y sombras --- */
  --line:        rgba(232, 222, 210, 0.10);
  --line-strong: rgba(232, 222, 210, 0.20);
  --shadow-sm:   0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-md:   0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg:   0 28px 70px rgba(0, 0, 0, 0.55);

  /* --- Tipografía --- */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body:    'Jost', 'Segoe UI', system-ui, sans-serif;

  /* --- Ritmo --- */
  --section-y:  clamp(72px, 9vw, 140px);
  --gutter:     clamp(20px, 5vw, 72px);
  --max-w:      1240px;
  --radius:     4px;
  --radius-lg:  10px;

  /* --- Movimiento --- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:  0.55s;

  --nav-h: 76px;

  /* Alto de la barra inferior de movil. Lo usan la barra, el hueco que se le
     deja al final de la pagina, el boton flotante de WhatsApp y la hoja de
     "Mas", que se apoya justo encima. Escrito cuatro veces a mano, cambiarlo
     dejaba siempre alguno descuadrado. */
  --tabbar-h: 58px;
}

/* ===================== RESET ===================== */

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--ink);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol { list-style: none; }

::selection {
  background: var(--amber);
  color: var(--ink);
}

/* Foco visible y consistente en todo lo interactivo */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   BARRAS DE SCROLL

   Finas y IGUALES en todas partes: la web pública, el panel, las tablas, los
   modales y los cajones. Van aquí, en base.css, porque es el único archivo que
   cargan las dos zonas — puestas en cada sitio acabarían distintas.

   Tres cosas que estaban mal y por las que se veían gordas y desiguales:

   1. Solo se declaraba `width`. Las barras HORIZONTALES no la usan: usan
      `height`, así que se quedaban con el grosor del sistema —unos 15px— y las
      verticales medían 10. Se notaba mucho donde salían las dos.

   2. Solo había reglas ::-webkit-, que Firefox ignora por completo: ahí salían
      las del sistema, más gordas todavía. Las propiedades estándar
      (scrollbar-width / scrollbar-color) cubren Firefox y Chrome moderno; las
      -webkit- se quedan para Safari y Chrome viejos, que no entienden las
      estándar. Con las dos, se ven igual en todos.

   3. La pista iba en --ink, que sobre las superficies claras del panel dibujaba
      una franja oscura. Transparente se adapta a lo que tenga detrás.

   Y por eso van REPARTIDAS en dos bloques en vez de declararse las dos a la
   vez: en cuanto un Chrome moderno ve `scrollbar-width`, deja de hacer caso a
   las reglas ::-webkit-. Y `thin` no es un grosor que se elija — son 10px
   fijos, o sea lo mismo de gordo que había. Se comprobó midiendo.

   Así que cada motor usa lo suyo: donde existe ::-webkit-scrollbar se puede
   pedir el grosor exacto (8px), y donde no —Firefox— se pide `thin`, que es
   todo lo fino que ese motor deja. Dentro de un mismo navegador quedan iguales
   en los dos ejes y en toda la aplicación, que es lo que importa.

   `scrollbar-color` se hereda, pero `scrollbar-width` NO: por eso va en `*` y
   no en :root. Lo que quiera esconder la suya del todo lo sigue pudiendo hacer
   con su propia clase, que gana por especificidad (ver .team__grid).
   ========================================================= */

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--graphite-2) transparent;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: var(--graphite-2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover { background: var(--wood); }

/* El cuadradito donde se cruzan las dos barras. Sin esto sale en el gris del
   sistema y canta muchísimo sobre el fondo negro. */
::-webkit-scrollbar-corner { background: transparent; }

/* ===================== TIPOGRAFÍA ===================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* Título cromado: replica el acabado metálico del logo */
.chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Sin -webkit-text-fill-color el texto se ve sólido en algunos motores */
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-lo));
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--amber-lo), transparent);
}

.eyebrow--start::before { display: none; }

.section-title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.5em;
}

.section-lead {
  color: var(--taupe);
  max-width: 62ch;
  margin-top: 1.1rem;
  font-size: 1.02rem;
}

/* ===================== LAYOUT ===================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section-head {
  margin-bottom: clamp(36px, 5vw, 68px);
}

.section-head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head--center .section-lead { margin-inline: auto; }

/* Separador fino entre secciones, con brillo cálido al centro */
.section--ruled::before {
  content: '';
  position: absolute;
  inset-inline: var(--gutter);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 50%, transparent);
}

/* ===================== BOTONES ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease),
              color 0.25s var(--ease),
              border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Primario: la luz ámbar del local */
.btn--primary {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-lo) 100%);
  color: var(--ink);
  box-shadow: 0 6px 24px var(--amber-glow);
}

.btn--primary:hover {
  box-shadow: 0 12px 34px rgba(232, 177, 92, 0.32);
}

/* Secundario: contorno discreto */
.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--sand);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Terciario: el verde oliva firma de la casa */
.btn--olive {
  background: var(--olive-lo);
  color: #F3F1E7;
}

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

.btn--sm {
  padding: 0.62em 1.2em;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.btn--block { width: 100%; }

/* ===================== ANIMACIÓN DE ENTRADA ===================== */

/* Entrada SOLO con CSS. Sin JavaScript, sin observador, sin clases.
   =================================================================
   Esto empezó siendo un IntersectionObserver que añadía .is-visible. Falló
   tres veces de formas distintas y siempre por lo mismo: el DOM lo pinta
   Blazor, y una clase que pone el JavaScript desaparece en cuanto Blazor
   vuelve a renderizar ese nodo. El síntoma era el peor posible — la web
   cargaba con todo el contenido presente pero invisible, unas veces sí y
   otras no.

   Con `animation ... both` el navegador se encarga solo: el elemento termina
   SIEMPRE en opacity 1, aunque la animación se interrumpa, se recorte o el
   nodo se sustituya a mitad. No hay estado que perder.

   Se pierde que la entrada se dispare al llegar con el scroll — ahora ocurre
   al pintarse. Es un adorno; que la web se vea no lo es. */
.reveal {
  animation: revealIn 0.85s var(--ease) both;
}

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

/* Quien haya pedido menos movimiento ve el contenido sin entrada. */
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

/* Escalonado para grupos de tarjetas */
.reveal[data-delay="1"] { animation-delay: 0.09s; }
.reveal[data-delay="2"] { animation-delay: 0.18s; }
.reveal[data-delay="3"] { animation-delay: 0.27s; }
.reveal[data-delay="4"] { animation-delay: 0.36s; }
.reveal[data-delay="5"] { animation-delay: 0.45s; }

/* ===================== ACCESIBILIDAD ===================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  background: var(--amber);
  color: var(--ink);
  padding: 0.8em 1.4em;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 12px; }

/* Quien pida menos movimiento, recibe menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
