/* =========================================================================
   rafaeljunior.vip — Identidade "Editorial Executivo · Minas moderna"
   Papel creme + tinta + terracota | Fraunces / Hanken Grotesk / JetBrains Mono
   ========================================================================= */

:root {
    /* --- Paleta editorial --- */
    --paper:        #F2EDE3;   /* papel creme quente (fundo base) */
    --paper-2:      #ECE4D5;   /* creme mais fundo (seções alternadas) */
    --paper-3:      #E5DBC8;   /* creme profundo (cabeçalhos internos) */
    --ink:          #1A1611;   /* tinta — texto/preto quente */
    --ink-2:        #4A4438;   /* texto secundário */
    --ink-3:        #756E5E;   /* texto terciário/muted */
    --accent:       #B14A2A;   /* terracota — cor de assinatura */
    --accent-2:     #8C3A1F;   /* terracota escuro (hover) */
    --accent-soft:  rgba(177, 74, 42, 0.10);
    --forest:       #2C3D33;   /* verde-petróleo (profundidade) */
    --line:         #D9CFBB;   /* hairlines / bordas sutis */
    --line-strong:  #C7BBA1;

    /* --- Compat com estilos inline herdados das páginas antigas --- */
    --primary-color:   var(--accent);
    --secondary-color: var(--accent-2);
    --accent-color:    var(--forest);
    --dark-color:      var(--ink);
    --light-color:     var(--paper);
    --text-dark:       var(--ink);
    --text-light:      var(--ink-2);
    --border-color:    var(--line);
    --success-color:   #3f7d52;
    --warning-color:   #c08a2d;
    --danger-color:    #b1432c;
    --gradient-primary:   linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

    /* --- Sombras editoriais (suaves, baseadas em tinta) --- */
    --shadow-sm: 0 1px 2px rgba(26, 22, 17, 0.05);
    --shadow-md: 0 1px 2px rgba(26, 22, 17, 0.04), 0 10px 28px -16px rgba(26, 22, 17, 0.22);
    --shadow-lg: 0 2px 4px rgba(26, 22, 17, 0.05), 0 22px 48px -22px rgba(26, 22, 17, 0.28);
    --shadow-xl: 0 30px 70px -30px rgba(26, 22, 17, 0.40);

    /* --- Tipografia --- */
    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    --transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --maxw: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* Grão de papel sobre toda a página */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--paper); }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

/* --- Tipografia base --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.015em;
    color: var(--ink);
    overflow-wrap: break-word;
    word-break: break-word;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); font-weight: 400; }
p { line-height: 1.7; }
a { color: inherit; }

/* Kicker — rótulo mono editorial */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.kicker::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--accent);
    display: inline-block;
}

/* =========================================================
   Loader
   ========================================================= */
