/* =========================================================================
   ALORA VÉLEZ — Global CSS
   01. Tokens de diseño
   02. Reset y base
   03. Utilidades y layout
   04. Componentes: botones, marca, chips, link-u
   05. Header + nav + drawer
   16. Footer + mobile-bar + wa-float + to-top
   17. Animaciones de aparición
   18. Responsive global
   ========================================================================= */

/* ============ 01. TOKENS ============ */
:root {
  --ink:        #0A0B0D;
  --ink-2:      #101216;
  --ink-3:      #171A1F;
  --ink-line:   rgba(246,244,240,.11);
  --ink-line-2: rgba(246,244,240,.22);

  --paper:      #F6F4F0;
  --paper-2:    #EFEBE4;
  --paper-3:    #E3DED4;

  --text:       #12141A;
  --text-2:     #4A4F59;
  --text-3:     #7A8089;
  --on-ink:     #F6F4F0;
  --on-ink-2:   rgba(246,244,240,.66);
  --on-ink-3:   rgba(246,244,240,.42);

  --gold:       #C0A265;
  --gold-soft:  #DFC894;
  --gold-dim:   rgba(192,162,101,.16);

  --font-display: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step--1: clamp(.8rem, .78rem + .1vw, .875rem);
  --step-0:  clamp(.95rem, .92rem + .15vw, 1.0625rem);
  --step-1:  clamp(1.1rem, 1.03rem + .3vw, 1.3rem);
  --step-2:  clamp(1.45rem, 1.3rem + .7vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.9rem);
  --step-4:  clamp(2.4rem, 1.8rem + 2.6vw, 4.2rem);
  --step-5:  clamp(2.9rem, 1.9rem + 4.2vw, 5.6rem);

  --pad-x:       clamp(1.25rem, 4vw, 3.5rem);
  --section-y:   clamp(4.5rem, 9vw, 8.5rem);
  --maxw:        1240px;
  --maxw-narrow: 780px;
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;

  --ease:     cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ============ 02. RESET Y BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-locked { overflow: hidden; }

img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -.02em; line-height: 1.06; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--gold); color: var(--ink); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: var(--on-ink);
  padding: .75rem 1.25rem; border-radius: var(--r-sm);
  font-size: var(--step--1); font-weight: 500;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ============ 03. UTILIDADES Y LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Evita que celdas de grilla estiren la página con contenido ancho */
.soc__layout > *, .contact > *, .loc > *, .faq > *, .about > *,
.rubros__layout > *, .cards > *, .steps > * { min-width: 0; }

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

.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--noise); opacity: .035; mix-blend-mode: screen;
}
.section--paper-2 { background: var(--paper-2); }

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; }
.display em { font-style: italic; color: var(--gold); }
.section--ink .display em { color: var(--gold-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
}
.section--ink .eyebrow { color: var(--on-ink-3); }
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--gold); flex: none;
}

.section-head { max-width: 720px; }
.section-head h2 { font-size: var(--step-3); margin-top: 1.1rem; }
.section-head p {
  margin-top: 1.15rem; color: var(--text-2);
  font-size: 1rem; line-height: 1.7; max-width: 52ch; letter-spacing: -.002em;
}
.section--ink .section-head p { color: var(--on-ink-2); }

.section-head--center { max-width: 780px; margin-inline: auto; text-align: center; }
.section-head--center h2 { font-size: var(--step-3); }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center p { margin-inline: auto; }

.lead { font-size: 1rem; line-height: 1.7; color: var(--text-2); }
.muted { color: var(--text-2); }
.rule { height: 1px; background: var(--paper-3); border: 0; margin: 0; }
.section--ink .rule { background: var(--ink-line); }

/* ============ 04. COMPONENTES ============ */

/* -- Marca -- */
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__mark path, .brand__mark rect, .brand__mark circle {
  transition: stroke .4s var(--ease), opacity .4s var(--ease);
}
.brand:hover .brand__mark .mk-geo { opacity: 1; stroke: var(--gold); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-size: 1.16rem; letter-spacing: .005em; }
.brand__tag {
  font-size: .575rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--on-ink-3); margin-top: .32rem; font-weight: 500; white-space: nowrap;
}

/* -- Botones -- */
.btn {
  --btn-bg: var(--gold); --btn-fg: var(--ink); --btn-bd: var(--gold);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem; border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--step--1); font-weight: 600; letter-spacing: .02em;
  border-radius: 999px; cursor: pointer; overflow: hidden; white-space: nowrap;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn svg { position: relative; z-index: 1; width: 16px; height: 16px; transition: transform .35s var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(192,162,101,.65); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--paper-3); }
