/* ══════════════════════════════════════════════════════════════════
   DESIGN SYSTEM — Editorial Humanista (Warm Canvas)
   bariza.dev — style.css compartilhado entre todas as páginas
   Paleta: Canvas #faf9f5 · Ink #141413 · Coral #cc785c · Borda #e6dfd8
══════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --canvas: #faf9f5;
    --ink: #141413;
    --ink-muted: #6b6560;
    --coral: #cc785c;
    --border: #e6dfd8;
    --surface: #f2ede6;
    --nav-h: 64px;
}

html {
    scroll-behavior: smooth;
}

/* ── Body & background canvas ───────────────────────────────────── */
body {
    margin: 0;
    padding: 0;
    background-color: var(--canvas);
    color: var(--ink);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ── Typography — display (EB Garamond) ─────────────────────────── */
.font-display {
    font-family: 'EB Garamond', Georgia, ui-serif, serif;
}

/* ── Section label ──────────────────────────────────────────────── */
.section-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--coral);
}

/* ── Horizontal rule accent ─────────────────────────────────────── */
.hr-accent {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, var(--coral), transparent);
    margin-bottom: 2rem;
    width: 64px;
}

/* ════════════════════════════════════════════════════════════════
   NAVBAR — Sticky, editorial, com hamburger em mobile
════════════════════════════════════════════════════════════════ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: var(--nav-h);
    background-color: var(--canvas);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo / wordmark */
.nav-logo {
    font-family: 'EB Garamond', Georgia, ui-serif, serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: var(--coral);
}

/* Desktop links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--coral);
    transition: width 0.25s ease;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--ink);
}

/* Hamburger button — visible only on mobile */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--ink);
    border-radius: 99px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburger → X when open */
.nav-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    background-color: var(--canvas);
    border-top: 1px solid var(--border);
    z-index: 49;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 0;
    animation: drawerSlideIn 0.28s cubic-bezier(.22, 1, .36, 1);
}

@keyframes drawerSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-drawer.open {
    display: flex;
}

.nav-drawer a {
    font-family: 'EB Garamond', Georgia, ui-serif, serif;
    font-weight: 400;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
}

.nav-drawer a:last-child {
    border-bottom: none;
}

.nav-drawer a:hover,
.nav-drawer a.active {
    color: var(--coral);
}

/* ── Responsive breakpoint ────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links    { display: none; }
    .nav-hamburger { display: flex; }
}

/* ════════════════════════════════════════════════════════════════
   HERO SECTION — Editorial Clean
════════════════════════════════════════════════════════════════ */

.hero-glass {
    padding: 1.75rem 0 2rem;
}

.hero-h1 {
    font-family: 'EB Garamond', Georgia, ui-serif, serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 9vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.hero-h1 .accent-word {
    color: var(--coral);
}

.hero-subtitle {
    font-family: 'Inter', ui-sans-serif, sans-serif;
    font-weight: 400;
    color: var(--ink-muted);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.hero-spline-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero-spline-container { height: 480px; }
}

.hero-spline-container spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── CTA — Coral Primary ─────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background-color: var(--coral);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #b86849;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    background-color: #a85f42;
}

/* ── Ghost button ────────────────────────────────────── */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: transparent;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--ink-muted);
    background: var(--surface);
}

/* ════════════════════════════════════════════════════════════════
   REVEAL ANIMATIONS — Fade Up Cascade
════════════════════════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(.22, 1, .36, 1),
        transform 0.6s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.05s; }
.reveal-d2 { transition-delay: 0.15s; }
.reveal-d3 { transition-delay: 0.28s; }
.reveal-d4 { transition-delay: 0.42s; }
.reveal-d5 { transition-delay: 0.56s; }

/* ════════════════════════════════════════════════════════════════
   PROJECT ITEMS — Editorial, sem caixas visuais
════════════════════════════════════════════════════════════════ */

.project-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.project-card .card-img {
    overflow: hidden;
    border-radius: 16px;
}

.project-card .card-img img {
    transition: transform 0.55s cubic-bezier(.22, 1, .36, 1);
    display: block;
    width: 100%;
}

.project-card:hover .card-img img {
    transform: scale(1.05);
}

.card-body { padding: 16px 4px 0; }

.card-title {
    font-family: 'Inter', ui-sans-serif, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.3;
    transition: color 0.25s ease;
}

.project-card:hover .card-title { color: var(--coral); }

.card-desc {
    font-family: 'Inter', ui-sans-serif, sans-serif;
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.7;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    background: rgba(230, 223, 216, 0.35);
    color: var(--ink-muted);
    border: none;
    border-radius: 4px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(250, 249, 245, 0.95);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.25rem 0.6rem;
    backdrop-filter: none;
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #5db872;
    flex-shrink: 0;
}

/* ── Scroll Indicator ─────────────────────────────────────────── */
@keyframes scrollFloat {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50%       { transform: translateY(8px); opacity: 0.55; }
}

.scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.scroll-indicator img {
    animation: scrollFloat 2.8s ease-in-out infinite;
}

@media (max-width: 1023px) { .scroll-indicator { display: none; } }

@media (max-width: 768px) { .desktop-only-break { display: none; } }

#lottie-plant { transform: translateX(24px); }
@media (max-width: 768px) { #lottie-plant { transform: none; } }

.card-ext-icon {
    color: var(--border);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.project-card:hover .card-ext-icon { color: var(--coral); }

/* ── Contact links ─────────────────────────────────────────────── */
.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.83rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
    border-color: var(--coral);
    background: var(--surface);
    color: var(--ink);
}

.contact-link.whatsapp:hover {
    border-color: #5db872;
    background: rgba(93, 184, 114, 0.06);
    color: #3d8a52;
}

/* ── Page header — seções internas ──────────────────────────── */
.page-header {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.5rem 3rem;
}

.page-h1 {
    font-family: 'EB Garamond', Georgia, ui-serif, serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 1rem;
}

.page-lead {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--ink-muted);
    max-width: 52ch;
    line-height: 1.65;
    margin: 0;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar           { width: 5px; }
::-webkit-scrollbar-track     { background: var(--canvas); }
::-webkit-scrollbar-thumb     { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--coral); }

/* ── Selection ──────────────────────────────────────────────── */
::selection {
    background-color: var(--coral);
    color: #ffffff;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    max-width: 1280px;
    margin: 48px auto 0;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--ink-muted);
    opacity: 0.7;
    margin: 0;
}
