/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --bg:        #0a0a0b;
    --bg-2:      #111113;
    --bg-3:      #181820;
    --surface:   #1c1c25;
    --border:    rgba(255,255,255,0.07);
    --accent:    #f5c518;
    --accent-2:  #ffd84d;
    --text:      #e8e8f0;
    --muted:     #6b6b7e;
    --muted-2:   #9494aa;
    --white:     #ffffff;
    --radius:    14px;
    --font-head: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: #111; }

/* ─── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ─── NOISE OVERLAY ────────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
    opacity: 0.4;
}

/* ─── NAV ──────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10,10,11,0.7);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.nav-logo {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted-2);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: #111;
    background: var(--accent);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover { background: var(--accent-2); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
    display: block;
}

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 8rem 2rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* Glow blob */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -5%;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: radial-gradient(circle, rgba(245,197,24,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: blobFloat 8s ease-in-out infinite;
}

@keyframes blobFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(245,197,24,0.1);
    border: 1px solid rgba(245,197,24,0.25);
    border-radius: 100px;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.7s 0.1s ease forwards;
}

.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--white);
    max-width: 680px;
    opacity: 0;
    animation: fadeUp 0.7s 0.25s ease forwards;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--muted-2);
    font-weight: 300;
    max-width: 500px;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.7s 0.4s ease forwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.7s 0.55s ease forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    background: var(--accent);
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 30px rgba(245,197,24,0.3);
}

.btn-primary:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(245,197,24,0.45);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--muted-2);
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.85rem 2rem;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-ghost:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--white);
    transform: translateY(-2px);
}

/* scroll hint removido */

/* ─── SECTION BASE ─────────────────────────────────────────── */
section {
    padding: 6rem 2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-desc {
    color: var(--muted-2);
    font-size: 1rem;
    font-weight: 300;
    max-width: 520px;
    margin-top: 0.75rem;
    line-height: 1.7;
}

/* ─── DIVIDER ──────────────────────────────────────────────── */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 0 2rem;
    max-width: calc(100vw - 4rem);
}

/* ─── SERVICES ─────────────────────────────────────────────── */
#servicos { padding-top: 5rem; }

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
}

.service-card:hover {
    border-color: rgba(245,197,24,0.35);
    transform: translateY(-4px);
}

.service-card:hover .service-img {
    transform: scale(1.04);
}

.service-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55) saturate(0.7);
    transition: transform 0.5s ease, filter 0.3s;
}

.service-card:hover .service-img {
    filter: brightness(0.65) saturate(0.85);
}

.service-body {
    padding: 1.75rem;
}

.service-icon {
    width: 38px;
    height: 38px;
    background: rgba(245,197,24,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-icon svg { width: 18px; height: 18px; color: var(--accent); }

.service-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.6rem;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--muted-2);
    line-height: 1.65;
}

/* ─── PORTFOLIO ────────────────────────────────────────────── */
#portfolio {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100%;
    padding: 6rem 0;
}

#portfolio .inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.project-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    group: true;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    border-color: rgba(245,197,24,0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.project-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.project-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 100%);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.75);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-body {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.project-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.project-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.87rem;
    color: var(--muted-2);
    line-height: 1.6;
}

/* ─── ABOUT ────────────────────────────────────────────────── */
#sobre {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    width: 100%;
}

.about-visual {
    position: relative;
}

.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--accent), transparent);
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.about-card-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-tag {
    font-size: 0.78rem;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    background: rgba(245,197,24,0.08);
    border: 1px solid rgba(245,197,24,0.2);
    color: var(--accent-2);
    font-weight: 500;
}

.about-text p {
    font-size: 0.97rem;
    color: var(--muted-2);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.about-text p:last-child { margin-bottom: 0; }

/* ─── CONTACT ──────────────────────────────────────────────── */
#contato {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    width: 100%;
    max-width: 100%;
    padding: 6rem 0;
}

#contato .inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.contact-info { padding-top: 0.5rem; }

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    background: rgba(245,197,24,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-detail-icon svg { width: 18px; height: 18px; color: var(--accent); }

.contact-detail-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.contact-detail-val {
    font-size: 0.95rem;
    color: var(--text);
    margin-top: 0.2rem;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.45rem; }

.form-label {
    font-size: 0.8rem;
    color: var(--muted-2);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.form-input,
.form-textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted); }

.form-textarea { resize: vertical; min-height: 140px; }

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    background: var(--accent);
    border: none;
    padding: 0.95rem 2rem;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 25px rgba(245,197,24,0.25);
    align-self: flex-start;
}

.form-submit:hover:not(:disabled) {
    background: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(245,197,24,0.4);
}

.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Feedback */
.form-feedback {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.form-feedback.success {
    display: block;
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    color: #4ade80;
}

.form-feedback.error {
    display: block;
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.2);
    color: #f87171;
}

/* ─── FOOTER ───────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-logo span { color: var(--accent); }

.footer-sub {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ─── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .services-grid,
    .portfolio-grid { grid-template-columns: 1fr; }

    #sobre {
    grid-template-columns: 1fr;
    gap: 3rem;
    }

    #contato .inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    }
}

@media (max-width: 640px) {
    /* Nav */
    nav { padding: 1rem 1.25rem; }
    .nav-links { display: none; }
    .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    width: 100%;
    background: rgba(10,10,11,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    }
    .nav-links.open a { font-size: 1rem; }
    .hamburger { display: flex; }
    .nav-cta { display: none; }

    /* Hero */
    .hero {
    padding: 7rem 1.25rem 4rem;
    min-height: 100svh;
    }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn-primary, .btn-ghost {
    width: 100%;
    justify-content: center;
    }

    /* Sections */
    section { padding: 4rem 1.25rem; }

    /* Portfolio */
    #portfolio { padding: 4rem 0; }
    #portfolio .inner { padding: 0 1.25rem; }

    /* Contato */
    #contato { padding: 4rem 0; }
    #contato .inner { padding: 0 1.25rem; gap: 2.5rem; }

    /* Divider */
    .divider { margin: 0; max-width: 100%; }

    /* Footer */
    footer { padding: 2rem 1.25rem; }

    /* Misc */
    .section-desc { max-width: 100%; }
    .about-card { padding: 1.5rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .contact-form { width: 100%; }
    .form-submit { width: 100%; justify-content: center; }
}

/* Telas muito pequenas */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.75rem; }
    .hero-badge { font-size: 0.7rem; }
    .stat-num { font-size: 1.8rem; }
}