/**
 * =============================================================================
 * GUEBEL A+D
 * Main CSS
 *
 * Ctrl + F y escribir el tag entre corchetes:
 * -----------------------------------------------------------------------------
 * [00-FONTS]   0. Declaraciones de fuentes web (@font-face)
 * [01-VARS]    1. Tokens de diseño y variables CSS (:root)
 * [02-RESET]   2. Reset moderno y normalizacion de box-model
 * [03-TYPO]    3. Tipografia base y elementos de texto (h1-h6, p, a)
 * [04-LAYOUT]  4. Objetos y estructura global (.container, .wrapper)
 * [05-COMP]    5. Componentes de interfaz (menu, botones, carruseles, modales)
 * [06-SECT]    6. Secciones del sitio (Hero, Proyectos, Estudio, Contacto, Footer)
 * [07-UTIL]    7. Clases utilitarias y estados de accesibilidad
 * =============================================================================
 */


/* =============================================================================
   [00-FONTS] 0. WEB FONTS & @FONT-FACE
   ========================================================================== */

/* ------------------------------------- */
/*  SWITZER VARIABLE FONT                */
/* ------------------------------------- */
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/Switzer-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/Switzer-VariableItalic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------- */
/*  ARCHIVO VARIABLE FONT                */
/* ------------------------------------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-VariableFont_wdth,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------- */
/*  WORK SANS VARIABLE FONT              */
/* ------------------------------------- */
@font-face {
  font-family: 'Work Sans';
  src: url('../fonts/WorkSans-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('../fonts/WorkSans-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}


/* =============================================================================
   [01-VARS] 1. DESIGN TOKENS & VARIABLES
   ========================================================================== */

:root {
  /* Enable automatic color scheme adaptation */
  color-scheme: light dark;

  /* ------------------------------------------ */
  /*  COLORS - Sketch / Artisanal Palette       */
  /*  Theme: LIGHT (default)                    */
  /* ------------------------------------------ */

  /* Backgrounds */
  --color-bg-primary: hsl(40 2 97);
  /* Paper Creme */
  --color-bg-secondary: hsl(40 0 99);
  /* Off-white */
  --color-bg-dark: hsl(220 5 5);
  /* Deep Charcoal */

  /* Text Colors */
  --color-text-primary: hsl(220 5 10);
  /* Charcoal Gray */
  --color-text-secondary: hsl(220 5 45);
  /* Medium Gray */
  --color-text-on-dark: hsl(40 5 95);

  /* Accent & Contrast */
  --color-accent: hsl(210 10 45);
  /* Architectural Blue */
  --color-accent-wash: hsl(210 20 50 / 15%);
  /* Sketch Wash */
  --color-contrast: hsl(30 10 45);
  /* Opposite Hue (30°) */
  --color-line: hsl(220 5 25);
  /* Graphite line */

  /* Ultra contrast (for hover/focus states) */
  --fondo-ultra: white;
  --texto-ultra: black;

  /* ------------------------------------------ */
  /*  TYPOGRAPHY                                */
  /* ------------------------------------------ */

  --font-display: 'Switzer', sans-serif;
  --font-headline: 'Switzer', sans-serif;
  --font-body: 'Switzer', sans-serif;
  --font-condensed: 'Archivo', sans-serif;
  --font-alternative: 'Work Sans', sans-serif;

  --txt-weight: 300;
  /* Dynamic Font Weight (controlled by scroll) */
  --title-weight: 300;
  /* Will be updated by JS: 300 → 600 */

  /* ------------------------------------------ */
  /*  SPACING SCALE                             */
  /* ------------------------------------------ */

  --space-unit: clamp(0.375rem, 0.3291rem + 0.2041vw, 0.5rem);

  --space-xs: calc(var(--space-unit) * 0.5);
  /* 4px */
  --space-sm: var(--space-unit);
  /* 8px */
  --space-md: calc(var(--space-unit) * 2);
  /* 16px */
  --space-lg: calc(var(--space-unit) * 4);
  /* 32px */
  --space-xl: calc(var(--space-unit) * 8);
  /* 64px */
  --space-2xl: calc(var(--space-unit) * 12);
  /* 96px */
  --space-3xl: calc(var(--space-unit) * 18);
  /* 144px */
  --space-4xl: calc(var(--space-unit) * 24);
  /* 192px */

  /* ------------------------------------------ */
  /*  LAYOUT                                    */
  /* ------------------------------------------ */

  --container-max-width: 1280px;
  --container-padding: var(--space-lg);

  /* ------------------------------------------ */
  /*  TEXTURES                                  */
  /* ------------------------------------------ */

  --texture-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");

  /* ------------------------------------------ */
  /*  TRANSITIONS & EASINGS                     */
  /* ------------------------------------------ */

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-sm: 0.3s;
  --duration-md: 0.6s;
  --duration-lg: 0.9s;
  --duration-xl: 1.2s;
}

/* ============================================ */
/*  DARK THEME                                  */
/*  Auto: when system prefers dark              */
/*  Manual: when data-theme="dark" is set       */
/* ============================================ */

/* Auto dark mode (system preference) - only if not forced to light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Backgrounds inverted */
    --color-bg-primary: hsl(220 5 5);
    --color-bg-secondary: hsl(220 5 10);
    --color-bg-dark: hsl(40 5 97);

    /* Text Colors inverted */
    --color-text-primary: hsl(40 5 95);
    --color-text-secondary: hsl(40 5 75);
    --color-text-on-dark: hsl(220 5 10);

    /* Accent & Contrast adjusted for dark */
    --color-accent: hsl(210 20 60);
    --color-accent-wash: hsl(210 30 50 / 20%);
    --color-contrast: hsl(30 20 60);
    --color-line: hsl(40 10 75);

    /* Ultra contrast inverted */
    --fondo-ultra: black;
    --texto-ultra: white;
  }
}

