/*
 * Página inicial (HomeFunction no template.yaml). O tema comum (tokens, topo, botões,
 * seções, cards e rodapé) está em base.css, carregada antes desta; aqui fica só o
 * que é da página: início, métricas, projeto em destaque, laboratórios, notícias,
 * canais e stack.
 */

/* ---------- Início ---------- */
.hero { padding: 72px 0 0; background: linear-gradient(180deg, var(--surface), var(--bg)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero-id { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); }
.hello { margin: 0; color: var(--dim); font-size: 0.88rem; }
.hero-name { margin: 0; font-size: 1.1rem; font-weight: 700; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 750; line-height: 1.1; letter-spacing: -0.03em; }
.h1-sub { display: block; margin-top: 10px; color: var(--primary); font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 600; letter-spacing: -0.01em; }
.lead { max-width: 58ch; margin: 0 0 30px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; font-size: 0.9rem; font-weight: 600; }
.socials a { color: var(--muted); text-decoration: none; }
.socials a:hover { color: var(--primary); }
.terminal { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 24px 48px -24px rgba(15, 27, 45, 0.45); }

/* ---------- Métricas ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 64px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 26px 24px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { color: var(--text); font-size: 1.9rem; font-weight: 750; letter-spacing: -0.02em; }
.stat span { color: var(--dim); font-size: 0.9rem; }

/* ---------- Projeto em destaque (Vitalis) ---------- */
.featured { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); margin-bottom: 24px; padding: 0; overflow: hidden; border-color: var(--primary); box-shadow: var(--shadow); }
.featured:hover { border-color: var(--primary); }
.featured-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 34px 36px; }
.featured h3 { margin: 4px 0 8px; font-size: 1.5rem; }
.featured p { max-width: 56ch; font-size: 1rem; }
.featured-cta { margin-top: 22px; }
.checks { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--text); font-size: 0.93rem; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.featured-art { display: grid; align-content: center; padding: 34px 32px; background: var(--primary-soft); border-left: 1px solid var(--line); }
.flow { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.flow li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; }
.flow li:not(:last-child)::after { content: ''; position: absolute; left: 25px; bottom: -11px; width: 1px; height: 10px; background: var(--line-strong); }
.flow-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 0.75rem; font-weight: 700; }

/* ---------- Laboratórios ---------- */
.lab { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.lab-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lab-top .icon-tile { margin-bottom: 16px; }
.lab p { flex: 1; margin-bottom: 18px; }
.lab-cta { color: var(--primary); font-size: 0.92rem; font-weight: 600; }
.lab-live:hover { border-color: var(--primary); }
.lab-link { color: inherit; text-decoration: none; }
/* Card com vídeo ou em destaque: o link do título cobre o card e o do vídeo fica por cima */
.lab-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.lab-video { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.lab-video:hover { color: var(--primary); }
.lab-video-thumb { position: relative; flex: none; display: block; width: 84px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.lab-video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; margin: auto; width: 22px; height: 16px; border-radius: 4px; background: #e11d48; }
.play::after { content: ''; position: absolute; top: 50%; left: 54%; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent #fff; transform: translate(-50%, -50%); }
.lab-locked { cursor: not-allowed; opacity: 0.6; }

/* ---------- Notícias ---------- */
.highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hl { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.hl:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.hl-banner { display: flex; align-items: center; height: 96px; padding: 0 26px; }
.hl-shark .hl-banner { background: linear-gradient(120deg, #0f2a4a, #1f4fd1); }
.hl-agro .hl-banner { background: linear-gradient(120deg, #0d3b30, #0f766e); }
.hl-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.hl-icon svg { width: 26px; height: 26px; }
.hl-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 26px 26px; }
.hl-badge { padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hl h3 { margin: 4px 0 0; font-size: 1.2rem; }
.hl p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.hl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 12px 0 16px; padding: 0; list-style: none; }
.hl-facts li { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hl-facts strong { font-size: 1.05rem; }
.hl-facts span { color: var(--dim); font-size: 0.78rem; line-height: 1.35; }
.hl .lab-cta { margin-top: auto; }

/* ---------- Canais ---------- */
.channel { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.channel:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.channel-banner { display: block; width: 100%; height: auto; aspect-ratio: 16 / 5; object-fit: cover; background: var(--surface); }
.channel-body { display: flex; flex: 1; flex-direction: column; gap: 2px; padding: 0 20px 20px; }
.channel-avatar { display: block; width: 56px; height: 56px; margin: -28px 0 10px; border: 3px solid var(--card); border-radius: 50%; background: var(--card); }
.channel h3 { margin: 0; font-size: 1rem; }
.channel-handle { color: var(--dim); font-size: 0.8rem; }
.channel p { flex: 1; margin: 8px 0 14px; color: var(--muted); font-size: 0.9rem; }
.channel-cta { color: var(--primary); font-size: 0.88rem; font-weight: 600; }

/* ---------- Stack ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.88rem; font-weight: 500; }

/* ---------- Telas menores ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .hero-art { max-width: 480px; }
    .featured { grid-template-columns: minmax(0, 1fr); }
    .featured-art { border-left: 0; border-top: 1px solid var(--line); }
    .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .flow li:not(:last-child)::after { display: none; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .highlights { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .hero { padding-top: 44px; }
    .nav-cta { display: none; }
    .actions .btn { flex: 1 1 100%; }
    .featured-body, .featured-art { padding: 26px 22px; }
    .stat { padding: 20px 14px 22px; }
    .stat strong { font-size: 1.5rem; }
}
@media (max-width: 420px) {
    .hl-facts { grid-template-columns: minmax(0, 1fr); }
    .flow { grid-template-columns: minmax(0, 1fr); }
}
