*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ========================================================
     THE REFINED OBSIDIAN THEME
     Lighter background for better contrast and readability.
     ======================================================== */
  --bg-color: #1A1C1A;          /* Slightly lighter background as requested */
  --bg-surface: #242724;        /* Elevated base layer */
  --bg-surface-2: #2E322E;      /* Interactive layer */
  --bg-surface-3: #383D38;      /* Highlights */
  
  --text-main: #FAF8F5;         /* Crema perlado */
  --text-muted: #BCC5B4;        
  --text-faint: #73806C;        
  
  --accent: #B1D89F;            /* Neon emerald highlight */
  --accent-dark: #3F5E32;       
  --accent-bg: rgba(63, 94, 50, 0.4); /* Stronger glow */
  
  --border-color: rgba(250, 248, 245, 0.2); /* 2px lines in specific areas */

  --font-display: 'Geist', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 72px;
  --side-pad: 5rem; /* Dynamic side padding */

  /* Backwards compatibility */
  --black: var(--text-main);      
  --white: var(--bg-surface-2);      
  --gray-1: var(--bg-surface);
  --gray-2: var(--bg-surface-2);
  --gray-3: var(--text-muted);
  --gray-4: var(--text-faint);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-color);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side-pad);
  background: rgba(26, 28, 26, 0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border-color); /* Thicker line */
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-transform: uppercase;
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px; /* Thicker line */
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text-main); font-weight: 500; }

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bg-color);
  background: var(--text-main);
  border: none;
  padding: 0.6rem 1.75rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── PAGE WRAPPER ── */
.page { padding-top: var(--nav-h); min-height: 100vh; }

/* ── HOMOGENIZED HERO HEADER STYLE ── */
.page-hero {
  padding: 2.5rem var(--side-pad);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-surface);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.page-hero-sub {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.6;
}

/* ── SECTION BASE ── */
.section {
  padding: 6rem var(--side-pad);
  border-top: 2px solid var(--border-color);
}
.section:first-of-type { border-top: none; }

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--bg-color);
  background: var(--text-main);
  border: none;
  padding: 1rem 2.5rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; }

/* ── FOOTER ── */
footer {
  border-top: 2px solid var(--border-color);
  padding: 1rem var(--side-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-color);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}
.footer-copy { font-family: var(--font-body); font-size: 0.8rem; color: var(--text-faint); }
.footer-socials { display: flex; gap: 2rem; }
.footer-socials a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-socials a:hover { color: var(--accent); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-3); border-radius: 3px; }

/* ── RESPONSIVE OVERRIDES ── */
@media (max-width: 1024px) {
  :root { --side-pad: 3rem; }
}

@media (max-width: 768px) {
  :root { 
    --side-pad: 1.5rem; 
    --nav-h: 64px;
  }
  
  .nav-links, .nav-cta { display: none; } /* Hide desktop nav */
  
  /* Mobile Menu Button */
  .menu-toggle {
    display: block;
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1001;
  }
  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    margin: 6px 0;
    transition: 0.3s;
  }

  /* Footer stack */
  footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2.5rem var(--side-pad);
  }
  .footer-socials { gap: 1.5rem; }
  
  /* Shared section scaling */
  .section { padding: 4rem var(--side-pad); }
  .page-hero { padding: 2.5rem var(--side-pad); gap: 1rem; }
}

/* ── MOBILE DRAWER (Injected via JS) ── */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
}
.mobile-nav a.active { color: var(--accent); }
