/* =====================================================================
   Vic's Hot Sauce — Shared site stylesheet (legal + 404 pages)
   Self-hosted; linked from legal/404 pages alongside fonts.css.
   index.html is a self-contained SPA and does NOT use this file.
   ===================================================================== */

/* ---- RESET ---- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0}
img,svg,video{max-width:100%;height:auto;display:block}
a{color:inherit}
button{font:inherit;color:inherit}
ul{margin:0}
*{overflow-wrap:break-word}
:focus-visible{outline:3px solid var(--focus,#0050A4);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* =====================================================================
   DESIGN TOKENS
   Light = warm cream paper. Dark "evening" = deep Puerto-Rican navy.
   All semantic vars guarantee WCAG AA for body ink on both bg & surface.
   ===================================================================== */

:root {
  /* ---- Brand (literal flag colors) — small identity marks only ---- */
  --brand-red: #E4002B;
  --brand-blue: #0050A4;
  --sauce: #F26B21;

  --brand-red-ink: #B11026;
  --brand-blue-ink: #0050A4;
  --sauce-ink: #B4480F;

  /* ---- Premium elevation palette (kept in sync with build-src/tokens.css
     so legal/404 pages inherit the same visual identity) ---- */
  --heritage-red: #7C1626;
  --brass: #B8862E;
  --brass-ink: #7A5518;

  /* ---- Semantic surfaces (LIGHT) ---- */
  --bg: #FBF5EC;
  --surface: #FFFFFF;
  --surface-2: #F3E9D9;
  --ink: #1B1410;
  --ink-soft: #5A4F45;
  --line: #E4D8C6;
  --shadow: 0 1px 2px rgba(27,20,16,.05), 0 12px 30px -12px rgba(27,20,16,.18);
  --focus: #0050A4;

  --salsa-tint: #FCE3DE;
  --pique-tint: #DCE8F6;
  --on-brand: #FFFFFF;
  --on-brand-soft: #E7EEF8;

  /* ---- Type stacks ---- */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-accent: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Layout */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #0A1626;
  --surface: #102338;
  --surface-2: #16314C;
  --ink: #F4F1EA;
  --ink-soft: #BFC9D6;
  --line: #25405E;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -16px rgba(0,0,0,.65);
  --focus: #7FB2FF;

  --brand-red-ink: #FF6F86;
  --brand-blue-ink: #8FBBF2;
  --sauce-ink: #FF9A5C;
  --brass-ink: #E3B968;

  --salsa-tint: #3A1620;
  --pique-tint: #15304C;
  --on-brand: #FFFFFF;
  --on-brand-soft: #E7EEF8;
}

/* ---- Base element defaults ---- */
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-red); color: #fff; }

/* =====================================================================
   COMPONENTS & PAGE SHELL
   ===================================================================== */

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 40px);
  width: 100%;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--heritage-red);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124,22,38,.55);
}
.btn--primary:hover { background: #5E0F1C; }

/* ---- Nav toggles ---- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.lang-toggle:hover { border-color: var(--brand-red); color: var(--brand-red); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.theme-toggle:hover { border-color: var(--brand-red); color: var(--brand-red); transform: rotate(-12deg); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* =====================================================================
   PAGE SHELL — header / nav
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  height: 44px;
}
.brand__mark img { height: 44px; width: auto; display: block; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -.01em;
  line-height: 1;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---- Narrow mobile: hide brand wordmark so header fits in 320px ---- */
@media (max-width: 499px) {
  .brand__name { display: none; }
  .nav-actions .btn {
    padding: 0 10px;
    font-size: 13px;
    min-height: 40px;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-red);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* =====================================================================
   PAGE SHELL — footer (dark premium band)
   ===================================================================== */
.site-footer {
  background: #0A1626;
  color: #EDEFF3;
  border-top: 4px solid var(--brand-red);
  padding-block: clamp(48px, 7vw, 80px) 0;
}
.site-footer a { color: #EDEFF3; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
@media (min-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.footer-brand { max-width: 360px; }
.footer-logo { display: inline-flex; height: 52px; margin-bottom: 14px; }
.footer-logo img { height: 52px; width: auto; display: block; }
.footer-tag {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: #C7CDD6;
  margin: 0 0 16px;
}
.footer-pride {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 15px;
  color: #FFD7A8;
}

.footer-col h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9AA6B4;
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  font-size: 15px;
  text-decoration: none;
  padding: 6px 0;
  color: #EDEFF3;
  transition: color .18s ease;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #9AA6B4;
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-legal a { color: #9AA6B4; text-decoration: none; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }

/* =====================================================================
   LANGUAGE BLOCKS (legal pages)
   Whole-section show/hide driven by html[lang].
   Chrome elements use data-en/data-es for text-swap (JS).
   ===================================================================== */
[data-lang-block="es"] { display: none; }
html[lang="es"] [data-lang-block="en"] { display: none; }
html[lang="es"] [data-lang-block="es"] { display: block; }

/* =====================================================================
   LEGAL PAGE LAYOUT
   ===================================================================== */
.legal-main {
  min-height: 60vh;
  padding-block: clamp(40px, 6vw, 80px);
}

/* ---- Legal body content ---- */
.legal-body {
  max-width: 760px;
  margin-inline: auto;
}

.legal-body h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 0.25em;
}

.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--ink);
  margin: 2em 0 0.45em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
}

.legal-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 1.4em 0 0.3em;
}

.legal-body p {
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 1em;
}

.legal-body ul,
.legal-body ol {
  color: var(--ink);
  line-height: 1.7;
  padding-left: 1.6em;
  margin: 0 0 1em;
}

.legal-body li { margin-bottom: 0.45em; }

.legal-body a {
  color: var(--brand-red-ink);
  text-decoration: underline;
}
[data-theme="dark"] .legal-body a { color: var(--brand-red-ink); }
.legal-body a:hover { text-decoration: none; }

.policy-meta {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 2em;
}

.contact-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  margin: 1em 0 1.4em;
}
.contact-block p { margin: 0 0 4px; }
.contact-block p:last-child { margin-bottom: 0; }

/* =====================================================================
   404 PAGE
   ===================================================================== */
.not-found {
  text-align: center;
  padding-block: clamp(60px, 10vw, 120px);
}

.not-found .nf-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5rem, 16vw, 10rem);
  line-height: 1;
  color: var(--brand-red);
  margin: 0 0 0.05em;
  letter-spacing: -.03em;
  display: block;
}

.not-found h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink);
  margin: 0 0 0.5em;
}

.not-found p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 auto 2em;
  max-width: 480px;
  line-height: 1.6;
}
