/* =========================================================
   MAGMA TEFRA — folha de estilos principal
   Conceito: rocha vulcanica solidificando em estrutura.
   Fundo escuro e mineral, acentos em brasa (laranja/vermelho/ouro).
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500&family=Archivo:ital,wdth,wght@0,80..125,400;0,80..125,500;0,80..125,600;0,80..125,700;0,80..125,800;1,80..125,500&display=swap');

:root {
    /* base */
    --bg:        #0b0908;
    --bg-alt:    #161210;
    --bg-alt-2:  #1d1815;
    --surface:   #201a17;
    --surface-2: #2a2220;
    --border:    rgba(244, 232, 219, 0.09);
    --border-strong: rgba(244, 232, 219, 0.18);

    /* texto */
    --text:      #f4ecdf;
    --text-dim:  #c3b6a7;
    --text-mute: #8d8076;

    /* brasa / fogo */
    --ember-gold:   #ffb64d;
    --ember-orange: #ff5b1f;
    --ember-red:    #c81e1e;
    --ember-deep:   #7a1210;
    --gradient-fire: linear-gradient(115deg, var(--ember-gold) 0%, var(--ember-orange) 48%, var(--ember-red) 100%);
    --gradient-fire-soft: linear-gradient(115deg, rgba(255,182,77,.18), rgba(255,91,31,.10) 55%, rgba(200,30,30,.06));

    --radius: 18px;
    --radius-sm: 10px;
    --container: 1180px;

    --shadow-ember: 0 20px 60px -20px rgba(255, 91, 31, 0.45);
    --shadow-soft: 0 30px 70px -35px rgba(0,0,0,.7);

    --ff-display: "Fraunces", ui-serif, Georgia, serif;
    --ff-body: "Archivo", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* grain texture overlay, fixed over whole viewport */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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; }

h1, h2, h3, h4 {
    font-family: var(--ff-display);
    font-weight: 600;
    line-height: 1.08;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
    color: var(--text);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    font-family: var(--ff-body);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ember-orange);
    margin-bottom: 1.1em;
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--gradient-fire);
    border-radius: 2px;
}

.fire-text {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    font-size: 1.18rem;
    color: var(--text-dim);
    max-width: 46ch;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 3;
}

section { position: relative; z-index: 1; }

.section {
    padding: 116px 0;
}
.section--tight { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }

.section-head {
    max-width: 680px;
    margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* -------------------- textured / photo backgrounds -------------------- */
.bg-texture {
    background-image: linear-gradient(180deg, rgba(11,9,8,.94), rgba(11,9,8,.90)), url('../img/textura-lava.jpg');
    background-size: cover;
    background-position: center;
}
.bg-vulcao {
    background-image: linear-gradient(160deg, rgba(11,9,8,.92) 10%, rgba(20,12,8,.75) 60%, rgba(120,30,10,.55)), url('../img/vulcao-secundario.jpg');
    background-size: cover;
    background-position: center 30%;
}

/* -------------------- jagged rock divider -------------------- */
.divider-jagged {
    height: 26px;
    width: 100%;
    background: var(--bg);
    clip-path: polygon(0% 100%, 4% 30%, 9% 80%, 14% 10%, 19% 60%, 24% 20%, 29% 90%, 34% 35%, 39% 70%, 44% 5%, 49% 55%, 54% 15%, 59% 85%, 64% 40%, 69% 65%, 74% 0%, 79% 50%, 84% 25%, 89% 75%, 94% 20%, 100% 60%, 100% 100%);
}
.section--alt + .divider-jagged,
.divider-jagged.to-alt { background: var(--bg-alt); }

/* ================= HEADER ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 9, 8, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: .02em;
}
.brand img { height: 34px; width: auto; }
.brand small {
    display: block;
    font-family: var(--ff-body);
    font-weight: 600;
    font-size: .58rem;
    letter-spacing: .22em;
    color: var(--text-mute);
    margin-top: 1px;
}

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a:not(.btn) {
    padding: 10px 16px;
    font-size: .93rem;
    font-weight: 600;
    color: var(--text-dim);
    border-radius: 999px;
    transition: color .2s, background .2s;
}
.main-nav a:not(.btn):hover { color: var(--text); background: var(--surface); }
.main-nav a.is-active { color: var(--text); background: var(--surface); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 15px 30px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    border: none;
    transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .25s ease;
    white-space: nowrap;
}
.btn-fire {
    background: var(--gradient-fire);
    color: #1a0e05;
    box-shadow: var(--shadow-ember);
}
.btn-fire:hover { transform: translateY(-2px); box-shadow: 0 26px 70px -16px rgba(255,91,31,.65); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ember-orange); }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 22px; font-size: .85rem; }

/* ================= HERO ================= */
.hero {
    padding: 76px 0 110px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 620px;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,91,31,.16), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(2.6rem, 4.6vw, 3.8rem);
    margin-bottom: .38em;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 34px;
}
.hero-badges span {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-badges span::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ember-orange);
    box-shadow: 0 0 10px 2px rgba(255,91,31,.7);
}
.hero-actions { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

.hero-visual {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-strong);
    aspect-ratio: 4/5;
}
.hero-visual img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.02);
}
.hero-visual::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(11,9,8,.75), transparent 45%);
    z-index: 1;
}
.hero-visual .tag {
    position: absolute;
    left: 20px; bottom: 20px;
    z-index: 2;
    background: rgba(11,9,8,.72);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(6px);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}