.btn--ghost:hover { --btn-bd: var(--text); box-shadow: none; }
.section--ink .btn--ghost, .hero .btn--ghost,
.cookies .btn--ghost, .mobile-bar .btn--ghost { --btn-fg: var(--on-ink); --btn-bd: var(--ink-line-2); }
.section--ink .btn--ghost:hover, .hero .btn--ghost:hover,
.cookies .btn--ghost:hover, .mobile-bar .btn--ghost:hover { --btn-bd: var(--on-ink); background: rgba(246,244,240,.06); }

.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--on-ink); --btn-bd: var(--ink); }
.btn--dark:hover { box-shadow: 0 12px 28px -12px rgba(10,11,13,.5); }
.btn--sm { padding: .7rem 1.25rem; }
.btn--block { width: 100%; }
.btn--wa {
  --btn-bg: rgba(37,211,102,.13); --btn-fg: #86EFB4; --btn-bd: rgba(37,211,102,.45);
}
.btn--wa:hover {
  --btn-bg: rgba(37,211,102,.2); --btn-bd: rgba(37,211,102,.75); --btn-fg: #A7F5C9;
  box-shadow: none;
}
.btn--wa svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* -- Link con subrayado animado -- */
.link-u {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--step--1); font-weight: 600; letter-spacing: .02em;
  padding-bottom: 2px; background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .4s var(--ease-out), color .3s var(--ease);
}
.link-u:hover { background-size: 100% 1px; color: var(--gold); }
.link-u svg { width: 14px; height: 14px; transition: transform .35s var(--ease-out); }
.link-u:hover svg { transform: translateX(3px); }

/* -- Chips -- */
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .9rem; border: 1px solid var(--ink-line);
  border-radius: 999px; font-size: .76rem; letter-spacing: .02em; color: var(--on-ink-2);
  backdrop-filter: blur(6px); background: rgba(246,244,240,.03);
  transition: border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease-out);
}
.chip:hover { border-color: var(--gold); color: var(--on-ink); transform: translateY(-2px); }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex: none; }

/* ============ 05. PROGRESO + HEADER ============ */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; z-index: 120;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .45s var(--ease), border-color .45s var(--ease), backdrop-filter .45s var(--ease), padding .45s var(--ease);
  border-bottom: 1px solid transparent;
  padding-block: 1.15rem;
}
.header.is-stuck {
  background: rgba(10,11,13,.82);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--ink-line);
  padding-block: .7rem;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.header .brand { color: var(--on-ink); }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  position: relative; padding: .55rem .85rem; border-radius: 999px;
  font-size: .84rem; font-weight: 500; letter-spacing: .01em; color: var(--on-ink-2);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: .28rem; width: 0; height: 1px;
  background: var(--gold); transform: translateX(-50%);
  transition: width .35s var(--ease-out);
}
.nav a:hover { color: var(--on-ink); }
.nav a:hover::after { width: 16px; }
.nav a.is-active { color: var(--on-ink); }
.nav a.is-active::after { width: 16px; }

.header__cta { display: flex; align-items: center; gap: .9rem; }
.header__phone {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 500; color: var(--on-ink-2);
  white-space: nowrap; transition: color .3s var(--ease);
}
.header__phone:hover { color: var(--gold); }
.header__phone svg { width: 15px; height: 15px; }

.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--ink-line);
  background: transparent; border-radius: 50%; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  transition: border-color .3s var(--ease);
}
.burger:hover { border-color: var(--gold); }
.burger i {
  display: block; width: 16px; height: 1.5px; background: var(--on-ink);
  transition: transform .4s var(--ease-out), opacity .25s var(--ease);
}
.burger.is-open i:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.burger.is-open i:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 99; background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--pad-x) 3rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .45s var(--ease), transform .55s var(--ease-out), visibility .45s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer nav { display: flex; flex-direction: column; gap: .25rem; }
.drawer nav a {
  font-family: var(--font-display); font-size: clamp(1.9rem, 9vw, 2.7rem);
  color: var(--on-ink); padding: .35rem 0; border-bottom: 1px solid var(--ink-line);
  display: flex; align-items: baseline; gap: 1rem;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease) var(--d, 0s), transform .6s var(--ease-out) var(--d, 0s), color .3s var(--ease);
}
.drawer.is-open nav a { opacity: 1; transform: none; }
.drawer nav a:hover { color: var(--gold); }
.drawer nav a small {
  font-family: var(--font-sans); font-size: .62rem; letter-spacing: .16em;
  color: var(--on-ink-3); font-weight: 600;
}
.drawer__foot {
  margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem;
  color: var(--on-ink-2); font-size: .86rem;
}
.drawer__foot a { display: inline-flex; align-items: center; gap: .6rem; }
.drawer__foot a:hover { color: var(--gold); }

