/* assets/css/style.css */
/* -------------------------------------------------------------
   Aguirre & Asociados -- Design Tokens & Structural CSS
   Tailwind utility classes handle all component styling.
   This file holds only: tokens, keyframes, reveal transitions,
   nav structural CSS, icon sizing, motion preferences.
   ------------------------------------------------------------- */

:root {
  /* -- Colors -- */
  --color-primary: #0f2a44;
  --color-primary-light: #1e3f5f;
  --color-primary-dark: #081a2d;
  --color-accent: #b8924d;
  --color-accent-light: #d4ad6a;
  --color-accent-dark: #97763a;

  --color-bg: #ffffff;
  --color-bg-alt: #f5f4f0;
  --color-bg-dark: #0f2a44;
  --color-text: #0f2a44;
  --color-text-muted: #6b7280;
  --color-border: rgba(15, 42, 68, 0.08);

  /* -- Typography -- */
  --font-heading: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-accent: 'Fraunces', Georgia, serif;

  /* -- Layout -- */
  --max-width: 1200px;

  /* -- Standard Tokens (auto-injected) -- */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-default: 4px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 42, 68, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 42, 68, 0.12);
  --shadow-xl: 0 20px 40px rgba(15, 42, 68, 0.15);
}

/* -------------------------------------------------------------
   Keyframes
   ------------------------------------------------------------- */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* -------------------------------------------------------------
   Scroll Reveal
   ------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 90ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 180ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 270ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 360ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 450ms; }
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body { margin: 0; }

/* -------------------------------------------------------------
   Site Header (fixed, scroll-aware)
   ------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.35s cubic-bezier(0.45, 0, 0.55, 1),
              background-color 0.35s cubic-bezier(0.45, 0, 0.55, 1),
              border-color 0.35s cubic-bezier(0.45, 0, 0.55, 1);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(15, 42, 68, 0.08);
  box-shadow: 0 4px 24px rgba(15, 42, 68, 0.04);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-logo:hover {
  color: var(--color-accent);
}

.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: block;
  }
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-cta:hover {
  background-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(184, 146, 77, 0.25);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  padding: 0;
}

/* -------------------------------------------------------------
   Mobile Menu (lives OUTSIDE .site-header)
   ------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background-color: var(--color-bg-alt);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  display: block;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 300;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.5rem 0;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.mobile-nav-link:hover {
  color: var(--color-accent);
  font-style: italic;
}

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  padding: 0.5rem;
  line-height: 1;
  z-index: 1;
}

/* -------------------------------------------------------------
   Icon Sizing
   ------------------------------------------------------------- */

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.icon.hidden { display: none; }
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2rem; height: 2rem; }

/* Subtle italic styling for <em> inside headings */
h1 em, h2 em, h3 em,
.font-heading em {
  font-style: italic;
}

/* Form input focus reset (Tailwind handles the actual ring) */
input:focus,
textarea:focus,
select:focus {
  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;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}