/* Manual dark mode (user preference via UI) */
:root[data-theme="dark"] {
  /* Backgrounds inverted */
  --color-bg-primary: hsl(220 5 5);
  --color-bg-secondary: hsl(220 5 10);
  --color-bg-dark: hsl(40 5 97);

  /* Text Colors inverted */
  --color-text-primary: hsl(40 5 95);
  --color-text-secondary: hsl(40 5 75);
  --color-text-on-dark: hsl(220 5 10);

  /* Accent & Contrast adjusted for dark */
  --color-accent: hsl(210 20 60);
  --color-accent-wash: hsl(210 30 50 / 20%);
  --color-contrast: hsl(30 20 60);
  --color-line: hsl(40 10 75);

  /* Ultra contrast inverted */
  --fondo-ultra: black;
  --texto-ultra: white;
}


/* =============================================================================
   [02-RESET] 2. RESET & BASE BOX-MODEL
   ========================================================================== */

/* ------------------------------------------ */
/*  BOX MODEL RESET                           */
/* ------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ------------------------------------------ */
/*  HTML & BODY                               */
/* ------------------------------------------ */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  font-weight: var(--txt-weight);

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;

    @view-transition {
      navigation: auto;
    }
  }
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
}

/* Global Grain Texture Overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: var(--texture-grain);
  z-index: 9999;
}

/* ------------------------------------------ */
/*  ELEMENTS RESET                            */
/* ------------------------------------------ */

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--duration-sm) var(--ease-expo);
}

/* ------------------------------------------ */
/*  HEADINGS BASE                             */
/* ------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  text-wrap: balance;
  max-width: 68ch;
}


h1,
h2:not(.logo) {
  font-weight: var(--title-weight, 300);
  transition: font-weight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-variation-settings: 'wght' var(--title-weight, 300);
}


/* =============================================================================
   [03-TYPO] 3. TYPOGRAPHY & BASE ELEMENTS
   ========================================================================== */

/* ------------------------------------------ */
/*  DISPLAY & HEADLINE CLASSES                */
/* ------------------------------------------ */

