/* ===================================================================
   SUPERMATIC — Design Tokens & Base Styles
   =================================================================== */

:root {
  /* Color */
  --sm-ink:        #0D1117;   /* near-black, hero/header bg */
  --sm-graphite:   #1C1C1E;   /* primary text */
  --sm-red:        #F73D17;   /* brand accent — color exacto del logo oficial */
  --sm-red-dim:    #D62E0B;   /* hover/active red; also used for small text (passes 4.5:1 on white) */
  --sm-red-rgb:    247, 61, 23; /* rgb channels of --sm-red for rgba() box-shadows */
  --sm-paper:      #FFFFFF;   /* product/card bg */
  --sm-fog:        #F5F5F7;   /* section bg */
  --sm-line:       #E4E4E7;   /* hairline borders */
  --sm-mute:       #71717A;   /* captions, helper text — #71717A passes WCAG AA 4.7:1 on white */
  --sm-mute-2:     #5B5B60;

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --maxw: 1280px;
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 48px;
  --gap-xl: 96px;
  --radius: 2px; /* sharp, technical — not soft/app-like */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--sm-graphite);
  background: var(--sm-paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 800;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }

p { margin: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sm-red-dim); /* --sm-red-dim #D62E0B = 4.8:1 on white; --sm-red #F73D17 only 3.6:1 */
}

.eyebrow + h1,
.eyebrow + h2 {
  margin-top: var(--gap-xs);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--gap-xl) 0;
}
.section--tight { padding: var(--gap-lg) 0; }
.section--fog   { background: var(--sm-fog); }
.section--ink   { background: var(--sm-ink); color: #fff; }
.section--ink .eyebrow { color: #FF5C72; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sm-red); color: #fff; } /* buttons = UI components, WCAG 2.1 requires 3:1; #F73D17 passes at ~3.6:1 */
.btn-primary:hover { background: var(--sm-red-dim); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--sm-ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; border-color: var(--sm-graphite); color: var(--sm-graphite); }
.btn-outline:hover { background: var(--sm-graphite); color: #fff; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--sm-line);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  height: 76px;
  gap: var(--gap-sm);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--sm-graphite);
  margin-right: auto;
}
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sm-red); }

.main-nav { display: flex; align-items: center; gap: var(--gap-lg); }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sm-mute-2);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover, .main-nav a.active { color: var(--sm-graphite); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--sm-red);
}
.has-dropdown { position: relative; }

/* Use child combinator so specificity (0,2,0) beats .main-nav ul (0,1,1).
   Without this, .main-nav ul { display: flex } overrides display: none. */
.has-dropdown > .dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: -16px;
  background: #ffffff;
  border: 1px solid var(--sm-line);
  min-width: 240px;
  padding: 10px;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.has-dropdown.dropdown-open > .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sm-mute-2);
  border-radius: var(--radius);
}
.dropdown a:hover { background: var(--sm-fog); color: var(--sm-graphite); }

/* Header actions: lang toggle + CTA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language switch — simple text links */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lang-switch__opt {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sm-mute);
  padding: 10px 8px; /* was 4px 2px — 44px touch-target height achieved */
  transition: color 0.15s ease;
}
.lang-switch__opt--active {
  color: var(--sm-red-dim);
}
.lang-switch__opt:hover:not(.lang-switch__opt--active) {
  color: var(--sm-red-dim);
}
.lang-switch__sep {
  color: var(--sm-line);
  font-size: 0.78rem;
  user-select: none;
  -webkit-user-select: none;
}

/* Nav CTA — pill shape, modern */
.nav-cta {
  border-radius: 8px;
  padding: 6px 5px;
  font-size: 0.84rem;
  box-shadow: 0 1px 6px rgba(var(--sm-red-rgb), 0.22);
  white-space: nowrap;
}
/* .main-nav a has (0,1,1) specificity; needs (0,2,0)+ to override color back to white */
.main-nav .nav-cta,
.nav-cta {
  color: #fff;
}
.nav-cta:hover {
  box-shadow: 0 2px 12px rgba(var(--sm-red-rgb), 0.38);
}

.nav-toggle { display: none; background: none; border: none; color: var(--sm-graphite); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: #ffffff;
    padding: 20px;
    border-top: 1px solid var(--sm-line);
  }
  .main-nav.open ul { flex-direction: column; gap: 4px; width: 100%; }
  .main-nav.open .dropdown {
    position: static;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 4px 0 8px 12px;
    margin-top: 0;
  }
  .header-actions {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-top: var(--gap-sm);
    border-top: 1px solid var(--sm-line);
    margin-top: 8px;
    gap: 12px;
  }
  .nav-cta { align-self: stretch; justify-content: center; border-radius: 8px; }
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--sm-ink);
  color: rgba(255,255,255,0.7);
  padding: var(--gap-xl) 0 var(--gap-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 0.92rem; color: rgba(255,255,255,0.65); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--gap-md);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.60); /* was 0.45 — 0.60 gives ~5:1 contrast on #0D1117 */
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin-top: 16px;
  max-width: 220px;
}

/* ===================== UTILITY ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-lg); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--sm-line);
  border-radius: 100px;
  color: var(--sm-mute-2);
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--sm-mute);
  margin-bottom: var(--gap-md);
}
.breadcrumb a { color: var(--sm-mute-2); }
.breadcrumb a:hover { color: var(--sm-red); }

.placeholder-img {
  background: linear-gradient(135deg, #ECECEF 0%, #DCDCE1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-mute-2); /* was #A6A6AC (2.1:1 fail) — mute-2 #5B5B60 gives ~6.5:1 on gradient bg */
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 220px;
}

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 14px; z-index: 999;
}

:focus-visible {
  outline: 3px solid var(--sm-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── Mobile: tighten spacing tokens to reduce excessive whitespace ── */
@media (max-width: 640px) {
  :root {
    --gap-xl: 64px; /* was 96px */
    --gap-lg: 36px; /* was 48px */
  }
}

/* ── Mobile nav: 44px touch targets on open menu items ── */
@media (max-width: 900px) {
  .main-nav.open > ul > li > a {
    display: block;
    padding: 12px 0;
  }
}
