@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f3f6f4;
    --bg-alt: #ffffff;
    --ink: #17231f;
    --ink-soft: #4d5c56;
    --teal: #123c3a;
    --teal-soft: #cfe5e0;
    --teal-line: #d9e6e2;
    --accent: #f0954c;
    --accent-dark: #d97b34;
    --accent-soft: #fce3cd;
    --card-shadow: 0 18px 40px -22px rgba(18, 60, 58, 0.35);
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 9px;
    --font-display: 'Fraunces', serif;
    --font-body: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
    padding: 28px 0 8px;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--teal);
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    flex-shrink: 0;
}

.topbar-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.topbar-link:hover { border-color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero {
    padding: 44px 0 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: var(--accent-soft);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 18px;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.12;
    margin: 0 0 14px;
    color: var(--teal);
    max-width: 20ch;
}

.hero p {
    font-size: 1.02rem;
    color: var(--ink-soft);
    max-width: 56ch;
    margin: 0;
}

/* ---------- Grid de temas ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    padding: 36px 0 70px;
}

.tema-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 26px 24px 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    border: 1px solid var(--teal-line);
}

.tema-index {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--accent-dark);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.tema-card h3 {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 600;
    color: var(--teal);
    margin: 0;
    line-height: 1.3;
}

.tema-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--teal);
    background: var(--teal-soft);
    padding: 5px 10px;
    border-radius: 100px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 13px 22px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
}
.btn-primary:hover { background: #0c2b29; transform: translateY(-1px); }

.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(240, 149, 76, 0.7);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--teal);
    border: 1.5px solid var(--teal-line);
}
.btn-outline:hover { border-color: var(--teal); }

.btn-block { width: 100%; }

/* ---------- Selo de tema já reservado ---------- */
.tema-card.is-reserved {
    border-color: var(--accent-soft);
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 40%);
}

.ribbon {
    position: absolute;
    top: 18px;
    right: -6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 14px 5px 12px;
    border-radius: 6px 0 0 6px;
    box-shadow: 0 8px 16px -8px rgba(217, 123, 52, 0.6);
}
.ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    top: 100%;
    border-width: 6px 6px 0 0;
    border-style: solid;
    border-color: var(--accent-dark) transparent transparent transparent;
}

.reserved-note {
    font-size: 0.8rem;
    color: var(--ink-soft);
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    line-height: 1.4;
}
.reserved-note strong { color: var(--accent-dark); }

.alert-banner {
    background: var(--accent-soft);
    color: #7a4a1f;
    border: 1px solid #f0cda3;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 14px;
}
.alert-banner strong { color: var(--accent-dark); }

/* ---------- Página de roteiro ---------- */
.roteiro-header {
    padding: 30px 0 6px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    margin-bottom: 18px;
}
.back-link:hover { color: var(--teal); }

.roteiro-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--teal);
    margin: 0 0 10px;
    line-height: 1.25;
    max-width: 30ch;
}

.roteiro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 60px;
}

/* Moldura vertical estilo 9:16, remete ao formato final do vídeo */
.phone-frame {
    width: 100%;
    max-width: 330px;
    aspect-ratio: 9 / 16;
    background: var(--teal);
    border-radius: 32px;
    padding: 10px;
    box-shadow: 0 30px 60px -25px rgba(18, 60, 58, 0.55);
    position: relative;
}

.phone-screen {
    background: linear-gradient(180deg, #f7fbf9 0%, #ffffff 55%);
    border-radius: 24px;
    height: 100%;
    width: 100%;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.scene-count {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-dark);
    background: var(--accent-soft);
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.scene-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--teal);
    margin: 0 0 12px;
    line-height: 1.25;
}

.scene-block-label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a9b94;
    margin-bottom: 4px;
}

.scene-imagem {
    font-size: 0.82rem;
    color: var(--ink-soft);
    background: #eef4f2;
    border: 1px dashed #b9cdc6;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
}

.scene-fala {
    font-size: 0.98rem;
    color: var(--ink);
    white-space: pre-line;
    flex: 1;
    overflow-y: auto;
}

.scene-tela-texto {
    margin-top: 12px;
    background: var(--teal);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    white-space: pre-line;
    line-height: 1.4;
}

.phone-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    border-radius: 100px;
    background: rgba(255,255,255,0.35);
}

/* Navegação do carrossel */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 22px;
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--teal-line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--teal);
    transition: background 0.15s ease, transform 0.1s ease;
}
.nav-btn:hover { background: var(--teal-soft); }
.nav-btn:active { transform: scale(0.94); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.nav-btn:disabled:hover { background: #fff; }

.dots {
    display: flex;
    gap: 7px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal-line);
    cursor: pointer;
    border: none;
    padding: 0;
}
.dot.active { background: var(--accent); width: 20px; border-radius: 100px; }

.record-cta {
    margin-top: 34px;
    text-align: center;
}

.record-cta p {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 14px;
}

/* ---------- Modal de agendamento ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 30, 27, 0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}
.modal-backdrop.open { display: flex; }

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px 28px 26px;
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px -30px rgba(18, 60, 58, 0.5);
}

.modal h2 {
    font-family: var(--font-display);
    color: var(--teal);
    font-size: 1.35rem;
    margin: 0 0 6px;
}

.modal .modal-sub {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 20px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 6px;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--teal-line);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #fbfcfb;
    color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.field textarea { resize: vertical; min-height: 70px; }

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.modal-actions .btn { flex: 1; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 1.3rem;
    line-height: 1;
    padding: 4px;
}

.form-msg {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.form-msg.show { display: block; }
.form-msg.success { background: #e3f3ec; color: #1e6b4c; }
.form-msg.error { background: #fbe6e2; color: #b3402a; }

.confirm-state {
    text-align: center;
    padding: 10px 0 4px;
}
.confirm-state .check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
}
.confirm-state h2 { margin-bottom: 8px; }
.confirm-state p { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 20px; }

footer {
    text-align: center;
    padding: 30px 0 40px;
    font-size: 0.78rem;
    color: #8a9b94;
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .phone-frame { max-width: 280px; }
}
