/* ============================================================
   CópiaPronto — Design System
   Identidade: laranja terroso, tipografia arredondada, grid sutil
   ============================================================ */

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

:root {
    --bg: #f7f3ec;
    --bg-soft: #fbf8f2;
    --bg-card: #ffffff;
    --text: #1c1814;
    --text-soft: #6b6258;
    --text-mute: #988e82;
    --accent: #c1572f;
    --accent-soft: #e08a64;
    --accent-bg: rgba(193, 87, 47, 0.08);
    --border: rgba(28, 24, 20, 0.10);
    --border-soft: rgba(28, 24, 20, 0.06);
    --grid-line: rgba(28, 24, 20, 0.04);
    --shadow: 0 1px 2px rgba(28, 24, 20, 0.04);
    --shadow-lg: 0 20px 50px rgba(28, 24, 20, 0.10);
    --radius: 20px;
    --radius-sm: 12px;
    --container: 1080px;
    --header-h: 80px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
    --bg: #161210;
    --bg-soft: #1c1714;
    --bg-card: #1e1815;
    --text: #f5efe8;
    --text-soft: #a89e92;
    --text-mute: #7a7166;
    --accent: #d4683f;
    --accent-soft: #e08a64;
    --accent-bg: rgba(212, 104, 63, 0.12);
    --border: rgba(245, 239, 232, 0.10);
    --border-soft: rgba(245, 239, 232, 0.06);
    --grid-line: rgba(245, 239, 232, 0.035);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.display { font-family: 'Fredoka', 'Inter', sans-serif; }

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

a { color: inherit; }

/* ===== Eyebrow / Section labels ===== */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.eyebrow::before {
    content: "";
    width: 48px;
    height: 2px;
    background: var(--accent);
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
}
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.brand-name strong { display: block; font-weight: 700; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--accent); }

/* ===== Theme toggle ===== */
.theme-switch { display: flex; align-items: center; gap: 10px; }
.theme-switch svg { width: 18px; height: 18px; color: var(--text-soft); }
.switch {
    position: relative;
    width: 52px;
    height: 28px;
    border: none;
    border-radius: 100px;
    background: var(--border);
    cursor: pointer;
    transition: background 0.3s var(--ease);
    flex-shrink: 0;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s var(--ease);
}
[data-theme="dark"] .switch { background: var(--accent); }
[data-theme="dark"] .switch::after { transform: translateX(24px); }

/* ===== Hero ===== */
.hero { padding: 88px 0 28px; }
#frases { padding-top: 0; }
.hero .eyebrow { margin-bottom: 28px; }
.hero h1 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
    max-width: 14ch;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-soft);
    max-width: 58ch;
    margin-bottom: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 100px;
    background: var(--accent);
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--accent-bg); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

/* ===== Section heading ===== */
.section { padding: 40px 0; }
.section-head { margin-bottom: 40px; }
.section-num {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: var(--accent);
    line-height: 1;
}
.section-head .row { display: flex; align-items: flex-start; gap: 24px; }
.section-head .label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-mute);
    padding-top: 6px;
}
.section-head h2 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    margin-top: 8px;
}

/* ===== Search ===== */
.search-bar { position: relative; max-width: 520px; margin: 0 auto 8px; }
.search-bar input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.search-bar svg {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: var(--text-mute); pointer-events: none;
}

/* ===== Category chips ===== */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 8px; }
.chip {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg-card);
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Feed ===== */
.feed { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
[hidden] { display: none !important; } /* scroll infinito: garante ocultar até anúncios (display:flex) */
.feed-sentinel { height: 1px; }

/* ===== Phrase card ===== */
.phrase {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 40px 44px;
    box-shadow: var(--shadow);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
    overflow: hidden;
}
.phrase::before {
    content: "";
    position: absolute;
    left: 0; top: 24px; bottom: 24px;
    width: 4px;
    border-radius: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}
.phrase:hover { border-color: var(--border); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.phrase:hover::before { opacity: 1; }

.phrase-text {
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
    font-size: clamp(1.3rem, 2.6vw, 1.85rem);
    line-height: 1.32;
    color: var(--text);
    margin-bottom: 28px;
}
.phrase-autor {
    display: block;
    margin: -12px 0 24px;
    font-style: normal;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
}
.phrase-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.phrase-cat {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--accent);
    text-decoration: none;
}
.phrase-cat:hover { text-decoration: underline; }

.copy-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 22px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    color: var(--text);
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-btn.done { background: #2f9e6b; color: #fff; border-color: #2f9e6b; }

/* ===== Ad slot ===== */
.ad {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ad-wrap { min-height: 100px; display: flex; justify-content: center; }
.ad-wrap .adsbygoogle { display: block; width: 100%; }

/* ===== Intro / FAQ (conteúdo original p/ SEO e AdSense) ===== */
.prose-intro {
    max-width: 64ch;
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.8;
}
.faq { max-width: 760px; }
.faq h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 24px; }
.faq-item { padding: 20px 0; border-top: 1px solid var(--border-soft); }
.faq-item h3 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.15rem; margin-bottom: 6px; }
.faq-item p { color: var(--text-soft); line-height: 1.7; }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 64px 24px; color: var(--text-soft); }
.empty.hidden { display: none; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border-soft); margin-top: 80px; padding: 48px 0 40px; }
.footer .container { display: flex; flex-direction: column; gap: 28px; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-cats a { font-size: 0.92rem; color: var(--text-soft); text-decoration: none; transition: color 0.2s var(--ease); }
.footer-cats a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.footer-brand { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); }
.footer-year { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.8rem; color: var(--text); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.9rem; color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ===== Content pages (sobre, termos, etc) ===== */
.prose { max-width: 760px; margin: 0 auto; padding: 64px 24px 40px; }
.prose h1 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.prose .lead { color: var(--text-soft); font-size: 1.1rem; margin-bottom: 36px; }
.prose h2 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.4rem; margin: 32px 0 12px; }
.prose p, .prose li { color: var(--text-soft); line-height: 1.8; margin-bottom: 14px; }
.prose ul { padding-left: 24px; }
.prose a { color: var(--accent); }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(120px);
    display: flex; align-items: center; gap: 10px;
    background: #2f9e6b; color: #fff;
    padding: 14px 26px; border-radius: 100px;
    font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 12px 32px rgba(47, 158, 107, 0.35);
    z-index: 1000; pointer-events: none;
    transition: transform 0.4s var(--ease);
}
.toast svg { width: 18px; height: 18px; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    :root { --header-h: 68px; }
    .nav { gap: 18px; }
    .nav-link { display: none; }
    .hero { padding: 56px 0 28px; }
    .phrase { padding: 28px 26px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 0.9rem; }
    .phrase-foot { flex-direction: column; align-items: flex-start; gap: 16px; }
    .copy-btn { width: 100%; justify-content: center; }
}