.display-large {
  font-family: var(--font-display);
  font-weight: var(--title-weight, 100);
  font-size: clamp(3rem, 0.4286rem + 11.4286vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  transition: font-weight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-variation-settings: 'wght' var(--title-weight, 300);
  hyphens: auto;
  word-wrap: break-word;
}

.headline-xxl {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(2.5rem, 0.6633rem + 8.1633vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.headline-xl {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(2rem, 0.898rem + 4.898vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.headline-lg {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(1.5rem, 1.1327rem + 1.6327vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.headline-md {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(1.5rem, 1.3163rem + 0.8163vw, 2rem);
  letter-spacing: -0.01em;
}

.headline-sm {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(1.5rem, 1.3929rem + 0.4762vw, 1.75rem);
  letter-spacing: -0.01em;
}

.headline-xs {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(1.25rem, 1.1429rem + 0.4762vw, 1.5rem);
  letter-spacing: -0.01em;
}

.headline-xxs {
  font-family: var(--font-headline);
  font-weight: var(--title-weight, 300);
  font-size: clamp(1rem, 0.8296rem + 0.6568vw, 1.25rem);
  letter-spacing: -0.01em;
}

/* ------------------------------------------ */
/*  TECHNICAL & BODY TEXT                     */
/* ------------------------------------------ */

.text-technical {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: var(--title-weight, 300);
}

p,
li,
figcaption,
blockquote {
  line-height: 1.6;
  max-width: var(--p-max-width, 70ch);
  text-wrap: pretty;
  font-size: clamp(1.25rem, 1.1429rem + 0.4762vw, 1.5rem);

  *+& {
    margin-top: 1lh;
  }

  &+* {
    margin-top: 1lh;
  }
}

.text-balanced {
  text-wrap: balance;

  @media (width >=1024px) {
    max-width: 900px;
  }
}


/* =============================================================================
   [04-LAYOUT] 4. OBJECTS & GLOBAL LAYOUT
   ========================================================================== */

html {
  overflow-x: clip;
}

/* ---------------------------------------------- */
/*  CONTAINERS                                    */
/* ---------------------------------------------- */

.container {
  width: min(100% - var(--container-padding) * 2,
      var(--container-max-width));
  margin: 0 auto;
}

/* ---------------------------------------------- */
/*  SECTION SPACING                               */
/* ---------------------------------------------- */

section,
footer {
  overflow-x: clip;
}

.section-padded {
  padding-block: var(--space-3xl);
}

/* ---------------------------------------------- */
/*  BACKGROUND UTILITIES                          */
/* ---------------------------------------------- */

.fondo-comun {
  background-color: var(--color-bg-primary);
}

.fondo-claro {
  background-color: var(--color-bg-secondary);
}

/* ---------------------------------------------- */
/*  ACCESSIBILITY                                 */
/* ---------------------------------------------- */

.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;
}


/* =============================================================================
   [05-COMP] 5. COMPONENTS
   ========================================================================== */

/* ============================================== */
/*  SKETCH CARD                                   */
/* ============================================== */

.sketch-card {
  padding:
    var(--space-md) var(--space-xs) 0 var(--space-xs);
  position: relative;
  font-family: var(--font-condensed);
  font-variation-settings: 'wdth' 70;

  display: grid;
  align-content: space-between;
  gap: var(--space-md);
  grid-template-rows: auto 1fr;

  border-block-end: 1px solid transparent;
  padding-block-end: var(--space-sm);

  /* Filter transition properties */
  opacity: 1;
  scale: 1;

  /* Transiciones con soporte para display discreto */
  transition:
    border-color var(--duration-md) var(--ease-expo),
    transform var(--duration-md) var(--ease-expo),
    opacity 0.6s ease-out var(--filter-delay, 0ms),
    scale 0.6s ease-out var(--filter-delay, 0ms),
    display 0.6s ease-out var(--filter-delay, 0ms) allow-discrete;
}

/* Estado inicial al aparecer (de hidden a visible) - CSS 2024 */
@starting-style {
  .sketch-card:not(.hidden) {
    opacity: 0;
    scale: 0.95;
  }
}

.sketch-card h3 {
  color: var(--color-contrast);
  transition: color var(--duration-md) var(--ease-expo), opacity var(--duration-md) var(--ease-expo);
  margin: 0;
  opacity: 0;
}

.sketch-card:is(:hover, :focus-within) h3 {
  opacity: 1;
}

.sketch-card__figure {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  /* border-radius: var(--space-sm); */
  overflow: hidden;
}

#design .sketch-card__figure {
  overflow: visible;
}

.sketch-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(90%) contrast(1.1);
  transition: filter var(--duration-md) var(--ease-expo),
    scale var(--duration-lg) var(--ease-expo);
}

.sketch-card:is(:hover, :focus-within) .sketch-card__image {
  filter: grayscale(0%) contrast(1);
  scale: 1.05;
}

/* Link with extended clickable area */
.sketch-card__link {
  color: inherit;
  text-decoration: none;
  outline: none;
  transition: color var(--duration-md) var(--ease-expo);
}

.sketch-card__link::after {
  content: '';
  position: absolute;
  inset: 0;

  /* This will cover the entire .sketch-card because it has position: relative */
}

/* Filtering Logic - Transición suave con fade y scale */
.sketch-card.hidden {
  opacity: 0;
  scale: 0.95;
  display: none;

  /* Transición al ocultar (sin delay escalonado para salida) */
  transition:
    opacity 0.3s ease-in,
    scale 0.3s ease-in,
    display 0.3s ease-in allow-discrete;
}

/* ============================================== */
/*  CAROUSEL SYSTEM                               */
/* ============================================== */

/* Carousel Wrapper - Sticky container with border effect */
.carousel-wrapper {
  align-self: start;
  padding: 0;
  isolation: isolate;
  min-width: 0;

  background-color: var(--color-bg-primary);
  position: sticky;
  /* top: 220px; */

  #proyectos & {
    top: var(--sticky-offset, 190px);

    @media (width < 1024px) {
      top: unset;
      bottom: 0;
    }

    @media (width >=1024px) {
      top: unset;
      bottom: unset;
    }
  }

  /* Animation removed - always visible */
  opacity: 1;
  transform: translateX(0);


  @media (width < 1024px) {
    margin-inline: calc(-1 * var(--container-padding));
  }

  /* Extend to viewport edge on desktop */
  @media (width >=1024px) {
    /* Dynamically extend towards viewport right edge, keeping padding */
    margin-inline-start: calc(-1 * max(var(--container-padding),
          (100vw - var(--container-max-width)) / 2) + var(--container-padding));
  }

  /* first on mobile */
  @media (width < 1024px) {
    /* order: -1; */
    top: 200px;
    top: unset;
    bottom: -1em;
  }
}

/* Arq Filter - Filter buttons for architecture projects */
.arq-filter {
  display: none;
  /* Oculto en móvil */
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: var(--space-xs);
  padding: var(--space-md) 0;
  justify-content: flex-end;

  @media (width >=1024px) {
    /* Visible solo en desktop */
    display: flex;
    padding: var(--space-md) var(--space-sm) var(--space-lg) var(--space-sm);
    margin-inline: calc(-1 * var(--space-sm));
    position: sticky;
    top: var(--header-height, 85px);
    background-color: var(--color-bg-primary);
    z-index: 10;
  }
}

/* Project Carousel - Horizontal scroll with snap */
.project-carousel {
  position: relative;
  z-index: 1;
  width: auto;

  display: flex;
  overflow-x: auto;
  overflow-y: clip;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 var(--space-xl);
  outline: none;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;

  #proyectos & {

    @media (width >=1024px) {
      gap: var(--space-lg) var(--space-sm);
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
      overflow-x: unset;
      flex: unset;
      position: relative;
      padding: 0;

      .sketch-card {
        width: auto;
        padding: 0;
      }
    }
  }

  #design & {
    scrollbar-color: hsl(from var(--color-contrast) h s l / 20%) transparent;
    justify-content: safe center;
  }

  &:active {
    cursor: grabbing;
  }

  &::-webkit-scrollbar {
    height: 8px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--color-contrast);
    /* border-radius: 4px; */
  }
}

.project-carousel>.sketch-card {
  flex: 0 0 auto;
  width: min(clamp(15rem, 12.3567rem + 10.1911vw, 20rem), 70vw);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.hero .project-carousel>.sketch-card {
  width: min(clamp(15rem, 13.6783rem + 5.0955vw, 17.5rem), 70vw);
  transform-origin: top;
}

/* 
@supports (animation-timeline: view()) {
  .hero .project-carousel>.sketch-card {
    /* cambio de tamaño y opacidad al recorrer el scroller
    animation: scroller linear both;
    animation-timeline: view(x);
  }
}
*/

.hero .project-carousel {
  gap: 0;
}

/* @keyframes scroller {

  0%,
  100% {
    scale: .90;
    opacity: .05;
    translate: -10%;
  }

  35%,
  65% {
    scale: 1.02;
    opacity: 1;
    translate: 0%;
  }
} */

/* fin de cambio de tamaño y opacidad al recorrer el scroller */

#proyectos .project-carousel>.sketch-card {
  @media (width < 1024px) {
    display: flex;
    flex-direction: column-reverse;
  }

  @media (width >=1024px) {
    h3 {
      opacity: 1;

      a {
        color: var(--color-contrast);
        font-size: .75em;

        &:is(:hover, :focus) {
          color: var(--color-text-primary);
        }
      }
    }
  }

}

