/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ffffff;
  --ink:       #0a0a0a;
  --red:       #d0111b;   /* LEGO red */
  --blue:      #0055bf;   /* LEGO blue */
  --yellow:    #f2cd37;   /* LEGO yellow */
  --line:      #0a0a0a;
  --mute:      #5a5a5a;

  --sans: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", "IBM Plex Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 1px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.02; letter-spacing: -0.02em; font-family: var(--sans); font-weight: 800; }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--yellow); color: var(--ink);
  z-index: 9999; font-weight: 700; font-family: var(--mono);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  background: var(--line);
}
.grid-12 > * { background: var(--bg); }
.col-span-3 { grid-column: span 12; padding: 1.5rem 1.25rem; }
.col-span-4 { grid-column: span 12; padding: 1.5rem 1.25rem; }
.col-span-5 { grid-column: span 12; padding: 1.5rem 1.25rem; }
.col-span-7 { grid-column: span 12; padding: 1.5rem 1.25rem; }
.col-span-8 { grid-column: span 12; padding: 1.5rem 1.25rem; }
.col-span-9 { grid-column: span 12; padding: 1.5rem 1.25rem; }

@media (min-width: 720px) {
  .col-span-3 { grid-column: span 3; }
  .col-span-4 { grid-column: span 4; }
  .col-span-5 { grid-column: span 5; }
  .col-span-7 { grid-column: span 7; }
  .col-span-8 { grid-column: span 8; }
  .col-span-9 { grid-column: span 9; }
}

/* =============================================================
   4. Header
   ============================================================= */
.site-header {
  border-bottom: 2px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.logo span { color: var(--red); }
.main-nav { display: flex; gap: 1.5rem; align-items: center; font-family: var(--mono); font-size: 0.85rem; }
.main-nav a { padding: 0.3rem 0; border-bottom: 2px solid transparent; transition: border-color 0.2s var(--ease-out), background 0.15s, color 0.15s; }
.main-nav a:hover { border-color: var(--red); }
.nav-cta { background: var(--ink); color: var(--bg) !important; padding: 0.5rem 1rem !important; }
.nav-cta:hover { background: var(--red); border-color: var(--red) !important; }

/* =============================================================
   5. Components
   ============================================================= */
.btn-block {
  display: inline-block;
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  background: var(--yellow); color: var(--ink);
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--ink);
  transition: transform 0.15s var(--ease-out), background 0.15s;
}
.btn-block:hover { background: var(--red); color: var(--bg); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-large { font-size: 1.1rem; padding: 1.1rem 2rem; }

/* =============================================================
   6. Sections
   ============================================================= */

/* HERO */
.hero { border-bottom: 2px solid var(--line); padding-top: 2rem; }
.hero-head h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  text-transform: uppercase;
}
.hero-head em { font-style: normal; color: var(--red); }
.hero-sub { font-size: 1.05rem; color: var(--mute); margin-bottom: 1.5rem; }
.hero-side { display: flex; flex-direction: column; justify-content: center; gap: 0; border-left: 2px solid var(--line); }

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--line);
}
.stat {
  padding: 1.25rem; text-align: center;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-value { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--blue); }
.stat-label { font-family: var(--mono); font-size: 0.75rem; color: var(--mute); text-transform: uppercase; }

/* MANIFESTO */
.manifesto { padding: 4rem 0; border-bottom: 2px solid var(--line); }
.manifesto-text { max-width: 62ch; font-size: 1.1rem; margin-bottom: 1.25rem; }
.manifesto-text:last-child { margin-bottom: 0; }

/* RESOURCES */
.resources { padding: 4rem 0; border-bottom: 2px solid var(--line); }
.resources h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 2.5rem; text-transform: uppercase; }
.resources-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter); background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 720px) { .resources-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .resources-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--bg);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: background 0.2s var(--ease-out);
}
.card:hover { background: #fdf6e3; }
.card-block {
  aspect-ratio: 16/10;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}
.card-block::before {
  content: "";
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: rgba(0,0,0,0.15);
}
.card:hover .card-block { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.tone-red { background: var(--red); }
.tone-blue { background: var(--blue); }
.tone-yellow { background: var(--yellow); }
.card-num { font-family: var(--mono); font-weight: 700; font-size: 1.8rem; color: var(--bg); }
.tone-yellow .card-num { color: var(--ink); }
.card-title { font-size: 1.05rem; font-weight: 800; }
.card-summary { font-size: 0.9rem; color: var(--mute); line-height: 1.5; }

/* SOBRE */
.sobre { padding: 4rem 0; border-bottom: 2px solid var(--line); }
.sobre h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }

/* CTA */
.cta { padding: 5rem 0; background: var(--ink); color: var(--bg); text-align: center; }
.cta .kicker { color: var(--yellow); }
.cta h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; text-transform: uppercase; }
.cta-sub { color: #ccc; max-width: 50ch; margin: 0 auto 2rem; font-size: 1.05rem; }

/* FOOTER */
.site-footer { padding: 2rem 0; border-top: 2px solid var(--line); }
.footer-inner { font-family: var(--mono); font-size: 0.8rem; color: var(--mute); display: flex; flex-direction: column; gap: 0.4rem; }
.footer-inner a { color: var(--blue); text-decoration: underline; }
.footer-legal { font-size: 0.7rem; }

/* =============================================================
   7. Effects
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(16px); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }

/* =============================================================
   8. Responsive handled inline via min-width blocks above
   ============================================================= */

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
