/* ====================================================================
   Design tokens
==================================================================== */
:root {
  /* Base */
  --bg: #0a0b14;
  --bg-raise: #111322;
  --bg-soft: #161828;
  --bg-softer: #1d2034;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f3ee;
  --text-soft: #9ea3b5;
  --text-dim: #6b6f82;

  /* Team palette — Fortaleza tricolor + Ceará alvinegro */
  --red: #e30613;
  --red-bright: #ff2e3c;
  --blue: #0a3b94;
  --blue-bright: #1f5bc6;
  --black: #050507;
  --white: #ffffff;

  /* Semantic accents */
  --accent: var(--red);
  --accent-bright: var(--red-bright);
  --accent-glow: rgba(227, 6, 19, 0.24);

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, system-ui, BlinkMacSystemFont, sans-serif;

  /* Easing — stronger custom curves (Emil Kowalski) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Layout */
  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ====================================================================
   Reset
==================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Ambient radial glow — red top, blue bottom, split like a flag */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(227, 6, 19, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(10, 59, 148, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 5% 100%, rgba(227, 6, 19, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

/* Fine grain texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

em {
  font-style: italic;
}

/* ====================================================================
   Scroll reveal
==================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 650ms var(--ease-out),
    transform 650ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 65ms);
}

[data-reveal-group].is-visible [data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================================
   Nav + jersey stripe
==================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
  background: rgba(10, 11, 20, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* Jersey stripe — the literal union of Fortaleza + Ceará colors */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--red) 0% 24%,
    var(--white) 24% 38%,
    var(--blue) 38% 62%,
    var(--black) 62% 86%,
    var(--white) 86% 100%
  );
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  transition: color 200ms ease;
}

.brand .crest {
  color: var(--red);
}

.crest {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
}

.crest svg {
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--red-bright);
  }
}

.nav-links a:focus-visible {
  color: var(--red-bright);
  outline: 2px solid var(--red);
  outline-offset: 6px;
  border-radius: 4px;
}

/* ====================================================================
   Hero
==================================================================== */
.hero {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 8rem) var(--gutter) clamp(3rem, 8vw, 5rem);
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  margin-bottom: 2.5rem;
  background: rgba(227, 6, 19, 0.1);
  border: 1px solid rgba(227, 6, 19, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--red-bright);
  letter-spacing: 0.01em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  animation: status-pulse 1800ms var(--ease-in-out) infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 46, 60, 0.65);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 46, 60, 0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 600;
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
}

/* "União" — Fortaleza red */
.title-line:not(.title-line--accent) {
  background: linear-gradient(180deg, var(--red-bright) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* "Sinistra" — Ceará alvinegro, italic, with subtle blue underglow */
.title-line--accent {
  font-style: italic;
  font-weight: 400;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(10, 59, 148, 0.35);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.375rem);
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.hero-tagline em {
  color: var(--red-bright);
}

.hero-lead {
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-lead em {
  color: var(--text);
  font-style: italic;
}

/* Progress bar — Fortaleza blue → red gradient */
.progress {
  max-width: 520px;
  margin: 0 auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.625rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.progress-label {
  color: var(--text-dim);
}

.progress-value {
  color: var(--red-bright);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 12%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--red) 100%);
  border-radius: 999px;
  transition: width 1100ms var(--ease-in-out);
  box-shadow: 0 0 14px var(--accent-glow);
}

.progress-note {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
}

/* ====================================================================
   KPIs
==================================================================== */
.kpis {
  max-width: var(--max-width);
  margin: clamp(3rem, 8vw, 5rem) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.kpi {
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-raise) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  transition:
    transform 280ms var(--ease-out),
    border-color 280ms ease,
    box-shadow 280ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .kpi:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow:
      0 18px 40px -22px rgba(0, 0, 0, 0.8),
      0 0 0 1px rgba(227, 6, 19, 0.18);
  }
}

.kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 600;
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.625rem;
  font-variant-numeric: tabular-nums;
}

.kpi span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ====================================================================
   Roadmap
