/* Hombres de Honor — colores muestreados del escudo */
@font-face {
  font-family: 'Oswald';
  src: url('/assets/fonts/oswald-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --carbon: #1b1d1a;
  --carbon-2: #272823;
  --teal: #0a7a88;
  --teal-deep: #075f6b;
  --gold: #f1bf44;
  --gold-hot: #ffd061;
  --cream: #f5efdf;
  --cream-2: #ebe3cc;
  --ink: #1b1d1a;
  --muted: #5f5d52;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--carbon);
  color: var(--cream);
  font: 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.gold { color: var(--gold); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--carbon); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* restoring: oculta la página mientras se recupera la posición de lectura */
html.restoring body { opacity: 0; }
body { transition: opacity .25s ease; }
html.leaving body { opacity: 0; transition-duration: .16s; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .45s var(--ease), background .3s, box-shadow .3s;
}
.site-header.is-solid { background: rgba(27, 29, 26, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(245, 239, 223, .1); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 1.25rem; color: var(--gold); }
.brand img { width: 40px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: .95rem; color: var(--cream); opacity: .85; position: relative; padding: 6px 0; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--gold); transition: right .3s var(--ease); }
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid rgba(245, 239, 223, .3); border-radius: 999px; overflow: hidden; }
.lang-switch a { text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .06em; padding: 7px 12px; color: var(--cream); }
.lang-switch a[aria-current] { background: var(--gold); color: var(--carbon); }

/* menú móvil */
.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 1px solid rgba(245, 239, 223, .3); border-radius: 10px; color: var(--cream); cursor: pointer; padding: 0; }
.menu-icon, .menu-icon::before { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), background .2s; }
.menu-icon { position: relative; }
.menu-icon::before { content: ''; position: absolute; left: 0; top: 7px; }
.menu-icon::after { content: ''; position: absolute; left: 0; top: -7px; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(-7px) rotate(-45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(7px) rotate(45deg); }
.nav-join { display: none; }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; border: 2px solid transparent;
  padding: 16px 28px; border-radius: 10px;
  transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button-gold { background: var(--gold); color: var(--carbon); }
.button-gold:hover { background: var(--gold-hot); }
.button-ghost { border-color: rgba(245, 239, 223, .45); color: var(--cream); }
.button-ghost:hover { border-color: var(--gold); color: var(--gold); }
.button-small { padding: 11px 18px; font-size: .9rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 128px 0 0;
  background:
    radial-gradient(60% 70% at 78% 40%, rgba(10, 122, 136, .55), transparent 70%),
    var(--carbon);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-bottom: 72px; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); line-height: .98; }
.hero h1 .gold { display: block; }
.lead { margin-top: 24px; max-width: 34em; font-size: 1.2rem; color: rgba(245, 239, 223, .88); }
.hero-note { margin-top: 20px; font-size: .9rem; color: rgba(245, 239, 223, .6); }
.hero-art { display: grid; place-items: center; }
.hero-shield { width: min(374px, 100%); filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .5)); will-change: transform; }

/* entrada del hero (CSS, sin esperar a Motion) */
.js .hero-copy > *, .js .hero-shield { opacity: 0; animation: rise .9s var(--ease) forwards; }
.js .hero-copy > :nth-child(2) { animation-delay: .1s; }
.js .hero-copy > :nth-child(3) { animation-delay: .2s; }
.js .hero-copy > :nth-child(4) { animation-delay: .3s; }
.js .hero-shield { animation-name: shield-in; animation-duration: 1.1s; animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes shield-in { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }

/* ticker */
.ticker { border-block: 1px solid rgba(245, 239, 223, .15); background: var(--gold); color: var(--carbon); overflow: hidden; white-space: nowrap; }
.ticker-track { display: flex; width: max-content; }
.ticker-set { display: flex; }
.ticker span { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 1.35rem; padding: 14px 0; }
.ticker span::after { content: '✦'; margin: 0 28px; font-size: .9em; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-cream { background: var(--cream); color: var(--ink); }
.section-dark { background: var(--carbon); }
.section-teal { background: var(--teal); }
.section-title { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 44px; }
.section-cream .section-title { color: var(--teal-deep); }
.section-dark .section-title { color: var(--gold); }
.section-teal .section-title { color: var(--gold); }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .95rem; color: var(--teal); margin-bottom: 14px; }

.statement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); }
.statement { border-top: 4px solid var(--gold); padding-top: 24px; }
.statement-text { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.8vw, 2.15rem); line-height: 1.25; color: var(--ink); }

