/* ============================================
   KMA — KENYI MARTÍN ALCÁNTARA — INSPECCIONES
   Typography: Bebas Neue (impact) + Playfair Display (editorial) + DM Sans (body)
   ============================================ */

:root {
  --black: #08080a;
  --dark: #0f0f12;
  --darker: #141418;
  --card: #18181c;
  --border: #252530;
  --muted: #6b6b7b;
  --text: #c8c8d0;
  --light: #e8e8ec;
  --white: #f8f8fa;
  --red: #e63946;
  --red-dark: #b91c2c;
  --red-glow: rgba(230, 57, 70, 0.12);
  --red-subtle: rgba(230, 57, 70, 0.06);
  --amber: #f4a261;
  --font-impact: 'Bebas Neue', sans-serif;
  --font-editorial: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-w: 1140px;
  --max-w-narrow: 780px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* GRAIN */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* UTILITY */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* TYPOGRAPHY */
h1, h2, h3 { color: var(--white); }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.35s;
}
nav.scrolled {
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-logo {
  font-family: var(--font-impact);
  font-size: 1.6rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.nav-logo span { color: var(--red); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta-btn {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 9px 22px !important;
  border-radius: 4px;
  font-weight: 600 !important;
  transition: all 0.3s !important;
}
.nav-cta-btn:hover { background: var(--red-dark) !important; transform: translateY(-1px); }
.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; transition: all 0.3s; }

/* LABEL */
.label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.label::before { content: ''; width: 28px; height: 1.5px; background: var(--red); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 30px var(--red-glow); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn svg { width: 16px; height: 16px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(3px); }

/* ARROW ICON */
.arrow-icon { width: 16px; height: 16px; }

/* CARDS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.3s;
}
.card:hover {
  border-color: var(--red);
  box-shadow: 0 0 50px var(--red-glow);
  transform: translateY(-4px);
}
.card-number {
  font-family: var(--font-impact);
  font-size: 4rem;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
  transition: color 0.4s;
}
.card:hover .card-number { color: var(--red); }
.card h3 {
  font-family: var(--font-editorial);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}
.card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 20px;
}
.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}
.card-link:hover { gap: 10px; }

/* LEGAL REF TAG */
.ref {
  display: inline-block;
  background: var(--red-subtle);
  border: 1px solid rgba(230, 57, 70, 0.2);
  color: var(--red);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

/* QUOTE BLOCK */
.quote-block {
  border-left: 3px solid var(--red);
  padding: 24px 28px;
  background: var(--red-subtle);
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}
.quote-block p {
  font-family: var(--font-editorial);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--light);
  line-height: 1.7;
}

/* TIP BOX */
.tip-box {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.07), rgba(244, 162, 97, 0.02));
  border: 1px solid rgba(244, 162, 97, 0.18);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 24px 0;
}
.tip-box h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tip-box p { font-size: 0.95rem; color: var(--text); }

/* FOOTER */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--black);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  font-family: var(--font-impact);
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.footer-brand span { color: var(--red); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-legal { font-size: 0.72rem; color: var(--muted); max-width: 440px; line-height: 1.6; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  nav.has-open { background: #08080a !important; backdrop-filter: none !important; border-bottom: 1px solid var(--border); }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: #08080a;
    padding: 28px 24px 32px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 48px rgba(0,0,0,.9);
    z-index: 1000;
  }
  .nav-links.open a { font-size: 0.95rem; color: var(--light); padding: 6px 0; }
  .nav-links.open .nav-cta-btn { margin-top: 6px; text-align: center; display: block; padding: 14px 22px !important; }
  .hamburger { display: block; }
  .container { padding: 0 18px; }
}