/* ================= BULLET LIST ================= */
.bullet-list { display: grid; gap: 16px; margin: 30px 0; }
.bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-weight: 600;
    color: var(--text);
}
.bullet-list b { color: var(--ember-gold); font-family: var(--ff-display); }
.bullet-icon {
    flex: none;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--gradient-fire-soft);
    border: 1px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center;
    color: var(--ember-orange);
    font-size: .85rem;
}

/* ================= CARDS ================= */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
    position: relative;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-soft);
}
.card .num {
    font-family: var(--ff-display);
    font-size: 2.1rem;
    color: transparent;
    -webkit-text-stroke: 1px var(--ember-orange);
    margin-bottom: 14px;
    display: block;
}
.card h3 { font-size: 1.25rem; margin-bottom: .5em; }
.card p { color: var(--text-dim); margin: 0; font-size: .96rem; }

.card-big {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-big .media { aspect-ratio: 16/10; overflow: hidden; }
.card-big .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-big:hover .media img { transform: scale(1.06); }
.card-big .body { padding: 28px 30px 32px; }
.card-big .body h3 { font-size: 1.4rem; }
.card-big .body p { color: var(--text-dim); }
.card-big .body a.btn { margin-top: 18px; }

.service-card {
    background: var(--bg-alt-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 26px 24px;
}
.service-card .ico {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--gradient-fire);
    color: #1a0e05;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    font-weight: 800;
}
.service-card h4 { font-size: 1.02rem; margin-bottom: .4em; }
.service-card p { font-size: .89rem; color: var(--text-dim); margin: 0; }

/* portfolio / gallery */
.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
    position: absolute; inset: auto 0 0 0;
    padding: 16px 18px;
    background: linear-gradient(0deg, rgba(0,0,0,.82), transparent);
    font-weight: 700; font-size: .85rem;
}

/* logos strip */
.logos-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 38px;
    padding: 34px 0;
}
.logos-strip span {
    font-family: var(--ff-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: .01em;
    transition: color .25s;
}
.logos-strip span:hover { color: var(--text); }

/* stat highlight */
.stat-banner {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 34px 40px;
    margin-bottom: 46px;
}
.stat-banner .stat-num {
    font-family: var(--ff-display);
    font-size: 3.2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    line-height: 1;
    flex: none;
}
.stat-banner p { margin: 0; color: var(--text-dim); font-size: 1.02rem; }

/* process steps */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; counter-reset: step; }
.step {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 26px 22px;
    background: var(--bg-alt-2);
}
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    font-family: var(--ff-display);
    font-size: 1.6rem;
    color: var(--ember-orange);
    display: block;
    margin-bottom: 10px;
}
.step h4 { font-size: 1rem; margin-bottom: .4em; }
.step p { font-size: .88rem; color: var(--text-dim); margin: 0; }

/* quote / closing */
.quote-block {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}
.quote-block p {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: clamp(1.3rem, 2.6vw, 1.9rem);
    color: var(--text);
    line-height: 1.4;
}

/* ================= FORMS ================= */
.form-panel {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 44px;
    box-shadow: var(--shadow-soft);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--text-dim);
    text-transform: uppercase;
}
.form-field input,
.form-field select,
.form-field textarea {
    background: var(--bg-alt);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-family: var(--ff-body);
    font-size: .96rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--ember-orange);
    box-shadow: 0 0 0 4px rgba(255,91,31,.15);
}
.form-field .err { color: #ff8686; font-size: .78rem; font-weight: 600; }
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%23c3b6a7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 22px;
    font-weight: 600;
    font-size: .92rem;
}
.form-alert--ok { background: rgba(88, 199, 122, .12); border: 1px solid rgba(88,199,122,.4); color: #8fe3ac; }

/* ================= CONTACT / SPLIT SECTION ================= */
.orcamento-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 50px;
    align-items: start;
}
.orcamento-side .assinatura {
    margin-top: 36px;
    font-family: var(--ff-display);
    font-style: italic;
    color: var(--text-dim);
    font-size: 1.05rem;
}

/* ================= FOOTER ================= */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 70px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 46px;
}
.footer-brand img { height: 36px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-mute); font-size: .9rem; max-width: 32ch; }
.footer-col h5 {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-mute);
    margin-bottom: 16px;
}
.footer-col a, .footer-col span {
    display: block;
    color: var(--text-dim);
    font-size: .92rem;
    margin-bottom: 10px;
    transition: color .2s;
}
.footer-col a:hover { color: var(--ember-orange); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .82rem;
    color: var(--text-mute);
}

/* ================= REVEAL ANIMATION ================= */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { animation: rise .6s ease both; }
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: .02s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: .10s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: .18s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: .26s; }
.reveal-stagger.is-visible > *:nth-child(5) { animation-delay: .34s; }
.reveal-stagger.is-visible > *:nth-child(6) { animation-delay: .42s; }
.reveal-stagger.is-visible > *:nth-child(7) { animation-delay: .50s; }
.reveal-stagger.is-visible > *:nth-child(8) { animation-delay: .58s; }
@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 480px; }
    .grid-4 { grid-template-columns: repeat(2,1fr); }
    .grid-3 { grid-template-columns: repeat(2,1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: repeat(2,1fr); }
    .orcamento-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .main-nav { position: fixed; inset: 84px 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch; padding: 20px; gap: 4px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; border-top: 1px solid var(--border); }
    .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .main-nav a:not(.btn) { padding: 16px; font-size: 1rem; }
    .main-nav .btn { margin-top: 10px; }
    .nav-toggle { display: flex; }
    .section { padding: 76px 0; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-panel { padding: 28px 22px; }
    .stat-banner { flex-direction: column; text-align: center; }
    .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding: 40px 0 70px; }
}