/* código de honor */
.code-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.code-card {
  position: relative; background: var(--carbon-2); border: 1px solid rgba(245, 239, 223, .1);
  border-radius: 14px; padding: 28px 24px 26px; overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s, background .3s;
}
.code-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.code-num { position: absolute; right: 16px; top: 8px; font-family: var(--display); font-size: 3.4rem; line-height: 1; color: rgba(241, 191, 68, .16); }
.code-card h3 { color: var(--gold); font-size: 1.6rem; margin-bottom: 10px; }
.code-card p { color: rgba(245, 239, 223, .82); font-size: .98rem; }
.code-card-cta { background: var(--teal); padding: 0; }
.code-card-cta a { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; height: 100%; min-height: 150px; padding: 28px 24px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.5rem; text-transform: uppercase; line-height: 1.1; }
.code-card-cta .arrow { font-size: 2rem; color: var(--gold); transition: transform .3s var(--ease); }
.code-card-cta:hover .arrow { transform: translateX(8px); }

/* programas */
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.program-card { background: #fffaee; border-radius: 14px; border-top: 6px solid var(--teal); padding: 30px 26px; box-shadow: 0 10px 30px rgba(27, 29, 26, .08); }
.program-card h3 { font-size: 1.55rem; color: var(--teal-deep); margin-bottom: 14px; }
.program-card ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.program-card li { margin-bottom: 8px; }
.program-card li::marker { color: var(--gold); }

/* pacto */
.pledge-wrap { max-width: 860px; }
.pledge-list { margin: 0 0 36px; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 14px; }
.pledge-list li { counter-increment: p; display: flex; gap: 16px; align-items: baseline; font-size: 1.2rem; border-bottom: 1px solid rgba(245, 239, 223, .25); padding-bottom: 14px; }
.pledge-list li::before { content: counter(p); font-family: var(--display); font-size: 1.6rem; color: var(--gold); min-width: 1.4em; }
.pledge-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; }
.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 1.1rem; }
.check input { width: 24px; height: 24px; accent-color: var(--gold); }
.pledge-status { margin-top: 18px; min-height: 1.6em; color: var(--cream); font-weight: 600; }

/* unirse */
.join-card { background: var(--carbon-2); border: 1px solid rgba(241, 191, 68, .35); border-radius: 20px; padding: clamp(28px, 5vw, 56px); max-width: 920px; margin-inline: auto; text-align: center; }
.join-card h2 { color: var(--gold); font-size: clamp(2rem, 4.5vw, 3.2rem); }
.join-card > p { margin: 14px auto 0; max-width: 40em; color: rgba(245, 239, 223, .85); }
.join-form { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; text-align: left; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .85rem; font-weight: 600; color: rgba(245, 239, 223, .8); }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea {
  font: inherit; color: var(--cream); background: var(--carbon); border: 1px solid rgba(245, 239, 223, .3);
  border-radius: 10px; padding: 14px 16px; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; text-align: center; font-weight: 600; color: var(--gold); }

/* footer */
.site-footer { background: #121411; border-top: 1px solid rgba(245, 239, 223, .1); padding: 36px 0; font-size: .92rem; color: rgba(245, 239, 223, .65); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--gold); }

/* páginas simples (gracias, 404) */
.simple-page { min-height: 80vh; display: grid; align-content: center; justify-items: start; width: min(760px, 100% - 40px); margin: 0 auto; padding: 140px 0 80px; gap: 16px; }
.simple-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--gold); }
.simple-page .eyebrow { color: var(--gold); }

/* revelados: solo si Motion cargó (si no, todo se ve) */
.js:not(.still) .reveal { opacity: 0; }
.js:not(.still) [data-stagger] > * { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; position: relative; z-index: 2; }
  .brand { position: relative; z-index: 2; }
  .menu-toggle { display: inline-flex; }
  .header-join { display: none; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; margin: 0; background: var(--carbon);
    padding: 108px 28px 40px; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav li { border-bottom: 1px solid rgba(245, 239, 223, .12); }
  .site-nav li a { display: block; padding: 18px 0; font-family: var(--display); text-transform: uppercase; font-size: 2rem; font-weight: 600; opacity: 1; letter-spacing: .02em; }
  .site-nav li a::after { display: none; }
  .site-nav .nav-join { display: block; border: 0; margin-top: 24px; }
  .site-nav .nav-join a { color: var(--carbon); display: flex; font-family: var(--body); font-size: 1.05rem; padding: 18px 28px; text-transform: none; }
  body.menu-open .site-header { background: var(--carbon); backdrop-filter: none; box-shadow: none; }
  .hero { padding-top: 104px; }
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .hero-shield { width: min(213px, 53vw); }
  .statement-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand { gap: 9px; }
  .brand span { font-size: 1rem; }
  .brand img { width: 32px; }
  .header-inner { min-height: 64px; }
  .hero { padding-top: 88px; }
  .join-form { grid-template-columns: 1fr; }
  .button-row .button { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .brand span { font-size: .88rem; }
  .lang-switch a { padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .hero-copy > *, .js .hero-shield { opacity: 1; }
  .js .reveal, .js [data-stagger] > * { opacity: 1 !important; }
}
