/* ============================================================
   ReisCode — identidade da home (v2)
   Paleta: azul elétrico → ciano (herdada do logo) sobre dark.
   Tipografia: Bricolage Grotesque (display), Instrument Sans
   (texto), JetBrains Mono (labels, métricas, código).
   ============================================================ */

:root {
    --bg: #06090f;
    --bg-raised: #0b111c;
    --bg-card: #0e1523;
    --line: rgba(148, 170, 220, 0.14);
    --text: #e9eef8;
    --text-dim: #93a1bc;
    --text-faint: #5f6d89;
    --blue: #384dff;
    --cyan: #24cdff;
    --cyan-soft: rgba(36, 205, 255, 0.12);
    --grad: linear-gradient(115deg, #384dff 0%, #24cdff 100%);
    --radius: 14px;
    --font-display: "Bricolage Grotesque", sans-serif;
    --font-body: "Instrument Sans", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--cyan);
    color: #06090f;
}

.container {
    width: min(1140px, 100% - 48px);
    margin-inline: auto;
}

/* ---------- fundo com grid + brilho ---------- */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(56, 77, 255, 0.22), transparent 60%),
        radial-gradient(700px 420px at -10% 30%, rgba(36, 205, 255, 0.10), transparent 60%),
        var(--bg);
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 10%, transparent 75%);
    opacity: 0.5;
}

/* ---------- tipografia ---------- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero .eyebrow {
    font-size: 16px;
    font-weight: 500;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--cyan);
    opacity: 0.6;
}

.section-head {
    max-width: 640px;
    margin-bottom: 56px;
}

.section-head h2 {
    font-size: clamp(30px, 4.4vw, 44px);
    margin-top: 14px;
}

.section-head p {
    color: var(--text-dim);
    margin-top: 14px;
    font-size: 17px;
}

.accent {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- botões ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    padding: 14px 26px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 28px rgba(36, 140, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(36, 140, 255, 0.5);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-soft);
}

.btn-sm {
    padding: 9px 18px;
    font-size: 14px;
    border-radius: 8px;
}

/* ---------- header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(6, 9, 15, 0.82);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.wordmark {
    font-family: var(--font-mono);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.wordmark .tag {
    color: var(--cyan);
}

.wordmark .cursor {
    display: inline-block;
    width: 9px;
    height: 1.05em;
    background: var(--cyan);
    vertical-align: text-bottom;
    margin-left: 3px;
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    list-style: none;
}

.nav-links a:not(.btn) {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--text);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- hero ---------- */
.hero {
    padding: 170px 0 90px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(38px, 5.6vw, 62px);
    margin: 20px 0 22px;
}

.hero .lead {
    color: var(--text-dim);
    font-size: 19px;
    max-width: 540px;
    margin-bottom: 36px;
}

.hero .lead strong {
    color: var(--text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* foto do hero */
.hero-photo {
    position: relative;
    max-width: 360px;
    justify-self: end;
    width: 100%;
}

.hero-photo img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.hero-photo::after {
    content: "";
    position: absolute;
    inset: 16px -16px -16px 16px;
    border: 1px solid rgba(36, 205, 255, 0.3);
    border-radius: var(--radius);
    z-index: -1;
}

.hero .social-row {
    margin-top: 28px;
}

/* ---------- métricas ---------- */
.metrics {
    border-block: 1px solid var(--line);
    background: rgba(11, 17, 28, 0.6);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.metric {
    padding: 34px 12px;
    border-left: 1px solid var(--line);
}

.metric:first-child {
    border-left: none;
}

.metric b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.metric span {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* ---------- seções ---------- */
.section {
    padding: 110px 0;
}

.section.tinted {
    background: linear-gradient(180deg, transparent, rgba(11, 17, 28, 0.65) 18%, rgba(11, 17, 28, 0.65) 82%, transparent);
}

/* ---------- projetos ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(36, 205, 255, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.project-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project-top img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.project-top h3 {
    font-size: 19px;
    line-height: 1.25;
}

.project-top small {
    display: block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: 3px;
    letter-spacing: 0.04em;
}

.project-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--cyan);
    background: var(--cyan-soft);
    border: 1px solid rgba(36, 205, 255, 0.25);
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
}

.project-card p {
    color: var(--text-dim);
    font-size: 15px;
    flex-grow: 1;
}

.project-card p b {
    color: var(--text);
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.store-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.store-link:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-soft);
}

/* ---------- serviços ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.service-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    background: rgba(14, 21, 35, 0.55);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.service-card:hover {
    border-color: rgba(36, 205, 255, 0.4);
    background: var(--bg-card);
}

.service-card .num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cyan);
    display: block;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 21px;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-dim);
    font-size: 15.5px;
}

/* ---------- stack ---------- */
.stack-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.stack-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    background: rgba(14, 21, 35, 0.55);
}

.stack-group h3 {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-tag {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.stack-tag:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* ---------- sobre ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 60px;
    align-items: center;
}

.about-grid.single {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.about-photo {
    position: relative;
}

.about-photo img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    border: 1px solid var(--line);
}

.about-photo::after {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid rgba(36, 205, 255, 0.3);
    border-radius: var(--radius);
    z-index: -1;
}

.about-text h2 {
    font-size: clamp(28px, 3.6vw, 38px);
    margin: 14px 0 20px;
}

.about-text p {
    color: var(--text-dim);
    margin-bottom: 16px;
    max-width: 60ch;
}

.about-text p strong {
    color: var(--text);
    font-weight: 600;
}

.about-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 26px;
    padding: 0;
    list-style: none;
}

.about-facts li {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
}

.social-row {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
}

.social-row a {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text-dim);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-row a:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: var(--cyan-soft);
}

.social-row svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

/* ---------- CTA final ---------- */
.cta-final {
    text-align: center;
    padding: 120px 0;
    position: relative;
}

.cta-final::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 320px at 50% 70%, rgba(56, 77, 255, 0.22), transparent 70%);
    pointer-events: none;
}

.cta-final h2 {
    font-size: clamp(32px, 5vw, 52px);
    max-width: 700px;
    margin: 18px auto 20px;
}

.cta-final p {
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 36px;
    font-size: 18px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-inner small {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    display: block;
    line-height: 1.8;
}

/* ---------- reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--d, 0s);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
    .wordmark .cursor { animation: none; }
}

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 140px;
        gap: 48px;
    }

    .hero-photo {
        justify-self: start;
        max-width: 300px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stack-groups {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .about-photo {
        max-width: 320px;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(6, 9, 15, 0.97);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        padding: 12px 24px 24px;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 12px 0;
    }

    .nav-links .btn {
        margin-top: 8px;
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric:nth-child(3) {
        border-left: none;
    }

    .metric:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 80px 0;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
