/*
  www/styles.css
  Base layer for the Polywarfare teaser: brand tokens, reset, typography,
  nav, buttons, signup form, toast, shared section header, ticker strip,
  reveal-on-scroll + idle-bob utilities, and reduced-motion overrides.
  Section-specific styles live in css/*.css.
*/

:root {
  /* Brand palette (from the brand owner's Affinity boards) */
  --rojo: #DE1A1A;
  --rojo-hi: #EA3A2C;
  --rojo-lo: #B30F14;
  --ghost: #E8EBF7;
  --noturno: #001621;
  --noturno-2: #072433;
  --petroleo: #0C4651;
  --vulcan: #FF4103;
  --limao: #E5FF2A;
  --verde: #A7F432;
  --paper: #F2E8D2;
  --ink: #0A1118;

  --f-display: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  --f-stencil: 'Black Ops One', 'Russo One', system-ui, sans-serif;
  --f-body: 'Chakra Petch', system-ui, sans-serif;
  --f-pixel: 'VT323', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 18px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--noturno);
  color: var(--ghost);
  font: 500 17px/1.55 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
::selection { background: var(--limao); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--limao); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--limao); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 14px var(--gutter) auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 10px;
  border-radius: 16px;
  transition: background .35s, box-shadow .35s, transform .45s var(--ease-out);
}
.nav.is-solid { background: rgba(0, 22, 33, .82); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.nav.is-hidden { transform: translateY(-120%); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 3px 0 var(--rojo-lo); }
.nav__word, .footer__word {
  display: block; width: 138px; aspect-ratio: 279 / 44; background: currentColor;
  -webkit-mask: url(assets/brand/wordmark.svg) center / contain no-repeat;
          mask: url(assets/brand/wordmark.svg) center / contain no-repeat;
}
.nav__links { display: flex; gap: 22px; margin-left: auto; font: 600 14px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; }
.nav__links a { text-decoration: none; opacity: .85; padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .3s, opacity .2s; }
.nav__links a:hover { opacity: 1; background-size: 100% 2px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--limao); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--bg); color: var(--fg);
  font: 400 17px/1 var(--f-display); text-transform: lowercase; text-decoration: none; letter-spacing: .02em;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn--small { padding: 11px 18px; font-size: 15px; margin-left: 4px; }
.btn--ink { --bg: var(--ink); --fg: var(--limao); box-shadow: 0 5px 0 var(--rojo-lo); }
.btn--ink:hover { box-shadow: 0 7px 0 var(--rojo-lo); }

/* ---------- Signup ---------- */
.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup input {
  flex: 1 1 220px; min-width: 0; padding: 15px 18px;
  border: 3px solid var(--ink); border-radius: 12px; background: var(--ghost); color: var(--ink);
  box-shadow: inset 0 3px 0 rgba(0,0,0,.08);
}
.signup input::placeholder { color: #7a8394; }
.signup input[aria-invalid="true"] { border-color: var(--limao); animation: shake .35s; }
.signup__note { flex-basis: 100%; font-size: 13px; opacity: .8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 14px 20px;
  background: var(--limao); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-hard);
  font: 400 18px/1.2 var(--f-display);
  transform: translate(-50%, calc(100% + 48px)) rotate(-2deg); visibility: hidden;
  transition: transform .5s var(--ease-out), visibility 0s .5s;
}
.toast.is-on { transform: translate(-50%, 0) rotate(-2deg); visibility: visible; transition: transform .5s var(--ease-out); }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(88px, 12vw, 160px) var(--gutter); }
.section__head { max-width: var(--max); margin: 0 auto clamp(40px, 6vw, 72px); }
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 6px 12px; border-radius: 6px;
  background: var(--limao); color: var(--ink);
  font: 400 13px/1 var(--f-stencil); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-1.5deg);
}
.section__title { font: 400 clamp(44px, 7.4vw, 112px)/.92 var(--f-display); letter-spacing: -.02em; text-transform: lowercase; }
.section__title em { font-style: normal; color: var(--limao); }
.section__lede { max-width: 560px; margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); opacity: .88; }

/* ---------- Ticker ---------- */
.ticker { position: relative; z-index: 3; overflow: hidden; margin-top: -2px; background: var(--limao); color: var(--ink); border-block: 4px solid var(--ink); transform: rotate(-1.6deg) scale(1.04); }
.ticker__track { display: flex; width: max-content; animation: ticker 28s linear infinite; }
.ticker__track span { padding: 16px 26px; font: 400 clamp(18px, 2vw, 26px)/1 var(--f-stencil); text-transform: uppercase; white-space: nowrap; }
.ticker__track span::after { content: '★'; margin-left: 52px; color: var(--rojo); }

/* ---------- Utilities ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.bob { animation: bob 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }

@keyframes bob { 50% { transform: translateY(-9px); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__brand { margin-right: auto; }
  .nav__word { width: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
