/* =========================================================
   ARPRO GLOBAL — Base compartida
   Incluir en todos los HTML via: <link rel="stylesheet" href="arpro-base.css">
   ========================================================= */

/* TIPOGRAFÍA GLOBAL: Barlow Condensed (títulos) + Inter (cuerpo) */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* TOKENS */
:root {
  --gold: #C9A84C;
  --gold-light: #E2C47A;
  --gold-dim: #8a6e2f;
  --z-nav: 1000; --z-overlay: 10; --z-text: 20; --z-accent: 30;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a; --bg-2: #111111; --bg-3: #1a1a1a; --border: #2a2a2a;
  --text: #f0f0f0; --text-2: #b3b3b3; --text-3: #666666;
  --nav-bg: rgba(10,10,10,0.92);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f3; --bg-2: #e8e8e6; --bg-3: #ffffff; --border: #cccccc;
  --text: #0d0d0d; --text-2: #3a3a3a; --text-3: #6b6b6b;
  --nav-bg: rgba(245,245,243,0.95);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter';
  background: var(--bg); color: var(--text);
  transition: background 0.4s, color 0.4s; overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: 'Barlow Condensed'; font-weight: 600; letter-spacing: 0.02em; }
[data-lucide] { width: 20px; height: 20px; stroke-width: 1.5; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  background: var(--nav-bg); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-2);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important; color: #000 !important;
  padding: 0.45rem 1.1rem; border-radius: 2px; font-weight: 500 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--gold-light) !important; color: #000 !important; }
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-2);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s; flex-shrink: 0; padding: 0;
}
.theme-toggle [data-lucide] { width: 16px; height: 16px; }
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav-hamburger {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 36px; height: 36px; border-radius: 2px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 18px; height: 1px;
  background: currentColor; transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* PAGE HERO (páginas internas) */
.page-hero {
  min-height: 65vh; display: flex; align-items: flex-end;
  padding: 0 2rem 5rem; position: relative; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 80px);
}
[data-theme="light"] .hero-bg-grid { opacity: 0.05; }
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 30% 50%, rgba(201,168,76,0.07) 0%, transparent 60%);
}
.page-hero-inner {
  max-width: 1280px; width: 100%; margin: 0 auto;
  padding-top: 130px; position: relative; z-index: 1;
}
.page-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem; display: flex; align-items: center;
  gap: 0.6rem; animation: fadeUp 0.7s ease both;
  width: fit-content;
}
.page-eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--gold); }
.page-hero h1 { font-size: clamp(3.5rem, 8vw, 7rem); line-height: 0.92; animation: fadeUp 0.7s 0.1s ease both; }
.page-hero h1 span { color: var(--gold); }
.page-hero-sub {
  font-size: 1.2rem; color: var(--text-2); font-weight: 300;
  line-height: 1.7; margin: 1.2rem 0 2rem; max-width: 480px;
  animation: fadeUp 0.7s 0.2s ease both;
}
.hero-cta-row { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeUp 0.7s 0.3s ease both; }