/* Legacy grid styles - kept for other sections */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-lg);
  padding: 0 0var(--space-2xl) 0;
}

/* ============================================== */
/*  BUTTONS                                       */
/* ============================================== */

/* Button Base */
.btn {
  display: inline-grid;
  place-items: center;
  gap: var(--space-sm);
  font-family: var(--font-headline);
  font-weight: 500;
  /* font-size: 0.875rem;
  text-transform: uppercase; */
  letter-spacing: 0.1em;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 2px solid var(--color-contrast);
  position: relative;
  transition: color var(--duration-sm) var(--ease-expo);

  outline: none;
}

.btn:hover {
  background: var(--color-bg-dark);
  border-color: var(--color-accent);
  color: var(--color-text-on-dark);
}

/* Primary Button Modifier */
.btn--primary {
  background: var(--color-contrast);
  color: var(--color-text-on-dark);
}

.btn--primary:is(:hover, :focus) {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-dark);
}

/* Secondary Button Modifier - stays as outline */
.btn--secondary {
  background: transparent;
  color: var(--color-contrast);
}

.btn--secondary:is(:hover, :focus) {
  background: var(--color-bg-dark);
  border-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

/* ============================================== */
/*  FILTER BUTTONS                                */
/* ============================================== */

.filter-btn {
  background: transparent;
  border: 3px solid hsl(from var(--color-contrast) h s l / 0);
  padding: var(--space-sm) var(--space-md);
  outline: none;
  color: var(--color-contrast);
  font-family: var(--font-condensed);
  font-variation-settings: 'wdth' 70;
  font-weight: 500;
  font-size: clamp(1rem, 0.8296rem + 0.6568vw, 1.25rem);
  letter-spacing: 0.05em;
  /* text-transform: capitalize; */
  transition: all var(--duration-sm) var(--ease-expo);
}

.filter-btn:is(:hover, :focus) {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border-color: hsl(from var(--color-contrast) h s l / 35%);
}

.filter-btn.active {
  background: var(--color-contrast);
  border-color: var(--color-contrast);
  color: var(--color-bg-primary);
  border-style: solid;
  filter: none;
}

/* ============================================== */
/*  THEME & LANGUAGE SELECTORS                    */
/*  Selectores de tema e idioma                   */
/* ============================================== */

.theme-selector,
.language-selector {
  border: none;
  padding: 0;
  margin: 0;
}

.theme-selector legend,
.language-selector legend {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
  color: var(--color-text-on-dark);
  text-align: center;
}

.theme-selector {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.language-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  justify-content: center;
}

.theme-option,
.language-option {
  display: grid;
  place-items: center;
  gap: var(--space-xs);
  border: 2px solid transparent;
  /* border-radius: 8px; */
  transition:
    border-color var(--duration-sm) var(--ease-expo),
    background-color var(--duration-sm) var(--ease-expo),
    transform var(--duration-sm) var(--ease-expo);
  color: var(--color-text-on-dark);
  padding: var(--space-md);
}

.theme-option {
  width: 4rem;
  aspect-ratio: 1;
  /* border-radius: 50%; */
  padding: 0;
}

.theme-option input,
.language-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-option svg,
.language-option svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: currentColor;
  transition: transform var(--duration-sm) var(--ease-expo);
}

.option-label {
  font-family: var(--font-condensed);
  font-variation-settings: 'wdth' 70;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.lang-flag {
  font-size: 2rem;
  display: block;
}

.theme-option:hover,
.language-option:hover {
  color: var(--color-accent);
  border-color: hsl(from var(--color-accent) h s l / 40%);
  background: hsl(from var(--color-accent) h s l / 10%);
}

.theme-option:hover svg,
.language-option:hover svg {
  transform: scale(1.1);
}

.theme-option:has(input:checked),
.language-option:has(input:checked) {
  border-color: var(--color-accent);
  background: hsl(from var(--color-accent) h s l / 20%);
  color: var(--color-accent);
}

.language-option:has(input:checked) .option-label,
.theme-option:has(input:checked) .option-label {
  opacity: 1;
  font-weight: 700;
}

.theme-option:has(input:focus-visible),
.language-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* =============================================================================
   [06-SECT] 6. SECTIONS
   ========================================================================== */

/* ============================================== */
/*  HEADER & NAVIGATION                           */
/* ============================================== */

header {
  display: flex;
  justify-content: center;
  /* Centrar el contenedor interno */
  align-items: center;
  padding: var(--space-md) 0;
  /* Padding horizontal eliminado, vertical mantenido */
  position: sticky;
  top: 0;
  z-index: 10000;
  /* border-bottom: 4px solid hsl(from var(--color-contrast) h s l / 20%); */

  transition: background 0.4s, border-color 0.4s;
  width: 100%;
}

header .container {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  align-items: center;

  @media (width < 600px) {
    width: min(100% - var(--container-padding),
        var(--container-max-width));
  }

  @media (width < 480px) {
    width: min(100%,
        var(--container-max-width));
  }
}

/* Estado del encabezado cuando el menú o las opciones están abiertas */
.menu-open header,
.options-open header {
  background: transparent;
  border-color: transparent;
}

.menu-open .logo,
.options-open .logo {
  opacity: 0;
  pointer-events: none;
}

.logo {
  font-family: var(--font-condensed);
  font-variation-settings: 'wdth' 70;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  position: relative;

  a {
    outline: none;

    &:is(:hover, :focus)::after {
      content: '';
      position: absolute;
      inset: -.5em -2em;
      z-index: -1;
      background: var(--fondo-ultra);
      transition: 0.4s;
    }

  }

  span {
    font-weight: 400;
    color: var(--color-text-secondary);
  }

  /* Texto del logotipo responsivo: mostrar versión completa por defecto */
  .logo__short {
    display: none;
  }

  @media (max-width: 479px) {
    .logo__full {
      display: none;
    }

    .logo__short {
      display: inline;
    }
  }
}

@media (max-width: 768px) {
  header {
    padding: var(--space-md) var(--space-lg);
  }
}

/* ============================================== */
/*  HEADER ACTIONS                                */
/* ============================================== */

/* Contenedor para nav y options-btn */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ============================================== */
/*  MAIN NAVIGATION                               */
/* ============================================== */

.main-nav {
  display: flex;
  align-items: center;
}

/* Lista de navegación - Móvil (< 900px) */
.nav-list {
  list-style: none;
  margin: 0;
  padding: var(--space-3xl) var(--space-xl);

  /* Fullscreen overlay en móvil */
  position: fixed;
  inset: 0;
  height: 101dvh;

  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  z-index: 9000;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg);

  /* Animación con clip-path */
  clip-path: circle(0% at 100% 0%);
  transition: clip-path var(--duration-lg) var(--ease-expo),
    visibility var(--duration-lg);
  pointer-events: none;
  visibility: hidden;

  @media (max-width: 768px) {
    padding: var(--space-2xl) var(--space-lg);
  }
}

