/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Space Grotesk', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
    --bg:      #EDEAE2;
    --surface: #F5F2EB;
    --text:    #181818;
    --muted:   #706D66;
    --tag-bg:  #D8D5CE;
    --border:  #181818;
    --shadow:     4px 4px 0 #181818;
    --shadow-lg:  6px 6px 0 #181818;
    --nav-h: 64px;
    --max-w: 1160px;
    --r: 2px;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container { width: 90%; max-width: var(--max-w); margin: 0 auto; }
section { padding: 5rem 0; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
}
.nav__inner {
    height: var(--nav-h);
    display: flex; justify-content: space-between; align-items: center;
}
.nav__logo { font-weight: 700; font-size: 0.95rem; letter-spacing: 1px; text-transform: uppercase; }
.nav__right { display: flex; align-items: center; gap: 2.5rem; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 0.88rem; transition: color 0.15s; }
.nav__links a:hover { color: var(--text); }

.nav__hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); transition: 0.2s; }
.nav--open .nav__hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav--open .nav__hamburger span:nth-child(2) { opacity: 0; }
.nav--open .nav__hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav__drawer {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 2px solid var(--border);
    padding: 1.5rem 5%; flex-direction: column; gap: 0.5rem;
}
.nav--open .nav__drawer { display: flex; }
.nav__drawer a {
    font-weight: 500; font-size: 1rem; padding: 0.6rem 0;
    border-bottom: 1px solid var(--tag-bg);
}
.nav__drawer a:last-child { border-bottom: none; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer;
    border: 2px solid var(--border);
    padding: 0.65rem 1.4rem;
    border-radius: var(--r);
    transition: transform 0.15s, box-shadow 0.15s;
    line-height: 1; white-space: nowrap;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--outline  { background: transparent; color: var(--text); }
@media (hover: hover) {
    .btn--primary:hover, .btn--outline:hover {
        transform: translate(-3px, -3px);
        box-shadow: var(--shadow);
    }
}
.btn--sm  { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn--lg  { padding: 0.9rem 2rem; font-size: 1rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: 5rem 0 4rem; border-bottom: 2px solid var(--border); }
.hero__inner { display: grid; grid-template-columns: 1fr 360px; gap: 4rem; align-items: center; }

.hero__tag {
    display: inline-block;
    background: var(--text); color: var(--bg);
    font-size: 0.7rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    padding: 4px 10px; border-radius: var(--r);
    margin-bottom: 1.25rem;
}
.hero__title {
    font-size: clamp(2.2rem, 3.5vw, 3rem);
    font-weight: 700; line-height: 1.12; letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}
.hero__desc {
    font-size: 1rem; color: var(--muted);
    max-width: 480px; margin-bottom: 2rem; line-height: 1.75;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Stats panel */
.hero__panel {
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 2rem; background: var(--surface);
}
.hero__panel-title {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    color: var(--muted); margin-bottom: 1.5rem;
    padding-bottom: 0.75rem; border-bottom: 2px solid var(--border);
}
.hero__stats { display: flex; flex-direction: column; gap: 1.25rem; }
.hero__stat-item { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hero__stat-num  { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.hero__stat-label { font-size: 0.82rem; color: var(--muted); }

/* ==========================================================================
   STATS BAR
   ========================================================================== */
.stats-bar { background: var(--text); color: var(--bg); border-bottom: 2px solid var(--border); }
.stats-bar__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-bar__item { padding: 1.75rem 1rem; text-align: center; border-right: 1px solid rgba(255,255,255,0.12); }
.stats-bar__item:last-child { border-right: none; }
.stats-bar__num   { font-size: 2rem; font-weight: 700; line-height: 1; }
.stats-bar__label { font-size: 0.75rem; opacity: 0.55; margin-top: 0.3rem; font-weight: 500; letter-spacing: 0.5px; }

/* ==========================================================================
   SECTION HEADINGS
   ========================================================================== */
.section-head { margin-bottom: 3rem; }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }
.section-title { font-size: clamp(1.75rem, 2.5vw, 2.2rem); font-weight: 700; letter-spacing: -0.3px; }
.section-sub { color: var(--muted); font-size: 0.95rem; max-width: 520px; line-height: 1.75; margin-top: 0.6rem; }

/* ==========================================================================
   SERVICES (shared border grid)
   ========================================================================== */
.services { background: var(--surface); border-bottom: 2px solid var(--border); }
.services__grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border: 2px solid var(--border); box-shadow: var(--shadow-lg);
}
.service-card {
    padding: 2.5rem 2rem; border-right: 2px solid var(--border);
    display: flex; flex-direction: column; gap: 1rem;
    transition: background 0.2s, color 0.2s;
}
.service-card:last-child { border-right: none; }
.service-card__index { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.service-card__title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.service-card__desc  { color: var(--muted); font-size: 0.88rem; line-height: 1.75; flex: 1; transition: color 0.2s; }
@media (hover: hover) {
    .service-card:hover { background: var(--text); color: var(--bg); }
    .service-card:hover .service-card__index,
    .service-card:hover .service-card__desc { color: rgba(237,234,226,.6); }
    .service-card:hover .btn { border-color: var(--bg); color: var(--bg); }
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.how { border-bottom: 2px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.step__num   { font-size: 4rem; font-weight: 700; line-height: 1; color: var(--tag-bg); margin-bottom: 1rem; }
.step__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step__desc  { color: var(--muted); font-size: 0.88rem; line-height: 1.75; }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonials { background: var(--surface); border-bottom: 2px solid var(--border); }
.testimonials__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.testimonial-card {
    border: 2px solid var(--border); padding: 2rem;
    box-shadow: var(--shadow); background: var(--bg);
    display: flex; flex-direction: column; gap: 1.25rem;
}
.testimonial-card__quote  { font-size: 0.95rem; line-height: 1.8; font-style: italic; }
.testimonial-card__author { font-weight: 700; font-size: 0.88rem; }
.testimonial-card__role   { color: var(--muted); font-size: 0.78rem; }

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner { background: var(--text); color: var(--bg); padding: 5rem 0; border-bottom: 2px solid var(--border); }
.cta-banner__inner { text-align: center; }
.cta-banner__label {
    display: block; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase; opacity: 0.5; margin-bottom: 1rem;
}
.cta-banner__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; margin-bottom: 1rem; }
.cta-banner__sub { font-size: 0.95rem; opacity: 0.65; margin-bottom: 2.5rem; max-width: 440px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.cta-banner .btn--primary { background: var(--bg); color: var(--text); border-color: var(--bg); }
@media (hover: hover) { .cta-banner .btn--primary:hover { box-shadow: 4px 4px 0 rgba(255,255,255,.25); } }

/* ==========================================================================
   DEMO FORM
   ========================================================================== */
.demo-form-section { border-bottom: 2px solid var(--border); }
.demo-form-section__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.demo-form-info__tag {
    display: inline-block; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    background: var(--tag-bg); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: var(--r); margin-bottom: 1rem;
}
.demo-form-info__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; line-height: 1.3; }
.demo-form-info__desc  { color: var(--muted); font-size: 0.9rem; line-height: 1.75; }
.demo-form {
    border: 2px solid var(--border); padding: 2rem;
    box-shadow: var(--shadow-lg); background: var(--surface);
    display: flex; flex-direction: column; gap: 1.25rem;
}
.demo-form__label { font-size: 0.7rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.35rem; }
.demo-form__row  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.demo-form__group { display: flex; flex-direction: column; }
.demo-form input, .demo-form textarea {
    background: var(--bg); border: 2px solid var(--border); border-radius: var(--r);
    padding: 0.7rem 0.9rem;
    font-family: 'Space Grotesk', sans-serif; font-size: 1rem; color: var(--text);
    width: 100%; transition: box-shadow 0.15s;
}
.demo-form input:focus, .demo-form textarea:focus { outline: none; box-shadow: 2px 2px 0 var(--border); }
.demo-form textarea { resize: vertical; min-height: 120px; }
.demo-form__note { font-size: 0.75rem; color: var(--muted); text-align: center; padding-top: 0.5rem; border-top: 1px solid var(--tag-bg); font-style: italic; }

/* ==========================================================================
   PAGE HERO (servicos / portfolio)
   ========================================================================== */
.page-hero { padding: 4rem 0 3rem; border-bottom: 2px solid var(--border); }
.page-hero__tag {
    display: inline-block; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    background: var(--tag-bg); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: var(--r); margin-bottom: 1rem;
}
.page-hero__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.75rem; }
.page-hero__desc  { color: var(--muted); font-size: 1rem; max-width: 580px; line-height: 1.75; }

/* ==========================================================================
   SERVICE DETAIL (servicos.html)
   ========================================================================== */
.service-detail { padding: 4rem 0; border-bottom: 2px solid var(--border); }
.service-detail:last-child { border-bottom: none; }
.service-detail__inner { display: grid; grid-template-columns: 220px 1fr; gap: 4rem; align-items: start; }
.service-detail__num   { font-size: 5rem; font-weight: 700; color: var(--tag-bg); line-height: 1; }
.service-detail__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }
.service-detail__desc  { color: var(--muted); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1.25rem; }
.service-detail__list  { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.service-detail__list li { color: var(--muted); font-size: 0.88rem; display: flex; gap: 0.6rem; align-items: baseline; }
.service-detail__list li::before { content: "→"; color: var(--text); font-weight: 700; flex-shrink: 0; }

/* ==========================================================================
   PORTFOLIO GRID
   ========================================================================== */
.portfolio-section { border-bottom: 2px solid var(--border); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.portfolio-card { border: 2px solid var(--border); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
@media (hover: hover) {
    .portfolio-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
}
.portfolio-card__img { aspect-ratio: 4/3; background: var(--tag-bg); border-bottom: 2px solid var(--border); }
.portfolio-card__body { padding: 1.5rem; }
.portfolio-card__index { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; color: var(--muted); margin-bottom: 0.4rem; display: block; }
.portfolio-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.portfolio-card__tags  { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.portfolio-card__tag   { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; background: var(--tag-bg); border-radius: var(--r); }
.portfolio-card__desc  { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--text); color: var(--bg); padding: 4rem 0 2rem; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__logo  { font-weight: 700; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 0.75rem; display: block; }
.footer__desc  { font-size: 0.85rem; opacity: 0.55; line-height: 1.7; max-width: 260px; }
.footer__col-title { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; opacity: 0.4; margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__links a { font-size: 0.88rem; opacity: 0.75; transition: opacity 0.15s; }
.footer__links a:hover { opacity: 1; }
.footer__contact { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__contact span { font-size: 0.88rem; opacity: 0.75; }
.footer__bottom { padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.footer__copy   { font-size: 0.78rem; opacity: 0.4; }
.footer__credit { font-size: 0.78rem; opacity: 0.55; }
.footer__credit a { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].visible { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    section { padding: 3.5rem 0; }
    .nav__links, .nav__cta { display: none; }
    .nav__hamburger { display: flex; }
    .hero__inner { grid-template-columns: 1fr; }
    .hero__panel { display: none; }
    .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
    .stats-bar__item:nth-child(2n) { border-right: none; }
    .stats-bar__item { border-bottom: 1px solid rgba(255,255,255,.08); }
    .stats-bar__item:nth-last-child(-n+2) { border-bottom: none; }
    .services__grid { grid-template-columns: 1fr; }
    .service-card { border-right: none; border-bottom: 2px solid var(--border); }
    .service-card:last-child { border-bottom: none; }
    .steps { grid-template-columns: 1fr; gap: 2rem; }
    .testimonials__grid { grid-template-columns: 1fr; }
    .demo-form-section__inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .demo-form__row { grid-template-columns: 1fr; }
    .service-detail__inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .service-detail__num { font-size: 3rem; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}
