/* ==========================================================================
   Content — Comunicação de Propósito
   Design System inspired by nikolaradeski.com
   Accent: Gold #D4A017 | Handwritten: Gloria Hallelujah
   ========================================================================== */

:root {
    --bg: #DBDBDB;
    --bg-content: #EAEAEA;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A1A;
    --text-primary: #1A1A1A;
    --text-body: #6D6D6D;
    --text-light: #999999;
    --accent: #D4A017;
    --accent-hover: #B8890F;
    --nav-gradient-start: #0A0A0A;
    --nav-gradient-end: #1A1A1A;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --radius-pill: 100px;
    --font-display: 'Clash Display', sans-serif;
    --font-body: 'General Sans', sans-serif;
    --font-hand: 'Gloria Hallelujah', cursive;
    --ease-out: cubic-bezier(0.4, 0, 0, 1);
    --ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Animatable custom property for golden ring fill */
@property --ring-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); font-weight: 400; font-size: 1rem; line-height: 1.6; color: var(--text-primary); background: var(--bg); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }
ul { list-style: none; }
input, textarea { font-family: var(--font-body); }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.section { padding: clamp(5rem, 10vw, 10rem) 0; position: relative; }
.gold { color: var(--accent); }

/* Section labels */
.section-label-hand {
    display: block;
    font-family: var(--font-hand);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: var(--text-body);
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    max-width: 700px;
}
.section-subtitle {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--text-body);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* Buttons */
.btn-gold {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.3s ease;
}
.btn-gold:hover { background: var(--accent-hover); transform: scale(1.03); }

.btn-outline {
    display: inline-block;
    border: 1.5px solid var(--text-primary);
    color: var(--text-primary);
    padding: 11px 28px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.btn-outline:hover { background: var(--text-primary); color: #fff; }

.btn-outline-dark {
    display: inline-block;
    border: 1.5px solid var(--text-primary);
    color: var(--text-primary);
    padding: 14px 36px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.btn-outline-dark:hover { background: var(--text-primary); color: var(--bg); }

/* ==========================================================================
   PRELOADER
   ========================================================================== */
#preloader {
    position: fixed; inset: 0; z-index: 9999; background: #000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0s 0.8s;
}
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-text {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.8rem, 4.5vw, 3.5rem); color: #fff; letter-spacing: -0.03em;
    display: inline-block;
}
/* Word transition effect */
.preloader-text.fade-out {
    opacity: 0 !important; transform: translateY(-8px) !important;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.preloader-text.fade-in {
    /* opacity controlled by JS for progressive fade effect */
    transition: opacity 0.12s ease, transform 0.12s ease;
}

/* Screen reader only */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   BOTTOM NAVIGATION
   ========================================================================== */
#bottom-nav {
    position: fixed; bottom: 20px; left: 50%; z-index: 1000;
    transform: translateX(-50%) translateY(20px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
#bottom-nav.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: all; }

/* Bottom fog — gradient blur behind the nav, content fades into it */
.bottom-fog {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 120px; z-index: 999;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, rgba(219,219,219,0.45) 35%, rgba(219,219,219,0.85) 65%, var(--bg) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
}
.bottom-fog.visible { opacity: 1; }

/* Top fog — content fades as it scrolls up past the top edge */
.top-fog {
    position: fixed; top: 0; left: 0; right: 0;
    height: 120px; z-index: 999;
    pointer-events: none;
    background: linear-gradient(to top, transparent 0%, rgba(219,219,219,0.45) 35%, rgba(219,219,219,0.85) 65%, var(--bg) 100%);
    -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%);
    mask-image: linear-gradient(to top, transparent 0%, black 30%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
}
.top-fog.visible { opacity: 1; }

.nav-inner {
    display: flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(180deg, var(--nav-gradient-start), var(--nav-gradient-end));
    border-radius: var(--radius-pill); padding: 10px 12px 10px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
}
.nav-logo {
    font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
    color: #fff; letter-spacing: -0.02em; margin-right: 1rem; white-space: nowrap;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
    font-family: var(--font-body); font-weight: 400; font-size: 0.85rem;
    color: rgba(255,255,255,0.65); padding: 8px 16px; border-radius: 50px;
    transition: color 0.3s ease, background 0.3s ease; white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-cta {
    display: inline-block; background: var(--accent); color: var(--bg-dark);
    padding: 8px 20px; border-radius: 50px; font-weight: 600; font-size: 0.85rem;
    transition: background 0.3s ease, transform 0.3s ease; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-hover); transform: scale(1.04); }

/* ==========================================================================
   HERO
   ========================================================================== */
#hero {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: var(--bg-content); z-index: 1; overflow: hidden;
}

/* Vanta.js WAVES canvas — sits behind hero content, semi-transparent */
#hero canvas {
    position: absolute !important;
    inset: 0;
    z-index: 0;
    opacity: 0.25;
}

/* Hero split layout — LEFT title only, card floats on the right via JS */
.hero-split {
    display: flex; align-items: center; justify-content: flex-start;
    width: 100%; max-width: 1400px; padding: 0 clamp(2rem, 6vw, 6rem) 0 clamp(4rem, 10vw, 10rem);
    position: relative; z-index: 1;
}
.hero-side { flex: none; }
.hero-side-left { text-align: left; }
.hero-name {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 0.92;
    color: var(--text-primary); letter-spacing: -0.04em;
}
.hero-dot { color: var(--accent); }
.hero-compass { display: none; }

.hero-scroll-cta {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-family: var(--font-body); font-weight: 500; font-size: 0.78rem;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-primary); z-index: 1;
}
.scroll-line {
    width: 2px; height: 44px; background: var(--accent);
    transform-origin: top; animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%   { transform: scaleY(0); opacity: 0.4; }
    50%  { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(0); opacity: 0.4; }
}

