/*
Theme Name: 0xDFIR
Theme URI: https://gray-okapi-771600.hostingersite.com
Author: Comunidade 0xDFIR
Description: Tema WordPress da 0xDFIR — comunidade brasileira de Forense Digital e Resposta a Incidentes. Réplica fiel do design original (React/Vite), reconstruído para edição sem código: imagens, eBook, conteúdos, loja e doação editáveis pelo painel do WordPress.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: 0xdfir
*/

/* =========================================================
   1. DESIGN TOKENS — mesmas cores/fontes do site original
   ========================================================= */
:root {
    --background: 222 32% 4%;
    --foreground: 150 12% 94%;
    --card: 222 24% 7%;
    --card-foreground: 150 12% 94%;
    --primary: 47.5 100% 61.4%;
    --primary-foreground: 222 45% 6%;
    --secondary: 220 16% 12%;
    --secondary-foreground: 150 12% 94%;
    --muted: 220 16% 12%;
    --muted-foreground: 215 12% 62%;
    --accent: 220 16% 12%;
    --accent-foreground: 47.5 100% 61.4%;
    --destructive: 0 72% 55%;
    --destructive-foreground: 0 0% 98%;
    --border: 220 14% 16%;
    --input: 220 14% 18%;
    --ring: 47.5 100% 61.4%;
    --radius: 0.375rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    overflow-x: clip;
    line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.font-jbmono { font-family: "JetBrains Mono", monospace; }

.wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

.bg-grid {
    background-image:
        linear-gradient(to right, hsl(220 14% 60% / 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, hsl(220 14% 60% / 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
}

.text-primary { color: hsl(var(--primary)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.875rem;
    color: rgb(255, 212, 71)!important;
}

/* =========================================================
   2. HEADER
   ========================================================= */
.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid hsl(var(--border) / 0.7);
    background: hsl(var(--background) / 0.85);
    backdrop-filter: blur(10px);
}
.site-header .wrap {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo img { height: 2.5rem; width: auto; max-width: 180px; object-fit: contain; }
.main-nav { display: none; align-items: center; gap: 1.75rem; }
.main-nav a { font-size: 0.875rem; color: hsl(var(--muted-foreground)); transition: color .2s; }
.main-nav a:hover { color: hsl(var(--foreground)); }
@media (min-width: 768px) { .main-nav { display: flex; } .menu-toggle { display: none; } }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: var(--radius);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    transition: filter .15s, transform .1s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 3rem;
    padding: 0 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary) / 0.6);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 600;
    transition: background .2s;
}
.btn-secondary:hover { background: hsl(var(--secondary)); }

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    width: 2.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: transparent;
    color: hsl(var(--foreground));
}
.mobile-nav { display: none; border-top: 1px solid hsl(var(--border)); padding: 1rem; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: .75rem; border-radius: var(--radius); color: hsl(var(--muted-foreground)); }
.mobile-nav a:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }

/* =========================================================
   3. HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; padding-top: 4rem; }
.hero::before {
    content: "";
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 60% 50% at 70% 20%, hsl(47.5 100% 61.4% / 0.08), transparent 70%);
}
.hero-grid {
    position: relative;
    display: grid;
    gap: 3rem;
    min-height: 92dvh;
    align-items: center;
    padding: 5rem 0;
}
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid hsl(var(--primary) / 0.3);
    background: hsl(var(--primary) / 0.1);
    border-radius: 999px; padding: .4rem .9rem;
    font-size: .8rem; color: rgb(255,212,71);
}
.hero h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 1.5rem 0 0; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; } }
.hero p.lead { margin-top: 1.5rem; max-width: 36rem; color: hsl(var(--muted-foreground)); font-size: 1.0625rem; line-height: 1.65; }
.hero-actions { margin-top: 2rem; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }
.hero-hex { margin-top: 2rem; font-family: "JetBrains Mono", monospace; font-size: .75rem; color: hsl(var(--muted-foreground) / 0.7); }

.hero-media { position: relative; }
.hero-media figure {
    overflow: hidden; border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    box-shadow: 0 25px 50px -12px hsl(var(--primary) / 0.1);
    margin: 0;
}
.hero-media img { aspect-ratio: 16/9; width: 100%; object-fit: contain; background: hsl(var(--card) / 0.6); }
.hero-terminal {
    position: absolute; bottom: -1rem; left: 1rem;
    font-family: "JetBrains Mono", monospace; font-size: .75rem;
    border: 1px solid hsl(var(--border)); background: hsl(var(--card));
    border-radius: var(--radius); padding: .5rem .75rem; color: hsl(var(--muted-foreground));
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / .3);
}

/* =========================================================
   4. MARQUEE
   ========================================================= */
.marquee { overflow: hidden; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--card) / 0.6); padding: 1rem 0; }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 2rem; animation: marquee-x 32s linear infinite; }
.marquee-track span.word { font-family: "JetBrains Mono", monospace; display: flex; align-items: center; gap: 2rem; white-space: nowrap; font-size: .75rem; letter-spacing: .15em; color: hsl(var(--muted-foreground)); }
@keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* =========================================================
   5. SECTION HEADINGS (Conteúdos / Ebook / Contato)
   ========================================================= */
