/* ===== Homepage ===== */

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  padding-top: var(--header-h); overflow: hidden; isolation: isolate;
}
.hero canvas.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 2s var(--ease); }
.hero canvas.topo.drawn { opacity: .7; }
.hero::after { /* desvanece o mapa para o texto respirar */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 22% 55%, var(--bg) 25%, transparent 75%);
}
.hero-inner { flex: 1; display: grid; align-items: center; gap: 40px; padding-top: clamp(32px, 6vh, 72px); padding-bottom: clamp(32px, 6vh, 72px); }
@media (min-width: 1000px) { .hero-inner { grid-template-columns: 1.5fr 1fr; } }
.hero-title .split-line > span { white-space: nowrap; }
.hero-title { margin: 24px 0 28px; }
.hero-title .olive { color: var(--olive); }
.hero .lead { margin-bottom: 36px; }

/* marca desenhada */
.hero-mark { display: none; justify-self: end; width: 100%; max-width: 440px; }
@media (min-width: 1000px) { .hero-mark { display: block; } }
.mark-frame { position: relative; aspect-ratio: 1; border: 1px solid var(--line-2); display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(2px); }
.mark-frame::before, .mark-frame::after { /* mira central */
  content: ""; position: absolute; background: var(--line-2);
}
.mark-frame::before { left: 50%; top: 0; bottom: 0; width: 1px; opacity: .5; }
.mark-frame::after { top: 50%; left: 0; right: 0; height: 1px; opacity: .5; }
.mark-draw { width: 70%; color: var(--ink); position: relative; z-index: 1; overflow: visible; }
.mark-draw .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .mark-draw .draw, .reduced .mark-draw .draw { animation: draw 2.2s .5s var(--ease) forwards; }
.mark-draw .pop { opacity: 0; transform-box: fill-box; transform-origin: center; }
.in .mark-draw .pop, .reduced .mark-draw .pop { animation: pop .7s var(--ease) forwards; }
.in .mark-draw .bb { animation-delay: 2.3s; }
.in .mark-draw path.pop { animation-delay: 2s; }
.in .mark-draw .flag { animation-delay: 2.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.reduced .mark-draw .draw { animation-duration: 0s; animation-delay: 0s; }
.reduced .mark-draw .pop { animation-duration: 0s; animation-delay: 0s !important; }
.mark-tag { position: absolute; top: 14px; left: 14px; font-size: 10.5px; color: var(--muted); letter-spacing: .1em; }
.mark-tag-b { top: auto; left: auto; bottom: 14px; right: 14px; }

/* HUD */
.hero-hud { position: absolute; inset: var(--header-h) 0 0 0; pointer-events: none; z-index: 0; }
.hud-corner { position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--ink); opacity: .55; }
.hud-corner.tl { top: 18px; left: var(--gutter); border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 18px; right: var(--gutter); border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 96px; left: var(--gutter); border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 96px; right: var(--gutter); border-left: 0; border-top: 0; }
.hud-top { display: flex; justify-content: space-between; padding-top: 28px; padding-left: calc(var(--gutter) + 34px); padding-right: calc(var(--gutter) + 34px); max-width: none; }
.hud-coords { display: none; }
@media (min-width: 700px) { .hud-coords { display: inline-flex; } }
.label .dot { animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* retículo que segue o rato (desktop) */
.reticle {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border: 1px solid var(--ink); border-radius: 50%; opacity: 0; transition: opacity .3s;
  will-change: transform;
}
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--ink); }
.reticle::before { left: 50%; top: -10px; bottom: -10px; width: 1px; }
.reticle::after { top: 50%; left: -10px; right: -10px; height: 1px; }
.reticle-readout { position: absolute; left: 44px; top: 44px; font-size: 10.5px; white-space: nowrap; color: var(--ink-2); background: var(--bg); padding: 2px 6px; }
.hero.aiming .reticle { opacity: .75; }
@media (hover: none), (max-width: 999px) { .reticle { display: none; } }