/* Lista de navegación - Activa en móvil */
.nav-list.active {
  clip-path: circle(150% at 100% 0%);
  pointer-events: auto;
  visibility: visible;
}

/* Enlaces de navegación - Estado base (móvil) */
.nav-link {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(3rem, 0.7568rem + 8.6486vw, 8rem);
  line-height: 1;
  letter-spacing: 0;
  font-variation-settings: 'wght' 200;
  hyphens: auto;
  word-wrap: break-word;

  opacity: 0;
  transform: translateY(20px);
  transition: .6s;
}

.nav-list.active .nav-link {
  opacity: 1;
  transform: translateY(0);
}

/* Delays escalonados para animación de entrada */
.nav-list li:nth-child(1) .nav-link {
  transition-delay: 0.1s;
}

.nav-list li:nth-child(2) .nav-link {
  transition-delay: 0.2s;
}

.nav-list li:nth-child(3) .nav-link {
  transition-delay: 0.3s;
}

.nav-list li:nth-child(4) .nav-link {
  transition-delay: 0.4s;
}

/* Hover/focus en enlaces */
.nav-link:is(:hover, :focus) {
  font-weight: 700;
  font-variation-settings: 'wght' 700;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  outline: none;
}

:root[data-theme="dark"] .nav-link:is(:hover, :focus) {
  font-weight: 700;
  font-variation-settings: 'wght' 700;
}

/* ============================================== */
/*  DESKTOP NAVIGATION (>= 900px)                 */
/* ============================================== */

@media (min-width: 900px) {

  /* Ocultar burger button en desktop */
  .burger-btn {
    display: none !important;
  }

  /* Resetear lista a layout horizontal */
  .nav-list {
    /* Anular estilos de móvil */
    position: static;
    height: auto;
    background: transparent;
    padding: 0;

    /* Visible siempre en desktop */
    clip-path: none;
    visibility: visible;
    pointer-events: auto;

    /* Layout horizontal */
    flex-direction: row;
    gap: var(--space-sm);
    align-items: center;
  }

  /* Reset márgenes de li (heredados de typography.css) */
  .nav-list li {
    margin: 0;
  }

  /* Reset enlaces para desktop */
  .nav-link {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1em;
    font-weight: 350;
    font-variation-settings: 'wght' 350;
    letter-spacing: 0.02em;
    line-height: 1;

    /* Visible siempre */
    opacity: 1;
    transform: none;
    transition: color 0.3s, font-weight 0.3s;

    color: var(--color-contrast);
    padding: var(--space-xs) var(--space-sm);
  }

  .nav-link:is(:hover, :focus),
  .nav-link.current {
    color: var(--color-text-primary) !important;
    font-weight: 300;
    font-variation-settings: 'wght' 300;
    letter-spacing: 0.02em;
  }

  /* solo en tema claro */
  :root[data-theme="light"] .nav-link.current {
    font-variation-settings: 'wght' 400;
  }

  /* Resetear delays */
  .nav-list li .nav-link {
    transition-delay: 0s;
  }
}

/* ============================================== */
/*  OPTIONS OVERLAY                               */
/* ============================================== */

.options-overlay {
  position: fixed;
  height: 101dvh;
  inset: 0;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-3xl) var(--space-xl);

  @media (max-width: 768px) {
    padding: var(--space-2xl) var(--space-lg);
  }

  clip-path: circle(0% at 100% 0%);
  transition: clip-path var(--duration-lg) var(--ease-expo),
  visibility var(--duration-lg);
  pointer-events: none;
  visibility: hidden;
}

.options-overlay.active {
  clip-path: circle(150% at 100% 0%);
  pointer-events: auto;
  visibility: visible;
}