/* ==========================================================================
   FLYING CARD — stories format, scroll-driven from hero center to services right
   ========================================================================== */
.flying-card {
    position: fixed; z-index: 5;
    width: 190px; height: 280px;
    /* Start position: center of viewport */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    perspective: 1000px;
    pointer-events: none;
    will-change: transform, top, left;
}
.flying-card.hidden { opacity: 0; pointer-events: none; }

.flying-card-inner {
    width: 100%; height: 100%;
    position: relative; transform-style: preserve-3d;
    /* No CSS transition — scroll drives rotation directly for tactile control */
}

.flying-card-face {
    position: absolute; inset: 0; backface-visibility: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
}
/* Front: liquid glass — starts nearly invisible, JS controls materialisation */
.flying-card-front {
    transform: rotateY(0deg);
    background: rgba(255,255,255,0.0);
    backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
    border: 1px solid rgba(255,255,255,0.0);
    box-shadow: none;
    color: var(--text-primary);
    transition: background 0.1s linear, backdrop-filter 0.1s linear,
                -webkit-backdrop-filter 0.1s linear, border-color 0.1s linear,
                box-shadow 0.1s linear;
}

/* Back: solid dark */
.flying-card-back {
    transform: rotateY(180deg);
    background: rgba(26,26,26,0.95); backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    color: #fff;
}

.flying-card-compass {
    width: 70%; height: auto; object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}
.flying-card-front-label {
    font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
    color: #3a3a3a; text-align: center; letter-spacing: 0.05em;
    text-transform: uppercase; line-height: 1.4; margin-top: 0.5rem;
    opacity: 0; transition: opacity 0.4s;
}
.flying-card-name {
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.4rem; letter-spacing: -0.02em;
}
.flying-card-role {
    font-size: 0.75rem; color: rgba(255,255,255,0.5);
    margin-top: 0.4rem; letter-spacing: 0.05em;
}
.flying-card-stat {
    font-family: var(--font-display); font-weight: 700;
    font-size: 4.5rem; line-height: 1; letter-spacing: -0.04em;
}
.flying-card-stat sup {
    font-size: 0.35em; color: var(--accent); vertical-align: super;
}
.flying-card-stat-label {
    font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.5rem;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
#main-content { position: relative; z-index: 2; margin-top: 100vh; background: var(--bg); }
.experience-landing-section { display: none; }

/* ==========================================================================
   MARQUEE TICKER
   ========================================================================== */
.marquee-section {
    padding: 2rem 0; overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.08); background: var(--bg);
}
.marquee-track { display: flex; width: max-content; animation: marqueeScroll 25s linear infinite; }
.marquee-content { display: flex; align-items: center; flex-shrink: 0; }
.marquee-content span {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem); color: var(--text-body);
    letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; padding: 0 1rem;
}
.marquee-dot { color: var(--accent) !important; font-size: 1.5rem !important; padding: 0 0.5rem !important; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-wrapper {
    display: flex; align-items: flex-start;
    gap: clamp(3rem, 6vw, 6rem); margin-top: 1rem;
}
.about-left { flex: 1.5; }
.about-roles {
    font-family: var(--font-body); font-weight: 500;
    font-size: 0.95rem; color: var(--text-body); margin-bottom: 1.5rem;
}
.about-text p {
    font-size: clamp(0.95rem, 1.2vw, 1.05rem); color: var(--text-body);
    line-height: 1.7; margin-bottom: 1rem; max-width: 540px;
}
.about-bold { color: var(--text-primary) !important; font-weight: 500; }
.about-ctas { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.about-trust {
    display: flex; align-items: center; gap: 0.75rem; margin-top: 2rem;
}
.stars { color: var(--accent); font-size: 1.1rem; letter-spacing: 2px; }
.about-trust span { font-size: 0.85rem; color: var(--text-body); }
#client-counter {
    font-weight: 700;
    display: inline-block;
    transform-origin: center bottom;
    margin: 0 0.15em;
    transition: color 0.6s ease, transform 0.15s ease-out;
}

.about-right { flex: 0.5; display: flex; justify-content: center; align-items: flex-start; padding-top: 2rem; }
.about-accent-block { text-align: center; }
.about-accent {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(5rem, 10vw, 8rem); color: var(--text-primary);
    line-height: 1; letter-spacing: -0.05em; display: block;
}
.about-accent sup { font-size: 0.4em; color: var(--accent); vertical-align: super; }
.about-accent-label {
    font-family: var(--font-body); font-weight: 400;
    font-size: 0.85rem; color: var(--text-body); letter-spacing: 0.05em; margin-top: 0.5rem; display: block;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services-wrapper {
    display: flex; gap: clamp(3rem, 5vw, 5rem); margin-top: 2rem;
}
.services-scroll { flex: 1.2; display: flex; flex-direction: column; gap: 0; }
.services-sticky {
    flex: 0.8; position: sticky; top: 30vh; height: fit-content; align-self: flex-start;
}
/* Sticky anchor — invisible placeholder where flying card visually lands */
.sticky-anchor {
    width: 190px; height: 280px;
    border-radius: var(--radius-lg);
    /* Invisible — flying card covers this position */
}

.service-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: clamp(2rem, 3.5vw, 3rem);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: box-shadow 0.5s ease;
    border: 1px solid rgba(0,0,0,0.04);
    position: sticky;
    will-change: transform, opacity;
    margin-bottom: 30px;
}
.service-card:nth-child(1) { top: 100px; z-index: 1; }
.service-card:nth-child(2) { top: 125px; z-index: 2; transform: rotate(-0.6deg) translateX(3px); }
.service-card:nth-child(3) { top: 150px; z-index: 3; transform: rotate(0.4deg) translateX(-4px); }
.service-card:nth-child(4) { top: 175px; z-index: 4; margin-bottom: 0; transform: rotate(-0.3deg) translateX(2px); }
.service-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.08); }

