/*
 * Testamento Digital Seguro — design system for the landing/institutional pages.
 *
 * Palette: deep ink navy (dark sections), warm parchment (light sections), bronze/gold
 * accent (legacy, trust, wax-seal), deep vault-teal (secondary, security).
 * Type: Fraunces (display serif — testament/legal document register) for headlines,
 * Inter for body copy, IBM Plex Mono for price/data figures.
 * Signature element: the "selo" (seal) — a rotating concentric-ring emblem used in the
 * hero and as a scroll-reveal accent, echoing a vault dial / wax seal.
 */

:root {
  --tds-ink: #0b1220;
  --tds-ink-soft: #141d31;
  --tds-parchment: #f6f1e7;
  --tds-parchment-deep: #ece3d1;
  --tds-bronze: #b08d57;
  --tds-bronze-bright: #d4af7a;
  --tds-teal: #1f4b43;
  --tds-ivory: #efe7d8;
  --tds-charcoal: #22262b;

  --tds-font-display: 'Fraunces', Georgia, serif;
  --tds-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --tds-font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Wordmark ---------- */

.tds-wordmark {
  font-family: var(--tds-font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.tds-wordmark__legado {
  color: var(--tds-parchment);
}

.tds-wordmark__tec {
  color: var(--tds-bronze-bright);
  font-weight: 700;
}

/* Variant for use on light backgrounds (e.g. the pricing block) */
.tds-wordmark--on-light .tds-wordmark__legado {
  color: var(--tds-ink);
}

.tds-wordmark--on-light .tds-wordmark__tec {
  color: var(--tds-bronze);
}

/* ---------- Top navbar ---------- */

.tds-navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: var(--tds-ink);
  border-bottom: 1px solid rgba(176, 141, 87, 0.25);
  padding: 0.65rem 0;
}

.tds-navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.tds-navbar__brand img {
  border-radius: 8px;
}

body {
  font-family: var(--tds-font-body);
  color: var(--tds-charcoal);
  background: var(--tds-parchment);
}

.tds-eyebrow {
  font-family: var(--tds-font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--tds-bronze);
}

h1, h2, h3, .tds-display {
  font-family: var(--tds-font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */

.tds-hero {
  background: radial-gradient(ellipse at top right, var(--tds-teal) 0%, var(--tds-ink) 55%, var(--tds-ink) 100%);
  color: var(--tds-ivory);
  position: relative;
  overflow: hidden;
  padding: 6rem 0 7rem;
}

/* Looping hero background video + parallax (JS adds the translateY via style.transform) */
.tds-hero-video {
  position: absolute;
  inset: -10% 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  z-index: 0;
  will-change: transform;
}

.tds-hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at top right, rgba(31, 75, 67, 0.82) 0%, rgba(11, 18, 32, 0.92) 55%, rgba(11, 18, 32, 0.96) 100%);
}

.tds-hero > .container {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .tds-hero-video {
    display: none;
  }
}

.tds-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--tds-parchment);
}

.tds-hero .lead {
  color: rgba(239, 231, 216, 0.82);
  font-size: 1.15rem;
  max-width: 42rem;
}

.tds-price-tag {
  font-family: var(--tds-font-mono);
  font-size: 1.5rem;
  color: var(--tds-bronze-bright);
}

/* Hero entrance — fades/rises in once on load, staggered per column */
.tds-hero-in {
  opacity: 0;
  transform: translateY(24px);
  animation: tds-hero-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tds-hero-in--1 {
  animation-delay: 0.05s;
}

.tds-hero-in--2 {
  animation-delay: 0.25s;
}

@keyframes tds-hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Signature element: rotating seal, echoes a vault dial / wax seal */
.tds-seal {
  width: 220px;
  height: 220px;
  position: relative;
  margin: 0 auto;
}

.tds-seal__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(176, 141, 87, 0.55);
  animation: tds-seal-spin 40s linear infinite, tds-seal-glow 3.5s ease-in-out infinite;
}

.tds-seal__ring--inner {
  inset: 22px;
  border-color: rgba(176, 141, 87, 0.85);
  animation-duration: 28s, 3.5s;
  animation-direction: reverse, normal;
  animation-delay: 0s, 0.6s;
}