.options-container {
  display: grid;
  gap: var(--space-3xl);
  max-width: 800px;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.options-overlay.active .options-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* ============================================== */
/*  BUTTONS (Options & Burger)                    */
/* ============================================== */

.options-btn {
  position: relative;
  z-index: 9001;
  width: clamp(1.75rem, 1.5796rem + 0.6568vw, 2rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  outline: none;
  fill: var(--color-contrast);
}

.options-btn:is(:hover, :focus) {
  fill: var(--texto-ultra);
}

.burger-btn {
  position: relative;
  z-index: 9001;
  width: clamp(1.75rem, 1.5796rem + 0.6568vw, 2rem);
  height: clamp(1.25rem, 1rem + 0.8333vw, 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-contrast);
  transition: transform 0.3s var(--ease-expo), background 0.3s;
}

.burger-btn:is(:hover, :focus) span {
  background: var(--texto-ultra);
}

body:not(.menu-open) :is(.options-btn, .burger-btn):focus::after {
  content: '';
  position: absolute;
  inset: -1.5em -1em -1.5em -1em;
  border-radius: 50%;
  z-index: -1;
  background: hsl(from var(--color-bg-secondary) h s l / 20%);
  transition: .6s;
}

body:not(.menu-open) .options-btn:focus::after {
  inset: -1em;
}

.menu-open .burger-btn span {
  background: var(--color-text-on-dark);
}

/* Índices 2, 3, 4 debido a .sr-only en el índice 1 */
.menu-open .burger-btn span:nth-child(2) {
  transform: translateY(11px) rotate(45deg);
}

.menu-open .burger-btn span:nth-child(3) {
  opacity: 0;
}

.menu-open .burger-btn span:nth-child(4) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ============================================== */
/*  HERO SECTION                                  */
/* ============================================== */

.hero {
  position: relative;
  /* height: 200vh; */
  /* Rastro para animación de desplazamiento */
  overflow-x: clip;
  /* Ocultar boceto fuera de pantalla sin desplazamiento horizontal */
  /* padding-block-end: var(--space-xl); */
  min-height: calc(100dvh - var(--header-height));
}

.hero .container {
  height: auto;
}

.hero__title {
  margin-bottom: var(--space-lg);
  max-width: 900px;
}

.hero__title [data-i18n="hero.hero-kicker"] {
  color: hsl(from currentColor h s l / 50%);
  margin-block-end: var(--space-sm);
  font-size: clamp(1rem, 0.8929rem + 0.4762vw, 1.25rem);
  font-weight: 300;
  line-height: 1.2;
  text-wrap: balance;

  &+* {
    margin-block-start: 0;
  }
}

/* Espaciado del lema de hero section */
.hero__title .text-technical {
  padding-block: var(--space-md);
}

/* Meta de hero section con retraso - aplica al segundo bloque de revelación en hero */
.hero__meta {
  transition-delay: 0.2s;
}

.hero__meta p {
  max-width: 65ch;
  text-wrap: balance;
}

/* Contenedor de botones CTA de hero section */
.hero__actions {
  display: grid;
  gap: var(--space-lg);
  margin-block: var(--space-3xl) var(--space-2xl);
  margin-inline-start: auto;
  width: min(100%, 500px);

  a {
    position: relative;
    font-weight: 200;
    display: block;
    padding-inline-end: var(--space-sm);
    outline: none;
  }

  a::after,
  a::before {
    content: '';
    position: absolute;
    inset: 0 -100% -1rem 0;
    z-index: -1;
    border-block-end: 2px solid transparent;
    transition: var(--duration-xl);
    transform: scaleX(0);
    transform-origin: left;
  }

  a::before {
    transform: scaleX(1);
    border-block-end-color: hsl(from currentColor h s l / 0.15);
  }

  a:is(:hover, :focus-visible):after {
    border-block-end-color: hsl(from currentColor h s l / 0.75);
    transform: scaleX(1);
    outline: none;
  }

  /* a:last-of-type {
    color: hsl(from currentColor h s l / 0.5);
  } */
}

/* Hero Slider Wrapper - Carousel de proyectos en hero */
.hero-slider-wrapper {
  background-color: var(--color-bg-primary);

  @media (width >=1024px) {
    position: sticky;
    top: var(--header-height, 104px);
    z-index: 1;
  }
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-carousel__item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.75) contrast(1.1);
  opacity: 0;
  transition: opacity 1.5s var(--ease-expo);
}

.hero-carousel__item.active {
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .hero {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 1200px) {
  .hero__content {
    max-width: 100%;
  }
}

/* ============================================== */
/*  ARQUITECTURA SECTION                          */
/* ============================================== */

.container.contenidos-arq {
  display: grid;
  gap: var(--space-xl);
  align-items: start;

  @media (width >=1024px) {
    /* grid-template-columns: 500px 1fr; */
    gap: var(--space-xl);
  }
}

.contenidos-arq svg {
  fill: var(--color-contrast);
  scale: 1.75;
  display: grid;
  place-items: center;
  margin-block-end: 1em;
  transform-origin: center left;
}

/* Párrafo de introducción pegajoso */
.intro-sticky {
  position: relative;

  /* Asegurar que ::after esté anclado correctamente en todas las pantallas */
  @media (width >=1024px) {
    position: sticky;
    top: 185px;
    /* Encabezado (85px) + espacio pegajoso del título de la sección */
  }

  align-self: start;
  z-index: 10;
  /* background: var(--color-bg-primary); */
  padding-block: var(--space-xl) var(--space-md);
  margin-inline-start: calc(-1 * var(--space-md));
  padding-inline-start: var(--space-md);

  &::after {
    position: absolute;
    content: "";
    display: block;
    width: 100%;
    height: 1em;
    border-block-end: solid 6px hsl(from var(--color-contrast) h s l / 20%);
    /* Anclar a la derecha para coincidir con la lógica h1::after */
    right: 0;
    /* Lógica: Comenzar en -100vw (izquierda de la pantalla), moviéndose a -1em (margen derecho) */
    transform: translateX(calc(-100vw + (100vw - 1em) * var(--intro-progress, 0)));
    opacity: calc(var(--intro-progress, 0) * 0.7);

    pointer-events: none;
    transition: none !important;
    /* Prevenir saltos/retrasos */
  }
}

/* Lista de servicios que se desplaza debajo de la introducción pegajosa */
.servicios-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
  gap: var(--space-xl) var(--space-md);
  padding-block: var(--space-2xl) var(--space-xl);

  >* {
    text-wrap: balance;
    display: grid;
    gap: var(--space-lg);

    >* {
      margin: 0;
    }

    h3 span {
      line-height: 2.5rem !important;
    }

  }

  article p {
    color: hsl(from currentColor h s l / 75%);
    align-self: end;
  }

  /* Mayor opacidad en tema claro */
  :root[data-theme="light"] & article p {
    color: hsl(from currentColor h s l / 85%);
  }

  /* Relleno de artículos de servicios */
  article {
    padding: var(--space-md) var(--space-lg);
    position: relative;
    border-radius: var(--radius-lg);
    /* Ancla para el tooltip */
  }

  /* ==============================================
     TOOLTIP: p[data-i18n] como tooltip en hover/focus
     ============================================== */

  article p[data-i18n] {
    /* Posicionamiento absoluto */
    position: absolute;
    inset-inline: 0;
    bottom: -2lh;
    z-index: 100;
    margin: 0;
    padding: var(--space-sm) var(--space-lg);

    /* Estilos visuales del tooltip */
    background: var(--color-bg-elevated, var(--color-bg-secondary));
    box-shadow: 0 4px 20px hsl(0 0% 0% / 15%);
    font-size: var(--font-size-sm, 0.875rem);
    line-height: 1.5;

    /* ========================================
       FALLBACK (Alternativa 4): clip-path
       Funciona en todos los navegadores
       ======================================== */
    clip-path: inset(50%);
    opacity: 0;
    transform: translateY(-0.5rem);
    pointer-events: none;

    transition:
      opacity 0.35s var(--ease-out, ease-out),
      transform 0.35s var(--ease-out, ease-out),
      clip-path 0s 0.35s;
    /* Delay clip-path al ocultar */
  }

  /* Estado visible: hover o focus-within */
  article:hover p[data-i18n],
  article:focus-within p[data-i18n] {
    clip-path: inset(0);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;

    transition:
      opacity 0.35s var(--ease-out, ease-out),
      transform 0.35s var(--ease-out, ease-out),
      clip-path 0s;
    /* Sin delay al mostrar */
  }

  /* ========================================
     MODERNO (Alternativa 3): @starting-style
     Chrome 117+, Safari 17.4+
     ======================================== */
  @supports (transition-behavior: allow-discrete) {
    article p[data-i18n] {
      /* Resetear fallback, usar visibility */
      clip-path: none;
      visibility: hidden;

      transition:
        opacity 0.35s var(--ease-out, ease-out),
        transform 0.35s var(--ease-out, ease-out),
        visibility 0.35s;
      transition-behavior: allow-discrete;
    }

    article:hover p[data-i18n],
    article:focus-within p[data-i18n] {
      clip-path: none;
      visibility: visible;
    }

    /* Animación de entrada desde estado inicial */
    @starting-style {

      article:hover p[data-i18n],
      article:focus-within p[data-i18n] {
        opacity: 0;
        transform: translateY(-0.5rem);
      }
    }
  }

  /* Feedback visual para navegación por teclado */
  article:focus-visible {
    outline: 4px dotted hsl(from var(--color-contrast) h s l / 30%);
    outline-offset: var(--space-md);
  }
}

#projekte {
  scroll-margin-top: var(--header-height);
}