.section { padding: 5rem 0; }
@media (min-width: 640px) { .section { padding: 7rem 0; } }
.section-head { max-width: 42rem; }
.section-head h2 { margin: .75rem 0 0; font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 640px) { .section-head h2 { font-size: 2.25rem; } }
.section-head p { margin-top: 1.25rem; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.section-head.center { margin: 0 auto; text-align: center; }

/* =========================================================
   6. CONTEÚDOS (grid — agora é um Custom Post Type editável)
   ========================================================= */
.contents-grid {
    margin-top: 3rem;
    display: grid;
    gap: 1px;
    background: hsl(var(--border));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}
@media (min-width: 640px) { .contents-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .contents-grid { grid-template-columns: repeat(3, 1fr); } }
.content-card { background: hsl(var(--background)); padding: 1.5rem; transition: background .2s; }
.content-card:hover { background: hsl(var(--card)); }
.content-card .row { display: flex; align-items: center; justify-content: space-between; }
.content-card .icon {
    display: flex; align-items: center; justify-content: center;
    height: 2.5rem; width: 2.5rem; border-radius: var(--radius);
    border: 1px solid hsl(var(--primary) / 0.3); background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
    font-size: 1.1rem;
}
.content-card .icon.has-image { padding: 0; border: none; background: none; overflow: hidden; }
.content-card .icon.has-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.content-card .num { font-family: "JetBrains Mono", monospace; font-size: .75rem; color: hsl(var(--muted-foreground) / 0.5); }
.content-card h3 { margin: 1.25rem 0 0; font-weight: 600; }
.content-card p { margin-top: .5rem; font-size: .875rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }

/* =========================================================
   7. EBOOK
   ========================================================= */
.ebook-section { border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--card) / 0.4); }
.ebook-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .ebook-grid { grid-template-columns: 0.85fr 1.15fr; } }
.ebook-cover { position: relative; max-width: 22rem; margin: 0 auto; }
.ebook-cover img { border-radius: var(--radius); border: 1px solid hsl(var(--border)); box-shadow: 0 25px 50px -12px hsl(var(--primary) / 0.2); }
.ebook-badge {
    position: absolute; top: 1rem; right: -0.75rem; transform: rotate(3deg);
    font-family: "JetBrains Mono", monospace; font-size: .75rem; font-weight: 600;
    background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
    padding: .35rem .75rem; border-radius: var(--radius); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .3);
}
.ebook-topics { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.ebook-topics li { display: flex; gap: .75rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }
.ebook-topics li::before { content: "✓"; color: hsl(var(--primary)); font-weight: 700; }

.ebook-form { margin-top: 2rem; max-width: 36rem; }
.ebook-form .grid2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .ebook-form .grid2 { grid-template-columns: 1fr 1fr; } }
.ebook-form label { font-size: .875rem; font-weight: 500; display: block; margin-bottom: .5rem; }
.ebook-form input {
    height: 3rem; width: 100%; border-radius: var(--radius);
    border: 1px solid hsl(var(--input)); background: hsl(var(--background));
    padding: 0 1rem; color: hsl(var(--foreground)); font-size: .875rem;
}
.ebook-form input:focus { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }
.ebook-form button { margin-top: 1.25rem; width: 100%; }
@media (min-width: 640px) { .ebook-form button { width: auto; } }
.ebook-note { margin-top: .75rem; font-size: .75rem; color: hsl(var(--muted-foreground) / 0.7); }
.ebook-error { margin-top: .75rem; font-size: .875rem; color: hsl(var(--destructive)); }
.ebook-success { margin-top: 2rem; border: 1px solid hsl(var(--primary) / 0.4); background: hsl(var(--primary) / 0.1); border-radius: var(--radius); padding: 1.5rem; }
.ebook-success p.title { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: hsl(var(--primary)); margin: 0; }
.ebook-success .btn-primary { margin-top: 1rem; }

/* =========================================================
   8. CONTATO
   ========================================================= */
.contact-grid { margin: 3rem auto 0; max-width: 56rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
    display: flex; flex-direction: column; height: 100%;
    border: 1px solid hsl(var(--border)); border-radius: var(--radius);
    background: hsl(var(--background)); padding: 1.5rem; transition: border-color .2s, background .2s;
}
.contact-card:hover { border-color: hsl(var(--primary) / 0.5); background: hsl(var(--card)); }
.contact-card .row { display: flex; align-items: center; justify-content: space-between; }
.contact-card .icon {
    display: flex; align-items: center; justify-content: center;
    height: 2.75rem; width: 2.75rem; border-radius: var(--radius);
    border: 1px solid hsl(var(--primary) / 0.3); background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
}
.contact-card h3 { margin: 1.25rem 0 0; font-weight: 600; }
.contact-card .handle { font-family: "JetBrains Mono", monospace; font-size: .75rem; color: rgb(255,212,71); margin-top: .25rem; }
.contact-card p { margin-top: .75rem; font-size: .875rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }

/* =========================================================
   9. FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid hsl(var(--border)); padding: 2.5rem 0; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
@media (min-width: 640px) { .site-footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer p { font-size: .8rem; color: hsl(var(--muted-foreground)); margin: 0; }

/* =========================================================
   10. Utilitário: ícones inline (sem depender de lib JS)
   ========================================================= */
.icon-svg { width: 1.1em; height: 1.1em; stroke: currentColor; fill: none; stroke-width: 2; vertical-align: -0.15em; }
