/* ============================================================
   CRESTA PUBLICITARIA — style.css
   CSS compartido para todas las páginas del sitio
   ============================================================ */

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

:root {
  --accent:        #e8b400;
  --accent-dark:   #c49a00;
  --burgundy:      #7d1a35;
  --burgundy-dk:   #5e1228;
  --ink:           #1c1c1c;
  --ink2:          #2d2d2d;
  --muted:         #6b6b6b;
  --faint:         #767676; /* 4.54:1 on white — WCAG AA */
  --bg:            #ffffff;
  --bg-off:        oklch(97% 0.007 10);   /* burgundy-tinted neutral — brand-specific, not warm-cream */
  --bg-warm:       oklch(96% 0.012 10);   /* hover surface, deeper burgundy tint */
  --bg-dark:       #111111;
  --border:        #dbd6d9;               /* burgundy-tinted border */
  --border-soft:   #e8e3e6;              /* softer burgundy-tinted border */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', sans-serif;
  background: var(--bg);
  color: var(--ink2);
  line-height: 1.65;
  overflow-x: hidden;
  font-kerning: normal;
  font-optical-sizing: auto;
}

/* ─── ANIMATIONS ─── */
/* Content visible by default; JS adds .js-animations to <html> so hidden tabs / no-JS stays readable */

/* Strong ease-out — built-in easings lack the punch intentional UI motion needs */
:root { --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1); }

/* Base reveal */
.js-animations .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}
.js-animations .reveal.up    { transform: translateY(14px); }
.js-animations .reveal.left  { transform: translateX(-14px); }
.js-animations .reveal.right { transform: translateX(14px); }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }
/* legacy aliases used in index/letrascorporeas */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ─── TYPED ANIMATION VARIANTS ─── */
/* Each variant overrides the base reveal's transform distance and transition duration.
   Stagger delays are applied via JS (inline style) and cleared on transitionend. */

/* Hero: biggest element — most room, most time */
.js-animations .reveal-hero {
  transform: translateY(20px);
  transition: opacity 320ms var(--ease-out-strong), transform 320ms var(--ease-out-strong);
}

/* Section headings: subtle lift, snappy */
.js-animations .reveal-heading {
  transform: translateY(8px);
  transition: opacity 240ms var(--ease-out-strong), transform 240ms var(--ease-out-strong);
}

/* Service catalog rows: medium lift, staggered in JS at 80ms apart */
.js-animations .reveal-card {
  transform: translateY(16px);
  transition: opacity 280ms var(--ease-out-strong), transform 280ms var(--ease-out-strong);
}

/* Portfolio images: fade only — images don't need positional motion */
.js-animations .reveal-photo {
  transform: none;
  transition: opacity 200ms var(--ease-out-strong);
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: padding .35s ease, box-shadow .35s ease;
}
nav.scrolled { padding: .6rem 3rem; box-shadow: 0 2px 24px rgba(0,0,0,.07); }
.nav-logo img { height: 44px; transition: height .3s; }
nav.scrolled .nav-logo img { height: 36px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: .875rem; font-weight: 400; color: var(--muted);
  text-decoration: none; position: relative; padding-bottom: 2px;
  transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1.5px; background: var(--burgundy);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.nav-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--burgundy);
  padding: .6rem 1.5rem; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 2px; text-decoration: none;
  transition: background .2s, transform .15s;
}
.nav-cta:hover { background: var(--burgundy-dk); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px; /* reset <button> defaults */
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: #fff; z-index: 99;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; letter-spacing: .06em;
  color: var(--ink); text-decoration: none; transition: color .2s;
}
.mobile-menu a:hover { color: var(--burgundy); }
.mobile-menu .mob-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent); color: var(--ink); padding: .8rem 2.5rem; border-radius: 2px;
}

/* ─── FOOTER ─── */
footer { background: var(--burgundy); padding: 3.5rem 3rem 2rem; padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem)); }
.footer-top {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 3rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-logo img { height: 42px; filter: brightness(0) invert(1); margin-bottom: .75rem; }
.footer-tagline { font-style: italic; color: rgba(255,255,255,.55); font-size: .9rem; }
.footer-links { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-end; }
.footer-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-socials { display: flex; gap: .75rem; margin-top: 1rem; justify-content: flex-end; }
.footer-socials a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.2); padding: .4rem 1rem; border-radius: 2px;
  text-decoration: none; transition: background .2s, color .2s, border-color .2s;
  min-height: 44px; display: inline-flex; align-items: center;
}
.footer-socials a:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.5); }
.footer-bottom {
  max-width: 1200px; margin: 1.75rem auto 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .75rem; color: rgba(255,255,255,.35);
}

/* ─── BADGE CORPÓREAS (fijo derecha) ─── */
.corporeas-badge {
  position: fixed; top: 40%; right: 0; z-index: 150;
  display: block; text-decoration: none;
  filter: drop-shadow(-2px 2px 6px rgba(0,0,0,.15));
  transition: opacity .2s, transform .2s;
}
.corporeas-badge img { display: block; width: 120px; height: auto; }
.corporeas-badge:hover { opacity: .88; transform: translateX(-3px); }