/* ============================================== */
/*  ESTUDIO SECTION                               */
/* ============================================== */

#estudio> :last-child {
  margin-block-end: 0;
  padding-block-end: 0;
}

.buro-grid {
  display: grid;
  gap: var(--space-xl) var(--space-lg);
  margin-block: var(--space-2xl) var(--space-3xl);

  @media (width >=900px) {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    margin-block: var(--space-3xl) var(--space-xl);
  }

  /* > :first-child {
    background-color: var(--color-bg-primary);
    text-wrap: balance;
    margin: calc(var(--space-lg) * -1);
    padding: var(--space-lg);

    @media (width >=900px) {
      grid-column: 1 / -1;
      align-self: start;
      z-index: 1;
    }

    >p {
      margin-bottom: var(--space-lg);
    }
  } */

  >article {
    >* {
      text-wrap: balance;
    }

    p {
      align-self: end;
      color: hsl(from currentColor h s l / 50%);
    }

    /* Mayor opacidad en tema claro */
    :root[data-theme="light"] & p {
      color: hsl(from currentColor h s l / 60%);
    }

  }

  >article.reveal-block {
    /* Animación controlada por posición de desplazamiento de JavaScript */
    opacity: var(--reveal-opacity, 0) !important;
    transform: translateX(var(--reveal-translate, 200px)) !important;
    /* Movemos desde más lejos (100px) para que sea más evidente */
    transition: none !important;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: var(--space-sm);


    &::before {
      background-color: var(--color-bg-primary);
    }
  }

  svg {
    fill: var(--color-contrast);
    scale: 1.75;
    display: grid;
    place-items: center;
    margin-block-end: 1.5em;
    transform-origin: bottom left;
  }
}

[data-i18n="buro.titulares"] {
  margin-block-end: var(--space-lg);
}

.empleados-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-md) var(--space-xl);
  padding-block: var(--space-xl);

  >* {
    margin: 0;

    &:nth-child(3n) {
      color: hsl(from var(--color-text-primary) h s l / 50%);
    }

    &:nth-child(3n + 1) {
      color: hsl(from var(--color-text-primary) h s l / 100%);
    }

    &:nth-child(3n + 2) {
      color: hsl(from var(--color-text-primary) h s l / 75%);
    }

    @media (width >=900px) {
      &:nth-child(odd) {
        color: var(--color-text-primary);
      }

      &:nth-child(even) {
        color: var(--color-text-secondary);
      }

    }
  }
}

