/* ===== IDV Vanguard Vision ===== */
@font-face { font-family: "Vanguard"; src: url("assets/vanguard.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Neuetra"; src: url("assets/neuetra-light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Neuetra"; src: url("assets/neuetra-regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neuetra"; src: url("assets/neuetra-medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Neuetra"; src: url("assets/neuetra-semibold.otf") format("opentype"); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #030709;
  --surface: #081014;
  --line: #14252b;
  --text: #fafafa;
  --muted: #aab6b9;
  --cyan: #22e6f2;
  --teal: #0f2f38;
  --steel: #b8cbd5;
  --radius: 18px;
  --display: "Vanguard", "Neuetra", sans-serif;
  --body: "Neuetra", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  background: rgba(3, 7, 9, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 26px; width: auto; }
.brand-name { font-size: 20px; color: var(--cyan); white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--text); font-weight: 300; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.tab {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 500 14px var(--body); padding: 9px 18px; border-radius: 999px; transition: background .2s, color .2s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--cyan); color: #041113; }

/* ===== Layout ===== */
main { max-width: 1080px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter) 80px; }
.screen { display: none; animation: fade .35s ease; }
.screen.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { margin-bottom: clamp(28px, 5vw, 44px); }
.eyebrow { color: var(--cyan); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(30px, 6vw, 60px); line-height: 1.05; letter-spacing: .02em; margin: 10px 0 14px;
  overflow-wrap: anywhere;
}
.hl { color: var(--cyan); }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 18px); max-width: 600px; }
.lead strong { color: var(--text); font-weight: 600; }

/* ===== Superfícies ===== */
.card, .panel, .timeline-card, .balance {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.card-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(34, 230, 242, .3); color: var(--cyan);
}
.card-influencer .card-tag, .panel:not(.panel-vanguard) .card-tag { border-color: rgba(184, 203, 213, .3); color: var(--steel); }

/* ===== Tela 1 ===== */
.exchange { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.card { padding: clamp(22px, 4vw, 32px); }
.card-vanguard { border-color: rgba(34, 230, 242, .3); }
.big-number {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 22px 0 10px;
  font-family: var(--display); font-size: clamp(48px, 8vw, 68px); line-height: 1;
}
.card-vanguard .big-number { color: var(--cyan); }
.big-number small { font-family: var(--body); font-size: 17px; color: var(--muted); }
.big-number .plus { margin-left: 6px; }
.card h3 { font-weight: 600; font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--muted); }
.card p strong { color: var(--text); font-weight: 600; }
.swap {
  align-self: center; justify-self: center; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); color: var(--cyan); font-size: 20px;
}

.timeline-card { margin-top: 16px; padding: clamp(20px, 4vw, 28px); }
.timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.timeline-head h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 20px; letter-spacing: .03em; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-reel { background: var(--teal); }
.dot-story { background: var(--cyan); }
.timeline { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px; }
.day {
  aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center;
  background: var(--teal); color: var(--muted);
  font-size: clamp(11px, 1.4vw, 13px); font-weight: 500; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .3s;
}
.day.show { opacity: 1; }
.day.story { background: var(--cyan); color: #041113; font-weight: 600; }

.rules { list-style: none; margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rules li {
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}
.rules strong { color: var(--cyan); font-weight: 600; }

/* ===== Tela 2 ===== */
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: clamp(20px, 4vw, 28px); display: flex; flex-direction: column; min-width: 0; }
.panel-vanguard { border-color: rgba(34, 230, 242, .3); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.reset {
  background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  border-radius: 999px; padding: 6px 14px; font: 500 13px var(--body);
}
.reset:hover { color: var(--text); }

.field { padding: 14px 0; border-bottom: 1px solid var(--line); }
.field-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.field label { font-weight: 500; font-size: 15px; }
.field output { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.subtotal { text-align: right; color: var(--cyan); font-size: 14px; margin-top: 8px; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; outline: none; cursor: pointer;
  --accent: var(--steel);
  background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--line) var(--p, 0%));
  touch-action: pan-y;
}
.panel-vanguard input[type="range"] { --accent: var(--cyan); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
input[type="range"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }

.panel-total { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.panel-total span { color: var(--muted); font-weight: 500; }
.panel-total strong { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.5vw, 38px); font-variant-numeric: tabular-nums; }
.panel-vanguard .panel-total strong { color: var(--cyan); }
.panel:not(.panel-vanguard) .panel-total strong { color: var(--steel); }

.balance { margin-top: 16px; padding: clamp(18px, 4vw, 24px); }
.balance-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); }
.balance-fill { height: 100%; width: 0; transition: width .3s ease; }
.balance-influencer { background: var(--steel); }
.balance-vanguard { background: var(--cyan); }
#balanceText { margin-top: 12px; color: var(--muted); }
#balanceText strong { color: var(--cyan); font-weight: 600; }

/* ===== Responsivo ===== */
@media (max-width: 860px) {
  .exchange { grid-template-columns: 1fr; }
  .swap { transform: rotate(90deg); }
  .custom-grid, .rules { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .topbar { padding-top: 12px; padding-bottom: 12px; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 9px 6px; font-size: 13px; }
  .timeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .legend { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
