/* ═══════════════════════════════════════════════════════════════════
   ProSprach — Vanilla CSS com temas Claro/Escuro
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fontes ── */
@font-face {
  font-family: 'OCR-A';
  src: url('../fonts/OCR-a___.ttf') format('truetype');
  font-weight: bold;
  font-display: swap;
}

@font-face {
  font-family: 'Futura';
  src: url('../fonts/futurab.ttf') format('truetype');
  font-display: swap;
}

/* ── Variáveis de Tema ── */
:root {
  --primary: #bf360c;
  --primary-dark: #a8300b;
  --primary-light: #e64a19;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #171717;
  --text-heading: #0f0f0f;
  --muted: #666666;
  --border: #e5e2dc;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --whatsapp: #25D366;
  --whatsapp-dark: #1fa855;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --surface: #171717;
    --surface-raised: #1f1f1f;
    --text: #f7f7f5;
    --text-heading: #ffffff;
    --muted: #b8b8b8;
    --border: #333333;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --success-light: #1b3a1b;
  }
}

/* ── Reset / Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Futura', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* ── Container ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Logo Tema ── */
.logo-light { display: block; }
.logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'OCR-A', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  line-height: 1.1;
}

.brand-slogan {
  font-family: 'Futura', sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── Language Switcher ── */
.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.5;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  background: var(--surface-raised);
  border-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
section {
  padding: 60px 20px;
}

section:nth-child(even) {
  background: var(--surface);
}

.section-title {
  font-family: 'Futura', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
}

.hero-title {
  font-family: 'OCR-A', monospace;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: bold;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-family: 'Futura', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}

.cta-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ── Hero Stats ── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  min-width: 120px;
}

.hero-stat-num {
  font-family: 'OCR-A', monospace;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════════════ */
.about-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════
   FOR WHOM — Tags
   ═══════════════════════════════════════════════════════════════════ */
.prof-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
}

.prof-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
}

.prof-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   OFFER — Cards
   ═══════════════════════════════════════════════════════════════════ */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.offer-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.offer-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════
   WHATSAPP
   ═══════════════════════════════════════════════════════════════════ */
.whatsapp-box {
  background: var(--success-light);
  border-left: 4px solid var(--whatsapp);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.whatsapp-box .section-title {
  margin-bottom: 0.75rem;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--whatsapp);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1rem;
  transition: all var(--transition);
}

.wa-btn:hover {
  background: var(--whatsapp-dark);
  color: #fff;
  transform: translateY(-1px);
}

.wa-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════
   SIGNUP FORM
   ═══════════════════════════════════════════════════════════════════ */
.signup-section {
  background: var(--surface);
}

/* ── Accordion ── */
.terms-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.terms-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface-raised);
  border: none;
  font-family: 'Futura', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}

.terms-toggle:hover {
  background: var(--border);
}

.terms-toggle .arrow {
  transition: transform var(--transition);
  font-size: 0.7rem;
}

.terms-toggle.open .arrow {
  transform: rotate(180deg);
}

.terms-body {
  display: none;
  border-top: 1px solid var(--border);
}

.terms-body.open {
  display: block;
}

.terms-content {
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--text);
}

.terms-hint {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.terms-hint.hidden {
  display: none;
}

.terms-accept-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.terms-accept-label input[type="checkbox"] {
  margin-top: 2px;
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ── Form ── */
.signup-form {
  max-width: 600px;
  margin: 0 auto;
}

.signup-form.disabled .form-fields {
  opacity: 0.5;
  pointer-events: none;
}

.form-disabled-msg {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
  font-size: 0.9rem;
}

.form-disabled-msg.hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

/* ── Google Section ── */
.google-section {
  margin-bottom: 16px;
}

.google-section label {
  display: block;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

#googleSignInBtn {
  margin-top: 4px;
}

#googleLoggedIn {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* ── Fields ── */
.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.field input,
.field select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(191, 54, 12, 0.1);
}

.field input.invalid,
.field select.invalid {
  border-color: #d32f2f;
}

.field input[readonly] {
  background: var(--surface-raised);
  color: var(--muted);
  cursor: default;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ── Checkbox Fields ── */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.checkbox-field input[type="checkbox"] {
  margin-top: 2px;
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox-field label {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

/* ── GDPR ── */
.gdpr-container {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-top: 16px;
}

.gdpr-container.invalid {
  border: 1px solid #d32f2f;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.gdpr-container input[type="checkbox"] {
  margin-top: 2px;
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.gdpr-container label {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

/* ── Switch Account Button ── */
.switch-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.switch-account-btn:hover {
  background: rgba(191, 54, 12, 0.05);
}

/* ── Submit Button ── */
.submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-family: 'Futura', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.submit-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.footer-contact a {
  color: var(--text);
  font-weight: 500;
}

/* ── Social Links ── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-link:hover {
  color: var(--primary);
}

/* ── Boole Systems ── */
.footer-boole {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-boole a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-boole img {
  height: 22px;
  width: auto;
  opacity: 0.7;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════════════════════════ */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 200;
  padding: 16px 20px;
}

.cookie-banner.show {
  display: block;
}

.cookie-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
}

.cookie-btn.accept {
  background: var(--primary);
  color: #fff;
}

.cookie-btn.accept:hover {
  background: var(--primary-dark);
}

.cookie-btn.info {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════
   MODALS (Success + Impressum)
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-close:hover {
  color: var(--text);
}

/* ── Success Modal ── */
.success-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}

.success-modal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 12px;
}

.success-modal p {
  color: var(--text);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 16px;
}

.success-modal .cta-btn {
  display: block;
  text-align: center;
}

/* ── Impressum Modal ── */
.impressum-eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}

.impressum-list {
  list-style: none;
  padding: 0;
}

.impressum-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.impressum-list li:last-child {
  border-bottom: none;
}

.impressum-list strong {
  color: var(--text-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.impressum-list span {
  color: var(--text);
  line-height: 1.5;
}

.impressum-list a {
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: var(--surface);
  color: var(--text);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 400;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
  border-left: 4px solid var(--primary);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: #d32f2f; }
.toast.warning { border-left-color: #f9a825; }
.toast.info { border-left-color: #1976d2; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  section {
    padding: 40px 16px;
  }

  .hero {
    padding: 60px 16px 40px;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stat-num {
    font-size: 1.4rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .brand-logo {
    height: 32px;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .brand-slogan {
    font-size: 0.6rem;
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }

  .modal-dialog {
    padding: 24px 16px;
  }
}

@media (max-width: 400px) {
  .offer-grid {
    grid-template-columns: 1fr;
  }

  .lang-switcher {
    gap: 0;
  }

  .lang-btn {
    padding: 4px 6px;
    font-size: 1rem;
  }
}