/* ============================================== */
/*  DESIGN SECTION                                */
/* ============================================== */

#design {
  padding-block-start: var(--space-xl);
  min-height: calc(100dvh - var(--header-height, 85px));
  scroll-margin-top: var(--header-height, 85px);
}

/* Estilos del menú de filtro */
.design-filter {
  position: sticky;
  top: var(--sticky-offset, 190px);

  @media (width >=900px) {
    top: var(--header-height, 85px);
  }

  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-lg);
  padding-block-start: var(--space-2xl);
}

#design .project-carousel .sketch-card__image {
  object-fit: cover;
  object-position: top;
}


/* ============================================== */
/*  STICKY SECTION HEADERS                        */
/* ============================================== */

.section-sticky-header {
  position: sticky;
  top: var(--header-height, 85px);
  /* Ajustar para coincidir con la altura del encabezado - ahora usando variable CSS */
  /* background: var(--color-bg-primary); */
  z-index: 900;
  width: 100%;
  margin-top: calc(var(--space-md) * -1);
  margin-bottom: var(--space-xl);

  /* NO sticky en pantallas >= 900px (menú visible marca la sección) */
  @media (width >=900px) {
    position: relative;
    top: unset;
  }
}

.section-title-sticky {
  padding: var(--space-md) 0;
  margin: 0;
}

/* Nota: La consulta de medios para pantallas más pequeñas no es necesaria
   ya que --header-height se ajusta automáticamente al tamaño real del encabezado */

/* ============================================== */
/*  FOOTER & CONTACT                              */
/* ============================================== */

footer {
  font-variation-settings: 'wght' 250;
  padding-block-end: var(--space-lg) !important;

  .logo {
    margin-block-start: var(--space-lg);
  }

  strong,
  a {
    font-variation-settings: 'wght' 400;
  }
}

.texto_contenido {
  position: relative;
  display: grid;

  @media (width >=1200px) {
    grid-template-columns: 800px 1fr;
    gap: var(--space-xl);
  }
}

.direcciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(12.5em, 100%), 1fr));
  gap: 2rem;
  line-height: 1.5;

  +p {
    margin-block-start: var(--space-lg);
  }
}

address {
  font-size: 1.25em;
  margin-block-start: 1em;
  font-style: normal;
}

#contacto a {
  display: inline-block;
  position: relative;
  font-weight: 700;
  transition: .5s;
  outline: none;

  &::after {
    content: "";
    position: absolute;
    inset: 0 -1em;
    z-index: -1;
    background-color: transparent;
  }

  &:is(:hover, :focus-visible) {
    color: var(--texto-ultra);
  }

  &:is(:hover, :focus-visible)::after {
    background-color: var(--fondo-ultra);
    transition: .5s;
  }

}

.footer-wrapper {
  position: relative;
  overflow: hidden;
  margin-right: calc(-1 * max(var(--container-padding),
        (100vw - var(--container-max-width)) / 2));

  /* Variables de animación */
  opacity: var(--footer-opacity, 0);
  transform: translateX(var(--footer-translate, 90%));

  @media (width < 1200px) {
    display: none;
  }
}


/* =============================================================================
   [07-UTIL] 7. UTILITIES & HELPERS
   ========================================================================== */

/* ------------------------------------------ */
/*  SKETCH FILTERS & BORDERS                  */
/* ------------------------------------------ */

.irregular {
  position: relative;
}

.irregular::after {
  content: '';
  position: absolute;
  inset: 0;
  /* border: 3px solid var(--color-contrast); */
  pointer-events: none;
  z-index: 10;
}

.fondo-irregular {
  position: relative;
}

.fondo-irregular::before {
  content: '';
  position: absolute;
  inset: -10px;
  z-index: -1;
  /* border-radius: 8px; */
  background-color: var(--color-bg-secondary);
}


#proyectos .fondo-irregular::before {
  background-color: hsl(from var(--color-bg-primary) h s l / 50%);
}

/* ------------------------------------------ */
/*  GRID SHIFT HELPERS                        */
/* ------------------------------------------ */

.shifted-up {
  transform: translateY(-var(--space-xl));
}

.shifted-down {
  transform: translateY(var(--space-xl));
}

@media (max-width: 768px) {

  .shifted-up,
  .shifted-down {
    transform: none;
  }
}

/* ------------------------------------------ */
/*  REVEAL ANIMATIONS                         */
/* ------------------------------------------ */

.reveal-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-lg) var(--ease-expo), transform var(--duration-lg) var(--ease-expo);
}

.reveal-block.active {
  opacity: 1;
  transform: translateY(0);
}

/* Section Header Parallax Wrapper */
.reveal-text-wrap {
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.reveal-text-wrap h2 {
  transition: transform var(--duration-lg) var(--ease-expo);
  transform: translateY(100%);
}

.reveal-text-wrap.active h2 {
  transform: translateY(0);
}

/* ------------------------------------------ */
/*  INTERACTIVE CURSOR                        */
/* ------------------------------------------ */

/* Solo activar cursor personalizado en dispositivos con hover (mouse/trackpad) */
@media (hover: hover) {

  body,
  a,
  button,
  article,
  .filter-btn,
  .theme-option,
  .language-option,
  .options-btn,
  .burger-btn {
    cursor: none;
  }
}

/* Ocultar cursor personalizado en dispositivos táctiles */
@media (hover: none) {
  .custom-cursor {
    display: none;
  }
}

.custom-cursor {
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: exclusion;
  transition: transform 0.15s ease-out;
  transform: translate(-50%, -50%);
}

.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(4);
}


/* ------------------------------------------ */
/*  Contenidos a la derecha                   */
/* ------------------------------------------ */

.content-right {
  margin-inline-start: auto;

  @media (width >=1024px) {
    max-width: min(85vw, 1000px);
  }
}