==================================================================== */
.roadmap {
  max-width: var(--max-width);
  margin: clamp(5rem, 12vw, 8rem) auto 0;
  padding: 0 var(--gutter);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--red);
  margin-bottom: 1rem;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1.25rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.feature {
  position: relative;
  isolation: isolate;
  padding: 2rem;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition:
    transform 320ms var(--ease-out),
    border-color 320ms ease;
}

.feature > * {
  position: relative;
  z-index: 1;
}

/* Cursor-follow glow */
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(227, 6, 19, 0.15),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
  z-index: 0;
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 46, 60, 0.32);
  }
  .feature:hover::before {
    opacity: 1;
  }
}

.feature-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Rotate factions: Fortaleza red → Fortaleza blue → Ceará alvinegro */
.feature-grid .feature:nth-child(3n + 1) .feature-badge {
  background: rgba(227, 6, 19, 0.12);
  border-color: rgba(227, 6, 19, 0.35);
  color: var(--red-bright);
}

.feature-grid .feature:nth-child(3n + 2) .feature-badge {
  background: rgba(10, 59, 148, 0.18);
  border-color: rgba(31, 91, 198, 0.5);
  color: #7ea2e5;
}

.feature-grid .feature:nth-child(3n + 3) .feature-badge {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.feature h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ====================================================================
   Manifesto
==================================================================== */
.manifesto {
  max-width: 820px;
  margin: clamp(5rem, 12vw, 8rem) auto 0;
  padding: clamp(3rem, 8vw, 5rem) var(--gutter);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.manifesto .eyebrow {
  margin-bottom: 2rem;
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 2rem;
  position: relative;
  padding: 0 1rem;
}

.manifesto blockquote::before {
  content: "\201C";
  position: absolute;
  top: -2.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3.5rem;
  color: var(--red);
  font-family: var(--font-display);
  line-height: 1;
}

.manifesto cite {
  display: block;
  font-size: 0.875rem;
  color: var(--text-dim);
  font-style: normal;
  letter-spacing: 0.02em;
}

/* ====================================================================
   CTA
==================================================================== */
.cta {
  max-width: 680px;
  margin: clamp(5rem, 12vw, 8rem) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}

.cta h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.cta > p {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.cta em {
  color: var(--red-bright);
  font-style: italic;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 160ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
  box-shadow: 0 10px 30px -14px rgba(227, 6, 19, 0.65);
}

.btn-label {
  position: relative;
  z-index: 1;
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  opacity: 0;
  transition: opacity 260ms ease;
  z-index: 0;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -14px rgba(255, 46, 60, 0.6);
  }
  .btn:hover .btn-glow {
    opacity: 1;
  }
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.btn:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 4px;
}

.join-msg {
  min-height: 1.75rem;
  margin-top: 1.5rem;
  color: var(--red-bright);
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0;
  filter: blur(4px);
  transition:
    opacity 240ms var(--ease-out),
    filter 240ms var(--ease-out);
}

.join-msg.is-visible {
  opacity: 1;
  filter: blur(0);
}

/* ====================================================================
   Footer
==================================================================== */
.site-footer {
  margin-top: clamp(5rem, 12vw, 8rem);
  padding: clamp(3rem, 6vw, 4rem) var(--gutter) 2rem;
  background: var(--bg-raise);
  border-top: 1px solid var(--border);
  position: relative;
}

/* Mirror the jersey stripe at the bottom of the page */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--red) 0% 24%,
    var(--white) 24% 38%,
    var(--blue) 38% 62%,
    var(--black) 62% 86%,
    var(--white) 86% 100%
  );
  pointer-events: none;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
}

.footer-col p,
.footer-col ul {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.footer-col p {
  margin-bottom: 0.4rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col .hint {
  margin-top: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.8rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.footer-brand .crest {
  color: var(--red);
}

.footer-legal {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-legal .disclaimer {
  margin-top: 0.5rem;
  font-style: italic;
  opacity: 0.75;
}

/* ====================================================================
   Responsive
==================================================================== */
@media (max-width: 720px) {
  .nav {
    padding: 1rem var(--gutter);
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-links li:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none;
  }
}

/* ====================================================================
   Reduced motion
==================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .progress-fill {
    transition: none;
  }

  .status-dot {
    animation: none;
  }
}
