/* Complementos do YouCine: formulários, blog, páginas legais, avisos e acessibilidade */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--yellow);
  color: #111;
  font-weight: 700;
}

.skip-link:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* Páginas internas */
.page-hero {
  padding: 4rem 0 1rem;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.2;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: #eef2f3;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
}

.breadcrumb {
  margin: 0 0 1rem;
  color: var(--dim);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--yellow);
}

.section-title-left {
  margin: 0 0 1.5rem !important;
  text-align: left !important;
}

/* Download */
.download-card .device-icon {
  margin-bottom: 0.5rem;
}

.download-card .meta {
  margin: 0 0 1rem;
  color: var(--dim);
  font-size: 0.85rem;
}

.download-card:target {
  border-color: var(--line-warm);
  box-shadow: 0 0 0 1px var(--line-warm);
}

.notice {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
  background: rgba(255, 193, 47, 0.06);
  color: #f3e6c3;
  font-size: 0.95rem;
}

#como-instalar {
  scroll-margin-top: 100px;
}

[id] {
  scroll-margin-top: 100px;
}

/* Blog */
.search-bar {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin: 2rem 0 0;
}

.field,
.search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 10, 15, 0.8);
  color: var(--text);
  font: inherit;
}

textarea.field {
  min-height: 160px;
  resize: vertical;
}

.field::placeholder,
.search-bar input::placeholder {
  color: var(--dim);
}

.field:focus,
.search-bar input:focus {
  border-color: var(--yellow);
  outline: none;
}

.field[aria-invalid="true"] {
  border-color: #ff6b6b;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 2rem 0 var(--section-y);
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 160ms ease, transform 160ms ease;
}

.post-card:hover {
  border-color: var(--line-warm);
  transform: translateY(-2px);
}

.post-card .tag {
  align-self: flex-start;
  margin-bottom: 0.9rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
}

.post-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.post-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.post-card .read-more {
  margin-top: auto;
  color: var(--yellow);
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* Texto corrido (artigos, termos, privacidade) */
.prose {
  max-width: 780px;
  padding: 1.5rem 0 var(--section-y);
  color: #dfe5ea;
}

.prose h2 {
  margin: 2.2rem 0 0.7rem;
  color: #fff;
  font-size: 1.35rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.post-meta {
  margin: 0 0 1rem;
  color: var(--dim);
  font-size: 0.92rem;
}

/* Contato */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 2rem;
  padding: 2rem 0 var(--section-y);
}

.form-card,
.info-card {
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 650;
}

.form-error {
  min-height: 1.1em;
  margin: 0.35rem 0 0;
  color: #ff8d8d;
  font-size: 0.85rem;
}

.form-status {
  margin: 1rem 0 0;
  color: #9be29b;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.info-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.info-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.info-card a {
  color: var(--yellow);
  word-break: break-all;
}

button.primary-button {
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

button.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Aviso (toast) */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  left: 1rem;
  z-index: 60;
  max-width: 440px;
  margin-left: auto;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

/* Planos */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.plan-featured {
  border-color: var(--yellow);
  background: linear-gradient(180deg, rgba(255, 193, 47, 0.1), var(--panel) 45%);
  box-shadow: 0 18px 50px rgba(240, 154, 9, 0.16);
}

.plan-badge {
  position: absolute;
  top: -0.8rem;
  left: 1.75rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 0.8rem;
  font-weight: 800;
}

.plan-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.plan-period {
  margin: 0.2rem 0 1.4rem;
  color: var(--muted);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
}

.plan-currency {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.plan-amount {
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1;
}

.plan-featured .plan-amount {
  color: var(--yellow);
}

.plan-note {
  margin: 0.5rem 0 1.5rem;
  color: var(--dim);
  font-size: 0.92rem;
}

.plan-features {
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
}

.plan-features li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.6rem;
  color: #dfe5ea;
}

.plan-features li::before {
  position: absolute;
  top: 0.55rem;
  left: 0.15rem;
  width: 0.4rem;
  height: 0.7rem;
  border-right: 2px solid var(--yellow);
  border-bottom: 2px solid var(--yellow);
  transform: rotate(45deg);
  content: "";
}

.plan-card .primary-button,
.plan-card .ghost-button {
  margin-top: auto;
}

.plans-footnote {
  margin: 1.5rem 0 0;
  color: var(--dim);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 1080px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .plan-card {
    margin-top: 0.4rem;
  }
}

/* Janela de pagamento */
dialog.checkout {
  width: min(94vw, 460px);
  max-height: 92vh;
  padding: 1.6rem 1.5rem 1.4rem;
  overflow-y: auto;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

dialog.checkout::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.checkout h2 {
  margin: 0;
  padding-right: 2.5rem;
  font-size: 1.35rem;
}

.checkout-total {
  margin: 0.2rem 0 1.2rem;
  color: var(--yellow);
  font-size: 2rem;
  font-weight: 850;
}

.checkout-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.checkout-close:hover {
  border-color: var(--yellow);
}

.checkout-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.checkout-box h3 {
  margin: 0;
  font-size: 1.05rem;
}

.checkout-qr {
  align-self: center;
  width: 200px;
  height: 200px;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.checkout-form .primary-button {
  width: 100%;
  margin-top: 0.6rem;
}

.checkout-order {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  border: 1px dashed var(--line-warm);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}

.checkout-order strong {
  color: var(--yellow);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

textarea.checkout-code {
  min-height: 0;
  height: 5.6rem;
  font-size: 0.78rem;
  word-break: break-all;
  resize: none;
}

.checkout-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.checkout-footer {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.plan-old {
  margin: 0 0 0.2rem;
  color: var(--dim);
  font-size: 0.95rem;
}

.plan-old del {
  text-decoration-thickness: 2px;
  text-decoration-color: #ff6b6b;
}

.plans-few {
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
}

[hidden] {
  display: none !important;
}

/* Faixa de promoção */
.promo-bar {
  position: relative;
  z-index: 25;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, #ffd35e, var(--yellow-deep));
  color: #111;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 750;
}

.promo-bar a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Botão do WhatsApp */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0 1.15rem 0 0.95rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab svg {
  width: 1.7rem;
  height: 1.7rem;
}

.whatsapp-button {
  border-color: #25d366 !important;
  color: #8ff0b4 !important;
}

@media (max-width: 720px) {
  .whatsapp-fab span {
    display: none;
  }

  .whatsapp-fab {
    width: 54px;
    padding: 0;
    justify-content: center;
  }
}

/* Voltar ao topo */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-warm);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--yellow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Animação de entrada */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 1080px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

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