/* ─── Talk2Doc landing — api_collab parity: dark gradient + glass ──────────
   Scoped to the landing via :has(.t2d-landing) so it never affects the
   app shell (drive) or other pages that extend base.html. Keeps the book
   ThreeJS hero (#t2d-book-canvas) and the existing data-i18n content. */

/* ─── Global theme (landing only) ─────────────────────────────────────── */
html body:has(.t2d-landing) {
  background: linear-gradient(140deg, #3a5d7e 0%, #5887b0 50%, #87aece 100%);
  background-attachment: fixed;
  color: #f5f9fc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body:has(.t2d-landing) main.t2d-content { padding: 0; }

/* Header → glass over the gradient */
body:has(.t2d-landing) .app-header {
  background: rgba(20, 40, 64, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* Brand: talk white + 2doc blue (overrides base.html inline color:#000) */
body:has(.t2d-landing) .app-header .app-header-title { color: #fff; }
body:has(.t2d-landing) .app-header .brand-mark .bm-pibi { color: #fff !important; }
body:has(.t2d-landing) .app-header .brand-mark .bm-collab { color: #6a9bc3 !important; }
body:has(.t2d-landing) .app-header .brand-mark {
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.45);
}
/* Lang switch readable on glass */
body:has(.t2d-landing) .app-header-actions,
body:has(.t2d-landing) .app-header-actions #langBtn,
body:has(.t2d-landing) .app-header-actions .pibico-lang-current { color: #fff; }

/* Footer → glass */
body:has(.t2d-landing) .t2d-footer {
  background: rgba(20, 40, 64, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}
body:has(.t2d-landing) .t2d-footer a,
body:has(.t2d-landing) .t2d-footer .t2d-footer-link { color: rgba(255, 255, 255, 0.85); }
body:has(.t2d-landing) .t2d-footer a:hover,
body:has(.t2d-landing) .t2d-footer .t2d-footer-link:hover { color: #fff; }

/* ─── Layout ──────────────────────────────────────────────────────────── */
.t2d-landing { width: 100%; }
.t2d-landing-inner { display: flex; flex-direction: column; }

/* ─── Hero (book ThreeJS canvas backdrop) ─────────────────────────────── */
.landing-hero {
  position: relative;
  min-height: calc(100vh - 200px);
  min-height: calc(100dvh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 20px 64px;
  gap: 16px;
  overflow: hidden;
}
.landing-hero #t2d-book-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center,
    rgba(8, 18, 30, 0.55) 0%, rgba(8, 18, 30, 0.20) 55%, rgba(8, 18, 30, 0) 100%);
}
.landing-hero > * { position: relative; z-index: 1; }

.landing-eyebrow {
  font-family: var(--font-heading, 'Inter'), sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.landing-wordmark {
  font-family: var(--font-brand, 'Raleway'), sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.3), 0 0 24px rgba(255, 255, 255, 0.25);
}
.landing-wordmark .wm-talk { color: #fff; font-weight: 600; }
.landing-wordmark .wm-doc { color: #6a9bc3; font-weight: 700; }

.landing-hero-sub {
  font-family: var(--font-heading, 'Inter'), sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.45;
  max-width: 54ch;
  margin: 4px auto 0;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.t2d-hero-narrative {
  /* Fixed height so cycling text never reflows the hero (eyebrow/wordmark stay put) */
  height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.92rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  opacity: 0;
  transition: opacity 0.4s ease;
  max-width: 60ch;
  overflow: hidden;
}

.landing-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

/* ─── CTA buttons ─────────────────────────────────────────────────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-heading, 'Inter'), sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cta-btn i { font-size: 1.1em; }
.cta-primary {
  background: #fff;
  color: #2c5171;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3); }
.cta-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cta-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.cta-btn.full { width: 100%; justify-content: center; }

/* ─── Section titles ──────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-brand, 'Raleway'), sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-align: center;
  color: #fff;
}
.section-sub {
  font-family: var(--font-heading, 'Inter'), sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 auto 28px;
  max-width: 60ch;
  text-align: center;
}

/* ─── Features ────────────────────────────────────────────────────────── */
.landing-features {
  padding: 64px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.feat-card {
  position: relative;
  background: rgba(13, 30, 48, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px 20px 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  text-align: left;
}
.feat-card:hover {
  transform: translateY(-3px);
  background: rgba(22, 44, 68, 0.52);
  border-color: rgba(255, 255, 255, 0.28);
}
.feat-card .t2d-card-illus {
  width: 100%;
  max-width: 130px;
  height: auto;
  margin-bottom: 8px;
  display: block;
}
.feat-card h3 {
  font-family: var(--font-heading, 'Inter'), sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  margin: 0 0 4px;
  color: #fff;
}
.feat-card p {
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

/* ─── Use cases ───────────────────────────────────────────────────────── */
.landing-usecases {
  padding: 72px 20px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.usecase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 720px) {
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .usecase-grid { grid-template-columns: repeat(3, 1fr); }
}
.usecase-card {
  background: rgba(13, 30, 48, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}
.usecase-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); }
.usecase-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 8px;
}
.usecase-head i { font-size: 1.4rem; color: #6a9bc3; }
.usecase-head h3 { margin: 0; color: #fff; font-size: 1.15rem; font-weight: 700; }
.usecase-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
.usecase-card p strong { color: #fff; }
.usecase-asks { margin-top: 10px; }
.usecase-asks-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a9bc3;
  margin-bottom: 5px;
}
.usecase-asks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.usecase-asks li {
  position: relative;
  padding: 5px 10px 5px 24px;
  font-size: 0.85rem;
  line-height: 1.2;
  font-style: italic;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(70, 130, 180, 0.18);
  border-radius: 8px;
}
.usecase-asks li::before {
  content: "\201C";
  position: absolute;
  left: 9px;
  top: 6px;
  color: #6a9bc3;
  font-weight: 700;
  line-height: 1;
}

/* ─── Pricing ─────────────────────────────────────────────────────────── */
.landing-pricing {
  padding: 72px 20px 56px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(13, 30, 48, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 28px 24px 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pricing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}
.pricing-card.featured {
  background: linear-gradient(160deg, rgba(106, 155, 195, 0.34) 0%, rgba(13, 30, 48, 0.46) 60%);
  border-color: rgba(140, 184, 220, 0.7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.pricing-card.featured:hover { box-shadow: 0 24px 56px rgba(106, 155, 195, 0.28); }
.t2d-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #6a9bc3;
  color: #0a1c2a;
  font-family: var(--font-brand, 'Raleway'), sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-card h3 {
  font-family: var(--font-brand, 'Raleway'), sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bcdcf5;
  margin: 0;
}
.t2d-price-amount {
  font-family: var(--font-brand, 'Raleway'), sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  margin: 12px 0 14px;
  /* Neutralize the old pibico.css clipped dark-gradient text (invisible on dark cards) */
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}
.t2d-price-amount span {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.7);
  text-shadow: none;
}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.pricing-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.1;
  padding: 3px 0;
  color: rgba(255, 255, 255, 0.88);
}
.pricing-card ul li i { color: #4fd97a; font-size: 1rem; flex: 0 0 auto; margin-top: 1px; }

/* ─── Slide panels (pricing CTAs) — white over the gradient ───────────── */
.t2d-slide-panel {
  position: fixed;
  inset: 0;
  z-index: 1600;
  pointer-events: none;
}
.t2d-slide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 60, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.t2d-slide-content {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #fff;
  color: #2c5171;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 24px 22px;
  overflow-y: auto;
}
.t2d-slide-panel.open { pointer-events: auto; }
.t2d-slide-panel.open .t2d-slide-backdrop { opacity: 1; }
.t2d-slide-panel.open .t2d-slide-content { transform: translateX(0); }
.t2d-slide-content h2 { margin: 0 0 12px; color: #2c5171; font-size: 1.3rem; }
.t2d-slide-content p { font-size: 0.92rem; line-height: 1.5; color: #4a6a85; }
.t2d-slide-content ul { padding-left: 18px; font-size: 0.9rem; line-height: 1.6; color: #4a6a85; }
.t2d-slide-content .t2d-btn,
.t2d-slide-content a.cta-btn { color: #fff; }
.t2d-slide-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 0;
  cursor: pointer;
  color: #577793;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 6px;
}
.t2d-slide-close:hover { background: rgba(70, 130, 180, 0.08); }
/* Pricing-panel CTA buttons stay branded blue on white panel */
.t2d-slide-content a.cta-btn.cta-primary { background: #4682b4; color: #fff; box-shadow: none; }
.t2d-slide-content a.cta-btn.cta-ghost { background: rgba(70, 130, 180, 0.1); color: #2c5171; border-color: rgba(70, 130, 180, 0.4); }

/* Access-request form (inside the white "Probar gratis" slide panel) */
.t2d-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.t2d-form input,
.t2d-form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  color: #2c5171;
  background: #f4f8fc;
  border: 1px solid rgba(70, 130, 180, 0.25);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t2d-form input::placeholder,
.t2d-form textarea::placeholder { color: #8aa3b8; }
.t2d-form input:focus,
.t2d-form textarea:focus {
  border-color: #4682b4;
  box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}
.t2d-form textarea { resize: vertical; min-height: 60px; }
.t2d-form button.cta-btn { margin-top: 4px; background: #4682b4; color: #fff; box-shadow: none; }
.t2d-form button.cta-btn:hover { background: #2c5171; }
.t2d-form-msg { margin: 6px 0 0; font-size: 0.85rem; line-height: 1.3; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .landing-hero { padding: 80px 32px 96px; }
  .landing-features { padding: 96px 32px 56px; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .landing-hero { padding: 96px 32px 110px; }
}

/* Compact vertical rhythm (pibiCo guideline: line-height ≤1.1, vertical padding ≤3px) */
.t2d-landing h2, .t2d-landing h3, .t2d-landing li,
.feat-card p, .usecase-card p { line-height: 1.1; }
.feat-card h3 { margin: 0 0 3px; }
.feat-card p { margin: 0; }
.feat-card { padding-top: 12px; padding-bottom: 12px; }
.usecase-card { padding-top: 14px; padding-bottom: 14px; }
.usecase-head { margin-bottom: 3px; }
.section-title { margin-bottom: 4px; }
.section-sub { margin-bottom: 18px; }
/* Hero/intro paragraphs stay readable within the 1–1.2 guideline */
.landing-hero-sub, .section-sub { line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
  .feat-card, .cta-btn, .pricing-card, .usecase-card { transition: none; }
}