/* ─── WHATSAPP FLOAT ─── */
.wa-float {
  position: fixed;
  bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
  right: max(2rem, calc(env(safe-area-inset-right) + 1rem));
  z-index: 200;
  background: #25d366; border-radius: 50%; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45); text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.55); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ─── SECTION COMMONS ─── */
section { padding: 7rem 3rem; }
.container { max-width: 1200px; margin: 0 auto; }

.eyebrow,
.section-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .7rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase;
  color: var(--burgundy); margin-bottom: .9rem;
}
.eyebrow::before,
.section-eyebrow::before { content: ''; display: block; width: 18px; height: 1.5px; background: var(--burgundy); }

h2.section-title,
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  letter-spacing: .03em; line-height: 1; color: var(--ink); margin-bottom: 1.25rem;
  text-wrap: balance;
}
.section-desc { font-size: 1rem; font-weight: 300; color: var(--muted); max-width: 540px; line-height: 1.8; text-wrap: pretty; }

/* ─── BUTTONS ─── */
.btn-primary {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent); color: var(--ink);
  padding: .9rem 2.25rem; border-radius: 2px; text-decoration: none; display: inline-block;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(232,180,0,.3);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,180,0,.4); }

.btn-secondary {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border: 1.5px solid var(--border); color: var(--ink2);
  padding: .9rem 2.25rem; border-radius: 2px; text-decoration: none; display: inline-block;
  transition: border-color .2s, color .2s, transform .15s;
}
.btn-secondary:hover { border-color: var(--burgundy); color: var(--burgundy); transform: translateY(-2px); }

.btn-burgundy {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--burgundy); color: #fff;
  padding: .9rem 2.25rem; border-radius: 2px; text-decoration: none; display: inline-block;
  transition: background .2s, transform .15s;
}
.btn-burgundy:hover { background: var(--burgundy-dk); transform: translateY(-2px); }

/* ─── FORM COMMONS ─── */
.form-panel { background: var(--bg-off); border: 1px solid var(--border-soft); padding: 2.5rem; }
.form-panel-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; letter-spacing: .04em;
  color: var(--ink); margin-bottom: .35rem;
}
.form-panel-sub { font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.span2 { grid-column: 1 / -1; }
label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}
input, textarea, select {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--ink); font-family: 'Archivo', sans-serif;
  font-size: .9rem; font-weight: 300;
  padding: .75rem 1rem; border-radius: 2px; width: 100%; outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,180,0,.12);
}
input::placeholder, textarea::placeholder { color: #c0bbb5; }
textarea { resize: vertical; min-height: 110px; }
.btn-submit {
  grid-column: 1 / -1; margin-top: .5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .85rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  background: var(--accent); color: var(--ink);
  border: none; padding: 1rem 2rem; border-radius: 2px; width: 100%;
  cursor: pointer; transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 12px rgba(232,180,0,.25);
}
.btn-submit:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 5px 18px rgba(232,180,0,.35); }
.form-note { grid-column: 1 / -1; font-size: .78rem; color: var(--faint); text-align: center; margin-top: .5rem; }
.form-success { display: none; text-align: center; padding: 2.5rem 1rem; }
.form-success-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.form-success-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--burgundy); letter-spacing: .04em; margin-bottom: .5rem; }
.form-success-sub { font-size: .9rem; color: var(--muted); }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  padding: 10rem 3rem 5rem;
  background: var(--bg-off);
  border-bottom: 1px solid var(--border-soft);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: attr(data-title);
  position: absolute; right: -1rem; bottom: -2rem;
  font-family: 'Bebas Neue', sans-serif; font-size: 12rem; line-height: 1;
  color: rgba(0,0,0,.04); white-space: nowrap; pointer-events: none; letter-spacing: .04em;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--faint); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--burgundy); }
.breadcrumb span { color: var(--border); }
.page-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: .92; letter-spacing: .02em; color: var(--ink); margin-bottom: 1.25rem;
  text-wrap: balance;
}
.page-hero h1 em { font-style: normal; color: var(--burgundy); }
.page-hero p { font-size: 1rem; font-weight: 300; color: var(--muted); max-width: 540px; line-height: 1.8; }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: var(--border-soft); margin: 0 3rem; }

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Inputs show box-shadow focus; suppress outline to avoid double ring */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js-animations .reveal,
  .js-animations .reveal-hero,
  .js-animations .reveal-heading,
  .js-animations .reveal-card,
  .js-animations .reveal-photo { opacity: 1; transform: none; }
}

/* ─── RESPONSIVE COMMONS ─── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  nav.scrolled { padding: .7rem 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  section { padding: 5rem 1.5rem; }
  footer { padding: 3rem 1.5rem 2rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { align-items: flex-start; }
  .footer-socials { justify-content: flex-start; }
  .divider { margin: 0 1.5rem; }
  .page-hero { padding: 8rem 1.5rem 4rem; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .corporeas-badge img { width: 80px; }
}
