/* ==========================================================================
   TelaBR IPTV — CSS global (custom layer sobre Tailwind)
   Reproduz fielmente os tokens e layers de src/index.css do projeto original.
   ========================================================================== */

:root {
  /* Brand surfaces */
  --background: 222 44% 8%;
  --foreground: 210 40% 98%;

  --surface: 220 39% 11%;
  --card: 220 39% 11%;
  --card-foreground: 210 40% 98%;

  --popover: 220 39% 11%;
  --popover-foreground: 210 40% 98%;

  /* Primary = ciano elétrico #22D3EE */
  --primary: 187 85% 53%;
  --primary-foreground: 222 47% 11%;

  /* Secondary = roxo #A855F7 */
  --secondary: 271 91% 65%;
  --secondary-foreground: 210 40% 98%;

  --muted: 220 28% 18%;
  --muted-foreground: 215 20% 65%;

  --accent: 187 85% 53%;
  --accent-foreground: 222 47% 11%;

  --whatsapp: 142 71% 45%;
  --whatsapp-foreground: 0 0% 100%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 215 25% 27% / 0.35;
  --input: 220 28% 18%;
  --ring: 187 85% 53%;

  --radius: 1rem;

  --gradient-primary: linear-gradient(135deg, hsl(187 85% 53%) 0%, hsl(271 91% 65%) 100%);
  --gradient-hero: radial-gradient(circle at 20% 20%, hsl(187 85% 53% / 0.18), transparent 55%),
                   radial-gradient(circle at 80% 30%, hsl(271 91% 65% / 0.18), transparent 55%),
                   linear-gradient(180deg, hsl(222 44% 8%) 0%, hsl(220 39% 11%) 100%);
  --gradient-surface: linear-gradient(180deg, hsl(220 39% 11%) 0%, hsl(222 44% 9%) 100%);

  --shadow-glow: 0 0 0 1px hsl(187 85% 53% / 0.25), 0 10px 40px -10px hsl(187 85% 53% / 0.45);
  --shadow-card: 0 10px 30px -15px hsl(222 60% 4% / 0.6);
  --shadow-whatsapp: 0 10px 30px -8px hsl(142 71% 45% / 0.55);

  --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { border-color: hsl(var(--border)); }

html { scroll-behavior: smooth; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  margin: 0;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; }

::selection { background: hsl(var(--primary) / 0.35); color: hsl(var(--foreground)); }

:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* sr-only utilitário (a11y skip-link) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border-width: 0;
}
.focus\:not-sr-only:focus {
  position: static; width: auto; height: auto; padding: 0; margin: 0;
  overflow: visible; clip: auto; white-space: normal;
}

/* ==========================================================================
   Components
   ========================================================================== */