.service-hand {
    font-family: var(--font-hand); font-size: 0.9rem; color: var(--text-body);
    display: block; margin-bottom: 0.75rem;
}
.service-number { color: var(--accent); }
.service-card h3 {
    font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 0.75rem; color: var(--text-primary);
}
.service-card p { font-size: 0.95rem; color: var(--text-body); line-height: 1.6; margin-bottom: 1rem; }
.service-list li {
    font-size: 0.88rem; color: var(--text-light); padding: 0.2rem 0;
    padding-left: 1rem; position: relative;
}
.service-list li::before {
    content: '•'; position: absolute; left: 0; color: var(--text-light);
}

/* ==========================================================================
   MANIFESTO (Scroll-reveal text)
   ========================================================================== */
.manifesto-section { padding: clamp(8rem, 16vw, 14rem) 0; }
.manifesto-text {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.35;
    color: var(--text-primary); max-width: 1000px;
}
/* Each word will be wrapped in a span by JS */
.manifesto-text .word {
    opacity: 0.12;
    transition: opacity 0.3s ease;
    display: inline-block;
}
.manifesto-text .word.visible { opacity: 1; }

/* ==========================================================================
   PORTFOLIO PREVIEW
   ========================================================================== */
.portfolio-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; margin-top: 3rem;
}
.portfolio-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    overflow: hidden; padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.08); }
.portfolio-card img { width: 100%; border-radius: var(--radius-md); }
.portfolio-cta { text-align: center; margin-top: 3rem; }

/* ==========================================================================
   STATEMENT SECTION
   ========================================================================== */
.statement-section { background: var(--bg-dark); padding: clamp(6rem, 14vw, 12rem) 0; }
.statement-text {
    font-size: clamp(2.2rem, 5.5vw, 4.5rem); color: #fff;
    text-align: center; line-height: 1.1; max-width: 900px; margin: 0 auto;
}

/* ==========================================================================
   DIFFERENTIALS
   ========================================================================== */
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.diff-item { padding: clamp(2rem, 3vw, 2.5rem) 0; border-top: 2px solid var(--text-primary); }
.diff-number {
    font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
    color: var(--accent); display: block; margin-bottom: 1.5rem;
}
.diff-item h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 0.75rem; }
.diff-item p { font-size: 0.95rem; color: var(--text-body); line-height: 1.6; }

/* ==========================================================================
   TEAM SECTION
   ========================================================================== */
#team { overflow: visible; }

.team-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin-top: 3rem;
    position: relative;
    min-height: 340px;
    padding-top: 20px;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0;
    transform: translateX(-80px);
    flex-shrink: 0;
    width: 160px;
    margin: 0 -12px;
    z-index: 1;
    cursor: default;
}
.team-member-ai { cursor: pointer; }
.team-member.slide-in {
    opacity: 1;
    transform: translateX(0);
    animation: teamSlideSettle 1s var(--ease-spring) forwards;
}
.team-member:nth-child(1).slide-in { animation-delay: 0s; }
.team-member:nth-child(2).slide-in { animation-delay: 0.18s; }
.team-member:nth-child(3).slide-in { animation-delay: 0.36s; }
.team-member:nth-child(4).slide-in { animation-delay: 0.54s; }
.team-member:nth-child(5).slide-in { animation-delay: 0.72s; }

@keyframes teamSlideSettle {
    0%   { opacity: 0; transform: translateX(-80px); }
    60%  { opacity: 1; transform: translateX(6px); }
    78%  { transform: translateX(-3px); }
    90%  { transform: translateX(1px); }
    100% { opacity: 1; transform: translateX(0); }
}

.team-member:hover { z-index: 10; }

/* Golden ring — conic-gradient that fills the contour on hover */
.team-member::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--accent) var(--ring-angle), transparent 0deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
    --ring-angle: 0deg;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s var(--ease-spring);
}
.team-member:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
    animation: ringFill 0.8s var(--ease-out) forwards;
}
@keyframes ringFill {
    from { --ring-angle: 0deg; }
    to { --ring-angle: 360deg; }
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-content);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 3px solid rgba(255,255,255,0.9);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
    position: relative;
    z-index: 2;
}
.team-member:hover .team-avatar {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}
.team-member:hover .team-avatar img { filter: grayscale(0%); }