/* ============ 16. FOOTER + BARRA MÓVIL ============ */
.footer { background: var(--ink); color: var(--on-ink); border-top: 1px solid var(--ink-line); }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__brand p { margin-top: 1.4rem; max-width: 34ch; color: var(--on-ink-3); font-size: .88rem; line-height: 1.65; }
.footer__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.footer h3 {
  font-family: var(--font-sans); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 600; color: var(--on-ink-3); margin-bottom: 1.2rem;
}
.footer ul { display: grid; gap: .7rem; }
.footer ul a { font-size: .89rem; color: var(--on-ink-2); transition: color .3s var(--ease), padding-left .3s var(--ease-out); }
.footer ul a:hover { color: var(--gold); padding-left: .3rem; }
.footer__bottom {
  border-top: 1px solid var(--ink-line); padding-block: 1.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: .78rem; color: var(--on-ink-3);
}
.footer__bottom a:hover { color: var(--gold); }
.link-boton {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: inherit; color: inherit; font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .3s var(--ease);
}
.link-boton:hover { color: var(--gold); }

.wa-float {
  position: fixed; left: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .8rem 1.15rem; border-radius: 999px;
  background: #1FBE5C; color: #04240F; border: 1px solid rgba(10,11,13,.16);
  font-size: .85rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 14px 34px -14px rgba(37,211,102,.75);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .5s var(--ease-out), visibility .45s, box-shadow .35s var(--ease);
}
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(37,211,102,.9); }
.wa-float svg { width: 20px; height: 20px; flex: none; }

.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 95; display: none;
  background: rgba(10,11,13,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--ink-line);
  padding: .7rem var(--pad-x) calc(.7rem + env(safe-area-inset-bottom));
  gap: .55rem; align-items: center;
  transform: translateY(110%); transition: transform .5s var(--ease-out);
}
.mobile-bar.is-visible { transform: none; }
.mobile-bar .btn { padding-block: .85rem; }
.mobile-bar .btn--icon { flex: none; width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.mobile-bar .btn--icon svg { width: 19px; height: 19px; }
.mobile-bar .btn--cta { flex: 1; }

.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink-line-2);
  background: rgba(10,11,13,.85); color: var(--on-ink); backdrop-filter: blur(10px);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .4s var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--gold); color: var(--gold); }
.to-top svg { width: 17px; height: 17px; }

/* Banner de cookies */
.cookies {
  position: fixed; z-index: 130;
  left: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  width: min(430px, calc(100vw - 2rem));
  background: rgba(16,18,22,.94); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--ink-line-2); border-radius: var(--r-lg);
  padding: clamp(1.3rem, 2.5vw, 1.7rem); color: var(--on-ink);
  box-shadow: 0 28px 60px -24px rgba(0,0,0,.75);
  opacity: 0; visibility: hidden; transform: translateY(18px) scale(.98);
  transition: opacity .5s var(--ease), transform .6s var(--ease-out), visibility .5s;
}
.cookies.is-open { opacity: 1; visibility: visible; transform: none; }
.cookies__head { display: flex; align-items: center; gap: .7rem; }
.cookies__head svg { width: 19px; height: 19px; color: var(--gold); flex: none; }
.cookies__head h2 {
  font-family: var(--font-sans); font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; font-weight: 600; color: var(--on-ink-2);
}
.cookies p { margin-top: .9rem; font-size: .85rem; line-height: 1.6; color: var(--on-ink-2); }
.cookies p a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.cookies__acciones { display: grid; gap: .55rem; margin-top: 1.3rem; }
.cookies__acciones .btn { width: 100%; padding-block: .8rem; }
.cookies__fila { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.cookies__link {
  margin-top: .9rem; display: block; text-align: center;
  font-size: .76rem; color: var(--on-ink-3); text-decoration: underline;
  text-underline-offset: 2px; transition: color .3s var(--ease);
}
.cookies__link:hover { color: var(--on-ink); }
body.cookies-abierto .mobile-bar { display: none; }

/* ============ 17. ANIMACIONES ============ */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease-out) var(--d, 0s), transform .9s var(--ease-out) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ============ 18. RESPONSIVE GLOBAL ============ */
@media (max-width: 1080px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav, .header__phone { display: none; }
  .burger { display: flex; }
  .header__cta > .btn { display: none; }
  .brand__tag { display: none; }
  .brand__name { font-size: 1.02rem; }
  .brand__mark { width: 32px; height: 32px; }
  .header__inner { gap: 1rem; }
  .brand { min-width: 0; }
  .brand__text { min-width: 0; }
  .brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bar { display: flex; }
  .wa-float { display: none; }
  .to-top { bottom: 5.2rem; }
  .footer__bottom { padding-bottom: 4.5rem; }
}

@media (max-width: 640px) {
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
}