.container-prose { max-width: 48rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.container-wide  { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

@media (min-width: 640px) { .container-wide { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container-wide { padding-left: 2rem; padding-right: 2rem; } }

.glass-card {
  background: linear-gradient(180deg, hsl(220 39% 13% / 0.7), hsl(220 39% 11% / 0.5));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid hsl(210 40% 98% / 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

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

.gradient-border {
  position: relative;
  background: hsl(var(--surface));
  border-radius: var(--radius);
}
.gradient-border::before {
  content: '';
  position: absolute; inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.prose-article { color: hsl(var(--foreground) / 0.9); line-height: 1.75; }
.prose-article h2 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; margin-top: 3rem; margin-bottom: 1rem; color: hsl(var(--foreground)); }
.prose-article h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; color: hsl(var(--foreground)); }
.prose-article h4 { font-size: 1.125rem; line-height: 1.5rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; color: hsl(var(--foreground)); }
.prose-article p { margin-top: 1rem; margin-bottom: 1rem; font-size: 1rem; line-height: 1.75; }
@media (min-width: 768px) { .prose-article p { font-size: 1.125rem; } }
.prose-article ul { list-style-type: disc; padding-left: 1.5rem; margin-top: 1rem; margin-bottom: 1rem; }
.prose-article ol { list-style-type: decimal; padding-left: 1.5rem; margin-top: 1rem; margin-bottom: 1rem; }
.prose-article ul > li, .prose-article ol > li { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.prose-article a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 4px; }
.prose-article a:hover { color: hsl(var(--primary) / 0.8); }
.prose-article strong { color: hsl(var(--foreground)); font-weight: 600; }
.prose-article em { font-style: italic; }
.prose-article blockquote { border-left: 4px solid hsl(var(--primary)); padding-left: 1rem; font-style: italic; color: hsl(var(--muted-foreground)); margin: 1.5rem 0; }
.prose-article table { border-collapse: collapse; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.bg-hero    { background: var(--gradient-hero); }
.bg-surface { background: var(--gradient-surface); }
.bg-grad-primary { background: var(--gradient-primary); }
.shadow-glow     { box-shadow: var(--shadow-glow); }
.shadow-whatsapp { box-shadow: var(--shadow-whatsapp); }
.transition-base { transition: var(--transition-base); }

@keyframes pulse-soft {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0 hsl(142 71% 45% / 0.55); }
  50%      { transform: scale(1.04);box-shadow: 0 0 0 14px hsl(142 71% 45% / 0); }
}
.animate-pulse-soft { animation: pulse-soft 2.4s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.7s ease-out both; }

/* line-clamp-3 (prose-article cards) */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.faq-item .faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: hsl(var(--foreground));
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: var(--transition-base);
}
@media (min-width: 768px) { .faq-item .faq-trigger { font-size: 1.125rem; } }
.faq-item .faq-trigger:hover { color: hsl(var(--primary)); }
.faq-item .faq-trigger .faq-chevron { width: 1.25rem; height: 1.25rem; flex-shrink: 0; transition: transform .25s, color .25s; }
.faq-item[data-open="true"] .faq-trigger .faq-chevron { transform: rotate(180deg); color: hsl(var(--primary)); }

.faq-item .faq-panel {
  display: none;
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}
.faq-item[data-open="true"] .faq-panel { display: block; animation: fade-up 0.7s ease-out both; }

/* ==========================================================================
   Buttons (variants do button.tsx convertidos para classes)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  border: 0;
}
.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.btn[disabled], .btn[aria-disabled="true"] { pointer-events: none; opacity: 0.5; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn--default     { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn--default:hover { background: hsl(var(--primary) / 0.9); }

.btn--whatsapp     { background: hsl(var(--whatsapp)); color: hsl(var(--whatsapp-foreground)); box-shadow: var(--shadow-whatsapp); font-weight: 600; }
.btn--whatsapp:hover { background: hsl(var(--whatsapp) / 0.9); }

.btn--hero         { background: var(--gradient-primary); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-glow); font-weight: 600; }
.btn--hero:hover   { opacity: 0.9; }

.btn--outlineGlow  { border: 1px solid hsl(var(--primary) / 0.4); background: transparent; color: hsl(var(--primary)); }
.btn--outlineGlow:hover { background: hsl(var(--primary) / 0.1); border-color: hsl(var(--primary)); }

.btn--default-size { height: 2.5rem; padding: 0.5rem 1rem; }
.btn--sm           { height: 2.25rem; border-radius: 0.375rem; padding: 0 0.75rem; }
.btn--lg           { height: 3rem; border-radius: 0.5rem; padding: 0 2rem; font-size: 1rem; }
.btn--xl           { height: 3.5rem; border-radius: 0.75rem; padding: 0 2.5rem; font-size: 1rem; }
@media (min-width: 768px) { .btn--xl { font-size: 1.125rem; } }
.btn--w-full       { width: 100%; }

/* ==========================================================================
   Form inputs (Contato)
   ========================================================================== */

.form-input, .form-textarea {
  display: flex;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color .15s;
}
.form-input { height: 2.5rem; }
.form-textarea { min-height: 80px; padding: 0.5rem 0.75rem; line-height: 1.5; resize: vertical; }
.form-input:focus, .form-textarea:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-color: transparent;
}
.form-input::placeholder, .form-textarea::placeholder { color: hsl(var(--muted-foreground)); }
.form-label { font-size: 0.875rem; font-weight: 500; line-height: 1; }

/* ==========================================================================
   Header / mobile nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(0 0% 100% / 0.05);
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mobile-nav { display: none; }
.mobile-nav[data-open="true"] { display: block; }

/* ==========================================================================
   Toast (form Contato)
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: hsl(var(--surface));
  border: 1px solid hsl(210 40% 98% / 0.1);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-card);
  min-width: 280px;
  max-width: 380px;
  animation: fade-up 0.4s ease-out;
}
.toast strong { display: block; margin-bottom: .25rem; }
.toast p { margin: 0; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

/* ==========================================================================
   tabular-nums (countdown)
   ========================================================================== */

.tabular-nums { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   prose-article: not-prose helper para conteúdo dentro de prose que NÃO
   deve receber estilos da prose
   ========================================================================== */

.prose-article .not-prose,
.prose-article .not-prose * { all: revert; }
.prose-article .not-prose { font-family: inherit; color: inherit; }
