/*
Theme Name: Creativo Estudio
Theme URI: https://creativoestudio.com.co
Author: ARTEFACTO.CO
Description: Tema custom para estudio de arquitectura Creativo Estudio diseñado y desarrollado por ARTEFACTO.CO © 2026
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: creativoestudio
*/

/* ============================================================
   TOKENS & VARIABLES GLOBALES
   ============================================================ */
:root {
  /* Colores */
  --color-bg:        #f1f1f1;
  --color-bg-dark:   #1a1916;
  --color-text:      #1a1916;
  --color-text-muted:#6b6860;
  --color-accent:    #e8c547;
  --color-white:     #ffffff;
  --color-border:    rgba(26,25,22,0.12);

  /* Tipografía */
  --font-serif:      'Aileron', system-ui, sans-serif;
  --font-sans:       'Aileron', system-ui, sans-serif;

  /* Espaciado */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Layout */
  --max-width:     1440px;
  --gutter:        40px;
  --header-height: 147px; /* logo 65px + padding 36px × 2 */

  /* Transiciones */
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration:  0.4s;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

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

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

ul, ol { list-style: none; }

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

/* ============================================================
   TIPOGRAFÍA BASE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.15;
}

.label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.label--accent { color: var(--color-text); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ============================================================
   CURSOR CUSTOM
   ============================================================ */

/* ============================================================
   COMPONENTE GLOBAL: FLECHA  (31 × 8 px)
   Triángulo relleno + línea de 1px.
   En hover la línea se borra lejos del ▲ y se redibuja hacia él.

   Matemática stroke-dashoffset (dash=23, gap=23, period=46):
     Visible en posición p si  (p − d) mod 46 < 23
     d = 0  → línea completa
     d → +23 → la IZQUIERDA del path desaparece primero
     d → −23 → la DERECHA del path desaparece primero

   Flecha → (x1=0, x2=23): erase izq (d 0→23), redraw izq→der (d -23→0)
   Flecha ← (x1=8, x2=31): erase der (d 0→-23), redraw der→izq (d 23→0)
   ============================================================ */
.site-arrow {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  color: #1a1916;
}

.site-arrow svg {
  display: block;
  width: 31px;
  height: 8px;
  overflow: visible;
}

.site-arrow__line {
  stroke-dasharray: 23;
  stroke-dashoffset: 0;
}

/* Flecha derecha (→): erase izquierda primero, redibuja izq→der */
.site-arrow--next:hover .site-arrow__line {
  animation: site-arrow-next 0.55s ease forwards;
}

@keyframes site-arrow-next {
  0%   { stroke-dashoffset: 0; }
  44%  { stroke-dashoffset: 23; }
  45%  { stroke-dashoffset: -23; }
  100% { stroke-dashoffset: 0; }
}

/* Flecha izquierda (←): erase derecha primero, redibuja der→izq */
.site-arrow--prev:hover .site-arrow__line {
  animation: site-arrow-prev 0.55s ease forwards;
}

@keyframes site-arrow-prev {
  0%   { stroke-dashoffset: 0; }
  44%  { stroke-dashoffset: -23; }
  45%  { stroke-dashoffset: 23; }
  100% { stroke-dashoffset: 0; }
}

/* ── WhatsApp link ── */
.wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  color: inherit;
}
.wa-link:hover { color: var(--color-text); }

/* ============================================================
   ANIMACIONES DE ENTRADA (SCROLL)
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.page-transition.is-leaving { opacity: 1; pointer-events: all; }
