:root {
    color-scheme: light;
    --ink: #2b2430;
    --muted: #6f6572;
    --rose: #b63367;
    --rose-dark: #8f2450;
    --cream: #fff9f5;
    --surface: #fff;
    --surface-soft: #fff0f3;
    --line: #eadfe4;
    --content-width: 1180px;
    --radius-card: 18px;
    --shadow-card: 0 12px 36px #4c26300d;
    --section-space: clamp(44px, 6vw, 76px);
    font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--cream); line-height: 1.6; }
a { color: inherit; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin-top: 0; }

/* Cabeçalho compartilhado */
.site-header { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(20px, 6vw, 88px); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand img { display: block; width: clamp(190px, 18vw, 250px); height: 88px; object-fit: contain; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.site-header nav a { font-size: .95rem; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--rose); }
.site-header nav a[aria-current="page"] { font-weight: 700; }
.site-header nav button { border: 0; font-size: .95rem; cursor: pointer; }
.site-header nav .social-link { display: inline-flex; align-items: center; gap: 7px; }
.site-header nav .social-link i { color: var(--rose); font-size: 1.18rem; }
.site-header nav .nav-user { display: inline-flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 650; }
.site-header nav .nav-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.site-header nav .logout-form { margin: 0; }
.nav-login { padding: 8px 0; color: var(--ink); background: transparent; }
.nav-login:hover { color: var(--rose); }
.nav-cta { padding: 10px 17px; color: #fff; background: var(--rose); border: 0; border-radius: 999px; font-weight: 700; }
.nav-cta:hover, .button:hover { color: #fff; background: var(--rose-dark); }
.menu-toggle { display: none; }

/* Componentes básicos */
.page-wrap { width: min(calc(100% - 48px), var(--content-width)); margin-inline: auto; }
.eyebrow { margin: 0 0 10px; color: var(--rose); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.lead { max-width: 610px; margin-bottom: 26px; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.14rem); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 19px; color: #fff; background: var(--rose); border: 0; border-radius: 999px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:focus-visible, .menu-toggle:focus-visible, .site-header a:focus-visible, .text-link:focus-visible { outline: 3px solid #b6336755; outline-offset: 3px; }
.button--quiet { color: var(--rose-dark); background: #f8edf1; }
.button--quiet:hover { color: var(--rose-dark); background: #f2dfe7; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--rose-dark); font-size: .93rem; font-weight: 700; text-decoration: none; }
.text-link:hover { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.icon-bubble { width: 44px; height: 44px; display: inline-grid; place-items: center; margin-bottom: 18px; color: var(--rose); background: var(--surface-soft); border-radius: 14px; }

/* Resumo da página inicial */
.home-hero, .page-hero { padding-block: clamp(54px, 8vw, 96px); background: linear-gradient(115deg, #fff0f3 0%, #fff8f2 64%, #f9e8ed 100%); }
.page-hero--compact { padding-block: clamp(42px, 6vw, 68px); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); align-items: center; gap: clamp(32px, 7vw, 92px); }
.home-intro h1, .page-hero h1 { max-width: 680px; margin-bottom: 18px; font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1.03; letter-spacing: -.05em; }
.home-intro h1 span, .page-hero h1 span { color: var(--rose); }
.home-feature .event-image, .home-feature .event-placeholder { aspect-ratio: 16 / 10; }
.feature-empty { padding: clamp(26px, 4vw, 42px); }
.feature-empty h2 { max-width: 390px; margin-bottom: 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.feature-empty > p:not(.eyebrow) { max-width: 380px; margin-bottom: 18px; color: var(--muted); }

/* Seções, cartões e estados vazios */
.section { padding-block: var(--section-space); }
.section--soft { background: #fff3f5; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.035em; }
.card-grid { display: grid; gap: 20px; }
.card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.event-image, .event-placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.event-placeholder { display: grid; place-content: center; justify-items: center; gap: 8px; color: #8b707b; background: repeating-linear-gradient(135deg, #f2e6e9, #f2e6e9 12px, #f8eff0 12px, #f8eff0 24px); font-size: .86rem; }
.event-placeholder i { font-size: 1.25rem; }
.event-card-copy { padding: 18px 20px 20px; }
.event-card-copy h3 { margin-bottom: 10px; font-size: 1.13rem; line-height: 1.25; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: .84rem; }
.card-meta i { width: 15px; color: var(--rose); }
.card-description { margin: 10px 0 0; color: var(--muted); font-size: .93rem; }
.empty-state { display: flex; align-items: flex-start; gap: 18px; padding: 24px; }
.empty-state .icon-bubble { flex: 0 0 auto; margin: 0; }
.empty-state h3, .empty-state h2 { margin: 2px 0 6px; font-size: 1.12rem; }
.empty-state p { margin: 0 0 10px; color: var(--muted); }
.empty-state p:last-child { margin-bottom: 0; }
.page-hero-copy { max-width: 820px; }
.page-hero-copy .lead { margin-bottom: 0; }
.info-card { padding: 26px; }
.info-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.info-card p { margin-bottom: 14px; color: var(--muted); }
.info-card p:last-child { margin-bottom: 0; }
.community-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.community-cta h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }

/* Perfil */
.profile-section { max-width: 880px; }
.profile-card { padding: clamp(22px, 4vw, 38px); }
.profile-heading { display: flex; align-items: center; gap: 18px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-heading .eyebrow { margin-bottom: 5px; }
.profile-heading h2 { margin-bottom: 3px; font-size: 1.35rem; }
.profile-heading p:last-child { margin: 0; color: var(--muted); font-size: .92rem; }
.profile-avatar { width: 76px; height: 76px; display: grid; place-items: center; flex: 0 0 auto; object-fit: cover; color: var(--rose); background: var(--surface-soft); border: 0; border-radius: 50%; font-size: 1.5rem; }
.profile-form { display: grid; gap: 28px; }
.profile-form fieldset { min-width: 0; padding: 0; border: 0; }
.profile-form legend { width: 100%; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 1.05rem; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auth-field { display: grid; gap: 6px; color: var(--ink); font-size: .9rem; font-weight: 650; }
.profile-form .auth-field input, .profile-form .auth-field select { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #d9cdd2; border-radius: 9px; font-weight: 400; }
.profile-form .auth-field input:focus, .profile-form .auth-field select:focus { outline: 3px solid #b6336726; border-color: var(--rose); }
.profile-photo-field input { padding: 8px !important; }
.profile-photo-field small { color: var(--muted); font-size: .82rem; font-weight: 400; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions p { margin: 0; color: var(--muted); font-size: .88rem; }
.form-notice { padding: 12px 14px; margin: 0 0 18px; color: var(--rose-dark); background: #fff0f3; border-radius: 10px; }
.form-notice--success { color: #285e45; background: #edf8f1; }

/* Modal de acesso */
.auth-modal { width: min(100% - 32px, 460px); max-width: 460px; max-height: min(90vh, 760px); padding: 0; overflow: visible; color: var(--ink); background: transparent; border: 0; }
.auth-modal::backdrop { background: #241922a8; backdrop-filter: blur(3px); }
.auth-modal-card { position: relative; max-height: min(90vh, 760px); overflow-y: auto; padding: clamp(26px, 6vw, 42px); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px #1d10194d; }
.auth-modal-card > .eyebrow { margin-bottom: 8px; }
.auth-modal-card h2 { margin: 0 38px 8px 0; font-size: 2rem; line-height: 1.1; letter-spacing: -.035em; }
.auth-description { margin-bottom: 22px; color: var(--muted); }
.auth-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); background: #f8f2f4; border: 0; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.auth-close:hover { color: var(--ink); background: #f1e4e9; }
.google-auth, .auth-submit { width: 100%; min-height: 48px; display: flex; justify-content: center; align-items: center; gap: 10px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.google-auth { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.google-auth i { font-size: 1.1rem; }
.google-auth:hover { background: #fcf8f9; border-color: #d8c6ce; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: .83rem; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }
.auth-form { display: grid; gap: 14px; }
.auth-field input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #d9cdd2; border-radius: 9px; font-weight: 400; }
.auth-field input:focus { outline: 3px solid #b6336726; border-color: var(--rose); }
.auth-submit { margin-top: 4px; color: #fff; background: var(--rose); border: 0; }
.auth-submit:hover { background: var(--rose-dark); }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-switch { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: .92rem; }
.auth-switch button { padding: 4px; color: var(--rose-dark); background: transparent; border: 0; font-weight: 750; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; }
.auth-feedback { padding: 10px 12px; margin: 0; color: var(--rose-dark); background: #fff0f4; border-radius: 8px; font-size: .9rem; }
.auth-feedback[hidden] { display: none; }

.site-footer { padding: 24px; color: var(--muted); font-size: .9rem; text-align: center; }
.site-footer p { margin: 0; }

@media (max-width: 900px) {
    .home-hero-grid { grid-template-columns: minmax(0, .85fr) minmax(300px, 1.15fr); gap: 32px; }
    .card-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
    .site-header { position: relative; min-height: 88px; flex-direction: row; align-items: center; }
    .brand img { width: clamp(150px, 48vw, 210px); height: 68px; }
    .menu-toggle { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 1.25rem; cursor: pointer; }
    .menu-toggle:hover { color: var(--rose); background: var(--cream); }
    .site-header nav { position: absolute; z-index: 5; top: 100%; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px clamp(22px, 7vw, 104px) 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px #2b243015; }
    .site-header nav.is-open { display: flex; }
    .site-header nav > a, .site-header nav > .nav-user, .site-header nav > button { min-height: 42px; display: flex; align-items: center; }
    .site-header nav .nav-cta { align-self: flex-start; min-height: 42px; margin-top: 6px; padding: 8px 18px; }
    .site-header nav .logout-form { width: fit-content; }
}

@media (max-width: 680px) {
    .home-hero-grid { grid-template-columns: 1fr; }
    .home-intro h1, .page-hero h1 { font-size: clamp(2.35rem, 11vw, 3.5rem); }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .card-grid--three { grid-template-columns: 1fr; }
    .community-cta, .form-actions { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
    .page-wrap { width: calc(100% - 32px); }
    .home-feature .event-image, .home-feature .event-placeholder { aspect-ratio: 4 / 3; }
    .empty-state { flex-direction: column; padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
}
