/* Portal Doce ou Porta (kit de marca 1.0): tokens em /branding/doce-ou-porta/tokens.css */
html { scroll-behavior: smooth; }
body.portal { margin: 0; background: var(--dop-cream); color: var(--dop-ink); font-family: var(--dop-font-body); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.portal a { color: var(--dop-plum); text-underline-offset: 3px; }
.portal h1, .portal h2, .portal h3 { font-family: var(--dop-font-title); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 12px; }
.portal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.portal h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
.portal h3 { font-size: 1.25rem; }
.muted { color: var(--dop-muted); }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--dop-plum); color: var(--dop-cream) !important; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.portal :focus-visible { outline: 3px solid var(--dop-plum); outline-offset: 3px; }
.dop-dark :focus-visible { outline-color: var(--dop-cream); }
.eyebrow { font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dop-muted); margin: 0 0 8px; }
.dop-dark .eyebrow { color: var(--dop-lavender); }
.skeleton { padding: 48px 16px; text-align: center; color: var(--dop-muted); }

.portal-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; box-sizing: border-box; }
.portal-narrow { max-width: 560px; }
.portal-header { background: var(--dop-surface); border-bottom: 1px solid var(--dop-line); position: sticky; top: 0; z-index: 20; }
.portal-header .portal-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-block: 8px; }
.portal-brand img { display: block; height: 52px; width: auto; }
.portal-nav { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.portal-nav a:not(.dop-button) { font-weight: 600; text-decoration: none; padding: 12px 6px; min-height: 24px; }
.portal-nav a:not(.dop-button):hover { text-decoration: underline; }
.portal-main { flex: 1; padding-bottom: 64px; }
.portal-main > .portal-wrap { padding-top: 40px; }
.dop-button.small { min-height: 44px; padding: 8px 16px; font-size: .95rem; }
.dop-button.on-dark { color: var(--dop-cream); border-color: var(--dop-cream); }
.dop-button.on-dark:hover { background: #ffffff1f; }
.portal .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--dop-plum); text-decoration: underline; cursor: pointer; }
.form-error { color: var(--dop-error); font-weight: 600; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.hint { display: block; color: var(--dop-muted); font-size: .875rem; margin-top: 4px; }
.hint.ok { color: var(--dop-success); font-weight: 600; }
.dop-notice--warn { background: var(--dop-warning-bg); color: var(--dop-warning); }
.dop-notice h1, .dop-notice h2 { color: inherit; }

/* hero */
.portal-hero { background: #2a1838 url('/branding/doce-ou-porta/illustrations/neighborhood-hero.png') right center / cover no-repeat; color: var(--dop-cream); min-height: 520px; display: flex; align-items: center; }
.portal-hero-grid { display: grid; }
.portal-hero-copy { max-width: 520px; padding-block: 56px; }
.portal-hero h1 { color: var(--dop-cream); font-size: clamp(2.25rem, 6vw, 3.5rem); }
.portal-hero .lede { font-size: 1.15rem; max-width: 46ch; }
@media (max-width: 720px) {
  .portal-hero { background-image: linear-gradient(180deg, #2a1838f2 0%, #2a1838cc 55%, #2a183899 100%), url('/branding/doce-ou-porta/illustrations/neighborhood-hero.png'); background-position: center, 70% center; background-size: cover; min-height: 0; }
}

/* seções */
.portal-section { padding: 56px 0; }
.portal-section--cream { background: var(--dop-surface); border-block: 1px solid var(--dop-line); }
.portal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.portal-cards .dop-card h2, .portal-cards .dop-card h3 { margin-top: 8px; }
.portal-cards .dop-icon { width: 36px; height: 36px; color: var(--dop-orange); }
.portal-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.portal-steps li { display: flex; gap: 16px; align-items: flex-start; }
.portal-steps li > span, .wizard-steps li > span { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--dop-orange); color: var(--dop-plum); font-weight: 800; display: grid; place-items: center; font-family: var(--dop-font-title); }
.portal-find { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.portal-find-form { display: flex; align-items: center; gap: 0; border: 1px solid var(--dop-muted); border-radius: 14px; background: #fff; padding: 4px 4px 4px 14px; max-width: 100%; box-sizing: border-box; flex-wrap: nowrap; }
.portal-find-form .dop-input { border: 0; min-width: 0; flex: 1 1 80px; width: auto; }
.portal-find-prefix { flex: none; }
@media (max-width: 480px) { .portal-find-prefix { display: none; } .portal-find { display: grid; } }
.portal-find-form .dop-input:focus-visible { outline-offset: 0; }
.portal-find-prefix { color: var(--dop-muted); white-space: nowrap; font-size: .95rem; }

/* formulários */
.portal-form { display: grid; gap: 16px; }
.portal-form .field { display: grid; gap: 2px; }
.portal-form fieldset { border: 0; padding: 0; margin: 0; }
.portal-form legend { padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.slug-input { display: flex; align-items: center; border: 1px solid var(--dop-muted); border-radius: 12px; background: #fff; padding-left: 12px; min-height: 48px; }
.slug-input > span { color: var(--dop-muted); white-space: nowrap; font-size: .95rem; }
.slug-input .dop-input { border: 0; min-width: 0; }
.choice-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.choice-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--dop-orange); flex: none; }
.wizard-steps { list-style: none; display: flex; gap: 8px 20px; flex-wrap: wrap; padding: 0; margin: 16px 0 24px; font-weight: 600; color: var(--dop-muted); }
.wizard-steps li { display: flex; align-items: center; gap: 8px; }
.wizard-steps li > span { width: 32px; height: 32px; font-size: .9rem; background: var(--dop-line); color: var(--dop-plum); }
.wizard-steps li[aria-current='step'] { color: var(--dop-plum); }
.wizard-steps li[aria-current='step'] > span, .wizard-steps li.done > span { background: var(--dop-orange); }
.review-list { display: grid; gap: 12px; margin: 0 0 16px; }
.review-list > div { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--dop-line); }
.review-list dt { font-weight: 700; font-size: .875rem; color: var(--dop-muted); }
.review-list dd { margin: 0; }
.portal-title-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.portal-empty { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.portal-error { max-width: 480px; margin: 12vh auto; padding: 24px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* rodapé */
.portal-footer { background: var(--dop-plum); color: var(--dop-cream); padding: 28px 0; }
.portal-footer .portal-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.portal-footer p { margin: 0; }
.portal-footer a { color: var(--dop-cream); }
.portal-footer .muted { color: #e1d6ea; }

/* aviso temporário */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px); background: var(--dop-plum); color: var(--dop-cream); padding: 12px 20px; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--dop-error); }