/* Info: hidden by default, appears on hover */
.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    pointer-events: none;
    padding-top: 0;
    width: 200px;
}
.team-member:hover .team-info {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Elegant connecting line */
.team-line {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    margin-bottom: 12px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s var(--ease-spring);
}
.team-member:hover .team-line { transform: scaleY(1); }

.team-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.team-role {
    font-family: var(--font-hand);
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 2px;
    margin-bottom: 8px;
}
.team-desc {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-body);
    line-height: 1.55;
    max-width: 190px;
}

/* AI Agent badge — curved SVG text above avatar, appears on hover */
.team-ai-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 150px;
    height: 30px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    overflow: visible;
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.team-ai-badge text {
    fill: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 8.5px;
    letter-spacing: 2px;
}
.team-member:hover .team-ai-badge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Golden connector line — from team to card */
.team-ai-connector {
    width: 1px;
    height: 0;
    margin: 0 auto;
    background: linear-gradient(to bottom, var(--accent), rgba(212,160,23,0.1));
    transition: height 0.6s var(--ease-spring), opacity 0.4s var(--ease-out);
    opacity: 0;
    overflow: hidden;
}
.team-ai-connector.visible {
    height: 40px;
    opacity: 1;
}

/* AI explanation card — hidden by default, shown via JS on AI member click */
.team-ai-card {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), max-height 0.6s var(--ease-out);
    pointer-events: none;
}
.team-ai-card.team-ai-card-visible {
    opacity: 1;
    max-height: 350px;
    transform: translateY(0);
    pointer-events: auto;
}
.team-ai-card-inner {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1.5px solid rgba(212,160,23,0.35);
    box-shadow: 0 4px 24px rgba(212,160,23,0.08);
    position: relative;
}
.team-ai-card-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 1px;
}
.team-ai-card-label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 1rem;
}
.team-ai-card-inner p {
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.team-ai-card-highlight {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .team-avatar { width: 120px; height: 120px; }
    .team-member { width: 130px; margin: 0 -8px; }
    .team-member::before { width: 130px; height: 130px; top: -2px; }
    .team-ai-badge { width: 120px; top: -12px; }
    .team-info { width: 170px; }
    .team-stage { min-height: 360px; }
}
@media (max-width: 768px) {
    .team-stage {
        flex-wrap: wrap;
        gap: 2rem;
        min-height: auto;
        justify-content: center;
    }
    .team-member {
        margin: 0;
        width: 130px;
        cursor: pointer;
    }
    .team-avatar { width: 110px; height: 110px; }
    .team-member::before { width: 120px; height: 120px; top: -2px; }
    .team-ai-badge { width: 110px; top: -10px; }
    /* B&W by default, colored when active */
    .team-avatar img { filter: grayscale(100%); }
    .team-member.active .team-avatar img { filter: grayscale(0%); }
    .team-info {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        width: 150px;
    }
    .team-line { transform: scaleY(1); }
    .team-desc { display: none; }
    /* Golden ring on active member */
    .team-member.active::before {
        opacity: 1;
        transform: translateX(-50%) scale(1.08);
        animation: ringFill 0.8s var(--ease-out) forwards;
    }
    /* Neutralize hover on touch */
    .team-member:hover .team-avatar { transform: none; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
    .team-member:hover .team-avatar img { filter: grayscale(100%); }
    .team-member.active:hover .team-avatar img { filter: grayscale(0%); }
    .team-member:hover::before { opacity: 0; animation: none; }
    .team-member:hover .team-info { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TEAM MODAL — liquid glass (mobile only)
   ========================================================================== */
.team-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.team-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.team-modal-card {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 320px;
    width: 85vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s var(--ease-spring);
}
.team-modal-overlay.visible .team-modal-card {
    transform: translateY(0) scale(1);
}
.team-modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(255, 255, 255, 0.7);
    margin: 0 auto 1rem;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.team-modal-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.25rem;
}
.team-modal-role {
    font-family: var(--font-hand);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.team-modal-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
}
.team-modal-badge {
    display: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.team-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

/* ==========================================================================
   CLIENTS MARQUEE
   ========================================================================== */
#clients { padding-bottom: clamp(4rem, 8vw, 8rem); }
.clients-marquee {
    overflow: hidden; width: 100%; padding: 3rem 0;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.clients-track {
    display: flex; align-items: center; gap: clamp(1.5rem, 2.5vw, 2rem);
    width: max-content; animation: clientsScroll 30s linear infinite;
}
.clients-track img {
    height: 40px; max-width: 120px; width: auto; object-fit: contain;
    opacity: 0.45; filter: grayscale(100%) brightness(0.85);
    transition: opacity 0.4s ease, filter 0.4s ease; flex-shrink: 0;
}
.clients-track img:hover { opacity: 0.9; filter: grayscale(0%) brightness(1); }
@keyframes clientsScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-wrapper {
    display: flex; align-items: flex-start; gap: 4rem; margin-top: 2rem;
}
.contact-form-col { flex: 1; min-width: 0; max-width: 540px; }

/* Contact illustration — email SVG */
.contact-illustration {
    flex: 1; display: flex; align-items: center; justify-content: center;
    min-width: 280px; padding-top: 2rem;
}
dotlottie-player { width: 100%; max-width: 420px; }

.contact-sub {
    font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.5rem;
}
.contact-desc { font-size: 0.95rem; color: var(--text-body); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; font-weight: 500; font-size: 0.9rem;
    color: var(--text-primary); margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
    width: 100%; padding: 12px 0; font-size: 0.95rem;
    border: none; border-bottom: 1px solid #d2d2d2;
    background: transparent; color: var(--text-primary);
    transition: border-color 0.3s ease; outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-bottom-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }
.form-group textarea { resize: vertical; min-height: 80px; }

.btn-submit { margin-top: 1rem; border: none; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-feedback { margin-top: 1rem; font-size: 0.9rem; min-height: 1.4em; }
.form-feedback-success { color: #2ecc71; font-weight: 500; }
.form-feedback-error { color: #e74c3c; font-weight: 500; }

.contact-info-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: clamp(2rem, 3vw, 3rem);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.contact-info-text {
    font-size: 0.95rem; color: var(--text-body); line-height: 1.7; margin-bottom: 2rem;
}
.contact-details { margin-bottom: 1.5rem; }
.contact-details a {
    display: block; font-size: 0.95rem; color: var(--text-primary);
    font-weight: 500; margin-bottom: 0.5rem; transition: color 0.3s ease;
}
.contact-details a:hover { color: var(--accent); }
.contact-social { display: flex; gap: 1.5rem; }
.contact-social a {
    font-size: 0.9rem; color: var(--text-body); transition: color 0.3s ease;
}
.contact-social a:hover { color: var(--accent); }

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.faq-list { max-width: 800px; margin-top: 3rem; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.08); }
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 0; text-align: left; font-family: var(--font-display);
    font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-primary); transition: color 0.3s ease;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
    font-size: 1.5rem; font-weight: 300; color: var(--text-body);
    transition: transform 0.3s ease;
    flex-shrink: 0; margin-left: 1rem;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
    padding: 0 0;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 0 1.5rem 0; }
.faq-answer p { font-size: 0.95rem; color: var(--text-body); line-height: 1.7; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    position: relative; overflow: hidden;
    background: var(--bg-content); padding: clamp(3rem, 6vw, 5rem) 0 2rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    z-index: 3;
}
.footer-ghost {
    position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(10rem, 20vw, 20rem); color: var(--text-primary);
    opacity: 0.04; white-space: nowrap; pointer-events: none;
    letter-spacing: -0.04em; line-height: 1; user-select: none;
}

/* Footer marquee */
.footer-marquee-section {
    overflow: hidden; padding: 2rem 0; margin-bottom: 3rem;
}
.footer-marquee-track {
    display: flex; width: max-content; animation: marqueeScroll 20s linear infinite;
}
.footer-marquee-content {
    display: flex; align-items: center; flex-shrink: 0;
}
.footer-marquee-content span {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2rem, 4vw, 3.5rem); color: var(--text-primary);
    white-space: nowrap; padding: 0 1.5rem;
}
.footer-marquee-star { font-size: clamp(1.5rem, 3vw, 2.5rem) !important; }

.footer-center {
    text-align: center; position: relative; z-index: 2; margin-bottom: 3rem;
}
.footer-center a {
    display: block; font-size: clamp(0.9rem, 1.2vw, 1rem); color: var(--text-primary);
    font-weight: 500; margin-bottom: 0.5rem; transition: color 0.3s ease;
}
.footer-center a:hover { color: var(--accent); }

.footer-bottom {
    display: flex; justify-content: center; align-items: center;
    gap: 2rem; padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    position: relative; z-index: 2;
    max-width: 1200px; margin: 0 auto;
    padding-left: clamp(1.5rem, 4vw, 3rem);
    padding-right: clamp(1.5rem, 4vw, 3rem);
    flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-light); }
.footer-cnpj { font-size: 0.7rem !important; color: rgba(0,0,0,0.2) !important; letter-spacing: 0.05em; }

.footer-legal-row {
    display: flex; justify-content: center; gap: 1.5rem;
    margin-top: 1rem; position: relative; z-index: 2;
    padding-bottom: 4rem; /* space for bottom nav */
}
.footer-legal-row a { font-size: 0.8rem; color: var(--text-light); transition: color 0.3s ease; }
.footer-legal-row a:hover { color: var(--accent); }

/* ==========================================================================
   MOBILE HEADER & MENU (hidden on desktop)
   ========================================================================== */
.mobile-header,
.mobile-menu-overlay {
    display: none;
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* Stacking cards — delays not needed, scroll drives the reveal */
.diff-item.reveal:nth-child(2) { transition-delay: 100ms; }
.diff-item.reveal:nth-child(3) { transition-delay: 200ms; }
.portfolio-card.reveal:nth-child(2) { transition-delay: 80ms; }
.portfolio-card.reveal:nth-child(3) { transition-delay: 160ms; }
.portfolio-card.reveal:nth-child(4) { transition-delay: 240ms; }
.faq-item.reveal:nth-child(2) { transition-delay: 60ms; }
.faq-item.reveal:nth-child(3) { transition-delay: 120ms; }
.faq-item.reveal:nth-child(4) { transition-delay: 180ms; }
.faq-item.reveal:nth-child(5) { transition-delay: 240ms; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .services-wrapper { flex-direction: column; }
    .services-sticky { position: relative; top: auto; order: -1; margin-bottom: 2rem; display: none; }
    .service-card { margin-bottom: 20px; }
    .service-card:nth-child(1) { top: 80px; }
    .service-card:nth-child(2) { top: 100px; }
    .service-card:nth-child(3) { top: 120px; }
    .service-card:nth-child(4) { top: 140px; margin-bottom: 0; }
    .services-scroll { gap: 0; }
    .about-wrapper { flex-direction: column; gap: 2rem; }
    .about-right { justify-content: flex-start; padding-top: 0; }
    .about-accent-block { display: flex; align-items: center; gap: 1rem; }
    .about-accent { font-size: 4rem; }
    .about-accent-label { margin-top: 0; }
    .diff-grid { grid-template-columns: 1fr; gap: 0; }
    .diff-item { border-top: 1px solid rgba(0,0,0,0.12); }
    .contact-wrapper { flex-direction: column; gap: 2rem; }
    .contact-form-col { max-width: 100%; }
    .contact-illustration { min-width: 0; max-width: 280px; margin: 0 auto; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-inner { padding: 8px 8px 8px 20px; }
    .hero-name { font-size: clamp(1.8rem, 7vw, 2.6rem); }
    .hero-split { justify-content: center; transform: translateY(-8vh); padding: 0 2rem; }
    .hero-side-left { text-align: center; }
    .hero-compass {
        display: none;
    }
    .flying-card { display: block !important; width: 140px; height: 210px; }
    .flying-card-stat { font-size: 3.2rem; }
    .flying-card-stat-label { font-size: 0.65rem; }
    .flying-card-face { padding: 1.2rem 1rem; }
    .experience-landing-section { display: block; min-height: 60vh; position: relative; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .statement-text { font-size: clamp(1.8rem, 7vw, 3rem); }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .footer-ghost { font-size: clamp(3rem, 18vw, 8rem); }

    /* Scroll hint: higher and more visible on mobile */
    .hero-scroll-cta {
        bottom: 80px;
        font-size: 0.85rem;
        letter-spacing: 0.25em;
        color: var(--accent);
    }
    .scroll-line {
        height: 52px;
        width: 2.5px;
    }

    /* Hide bottom nav on mobile */
    #bottom-nav { display: none !important; }
    #bottom-fog { display: none !important; }

    /* Client logos: bigger and faster on mobile */
    .clients-track img { height: 55px; max-width: 160px; }
    .clients-track { animation-duration: 20s; gap: 1.5rem; }

    /* Mobile header bar */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 1001;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: var(--bg-dark);
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .mobile-header.visible {
        opacity: 1;
        transform: translateY(0);
    }
    .mobile-header-logo {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 1.15rem;
        color: #fff;
        letter-spacing: -0.02em;
    }
    .mobile-header-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px 0;
    }
    .hamburger-lines {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .hamburger-line {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
    }
    .hamburger-label {
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 0.85rem;
        color: #fff;
        letter-spacing: 0.02em;
    }

    /* Mobile menu full-screen overlay */
    .mobile-menu-overlay {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 2000;
        background: var(--bg);
        flex-direction: column;
        transform: translateX(100%);
        transition: transform 0.45s var(--ease-spring);
        overflow-y: auto;
    }
    .mobile-menu-overlay.open {
        transform: translateX(0);
    }
    .mobile-menu-inner {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 24px 28px 40px;
    }
    .mobile-menu-close {
        position: absolute;
        top: 18px;
        right: 20px;
        font-size: 2rem;
        color: var(--text-primary);
        background: none;
        border: none;
        cursor: pointer;
        line-height: 1;
        padding: 4px;
        z-index: 1;
    }
    .mobile-menu-top {
        display: flex;
        justify-content: flex-start;
        margin-bottom: 1.5rem;
        margin-top: 0.5rem;
    }
    .mobile-menu-compass-img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        border-radius: 20px;
        opacity: 0.9;
    }
    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        flex: 1;
        margin-top: 1rem;
    }
    .mobile-menu-link {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: clamp(2rem, 8vw, 2.8rem);
        color: var(--text-primary);
        letter-spacing: -0.03em;
        line-height: 1.25;
        padding: 0.3rem 0;
        transition: color 0.3s ease;
    }
    .mobile-menu-link:active {
        color: var(--accent);
    }
    .mobile-menu-footer {
        margin-top: auto;
        padding-top: 2rem;
    }
    .mobile-menu-footer-label {
        display: block;
        font-family: var(--font-body);
        font-size: 0.75rem;
        color: var(--text-light);
        margin-bottom: 0.5rem;
        letter-spacing: 0.02em;
    }
    .mobile-menu-footer a {
        font-family: var(--font-body);
        font-size: 0.95rem;
        color: var(--text-primary);
        font-weight: 500;
        transition: color 0.3s ease;
    }
    .mobile-menu-footer a:active {
        color: var(--accent);
    }
}
@media (max-width: 480px) {
    #bottom-nav { bottom: 12px; left: 12px; right: 12px; transform: translateX(0) translateY(20px); }
    #bottom-nav.visible { transform: translateX(0) translateY(0); }
    .nav-inner { width: 100%; justify-content: space-between; }
    .about-ctas { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
    #hero { position: relative; }
    #main-content { margin-top: 0; }
    .manifesto-text .word { opacity: 1; }
}

/* ==========================================================================
   PORTFOLIO PAGE
   ========================================================================== */
.portfolio-header {
    text-align: center; padding: clamp(6rem, 10vw, 8rem) 0 2rem;
}
.portfolio-header .section-label-hand { display: block; text-align: center; }

/* Category tabs */
.portfolio-categories {
    display: flex; gap: 0.75rem; justify-content: center;
    padding: 1.5rem 0 2.5rem; flex-wrap: wrap;
}
.portfolio-cat {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.25rem; padding: 1rem 1.5rem;
    border-radius: var(--radius-md); background: var(--bg-card);
    border: 1.5px solid rgba(0,0,0,0.06);
    transition: all 0.35s var(--ease-spring);
    position: relative; min-width: 120px;
}
.portfolio-cat:hover {
    border-color: rgba(0,0,0,0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.portfolio-cat.active {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(212,160,23,0.12);
}
.cat-number {
    font-family: var(--font-display); font-weight: 700;
    font-size: 1.5rem; color: var(--text-primary);
    line-height: 1; letter-spacing: -0.03em;
}
.portfolio-cat.active .cat-number { color: var(--accent); }
.cat-name {
    font-family: var(--font-body); font-weight: 500;
    font-size: 0.78rem; color: var(--text-body);
    letter-spacing: 0.02em; white-space: nowrap;
}
.cat-badge {
    position: absolute; top: -6px; right: -6px;
    font-family: var(--font-body); font-weight: 600;
    font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase;
    background: var(--text-primary); color: var(--bg);
    padding: 3px 8px; border-radius: var(--radius-pill);
}

/* Showcase grid */
.portfolio-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 4rem;
}

/* Large items span 2 columns in the 3-col grid */
.showcase-item.showcase-large {
    grid-column: span 1;
}
/* First two and middle two items: span half the grid (2-col layout) */
.showcase-item:nth-child(1),
.showcase-item:nth-child(2),
.showcase-item:nth-child(9),
.showcase-item:nth-child(10) {
    grid-column: span 1;
}
/* Actually make featured items use a 2-col layout via subgrid behavior */
.showcase-item:nth-child(1) { grid-column: 1 / 2; }
.showcase-item:nth-child(2) { grid-column: 2 / 4; }
.showcase-item:nth-child(9) { grid-column: 1 / 3; }
.showcase-item:nth-child(10) { grid-column: 3 / 4; }

.showcase-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
}
.showcase-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.showcase-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    aspect-ratio: 16 / 9;
}
.showcase-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
    transition: transform 0.6s var(--ease-spring);
}
.showcase-item:hover .showcase-img-wrap img {
    transform: scale(1.03);
}

/* Overlay on hover */
.showcase-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(26,26,26,0.85) 100%
    );
    display: flex; flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.showcase-item:hover .showcase-overlay { opacity: 1; }

.showcase-tag {
    font-family: var(--font-body); font-weight: 600;
    font-size: 0.65rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 0.4rem;
}
.showcase-overlay h3 {
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.15rem; color: #fff;
    line-height: 1.2; margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}
.showcase-overlay p {
    font-family: var(--font-body); font-weight: 400;
    font-size: 0.8rem; color: rgba(255,255,255,0.65);
    line-height: 1.4;
}

/* Empty state */
.portfolio-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 6rem 2rem; text-align: center;
    margin-bottom: 4rem;
}
.empty-icon {
    font-size: 2.5rem; margin-bottom: 1.5rem;
    opacity: 0.3;
}
.portfolio-empty h3 {
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.5rem; color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.portfolio-empty p {
    font-size: 0.95rem; color: var(--text-body);
    max-width: 400px;
}

/* Portfolio bottom nav override */
.portfolio-nav .nav-inner { gap: 0.75rem; }
.portfolio-nav .nav-back {
    font-size: 0.85rem; color: rgba(255,255,255,0.65); padding: 8px 16px;
    border-radius: 50px; transition: color 0.3s ease, background 0.3s ease;
}
.portfolio-nav .nav-back:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Portfolio responsive */
@media (max-width: 1024px) {
    .portfolio-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
    .showcase-item:nth-child(1),
    .showcase-item:nth-child(2),
    .showcase-item:nth-child(9),
    .showcase-item:nth-child(10) {
        grid-column: span 1;
    }
    .portfolio-categories { gap: 0.5rem; }
    .portfolio-cat { min-width: 100px; padding: 0.75rem 1rem; }
    .cat-number { font-size: 1.2rem; }
}
@media (max-width: 768px) {
    .portfolio-showcase {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .showcase-item:nth-child(1),
    .showcase-item:nth-child(2),
    .showcase-item:nth-child(9),
    .showcase-item:nth-child(10) {
        grid-column: span 1;
    }
    .showcase-overlay { opacity: 1; }
    .portfolio-categories { gap: 0.4rem; }
    .portfolio-cat { min-width: auto; padding: 0.6rem 0.8rem; }
    .cat-number { font-size: 1rem; }
    .cat-name { font-size: 0.7rem; }
}

/* ==========================================================================
   PORTFOLIO GATE — Tela de senha
   ========================================================================== */
.portfolio-gate {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.gate-exit {
    opacity: 0; transform: scale(1.02);
    pointer-events: none;
}
.gate-content {
    width: 100%; max-width: 460px;
    padding: 2rem;
    display: flex; flex-direction: column; align-items: center;
}
.gate-back {
    align-self: flex-start;
    font-size: 0.85rem; color: var(--text-body);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}
.gate-back:hover { color: var(--text-primary); }

.gate-card {
    width: 100%; text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}
.gate-lock-icon {
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex; justify-content: center;
}
.gate-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    margin-bottom: 0.75rem;
}
.gate-desc {
    font-size: 0.9rem; color: var(--text-body);
    line-height: 1.7; margin-bottom: 2rem;
    max-width: 360px; margin-left: auto; margin-right: auto;
}

.gate-form { width: 100%; }
.gate-input-wrap {
    display: flex; align-items: center;
    border: 1.5px solid #d2d2d2;
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gate-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.12);
}
.gate-input {
    flex: 1; border: none; outline: none;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 0.95rem; background: transparent;
    color: var(--text-primary);
}
.gate-input::placeholder { color: var(--text-light); }
.gate-input-error {
    animation: gate-shake 0.4s ease;
}
@keyframes gate-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.gate-submit {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; min-width: 44px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 50%;
    margin-right: 4px; cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.gate-submit:hover { background: var(--accent-hover); transform: scale(1.05); }

.gate-error {
    font-size: 0.8rem; color: #e74c3c;
    font-weight: 500; margin-top: 0.75rem;
    min-height: 1.2em;
}

.gate-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.75rem 0;
    color: var(--text-light); font-size: 0.8rem;
}
.gate-divider::before,
.gate-divider::after {
    content: ''; flex: 1; height: 1px;
    background: #e0e0e0;
}

.gate-request-btn {
    width: 100%;
    text-align: center;
    padding: 12px 28px;
}
.gate-hint {
    font-size: 0.78rem; color: var(--text-light);
    margin-top: 1rem; line-height: 1.5;
}

/* Portfolio content hidden */
.portfolio-content-hidden {
    display: none;
}
.portfolio-content-enter {
    animation: portfolio-fade-in 0.6s ease forwards;
}
@keyframes portfolio-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ACCESS REQUEST MODAL
   ========================================================================== */
.access-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; opacity: 0;
    transition: opacity 0.35s ease;
}
.access-modal-open {
    pointer-events: auto; opacity: 1;
}
.access-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(26,26,26,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.access-modal-dialog {
    position: relative; z-index: 1;
    width: 90%; max-width: 440px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 2.5rem);
    box-shadow: 0 24px 80px rgba(0,0,0,0.12);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s var(--ease-spring);
}
.access-modal-open .access-modal-dialog {
    transform: translateY(0) scale(1);
}
.access-modal-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-body);
    transition: background 0.2s ease, color 0.2s ease;
}
.access-modal-close:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
}
.access-modal-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin-bottom: 0.5rem;
}
.access-modal-desc {
    font-size: 0.88rem; color: var(--text-body);
    line-height: 1.6; margin-bottom: 1.75rem;
}
.access-form .form-group { margin-bottom: 1.25rem; }
.access-submit {
    width: 100%; text-align: center;
    margin-top: 0.5rem; padding: 14px 28px;
    font-size: 0.95rem; border: none;
}
.access-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Footer address */
.footer-address, .contact-address p {
    font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem;
}