/* barra inferior */
.hero-bar { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px); position: relative; z-index: 1; }
.hero-bar-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-bar-inner > div { padding: 18px 0; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 12px; }
.hero-bar-inner > div + div { padding-left: clamp(12px, 3vw, 32px); }
.hero-bar-inner .mono { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-bar-inner b { font-size: clamp(16px, 2vw, 22px); font-stretch: 115%; letter-spacing: -.02em; }
.scroll-cue { display: none; }
@media (min-width: 800px) {
  .hero-bar-inner { grid-template-columns: repeat(3, 1fr) auto; }
  .scroll-cue { display: flex; align-items: center; gap: 10px; padding-left: 32px; text-decoration: none; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
  .scroll-cue svg { width: 14px; transform: rotate(90deg); animation: nudge 2s var(--ease) infinite; }
}
@media (max-width: 799px) { .hero-bar-inner > div:nth-child(3) { border-right: 0; } }
@keyframes nudge { 50% { transform: rotate(90deg) translateX(4px); } }

/* ---------- aderir ---------- */
.join { display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .join { grid-template-columns: 1.25fr 1fr; gap: 96px; } }
.steps { list-style: none; padding: 0; margin: 48px 0 0; counter-reset: s; position: relative; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 24px 0; border-top: 1px solid var(--line-2); position: relative; }
.steps li:last-child { border-bottom: 1px solid var(--line-2); }
@media (max-width: 600px) { .steps li { grid-template-columns: 36px 1fr; } }
.steps li > .mono { font-size: 13px; color: var(--olive); font-weight: 600; padding-top: 3px; }
.steps h4 { font-size: 19px; letter-spacing: -.015em; font-stretch: 105%; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 52ch; }

.price-card {
  background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px); position: sticky; top: calc(var(--header-h) + 24px);
  box-shadow: 10px 10px 0 -1px var(--olive-soft), 10px 10px 0 0 var(--line-2);
}
.price-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.price-main { display: flex; align-items: flex-end; gap: 20px; margin: 28px 0 24px; padding-bottom: 24px; border-bottom: 1px dashed var(--line-2); flex-wrap: wrap; }
.price-amount { display: flex; align-items: flex-start; line-height: .8; }
.price-amount b { font-size: clamp(88px, 10vw, 120px); font-weight: 800; letter-spacing: -.06em; font-stretch: 125%; }
.price-amount span { font-family: var(--mono); font-size: 14px; margin-top: 8px; margin-left: 6px; color: var(--muted); }
.price-main p { margin: 0 0 6px; font-weight: 600; line-height: 1.4; }
.price-main p .mono { font-weight: 400; font-size: 12px; }
.price-list { list-style: none; margin: 0 0 28px; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.price-list b { font-variant-numeric: tabular-nums; }
.price-note { text-align: center; font-size: 11px; color: var(--muted); margin: 16px 0 0; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- HAVOC ---------- */
.havoc { overflow: hidden; isolation: isolate; }
.havoc canvas.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.havoc-inner { display: grid; gap: 64px; align-items: center; }
@media (min-width: 1000px) { .havoc-inner { grid-template-columns: 1.2fr 1fr; } }
.havoc-title {
  font-size: clamp(84px, 16vw, 220px); font-weight: 900; letter-spacing: -.02em; line-height: .85; font-stretch: 62%;
  margin: 20px 0 28px; color: var(--bg);
}
.havoc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-top: 36px; border-top: 1px solid #34382b; }
.havoc-meta > div { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.havoc-meta .mono { font-size: 11px; color: #7f8275; text-transform: uppercase; letter-spacing: .08em; }
.havoc-meta b { font-size: 17px; color: var(--bg); }

.hex-stack { position: relative; height: clamp(320px, 42vw, 520px); }
.hex {
  position: absolute; width: clamp(180px, 22vw, 290px); aspect-ratio: .866;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--mono); text-align: center; transition: transform .8s var(--ease);
}
.hex span { font-size: 11px; letter-spacing: .3em; }
.hex b { font-family: var(--font); font-size: clamp(56px, 7vw, 96px); line-height: 1; font-weight: 900; font-stretch: 62%; }
.hex small { font-size: 10px; letter-spacing: .2em; }
.hex-a { right: 4%; top: 4%; background: var(--bg); color: var(--ink); z-index: 3; }
.hex-b { left: 6%; top: 32%; background: var(--olive); color: var(--bg); z-index: 2; transform: scale(.82); }
.hex-c { right: 28%; bottom: 0; background: #2a2e22; color: #c9cbbf; z-index: 1; transform: scale(.7); border: 1px solid #3a3e31; }
.hex-stack:hover .hex-a { transform: translate(8px, -8px); }
.hex-stack:hover .hex-b { transform: scale(.82) translate(-10px, 4px); }
.hex-stack:hover .hex-c { transform: scale(.7) translate(6px, 12px); }
@media (max-width: 999px) { .hex-stack { height: 300px; } .hex { width: 170px; } .hex-a { right: 0; } .hex-b { left: 0; } .hex-c { right: 30%; } }

/* ---------- notícias ---------- */
.news-skeleton { aspect-ratio: 16 / 14; border-radius: var(--radius); background: linear-gradient(100deg, var(--bg-2) 30%, var(--surface) 50%, var(--bg-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- atalhos de documentos ---------- */
.quick { display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.quick > svg { width: 28px; height: 28px; color: var(--olive); }
.quick h3 { margin: auto 0 0; }
.quick .link-arrow { font-size: 14px; color: var(--muted); }
.quick:hover .link-arrow { color: var(--ink); }

/* ---------- CTA final ---------- */
.cta-final { overflow: hidden; }
.cta-grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 1000px) { .cta-grid { grid-template-columns: 1.4fr 1fr; gap: 80px; } }
.cta-final .h1 { max-width: none; }

/* ---------- mobile: o essencial primeiro ---------- */
@media (max-width: 999px) {
  /* título → preço + inscrição → passos */
  .join { display: flex; flex-direction: column; gap: 0; }
  .join > div:first-child { display: contents; }
  .join .label, .join .h2 { order: -2; }
  .join > aside { order: -1; margin-top: 32px; }
  .join .steps { margin-top: 44px; }
  .price-card { position: relative; top: 0; box-shadow: 6px 6px 0 -1px var(--olive-soft), 6px 6px 0 0 var(--line-2); }
}
@media (max-width: 699px) {
  /* hero: CTA ocupa a largura toda; menos altura morta */
  .hero { min-height: auto; }
  .hero-inner { padding-top: 40px; padding-bottom: 40px; }
  .hero-title { margin: 18px 0 20px; }
  .hero .lead { margin-bottom: 28px; }
  .hero .row { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero .row .btn { width: 100%; }
  .hud-corner.bl, .hud-corner.br { bottom: 84px; }

  /* números: o 22 € e o 0 € já estão na barra do hero */
  .home-stats .stat:nth-child(2), .home-stats .stat:nth-child(4) { display: none; }
  .home-stats .stat:nth-child(3) { border-right: 0; padding-left: 16px; border-top: 0; margin-top: 0; }
  .home-stats .stat:nth-child(1) { border-right: 1px solid var(--line); }
  .home-stats .stat b { font-size: 40px; }

  /* vantagens: lista compacta em vez de 6 cartões altos */
  #porque .grid-3 { gap: 0; border-top: 1px solid var(--line); }
  #porque .card { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 0; }
  #porque .card .icon-box { width: 40px; height: 40px; grid-row: span 2; }
  #porque .card h3 { margin: 0 0 4px; font-size: 18px; }
  #porque .card p { font-size: 14.5px; line-height: 1.5; }
  #porque .corners::before, #porque .corners::after { display: none; }

  .steps { margin-top: 28px; }
  .steps li { padding: 18px 0; }
  .price-main { margin: 20px 0 18px; padding-bottom: 18px; }
  .price-amount b { font-size: 84px; }

  /* HAVOC: os hexágonos são decorativos */
  .hex-stack { display: none; }
  .havoc-inner { gap: 0; }
  .havoc-title { font-size: clamp(84px, 30vw, 140px); margin: 14px 0 20px; }
  .havoc-meta { grid-template-columns: 1fr 1fr; }
  .havoc-meta > div:first-child { grid-column: 1 / -1; }

  /* notícias: linhas com miniatura */
  #home-news { gap: 0; border-top: 1px solid var(--line); }
  #home-news .news-card { display: grid; grid-template-columns: 104px 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  #home-news .news-card .thumb { grid-row: 1 / -1; aspect-ratio: 1; }
  #home-news .news-card h3 { font-size: 17px; }
  #home-news .news-card p { font-size: 14px; -webkit-line-clamp: 2; }
  #home-news .news-card .meta { font-size: 11px; gap: 8px; }
  #home-news .news-card .meta .tag { height: 22px; padding: 0 8px; font-size: 10px; }
  .news-skeleton { aspect-ratio: auto; height: 104px; margin: 16px 0; }

  /* documentos: grelha 2×2 compacta */
  .grid-4:has(.quick) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick { min-height: 0; padding: 16px; gap: 10px; }
  .quick > svg { width: 22px; height: 22px; }
  .quick h3 { margin: 0; font-size: 16px; line-height: 1.2; }
  .quick .link-arrow { font-size: 13px; margin-top: auto; }

  .cta-final .h1 { font-size: clamp(34px, 10vw, 48px); }
}