.tds-seal__core {
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--tds-bronze) 0%, var(--tds-bronze-bright) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(176, 141, 87, 0.35);
  animation: tds-seal-core-glow 3.5s ease-in-out infinite;
}

.tds-seal__core i {
  font-size: 2.2rem;
  color: var(--tds-ink);
}

@keyframes tds-seal-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes tds-seal-glow {
  0%, 100% {
    border-color: rgba(176, 141, 87, 0.4);
    box-shadow: none;
  }
  50% {
    border-color: rgba(212, 175, 122, 0.95);
    box-shadow: 0 0 18px rgba(212, 175, 122, 0.55);
  }
}

@keyframes tds-seal-core-glow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(176, 141, 87, 0.35);
  }
  50% {
    box-shadow: 0 0 64px rgba(212, 175, 122, 0.65);
  }
}

/* ---------- Sections ---------- */

.tds-section {
  padding: 5rem 0;
}

.tds-section--dark {
  background: var(--tds-ink);
  color: var(--tds-ivory);
}

.tds-section--parchment-deep {
  background: var(--tds-parchment-deep);
}

.tds-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(34, 38, 43, 0.08);
  padding: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Only for cards laid out side-by-side in a grid row (e.g. landing feature cards), where
   equal height across siblings is the point. Stacked/standalone cards (auth forms, panel
   sections) must NOT use this — height:100% on the base .tds-card previously made every
   single-card page stretch to fill the section, forcing pointless scroll. */
.tds-card--stretch {
  height: 100%;
}

.tds-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(11, 18, 32, 0.1);
}