/* ==========================================================================
   LEGAL PAGES (Privacidade, Termos)
   ========================================================================== */
.page-legal { background: var(--bg); }
.page-legal main { padding-bottom: 5rem; }
.legal-header {
    text-align: center; padding: clamp(4rem, 8vw, 6rem) 0 2rem;
}
.legal-content {
    max-width: 760px; margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}
.legal-content h2 {
    font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 2.5rem 0 0.75rem;
    color: var(--text-primary);
}
.legal-content h3 {
    font-size: clamp(1rem, 1.5vw, 1.15rem); margin: 2rem 0 0.5rem;
    color: var(--text-primary);
}
.legal-content p {
    font-size: 0.92rem; color: var(--text-body); line-height: 1.75;
    margin-bottom: 1rem;
}
.legal-content ul, .legal-content ol {
    margin: 0.5rem 0 1rem 1.5rem; list-style: disc;
}
.legal-content li {
    font-size: 0.92rem; color: var(--text-body); line-height: 1.75;
    margin-bottom: 0.3rem;
}
.legal-content ol { list-style: decimal; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-content a:hover { color: var(--accent-hover); }
.legal-updated {
    font-size: 0.8rem; color: var(--text-light); text-align: center;
    margin-bottom: 3rem;
}

/* ==========================================================================
   LANGUAGE SWITCHER (i18n)
   ========================================================================== */
.lang-switcher { display: flex; gap: 6px; align-items: center; }
.lang-btn { background: none; border: none; cursor: pointer; font-size: 20px; opacity: 0.5; transition: opacity 0.2s, transform 0.2s; padding: 2px; line-height: 1; }
.lang-btn:hover { opacity: 0.8; }
.lang-btn.active { opacity: 1; transform: scale(1.15); }

/* Desktop nav: place switcher between links and CTA */
#bottom-nav .lang-switcher { margin-left: auto; margin-right: 8px; }

/* Mobile header: small switcher before hamburger */
.lang-switcher-mobile { margin-left: auto; margin-right: 10px; }
.lang-switcher-mobile .lang-btn { font-size: 18px; }
