/* Páginas internas (entrar, publicar, 404) no visual da home: topo escuro, cartão claro, teal profundo. */
:root {
  --ink: #0A1414;
  --teal: #2DD4BF;
  --mint: #5EEAD4;
  --deep: #0B6E6E;
  --paper: #F7F6F2;
  --text: #0E1A1A;
  --muted: #4B5A5A;
  --line: #DAD8CE;
  --on-dark-2: #C9D8D8;
  --cta: #0B6E6E;
  --cta-hover: #085555;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
h1, h2 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--mint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* topo escuro com brilho */
.home-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-top { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #fff; }
.page-top::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60vw 60vw at 85% -20%, rgba(45,212,191,.38), rgba(45,212,191,0) 65%),
  radial-gradient(50vw 50vw at 0% 120%, rgba(14,116,144,.5), rgba(14,116,144,0) 65%); }
.home-header { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 4vw, 40px); }
.home-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: #fff; }
.home-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal); color: #062020; font-family: var(--font-mono); font-size: 13px; transition: transform .2s ease, background-color .2s ease; }
.home-brand:hover .home-mark { background: var(--mint); }
@media (prefers-reduced-motion: no-preference) { .home-brand:hover .home-mark { transform: rotate(-8deg) scale(1.06); } }
.page-top .home-button.small { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.page-top .home-button.small:hover { background: #fff; color: var(--ink); }

/* botões */
.home-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--cta); border-radius: 10px; background: var(--cta); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.home-button:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.home-button.small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.home-button.secondary, .home-button.ghost { background: transparent; color: var(--text); border-color: var(--text); }
.home-button.secondary:hover, .home-button.ghost:hover { background: var(--text); color: #fff; }
@media (prefers-reduced-motion: no-preference) { .home-button:hover { transform: translateY(-1px); } }
.home-button[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* textos */
.home-kicker { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--deep); }
.page-top .home-kicker { color: var(--mint); }
.page-top .card-sheet .home-kicker { color: var(--deep); }
.home-lead { margin-top: 16px; max-width: 620px; font-size: 18px; color: var(--muted); }
.page-top .home-lead { color: var(--on-dark-2); }
.home-inner { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }

/* cartão claro sobre o topo escuro */
.card-sheet { width: min(100%, 520px); padding: clamp(24px, 5vw, 36px); border-radius: 18px; background: var(--paper); color: var(--text); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 30px 60px -26px rgba(0,0,0,.7), 0 0 0 7px rgba(94,234,212,.10); }
.card-sheet h1 { margin-top: 14px; font-size: clamp(30px, 5vw, 42px); line-height: 1.05; font-weight: 800; }

/* formulários */
.field { display: grid; gap: 6px; }
.field > span, .auth-form label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #A9B3AD; border-radius: 10px; background: #fff; color: var(--text); font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--deep); }
.field small { font-size: 14px; color: var(--muted); }
code { font-family: var(--font-mono); font-size: .9em; padding: 1px 5px; border-radius: 5px; background: #E4ECE8; }

/* rodapé */
.home-footer { margin-top: auto; padding: 24px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.home-footer .home-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.home-footer a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--text); text-underline-offset: 4px; }
.home-footer a:hover { color: var(--deep); text-decoration-thickness: 2px; }

/* ---------- entrar ---------- */
.auth-main { flex: 1; display: grid; place-items: center; padding: clamp(24px, 6vw, 64px) 16px clamp(48px, 8vw, 96px); }
.auth-copy { margin-top: 14px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 24px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.auth-tab { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.auth-tab:hover { background: #E4ECE8; color: var(--text); }
.auth-tab.active, .auth-tab[aria-selected="true"] { background: var(--text); color: #fff; }
.google-button { width: 100%; min-height: 48px; margin-top: 18px; border: 1px solid var(--text); border-radius: 10px; background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.google-button:hover { background: var(--text); color: #fff; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 8px; }
.auth-form #name-row { display: grid; gap: 8px; }
.auth-form #name-row[hidden] { display: none; }
.auth-form .home-button { margin-top: 10px; width: 100%; }
.auth-status { margin-top: 16px; font-size: 15px; color: var(--muted); }

/* ---------- publicar ---------- */
.publish-hero { padding: clamp(24px, 5vw, 56px) 0 clamp(32px, 5vw, 56px); }
.publish-hero h1 { margin-top: 14px; font-size: clamp(36px, 5vw, 60px); line-height: 1.03; font-weight: 800; }
.publish { padding: clamp(28px, 5vw, 48px) 0 64px; }
.publish-form { max-width: 820px; display: grid; gap: 20px; padding: clamp(20px, 4vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.publish-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.publish-status { min-height: 1.5em; font-size: 15px; color: var(--muted); }

/* ---------- 404 ---------- */
.nf { flex: 1; display: grid; align-content: center; padding: clamp(48px, 10vw, 120px) 0; }
.nf h1 { margin-top: 16px; font-size: clamp(40px, 6vw, 72px); line-height: 1.03; font-weight: 800; }
.nf h1 em { font-style: normal; color: var(--mint); }
.nf .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.nf .home-button.ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.nf .home-button.ghost:hover { background: #fff; color: var(--ink); }
.nf-shell { background: var(--ink); }