/* PAGE HERO — variante con imagen de fondo */
.page-hero--img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 70vh;
}
.page-hero--img .page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.48) 55%, rgba(0,0,0,0.32) 100%);
  z-index: 0;
}
.page-hero--img .page-hero-inner { position: relative; z-index: 1; }
.page-hero--img h1,
[data-theme="light"] .page-hero--img h1 { color: #fff; }
.page-hero--img .page-hero-sub,
[data-theme="light"] .page-hero--img .page-hero-sub { color: rgba(255,255,255,0.82); }
.page-hero--img .hero-quote,
[data-theme="light"] .page-hero--img .hero-quote { color: rgba(255,255,255,0.8); border-left-color: var(--gold); }
.page-hero--img .btn-secondary,
[data-theme="light"] .page-hero--img .btn-secondary { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.4); }
.page-hero--img .btn-secondary:hover,
[data-theme="light"] .page-hero--img .btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* PAGE HERO — variante con video YouTube de fondo full-screen */
.page-hero--yt {
  min-height: 100vh;
  background: #000;
}
.hero-yt-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-yt-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Técnica cover: el mayor de los dos valores cubre el contenedor */
  width: 177.78vh;   /* 16/9 × 100vh */
  height: 56.25vw;   /* 9/16 × 100vw */
  min-width: 100%;
  min-height: 100%;
  border: 0;
}
.page-hero--yt .page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.30) 100%);
  z-index: 1;
}
.page-hero--yt .page-hero-inner { position: relative; z-index: 2; }
.page-hero--yt h1,
[data-theme="light"] .page-hero--yt h1 { color: #fff; }
.page-hero--yt .page-hero-sub,
[data-theme="light"] .page-hero--yt .page-hero-sub { color: rgba(255,255,255,0.82); }
.page-hero--yt .btn-secondary,
[data-theme="light"] .page-hero--yt .btn-secondary { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.4); }
.page-hero--yt .btn-secondary:hover,
[data-theme="light"] .page-hero--yt .btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 768px) {
  .page-hero--img { min-height: 60vh; }
  .page-hero--yt { min-height: 70vh; }
}

/* BUTTONS */
.btn-primary {
  background: var(--gold); color: #000; padding: 0.9rem 2.2rem;
  font-weight: 500; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: none; cursor: pointer; text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-secondary {
  background: transparent; color: var(--text); padding: 0.9rem 2.2rem;
  font-weight: 500; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* SECTION LAYOUT */
.section { padding: 7rem 2rem; max-width: 1280px; margin: 0 auto; }
.section-full { padding: 7rem 2rem; background: var(--bg-2); transition: background 0.4s; }
.si { max-width: 1280px; margin: 0 auto; }
.section-tag {
  font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.section-tag::before { content: ''; width: 24px; height: 1px; background: var(--gold); display: block; }
.section-title { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1; margin-bottom: 1.5rem; }
.section-sub {
  font-size: 1.1rem; color: var(--text-2); font-weight: 300;
  line-height: 1.7; max-width: 560px; margin-bottom: 3rem;
}

/* DIVIDER */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.3;
}

/* FOOTER */
footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem; transition: background 0.4s, border-color 0.4s;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 0.85rem; color: var(--text-3); line-height: 1.7; margin-top: 1rem; max-width: 260px; }
.footer-col h5 { font-size: 0.82rem; letter-spacing: 0.2em; color: var(--text-3); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { font-size: 0.85rem; color: var(--text-3); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; flex-wrap: wrap; gap: 1rem; }
.footer-copy { font-size: 0.78rem; color: var(--text-3); }
.footer-copy span { color: var(--gold); }

/* FORM (contacto y formularios embebidos) */
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.form-field input, .form-field select, .form-field textarea {
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  padding: 0.85rem 1rem; font-size: 0.88rem;
  outline: none; transition: border-color 0.2s, background 0.4s; resize: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--gold); }
.form-field select option { background: var(--bg-3); }
/* Feedback de formulario */
.form-feedback {
  display: none; padding: 1rem 1.25rem; font-size: 0.85rem; line-height: 1.5;
  border-left: 3px solid; margin-top: 0.5rem;
}
.form-feedback.success { border-color: var(--gold); background: rgba(201,168,76,0.08); color: var(--gold); display: block; }
.form-feedback.error { border-color: #e05a5a; background: rgba(224,90,90,0.08); color: #e05a5a; display: block; }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed; top: 68px;
    left: 0; right: 0; background: var(--nav-bg); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); padding: 1.5rem 2rem;
    gap: 1.2rem; align-items: flex-start; z-index: 999;
  }
  .nav-links.open a { font-size: 1rem; }
  .nav-hamburger { display: flex; }
  .nav-inner { gap: 0.75rem; }
  .page-hero { padding: 0 1.5rem 4rem; }
  .section { padding: 4rem 1.5rem; }
  .section-full { padding: 4rem 1.5rem; }
  .hero-cta-row { flex-direction: column; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}
