/* ==========================================================================
   MAVORS TECH - TECH-NOIR DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  --bg-deep: #070709;
  --bg-surface: #0e0f14;
  --bg-card: rgba(18, 20, 29, 0.65);
  --bg-card-hover: rgba(25, 28, 42, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --gold-primary: #D4AF37;
  --gold-light: #FFD700;
  --gold-dark: #AA820A;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-border: rgba(212, 175, 55, 0.22);
  --gold-gradient: linear-gradient(135deg, #FFF099 0%, #D4AF37 50%, #997A15 100%);
  
  --text-white: #FFFFFF;
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(212, 175, 55, 0.4);
  
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.05);
  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.35);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 90% 60%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

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

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

.gold-gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.terminal-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--gold-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-primary);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.glass-card:hover {
  border-color: var(--gold-border);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(212, 175, 55, 0.1);
}

/* Header & Navigation */
.header-global {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(7, 7, 9, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-symbol {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 0, 0, 0.8));
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold-light);
  box-shadow: 0 0 15px var(--gold-glow);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-white);
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* Navigation Tabs */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap; /* rótulos longos como "Soporte / Contacto" não quebram */
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--bg-deep);
  background: var(--gold-gradient);
  font-weight: 700;
  box-shadow: 0 0 15px var(--gold-glow);
}

/* Seletor de idioma da home */
.lang-switcher-home {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  margin-left: 12px;
}

.lang-switcher-home a {
  padding: 6px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap; /* impede o "中文" de partir ao meio */
}

.lang-switcher-home a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.lang-switcher-home a.active {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  padding: 5px 10px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Main Content Area */
main {
  flex: 1;
  padding-top: 90px;
}

/* Page Section Views */
.page-view {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  min-height: calc(100vh - 180px);
}

.page-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 80px 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  max-width: 900px;
  margin: 24px 0 20px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 40px;
  font-weight: 400;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-gradient);
  color: #070709;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 25px var(--gold-glow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.5);
  color: #000;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gold-border);
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Seção "Quem Somos" */
.about-section {
  margin-top: 40px;
}

.about-card {
  padding: 40px;
}

.about-lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 16px;
  max-width: 900px;
}

.about-lead strong {
  color: var(--text-white);
}

.about-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 900px;
}

.about-body strong {
  color: var(--text-main);
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.about-pillar-title {
  font-size: 1.05rem;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.about-pillar-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .about-card {
    padding: 28px 20px;
  }

  .about-lead {
    font-size: 1.05rem;
  }

  .about-pillars {
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
  }
}

/* Highlights Grid */
.section-header {
  margin-bottom: 40px;
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.app-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.app-icon-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1.5px solid var(--gold-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  flex-shrink: 0;
}

.app-meta {
  display: flex;
  flex-direction: column;
}

.app-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.app-name {
  font-size: 1.4rem;
  color: var(--text-white);
}

.app-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* App Store Badge Button */
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  transition: var(--transition);
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}

.app-store-btn:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px var(--gold-glow);
  transform: translateY(-2px);
}

.app-store-svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

.app-store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.app-store-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.app-store-main {
  font-size: 0.98rem;
  font-weight: 700;
}

/* Selo "Em breve" — apps ainda não publicados na App Store.
   Deliberadamente não é um link: não existe destino real ainda. */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--gold-border);
  color: var(--text-muted);
  padding: 12px 22px;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  cursor: default;
}

.coming-soon-badge .app-store-svg {
  opacity: 0.55;
}

.coming-soon-badge .app-store-main {
  color: var(--text-main);
}

/* Legal Links Area */
.legal-links-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.legal-link {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Contact / Support Section */
.support-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .support-container {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 1rem; /* Prevents auto-zoom on iOS */
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Honeypot anti-spam: removido do fluxo visual e do leitor de tela,
   mas ainda preenchível por robôs que ignoram CSS. */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.form-status.pending {
  display: block;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
}

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Accordion FAQ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.accordion-header {
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.accordion-header:hover {
  color: var(--gold-primary);
}

.accordion-icon {
  font-size: 1.1rem;
  color: var(--gold-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.accordion-item.active .accordion-body {
  max-height: 400px;
  padding: 0 20px 20px;
}

/* Support Email Display Card */
.support-info-card {
  padding: 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.support-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.support-info-icon svg {
  width: 24px;
  height: 24px;
}

.support-email-link {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.support-email-link:hover {
  color: var(--gold-light);
}

/* Footer Global */
.footer-global {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 5, 7, 0.95);
  padding: 32px 0 24px;
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: inline-block;
  padding: 8px 0; /* área de toque confortável no celular */
}

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

/* Mobile Responsive Optimization (< 768px & < 600px) */
/* ==========================================================================
   Navegação em tablets e celulares — o menu vira hambúrguer a partir de 900px.
   O corte era 768px, mas entre 769 e 900 (iPad em retrato) o menu completo
   não cabia: "Soporte / Contacto" quebrava em duas linhas e o "中文" partia
   ao meio. Os rótulos variam de tamanho entre os 4 idiomas, então o corte
   precisa ter folga para o mais longo.
   ========================================================================== */
@media (max-width: 900px) {
  .mobile-toggle {
    display: block;
    padding: 8px;
  }

  /* Em tela pequena o seletor de idioma fica junto do botão de menu */
  .lang-switcher-home {
    margin-left: auto;
    margin-right: 8px;
    padding: 2px;
  }

  .lang-switcher-home a {
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  .lang-switcher-home a.active {
    padding: 4px 7px;
  }

  .nav-menu {
    position: fixed;
    top: 75px;
    left: 16px;
    right: 16px;
    background: rgba(14, 15, 20, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold-border);
    display: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  }

  .nav-menu.mobile-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 36px 16px;
  }
  
  .hero-section {
    padding: 40px 0 30px;
  }
  
  .hero-title {
    font-size: 2.1rem;
    margin: 16px 0 14px;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 28px;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
  
  .glass-card {
    border-radius: var(--radius-md);
  }
  
  .contact-card {
    padding: 24px 16px;
  }
  
  .support-info-card {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* ==========================================================================
   Telas estreitas (iPhone). O header precisa caber logo + seletor de idioma
   + botão de menu. Sem estes ajustes, a soma passava de 385px numa tela de
   375px e o botão do menu ficava fora da tela, deixando a navegação
   inacessível no celular.
   ========================================================================== */
@media (max-width: 560px) {
  .header-container {
    padding: 0 16px;
  }

  .logo-symbol {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .logo-brand {
    gap: 9px;
  }

  .logo-title {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .logo-sub {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }

  .lang-switcher-home {
    margin-left: auto;
    margin-right: 2px;
    gap: 0;
  }

  .lang-switcher-home a {
    padding: 8px 6px;
    font-size: 0.65rem;
  }

  .lang-switcher-home a.active {
    padding: 7px 5px;
  }

  .mobile-toggle {
    font-size: 1.4rem;
    padding: 8px 0 8px 6px;
  }
}

@media (max-width: 380px) {
  /* Em telas muito estreitas o subtítulo da marca sai para dar espaço */
  .logo-sub {
    display: none;
  }

  .lang-switcher-home a {
    padding: 8px 5px;
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }
  
  .section-title {
    font-size: 1.7rem;
  }
  
  .legal-links-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