.tds-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tds-teal);
  color: var(--tds-parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.tds-credibility-card {
  background: var(--tds-ink-soft);
  border: 1px solid rgba(176, 141, 87, 0.3);
  border-radius: 14px;
  padding: 2rem;
  height: 100%;
}

.tds-credibility-card .badge-disclaimer {
  font-family: var(--tds-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(239, 231, 216, 0.55);
  text-transform: uppercase;
  display: inline-block;
  margin-top: 0.75rem;
}

/* ---------- Vantagens (light video section) ---------- */

.tds-vantagens-video {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(11, 18, 32, 0.12);
  border: 1px solid rgba(34, 38, 43, 0.08);
  display: block;
}

.tds-vantagens-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tds-vantagens-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(34, 38, 43, 0.08);
}

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

.tds-vantagens-list i {
  color: var(--tds-teal);
  margin-top: 0.2rem;
}

/* Storage pricing block */
.tds-pricing-block {
  border: 1px solid rgba(34, 38, 43, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  background: #fff;
}

.tds-pricing-block--watermark {
  position: relative;
  overflow: hidden;
}

.tds-pricing-block__watermark {
  position: absolute;
  top: 50%;
  right: -3rem;
  width: 220px;
  height: 220px;
  transform: translateY(-50%) rotate(-8deg);
  opacity: 0.06;
  pointer-events: none;
}

.tds-pricing-block .tds-price-figure {
  font-family: var(--tds-font-mono);
  font-size: 3rem;
  color: var(--tds-teal);
}

/* Reveal-on-scroll (subtle, one signature moment per section) */
.tds-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tds-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */

.btn-tds-primary,
.btn-tds-outline {
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-tds-primary {
  background: var(--tds-bronze);
  border-color: var(--tds-bronze);
  color: var(--tds-ink);
  font-weight: 600;
}

.btn-tds-primary:hover {
  background: var(--tds-bronze-bright);
  border-color: var(--tds-bronze-bright);
  color: var(--tds-ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(176, 141, 87, 0.35);
}

.btn-tds-outline {
  border-color: rgba(239, 231, 216, 0.5);
  color: var(--tds-ivory);
}

.btn-tds-outline:hover {
  background: rgba(239, 231, 216, 0.1);
  color: var(--tds-parchment);
  border-color: var(--tds-parchment);
  transform: translateY(-2px);
}

/* Focus visibility (quality floor) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--tds-bronze-bright);
  outline-offset: 3px;
}

/* ---------- Legal pages ---------- */

.tds-legal-marker {
  background: #fff3cd;
  border: 1px dashed #b08d57;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-family: var(--tds-font-mono);
  font-size: 0.85rem;
  color: #6b4f1d;
}

.tds-legal-nav .nav-link {
  color: var(--tds-teal);
}

.tds-legal-nav .nav-link.active {
  font-weight: 700;
  color: var(--tds-bronze);
}

/* ---------- Footer ---------- */

.tds-footer {
  background: var(--tds-ink);
  color: rgba(239, 231, 216, 0.7);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}

.tds-footer a {
  color: rgba(239, 231, 216, 0.85);
  text-decoration: none;
}

.tds-footer a:hover {
  color: var(--tds-bronze-bright);
  text-decoration: underline;
}

/* ---------- Cookie banner ---------- */

.tds-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  background: var(--tds-ink);
  color: var(--tds-ivory);
  border-top: 1px solid rgba(176, 141, 87, 0.4);
  padding: 1.25rem 1rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.tds-cookie-banner.is-visible {
  transform: translateY(0);
}

/* ---------- Support impersonation banner (SADM-11) ---------- */

.tds-impersonate-banner {
  position: sticky;
  top: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--tds-ink, #1a1a1a);
  color: #fff;
  font-size: 0.9rem;
}

.tds-impersonate-banner form {
  margin: 0;
}

/* ---------- Floating WhatsApp button ---------- */

.tds-whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1070;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tds-whatsapp-float:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 575.98px) {
  .tds-whatsapp-float {
    right: 1rem;
    bottom: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
}

/* ---------- Titular panel navigation (menu do painel do titular) ---------- */

.tds-titular-nav {
  position: sticky;
  top: 61px;
  z-index: 1040;
  background: var(--tds-parchment-deep);
  border-bottom: 1px solid rgba(176, 141, 87, 0.35);
}

.tds-titular-nav__inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.35rem 0;
}

.tds-titular-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tds-charcoal);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.tds-titular-nav__link:hover {
  background: rgba(176, 141, 87, 0.15);
  color: var(--tds-ink);
  text-decoration: none;
}

.tds-titular-nav__link.is-active {
  background: var(--tds-ink);
  color: var(--tds-parchment);
}

.tds-titular-nav__link--sair {
  margin-left: auto;
  color: #a4433f;
}

.tds-titular-nav__link--sair:hover {
  background: rgba(164, 67, 63, 0.12);
  color: #a4433f;
}

/* ---------- Cofre: Dropzone e lista de documentos ---------- */

.tds-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tds-dropzone:hover,
.tds-dropzone.dz-drag-hover {
  border-color: var(--tds-brand, #6b4f3b);
  background-color: rgba(0, 0, 0, 0.02);
}

.tds-dropzone .dz-preview {
  display: none;
}

.tds-doc-item__acoes {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.tds-doc-item--frio {
  opacity: 0.8;
}

/* ---------- Dashboard e Perfil do titular ---------- */

.tds-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tds-dashboard-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tds-dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(11, 18, 32, 0.12);
  color: inherit;
  text-decoration: none;
}

.tds-dashboard-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(176, 141, 87, 0.15);
  color: var(--tds-bronze);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

/* ---------- Assinatura: passos do PIX ---------- */

.tds-pix-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tds-pix-step {
  flex: 1 1 140px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background: var(--tds-parchment-deep);
  font-size: 0.85rem;
  color: var(--tds-charcoal);
}

.tds-pix-step.is-active {
  background: var(--tds-ink);
  color: var(--tds-parchment);
  font-weight: 600;
}

.tds-pix-qr-frame {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  display: inline-flex;
  box-shadow: 0 4px 16px rgba(11, 18, 32, 0.08);
}

/* ---------- Assinatura: resumo + tabs (mobile-first) ---------- */

.tds-assinatura-resumo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(34, 38, 43, 0.08);
  padding: 1rem 1.25rem;
}

@media (min-width: 576px) {
  .tds-assinatura-resumo {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.tds-assinatura-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid rgba(34, 38, 43, 0.12);
}

.tds-assinatura-tabs .nav-link {
  white-space: nowrap;
  color: var(--tds-charcoal);
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
}

.tds-assinatura-tabs .nav-link.active {
  color: var(--tds-ink);
  border-bottom-color: var(--tds-bronze);
  background: transparent;
}

@media (max-width: 575.98px) {
  .tds-pix-qr-frame {
    padding: 0.75rem;
  }

  .tds-pix-qr-frame canvas,
  .tds-pix-qr-frame img {
    max-width: 100%;
    height: auto;
  }
}