.loader-wrapper {
    position: fixed; inset: 0;
    background: var(--paper);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader-wrapper.hidden { opacity: 0; visibility: hidden; }
/* Rede de segurança: some sozinho mesmo se o JS falhar */
.loader-wrapper { animation: loaderSafety 0.5s ease 2.6s forwards; }
.loader {
    width: 44px; height: 44px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loaderSafety { to { opacity: 0; visibility: hidden; } }

/* =========================================================
   Reveal on scroll (próprio, sem CDN) — usa os atributos data-aos
   já presentes no markup. Só esconde quando há JS (classe .js),
   garantindo conteúdo visível se o JS falhar ou estiver desligado.
   ========================================================= */
.js [data-aos] {
    opacity: 0;
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-aos="fade-up"]    { transform: translateY(26px); }
.js [data-aos="fade-down"]  { transform: translateY(-26px); }
.js [data-aos="fade-right"] { transform: translateX(-28px); }
.js [data-aos="fade-left"]  { transform: translateX(28px); }
.js [data-aos="zoom-in"]    { transform: scale(0.94); }
.js [data-aos].aos-animate  { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js [data-aos] { opacity: 1 !important; transform: none !important; transition: none; }
    .loader-wrapper { animation: none; }
}

/* =========================================================
   Navbar
   ========================================================= */
.navbar {
    background: rgba(242, 237, 227, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    position: sticky; top: 0;
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(242, 237, 227, 0.95);
    border-bottom: 1px solid var(--line);
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.15rem 0;
}
.nav-brand a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
    width: 38px; height: 38px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.04em;
    color: var(--ink);
    transition: var(--transition);
}
.nav-brand a:hover .brand-mark { background: var(--ink); color: var(--paper); }
.brand-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
}
.brand-primary { color: var(--ink); }
.brand-secondary { color: var(--accent); font-style: italic; }

.nav-list { display: flex; list-style: none; gap: 0.35rem; }
.nav-link {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.5rem 0.95rem;
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
}
.nav-link i { font-size: 0.85rem; opacity: 0.6; transition: var(--transition); }
.nav-link::after {
    content: '';
    position: absolute; left: 0.95rem; right: 0.95rem; bottom: 0.32rem;
    height: 1.5px; background: var(--accent);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover i { opacity: 1; color: var(--accent); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active i { color: var(--accent); opacity: 1; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.bar { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: var(--transition); }

/* =========================================================
   Botões
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.95rem 1.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1.5px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn i { font-size: 0.9rem; }
.btn-primary {
    background: var(--accent);
    color: #FBF6EC;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-outline:hover {
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-2px);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(177, 74, 42, 0.06) 0%, transparent 55%),
        var(--paper);
    overflow: hidden;
}
.hero-pattern, .hero-grain {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.4;
    -webkit-mask-image: radial-gradient(120% 100% at 80% 10%, #000 0%, transparent 70%);
    mask-image: radial-gradient(120% 100% at 80% 10%, #000 0%, transparent 70%);
}
.hero-content, .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-text .kicker { margin-bottom: 1.6rem; }
.hero-text h1, .hero-title {
    font-size: clamp(2.9rem, 7.5vw, 5.6rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
    color: var(--ink);
}
.hero-title em { display: inline; }
.hero-role {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 500;
    color: var(--ink-2);
    margin-bottom: 1.6rem;
}
.hero-text p.lead, .hero-text > p {
    font-size: 1.13rem;
    color: var(--ink-2);
    line-height: 1.75;
    max-width: 30em;
    margin-bottom: 2.2rem;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-facts {
    margin-top: 2.6rem;
    padding-top: 1.7rem;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 1.8rem;
    justify-content: start;
}
.hero-fact { line-height: 1.3; }
.hero-fact dt {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 0.25rem;
}
.hero-fact dd {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ink);
}

/* Retrato editorial */
.hero-image, .hero-portrait { display: flex; justify-content: center; position: relative; }
.hero-image-wrapper, .portrait-frame {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 4 / 5;
}
.hero-image-bg {
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    z-index: 0;
    animation: none;
    background: none;
    opacity: 1;
}
.hero-image img, .portrait-frame img {
    position: relative;
    z-index: 1;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: none;
    box-shadow: var(--shadow-lg);
    filter: saturate(1.02) contrast(1.02);
}
.portrait-badge {
    position: absolute;
    bottom: 1.2rem; left: -1.2rem;
    z-index: 2;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
}

/* =========================================================
   Seções
   ========================================================= */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

.section-title { text-align: center; max-width: 44rem; margin: 0 auto 3.2rem; }
.section-title .kicker { justify-content: center; margin-bottom: 1.1rem; }
.section-title .kicker::after {
    content: ''; width: 26px; height: 1px; background: var(--accent); display: inline-block;
}
.section-title h2 {
    font-size: clamp(2.1rem, 4.6vw, 3.3rem);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 1rem;
    -webkit-text-fill-color: currentColor;
}
.section-title p {
    font-size: 1.13rem;
    color: var(--ink-2);
    line-height: 1.7;
}

/* Seção em tema escuro (tinta) */
.section--dark {
    background: var(--ink);
    color: var(--paper);
}
.section--dark .section-title h2 { color: #FBF6EC; }
.section--dark .section-title p,
.section--dark p { color: rgba(251, 246, 236, 0.72); }
.section--dark .kicker, .section--dark .kicker::before, .section--dark .kicker::after { color: #E8956F; background-color: #E8956F; }
.section--dark .kicker { background: none; }

/* =========================================================
   Cards
   ========================================================= */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 2.1rem;
    transition: var(--transition);
    position: relative;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.card-icon {
    width: 52px; height: 52px;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.card:hover .card-icon { background: var(--accent); border-color: var(--accent); }
.card-icon i { font-size: 1.3rem; color: var(--accent); transition: var(--transition); }
.card:hover .card-icon i { color: #FBF6EC; }
.card h3 {
    font-size: 1.42rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--ink);
}
.card p { color: var(--ink-2); line-height: 1.7; font-size: 0.98rem; }

.section--dark .card {
    background: #221D16;
    border-color: rgba(251, 246, 236, 0.12);
}
.section--dark .card:hover { border-color: #E8956F; }
.section--dark .card h3 { color: #FBF6EC; }
.section--dark .card p { color: rgba(251, 246, 236, 0.66); }
.section--dark .card-icon { background: rgba(232, 149, 111, 0.14); border-color: rgba(251, 246, 236, 0.12); }
.section--dark .card-icon i { color: #E8956F; }

/* =========================================================
   Grids
   ========================================================= */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }

/* =========================================================
   Projetos recentes (home)
   ========================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.5rem;
}
.project-card {
    background: #221D16;
    border: 1px solid rgba(251, 246, 236, 0.12);
    border-radius: 12px;
    padding: 2.1rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--accent);
    transform: scaleY(0); transform-origin: top;
    transition: transform 0.4s var(--ease);
}
.project-card:hover { transform: translateY(-5px); border-color: rgba(232, 149, 111, 0.5); }
.project-card:hover::after { transform: scaleY(1); }
/* Card em destaque (case de sucesso) */
.project-card--featured {
    border-color: rgba(232, 149, 111, 0.55);
    background: linear-gradient(165deg, rgba(232, 149, 111, 0.10) 0%, #221D16 55%);
}
.project-card--featured::after { transform: scaleY(1); }
.project-card--featured .project-num { color: #F2B88F; }
.project-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: #E8956F;
    margin-bottom: 1.5rem;
}
.project-card h3 {
    font-size: 1.55rem;
    font-weight: 500;
    color: #FBF6EC;
    margin-bottom: 0.7rem;
}
.project-card > p {
    color: rgba(251, 246, 236, 0.68);
    font-size: 0.96rem;
    line-height: 1.7;
    margin-bottom: 1.6rem;
    flex-grow: 1;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(251, 246, 236, 0.7);
    border: 1px solid rgba(251, 246, 236, 0.16);
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
}

/* =========================================================
   Tech tags (páginas internas)
   ========================================================= */
.tech-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--ink-2);
    background: var(--paper-2);
    border: 1px solid var(--line);
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    margin: 0.25rem 0.25rem 0 0;
    transition: var(--transition);
}
.tech-tag:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   Timeline (página Sobre)
   ========================================================= */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 1px; background: var(--line-strong); transform: translateX(-50%);
}
.timeline-item { display: flex; justify-content: center; margin-bottom: 3rem; position: relative; }
.timeline-item:nth-child(odd) .timeline-content { margin-right: calc(50% + 32px); text-align: right; }
.timeline-item:nth-child(even) .timeline-content { margin-left: calc(50% + 32px); }
.timeline-dot {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 14px; height: 14px;
    background: var(--accent); border: 3px solid var(--paper);
    border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong);
    z-index: 1; margin-top: 6px;
}
.timeline-content {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1.6rem;
    border-radius: 10px;
    max-width: 480px;
    transition: var(--transition);
}
.timeline-content:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.78rem; letter-spacing: 0.08em;
    font-weight: 500; color: var(--accent); margin-bottom: 0.5rem;
}
.timeline-title { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--ink); }
.timeline-description { color: var(--ink-2); line-height: 1.65; font-size: 0.96rem; }

/* =========================================================
   Skills
   ========================================================= */
.skill-item { margin-bottom: 1.5rem; }
.skill-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.55rem; }
.skill-name { font-weight: 600; color: var(--ink); font-size: 0.97rem; }
.skill-level { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--accent); }
.skill-bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.skill-progress { height: 100%; background: var(--accent); border-radius: 3px; transition: width 1.4s var(--ease); }

/* =========================================================
   Stats
   ========================================================= */
.stats-section { padding-top: 0; }
.stats {
    background: var(--ink);
    border-radius: 14px;
    padding: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--paper);
    box-shadow: var(--shadow-lg);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: left;
}
.stat-item { padding: 0.4rem 0; position: relative; }
.stat-item + .stat-item { }
.stat-item h3 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 0.6rem;
    color: #FBF6EC;
    letter-spacing: -0.02em;
}
.stat-item h3 .counter { color: #FBF6EC; }
.stat-item p {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #E8956F;
}

/* =========================================================
   Page header (páginas internas)
   ========================================================= */
.page-header {
    background: var(--paper-3);
    border-bottom: 1px solid var(--line);
    padding: clamp(3rem, 7vw, 5rem) 0;
    text-align: center;
    position: relative;
}
.page-header h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 1rem;
    -webkit-text-fill-color: currentColor;
}
.page-header p { font-size: 1.15rem; color: var(--ink-2); max-width: 42rem; margin: 0 auto; }

