/* ==========================================================================
   AE PROPERTY MANAGEMENT & CONSULT
   Archivo: css/variables.css

   Sistema visual global:
   - Diseño oscuro y contemporáneo.
   - Fondo negro mineral.
   - Textura inspirada en cuarzo negro.
   - Blanco cálido.
   - Terracota como color de acento.
   - Enfoque mobile first.
   ========================================================================== */

:root {
  /* ========================================================================
     COLORES DE MARCA
     ======================================================================== */

  /*
   * Negro mineral principal.
   * Se evita el negro absoluto para conservar profundidad y matices.
   */
  --color-background: #101110;
  --color-background-soft: #161715;
  --color-background-elevated: #1c1d1b;
  --color-background-strong: #0b0c0b;

  /*
   * Superficies utilizadas en tarjetas, formularios,
   * navegación móvil y elementos elevados.
   */
  --color-surface: #171816;
  --color-surface-hover: #20211f;
  --color-surface-active: #262724;

  /*
   * Blancos y grises ligeramente cálidos.
   */
  --color-white: #ffffff;
  --color-text-primary: #f5f2ec;
  --color-text-secondary: #b9b6af;
  --color-text-muted: #8e8c86;
  --color-text-disabled: #696862;

  /*
   * Verde oliva ahumado.
   *
   * Acento definitivo de marca, cálido y editorial.
   */

  --color-accent: #6e7a4e;
  --color-accent-hover: #8b9768;
  --color-accent-strong: #4f5837;
  --color-accent-strong-hover: #5c6640;
  --color-accent-soft: rgba(110, 122, 78, 0.14);
  --color-accent-border: rgba(110, 122, 78, 0.45);

  /*
   * Colores de estado.
   * Se emplearán especialmente en el formulario de contacto.
   */
  --color-success: #7da282;
  --color-warning: #d2a55f;
  --color-error: #d16e65;
  --color-info: #7e9baa;

  /* ========================================================================
     BORDES Y DIVISORES
     ======================================================================== */

  --color-border: rgba(245, 242, 236, 0.12);
  --color-border-soft: rgba(245, 242, 236, 0.07);
  --color-border-strong: rgba(245, 242, 236, 0.25);
  --color-divider: rgba(245, 242, 236, 0.08);

  /* ========================================================================
     SUPERPOSICIONES
     ======================================================================== */

  --overlay-light: rgba(255, 255, 255, 0.04);
  --overlay-medium: rgba(255, 255, 255, 0.08);
  --overlay-dark: rgba(5, 6, 5, 0.58);
  --overlay-dark-strong: rgba(5, 6, 5, 0.78);

  /*
   * Degradado que protegerá la legibilidad de los textos
   * colocados sobre las fotografías del carrusel.
   */
  --overlay-hero:
    linear-gradient(
      90deg,
      rgba(7, 8, 7, 0.92) 0%,
      rgba(7, 8, 7, 0.76) 40%,
      rgba(7, 8, 7, 0.34) 72%,
      rgba(7, 8, 7, 0.2) 100%
    );

  --overlay-hero-mobile:
    linear-gradient(
      180deg,
      rgba(7, 8, 7, 0.72) 0%,
      rgba(7, 8, 7, 0.42) 35%,
      rgba(7, 8, 7, 0.9) 100%
    );

  /* ========================================================================
     TEXTURA DE CUARZO NEGRO
     ======================================================================== */

  /*
   * Fondo mineral formado únicamente con CSS.
   *
   * Se aplicará en zonas concretas mediante:
   *
   * background-color: var(--color-background);
   * background-image: var(--background-quartz);
   *
   * No se aplicará con la misma intensidad detrás de textos largos.
   */
  --background-quartz:
    radial-gradient(
      circle at 12% 18%,
      rgba(255, 255, 255, 0.035) 0,
      transparent 24%
    ),
    radial-gradient(
      circle at 82% 14%,
      rgba(110, 122, 78, 0.035) 0,
      transparent 22%
    ),
    radial-gradient(
      circle at 68% 76%,
      rgba(255, 255, 255, 0.025) 0,
      transparent 28%
    ),
    linear-gradient(
      118deg,
      transparent 0%,
      transparent 31%,
      rgba(255, 255, 255, 0.025) 31.4%,
      transparent 32%,
      transparent 68%,
      rgba(255, 255, 255, 0.018) 68.4%,
      transparent 69%
    ),
    linear-gradient(
      142deg,
      transparent 0%,
      transparent 46%,
      rgba(110, 122, 78, 0.018) 46.4%,
      transparent 47%,
      transparent 100%
    );

  /*
   * Versión ligeramente más marcada para el hero,
   * cabeceras interiores y llamadas a la acción.
   */
  --background-quartz-emphasis:
    radial-gradient(
      ellipse at 14% 20%,
      rgba(255, 255, 255, 0.05) 0,
      transparent 25%
    ),
    radial-gradient(
      ellipse at 78% 18%,
      rgba(110, 122, 78, 0.045) 0,
      transparent 22%
    ),
    radial-gradient(
      ellipse at 62% 82%,
      rgba(255, 255, 255, 0.035) 0,
      transparent 30%
    ),
    linear-gradient(
      124deg,
      transparent 0%,
      transparent 28%,
      rgba(255, 255, 255, 0.04) 28.35%,
      transparent 29%,
      transparent 63%,
      rgba(255, 255, 255, 0.025) 63.4%,
      transparent 64%
    ),
    linear-gradient(
      152deg,
      transparent 0%,
      transparent 48%,
      rgba(110, 122, 78, 0.025) 48.4%,
      transparent 49%
    );

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

  /*
   * Estas familias se cargarán posteriormente desde assets/fonts/.
   * Mientras tanto se utilizarán las alternativas instaladas
   * en el sistema del visitante.
   */
  --font-heading:
    "Cormorant Garamond",
    "Times New Roman",
    Georgia,
    serif;

  --font-body:
    "Manrope",
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  --font-logo:
    "Cormorant Garamond",
    "Times New Roman",
    Georgia,
    serif;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /*
   * Tamaños fluidos.
   * Se adaptan progresivamente entre móvil y escritorio.
   */
  --font-size-2xs: 0.6875rem;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: clamp(1.75rem, 3vw, 2.25rem);
  --font-size-3xl: clamp(2.125rem, 4vw, 3rem);
  --font-size-4xl: clamp(2.75rem, 6vw, 4.5rem);
  --font-size-hero: clamp(3rem, 7vw, 5.75rem);

  --line-height-tight: 1.05;
  --line-height-heading: 1.12;
  --line-height-body: 1.65;
  --line-height-ui: 1.3;

  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.08em;
  --letter-spacing-wider: 0.14em;
  --letter-spacing-label: 0.18em;

  /* ========================================================================
     ESPACIADO
     ======================================================================== */

  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-9: 2.5rem;
  --space-10: 3rem;
  --space-11: 3.5rem;
  --space-12: 4rem;
  --space-14: 5rem;
  --space-16: 6rem;
  --space-18: 7rem;
  --space-20: 8rem;

  /*
   * Separación vertical de las secciones.
   */
  --section-spacing-small: clamp(3.5rem, 7vw, 5rem);
  --section-spacing: clamp(4.5rem, 9vw, 7.5rem);
  --section-spacing-large: clamp(5.5rem, 11vw, 9rem);

  /* ========================================================================
     CONTENEDORES Y MEDIDAS
     ======================================================================== */

  --container-width: 75rem;
  --container-width-wide: 87.5rem;
  --container-width-text: 46rem;

  --page-gutter: clamp(1.25rem, 4vw, 3rem);

  --header-height-mobile: 4.5rem;
  --header-height-desktop: 5.5rem;

  --hero-min-height-mobile: 42rem;
  --hero-min-height-desktop: 47.5rem;

  --button-min-height: 3rem;
  --control-min-size: 2.75rem;
  --form-control-min-height: 3.25rem;

  /* ========================================================================
     BORDES REDONDEADOS
     ======================================================================== */

  --radius-none: 0;
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ========================================================================
     SOMBRAS
     ======================================================================== */

  --shadow-xs:
    0 0.25rem 0.75rem rgba(0, 0, 0, 0.16);

  --shadow-sm:
    0 0.625rem 1.875rem rgba(0, 0, 0, 0.2);

  --shadow-md:
    0 1.25rem 3.125rem rgba(0, 0, 0, 0.28);

  --shadow-lg:
    0 1.875rem 5rem rgba(0, 0, 0, 0.38);

  --shadow-accent:
    0 0.75rem 2.5rem rgba(110, 122, 78, 0.22);

  --shadow-header:
    0 0.5rem 2rem rgba(0, 0, 0, 0.2);

  /* ========================================================================
     TRANSICIONES Y ANIMACIÓN
     ======================================================================== */

  --transition-fast: 160ms ease;
  --transition-base: 260ms ease;
  --transition-slow: 500ms ease;
  --transition-carousel: 900ms ease-in-out;

  /*
   * El intervalo también se declarará en main.js.
   * Esta variable sirve como referencia común del sistema visual.
   */
  --carousel-autoplay-delay: 6000ms;

  /* ========================================================================
     FOCO Y ACCESIBILIDAD
     ======================================================================== */

  --focus-color: #e49a7a;
  --focus-ring:
    0 0 0 0.1875rem rgba(228, 154, 122, 0.4);

  --focus-offset: 0.25rem;

  /* ========================================================================
     CAPAS
     ======================================================================== */

  --z-index-base: 1;
  --z-index-content: 10;
  --z-index-carousel-controls: 20;
  --z-index-header: 100;
  --z-index-mobile-menu: 200;
  --z-index-overlay: 300;
  --z-index-modal: 400;
  --z-index-whatsapp: 500;

  /* ========================================================================
     OPACIDADES
     ======================================================================== */

  --opacity-disabled: 0.45;
  --opacity-muted: 0.7;
  --opacity-overlay: 0.82;
  --opacity-icon: 0.85;
}