/* base.css — reset, fonts, variáveis, container */

:root{
  --bg: #1a1a1a;
  --bg-muted: #232323;
  --fg: #ece7d8;
  --fg-muted: #a8a294;
  --fg-subtle: #7a7568;
  --border: #2f2f2f;
  --accent: #d4a857;
  --accent-soft: #c9a558;
  --gold: #d4a857;
  --gold-light: #2a2418;
  --gold-bg: #25201a;
  --gold-text: #e8c97a;
  --radius: 0.5rem;
  --content-width: 1100px;
  --admin-sidebar-width: 260px;
  --admin-header-height: 68px;
  --admin-sidebar-pad-top: 16px;
  --admin-sidebar-pad-bottom: 24px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased;color-scheme:dark}
body{font-family:var(--font-sans);background:var(--bg);color:var(--fg);line-height:1.7}
body:not(.admin-body){min-height:100vh;display:flex;flex-direction:column}
body:not(.admin-body)>main{flex:1;width:100%}
a{color:inherit;text-decoration:none}
.container{max-width:var(--content-width);margin:0 auto;padding:0 24px}

/* Checkboxes e radios — controles consistentes com o tema */
input[type="checkbox"],input[type="radio"]{
  appearance:none;-webkit-appearance:none;width:18px;height:18px;flex:0 0 18px;margin:0;
  border:1px solid var(--border);border-radius:5px;background:var(--bg-muted);color:var(--gold);
  cursor:pointer;display:inline-grid;place-content:center;
  transition:background 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease,transform 0.15s ease;
}
input[type="checkbox"]::before{content:"";width:9px;height:5px;border-left:2px solid #1a1a1a;border-bottom:2px solid #1a1a1a;transform:rotate(-45deg) scale(0);transition:transform 0.12s ease}
input[type="checkbox"]:checked{background:var(--gold);border-color:var(--gold)}
input[type="checkbox"]:checked::before{transform:rotate(-45deg) scale(1)}
input[type="radio"]{border-radius:50%}
input[type="radio"]::before{content:"";width:8px;height:8px;border-radius:50%;background:#1a1a1a;transform:scale(0);transition:transform 0.12s ease}
input[type="radio"]:checked{background:var(--gold);border-color:var(--gold)}
input[type="radio"]:checked::before{transform:scale(1)}
input[type="checkbox"]:hover,input[type="radio"]:hover{border-color:var(--gold);transform:translateY(-1px)}
input[type="checkbox"]:focus-visible,input[type="radio"]:focus-visible{outline:2px solid var(--gold);outline-offset:2px;box-shadow:0 0 0 4px rgba(212,168,87,0.12)}
@media(prefers-reduced-motion:reduce){input[type="checkbox"],input[type="radio"],input[type="checkbox"]::before,input[type="radio"]::before{transition:none}}

/* Botão voltar ao topo */
#scroll-top{
  position:fixed;bottom:24px;right:24px;z-index:80;
  width:42px;height:42px;border-radius:50%;border:1px solid var(--border);
  background:var(--bg-muted);color:var(--gold);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity 0.25s,visibility 0.25s,transform 0.25s,border-color 0.15s,background 0.15s;
}
#scroll-top.scroll-top--visible{opacity:1;visibility:visible;transform:translateY(0)}
#scroll-top:hover{border-color:var(--gold);background:var(--gold-light)}
#scroll-top:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
#scroll-top svg{width:20px;height:20px;flex:0 0 20px}
@media(prefers-reduced-motion:reduce){#scroll-top{transition:none}}
@media(max-width:600px){#scroll-top{bottom:16px;right:16px;width:38px;height:38px}}

/* Botão flutuante de Newsletter (lateral esquerda) */
.newsletter-fab{
  position:fixed;left:0;top:50%;transform:translateY(-50%);z-index:70;
  display:flex;flex-direction:column;align-items:center;gap:10px;
  padding:16px 10px;border:1px solid var(--border);border-left:none;
  border-radius:0 12px 12px 0;background:var(--bg-muted);color:var(--gold);
  text-decoration:none;cursor:pointer;
  transition:border-color 0.2s,background 0.2s,color 0.2s,padding-right 0.2s;
  writing-mode:vertical-rl;text-orientation:mixed;
}
.newsletter-fab:hover{border-color:var(--gold);background:var(--gold-light);padding-right:14px}
.newsletter-fab:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.newsletter-fab svg{width:20px;height:20px;flex:0 0 20px;writing-mode:horizontal-tb}
.newsletter-fab-label{font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.newsletter-fab{transition:none}}
@media(max-width:900px){
  .newsletter-fab{padding:12px 8px;border-radius:0 10px 10px 0}
  .newsletter-fab svg{width:18px;height:18px;flex:0 0 18px}
  .newsletter-fab-label{font-size:0.7rem}
}
@media(max-width:600px){
  .newsletter-fab{top:auto;bottom:80px;transform:none;flex-direction:row;writing-mode:horizontal-tb;border-radius:0 12px 12px 0;border-left:none}
  .newsletter-fab svg{writing-mode:horizontal-tb}
  .newsletter-fab-label{letter-spacing:0}
}