/* =========================================================
   Formulários (contato)
   ========================================================= */
.contact-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2.2rem;
    box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 1.4rem; }
.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
    font-weight: 500; margin-bottom: 0.55rem; color: var(--ink-2);
}
.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper-2);
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--paper);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.form-control { min-height: 150px; resize: vertical; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(3rem, 6vw, 4.5rem) 0 1.8rem;
    border-top: 3px solid var(--accent);
}
.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 1rem; color: #FBF6EC; }
.footer-subtitle {
    font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em;
    text-transform: uppercase; font-weight: 500; margin-bottom: 1.2rem; color: #E8956F;
}
.footer-text { color: rgba(251, 246, 236, 0.6); line-height: 1.75; font-size: 0.96rem; max-width: 26em; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a {
    color: rgba(251, 246, 236, 0.62); text-decoration: none; font-size: 0.94rem;
    transition: var(--transition); display: inline-block;
}
.footer-links a:hover { color: #FBF6EC; transform: translateX(4px); }
.social-links { display: flex; gap: 0.7rem; margin-top: 1.5rem; }
.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid rgba(251, 246, 236, 0.2);
    border-radius: 8px;
    color: rgba(251, 246, 236, 0.75);
    transition: var(--transition);
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #FBF6EC; transform: translateY(-3px); }
.contact-info p { color: rgba(251, 246, 236, 0.62); margin-bottom: 0.7rem; font-size: 0.94rem; display: flex; align-items: center; }
.contact-info i { width: 20px; margin-right: 0.6rem; color: #E8956F; }
.footer-bottom {
    border-top: 1px solid rgba(251, 246, 236, 0.12);
    padding-top: 1.8rem; text-align: center;
    color: rgba(251, 246, 236, 0.45); font-size: 0.88rem;
}
.footer-tech { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.78rem; }
.pulse { color: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* =========================================================
   Botões flutuantes
   ========================================================= */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem;
    width: 48px; height: 48px;
    background: var(--ink); color: var(--paper);
    border: none; border-radius: 10px;
    display: none; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition); z-index: 999;
}
.back-to-top:hover { background: var(--accent); transform: translateY(-4px); }
.back-to-top.show { display: flex; }

.whatsapp-float {
    position: fixed; bottom: 2rem; left: 2rem;
    background: #1f8a4c; color: white;
    padding: 0.8rem 1.4rem; border-radius: 50px;
    text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
    box-shadow: var(--shadow-lg); transition: var(--transition); z-index: 999;
    font-size: 0.92rem;
}
.whatsapp-float:hover { background: #15703c; transform: translateY(-4px); }
.whatsapp-float i { font-size: 1.3rem; }
.whatsapp-text { font-weight: 600; }

/* Utils */
.text-center { text-align: center; }

/* Reveal on scroll (sutil) */
[data-aos] { will-change: opacity, transform; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; left: -100%; top: 69px;
        width: 100%; height: calc(100vh - 69px);
        background: var(--paper);
        border-top: 1px solid var(--line);
        transition: left 0.4s var(--ease);
    }
    .nav-menu.active { left: 0; }
    .nav-list { flex-direction: column; padding: 2rem; gap: 0.5rem; }
    .nav-link { padding: 0.9rem 1rem; font-size: 1.05rem; }
    .nav-link::after { display: none; }
    .nav-toggle { display: flex; }

    .hero-content, .hero-grid { grid-template-columns: 1fr; text-align: left; }
    .hero-portrait, .hero-image { order: -1; justify-content: flex-start; }
    .hero-image-wrapper, .portrait-frame { width: min(78%, 300px); }
    .hero-facts { grid-template-columns: 1fr 1fr; gap: 1.2rem; }

    .timeline::before { left: 22px; }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 52px; margin-right: 0; text-align: left;
    }
    .timeline-dot { left: 22px; }

    .footer-content { grid-template-columns: 1fr; }
    .whatsapp-text { display: none; }
    .whatsapp-float { padding: 0.9rem; border-radius: 50%; }
}
@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .hero-facts { grid-template-columns: 1fr; }
    .btn { padding: 0.85rem 1.4rem; font-size: 0.9rem; }
}

/* Títulos com font-size inline legado (páginas internas) — escalam no mobile */
@media (max-width: 640px) {
    [style*="font-size: 3rem"]   { font-size: clamp(1.85rem, 8.5vw, 2.5rem) !important; }
    [style*="font-size: 2.5rem"] { font-size: clamp(1.65rem, 7.2vw, 2.1rem) !important; }
    [style*="font-size: 2rem"]   { font-size: clamp(1.45rem, 6vw, 1.85rem) !important; }

    /* Grids inline de 2/3 colunas colapsam para 1 coluna */
    [style*="grid-template-columns: repeat(2"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Telas muito estreitas (≤360px) */
@media (max-width: 360px) {
    .brand-text { font-size: 1.18rem; }
    .brand-mark { width: 34px; height: 34px; font-size: 0.95rem; }
    .project-card, .card { padding: 1.6rem; }
    .stats { padding: 1.8rem 1.5rem; }
}
