/* ── Translate landing page — distinct blue/teal identity ── */
:root {
  --tp-accent: #0891b2;
  --tp-accent-2: #0ea5e9;
  --tp-accent-3: #14b8a6;
  --tp-accent-dark: #0e7490;
  --tp-accent-light: #e0f7fa;
  --tp-grad-accent: linear-gradient(135deg, #0891b2 0%, #0ea5e9 50%, #14b8a6 100%);
  --tp-grad-soft: linear-gradient(180deg, #ecfeff 0%, #e0f7fa 100%);
}

[data-theme="dark"] {
  --tp-accent: #22d3ee;
  --tp-accent-2: #38bdf8;
  --tp-accent-3: #2dd4bf;
  --tp-accent-dark: #06b6d4;
  --tp-accent-light: #164e63;
}

.tp-section-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 24px;
}

.tp-h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}

.tp-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 720px;
}

/* ── Hero ── */
.tp-hero {
  position: relative;
  overflow: hidden;
  background: var(--tp-grad-soft);
}

[data-theme="dark"] .tp-hero {
  background: linear-gradient(180deg, #0c1e26 0%, #0b1420 100%);
}

.tp-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.tp-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.tp-hero-blob-1 {
  width: 480px;
  height: 480px;
  background: var(--tp-accent-2);
  top: -160px;
  right: -120px;
}

.tp-hero-blob-2 {
  width: 380px;
  height: 380px;
  background: var(--tp-accent-3);
  bottom: -160px;
  left: -100px;
}

.tp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(8, 145, 178, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(8, 145, 178, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.tp-hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 24px 80px;
  text-align: center;
}

.tp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--tp-accent-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.tp-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tp-grad-accent);
}

.tp-h1 {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}

.tp-accent {
  background: var(--tp-grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tp-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.tp-hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.tp-cta-btn {
  background: var(--tp-grad-accent);
  border: none;
}

.tp-cta-btn:hover {
  background: var(--tp-accent-dark);
  transform: translateY(-1px);
}

.tp-microcopy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.tp-dot { opacity: 0.5; }

.tp-upload-anchor {
  scroll-margin-top: 80px;
}

.tp-upload-widget {
  margin-top: 48px;
}

/* ── Pain/Promise ── */
.tp-pain {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

/* ── How it works ── */
.tp-hiw {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tp-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.tp-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.tp-step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--tp-accent);
  margin-bottom: 10px;
}

.tp-step-t {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.tp-step-d {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.tp-demo {
  margin-top: 40px;
}

.tp-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tp-demo-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

.tp-demo-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--tp-grad-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  z-index: 1;
}

.tp-demo-img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: var(--tp-accent-light);
}

.tp-demo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 320px;
  background: var(--tp-accent-light);
  color: var(--tp-accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 24px;
}

[data-theme="dark"] .tp-demo-placeholder {
  background: rgba(8, 145, 178, 0.08);
}

.tp-demo-caption {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ── Use cases ── */
.tp-use-cases {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tp-use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.tp-use-case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.tp-use-case-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tp-use-case-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.tp-disclaimer {
  margin-top: 32px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--tp-accent-light);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

[data-theme="dark"] .tp-disclaimer {
  color: var(--muted);
}

/* ── Pricing ── */
.tp-pricing {
  background: var(--tp-grad-soft);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .tp-pricing {
  background: linear-gradient(180deg, #0c1e26 0%, #0b1420 100%);
}

.tp-pricing-sub {
  margin-top: 8px;
}

.tp-secondary-cta {
  display: inline-block;
  margin-top: 24px;
  color: var(--tp-accent-dark);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.tp-secondary-cta:hover {
  text-decoration: underline;
}

/* ── Language coverage ── */
.tp-languages {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tp-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.tp-lang-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 16px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.tp-lang-chip:hover {
  border-color: var(--tp-accent);
  box-shadow: 0 2px 12px rgba(8, 145, 178, 0.12);
  transform: translateY(-2px);
}

.tp-lang-flag {
  font-size: 28px;
  line-height: 1;
}

.tp-lang-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* ── FAQ ── */
.tp-faq {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tp-faq-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tp-faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.tp-faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  -webkit-user-select: none;
  user-select: none;
}

.tp-faq-item.is-expanded .tp-faq-q {
  margin-bottom: 8px;
}

.tp-faq-chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--tp-accent);
  transition: transform 0.25s ease;
  transform: rotate(0deg);
}

.tp-faq-item.is-expanded .tp-faq-chevron {
  transform: rotate(180deg);
}

.tp-faq-a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.tp-faq-item.is-expanded .tp-faq-a {
  opacity: 1;
}

/* ── Final CTA ── */
.tp-final-cta {
  background: var(--tp-grad-accent);
  text-align: center;
}

.tp-final-h2 {
  color: #fff;
}

.tp-final-body {
  color: rgba(255, 255, 255, 0.9);
  margin-left: auto;
  margin-right: auto;
}

.tp-final-cta .tp-section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tp-final-cta .tp-cta-btn {
  background: #fff;
  color: var(--tp-accent-dark);
}

.tp-final-cta .tp-cta-btn:hover {
  background: #f0fdff;
  color: var(--tp-accent-dark);
}

/* ── Upload widget ── */
.tp-upload-widget {
  margin-top: 48px;
  text-align: left;
}

.tp-upload-widget .convert-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-width: 500px;
}

.tp-upload-widget .file-input-wrapper {
  max-width: 500px;
}

[data-theme="dark"] .tp-upload-widget .convert-form {
  background: var(--card);
}

/* Hide the detail-level advanced options on translate page — not relevant */
.tp-upload-widget #detailLevelOpts {
  display: none;
}

/* ── Pre-expanded translate selectors ── */
.translate-pre-expanded {
  margin-bottom: 32px;
  margin-top: 16px;
  padding: 16px;
  background: var(--tp-accent-light);
  border: 1px solid rgba(8, 145, 178, 0.2);
  border-radius: var(--radius);
}

[data-theme="dark"] .translate-pre-expanded {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.25);
}

.translate-pre-expanded-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  justify-content: center;
}

.translate-pre-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  max-width: 200px;
}

.translate-pre-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tp-accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .translate-pre-label {
  color: var(--tp-accent);
}

.translate-pre-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}

[data-theme="dark"] .translate-pre-select {
  background: var(--bg);
}

.translate-pre-select:focus {
  outline: 2px solid var(--tp-accent);
  outline-offset: -1px;
  border-color: var(--tp-accent);
}

.translate-pre-arrow {
  font-size: 20px;
  color: var(--tp-accent);
  padding-bottom: 8px;
  font-weight: 700;
}

/* ── Responsive ── */

/* Tablet and small desktop */
@media (max-width: 860px) {
  .tp-steps { grid-template-columns: repeat(2, 1fr); }
  .tp-use-case-grid { grid-template-columns: 1fr; }
  .tp-lang-grid { grid-template-columns: repeat(2, 1fr); }
  .tp-section-inner { padding: 56px 20px; }
  .tp-hero-inner { padding: 72px 20px 56px; }
  .tp-h1 { font-size: 38px; }
  .tp-h2 { font-size: 28px; }
  .tp-demo-img, .tp-demo-placeholder { height: 260px; }
}

/* Mobile */
@media (max-width: 600px) {
  /* Typography */
  .tp-h1 { font-size: 28px; letter-spacing: -0.5px; }
  .tp-sub { font-size: 15px; line-height: 1.55; }
  .tp-h2 { font-size: 24px; }
  .tp-body { font-size: 15px; line-height: 1.6; }

  /* Layout: single column everywhere */
  .tp-steps { grid-template-columns: 1fr; gap: 16px; }
  .tp-demo-grid { grid-template-columns: 1fr; gap: 16px; }
  .tp-lang-grid { grid-template-columns: 1fr; gap: 10px; }
  .tp-use-case-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Section spacing */
  .tp-section-inner { padding: 48px 16px; }
  .tp-hero-inner { padding: 56px 16px 40px; }

  /* Demo images */
  .tp-demo-img, .tp-demo-placeholder { height: 200px; }

  /* Full-width CTA buttons */
  .tp-hero-cta { gap: 12px; }
  .tp-hero-cta .tp-cta-btn,
  .tp-final-cta .tp-cta-btn {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: center;
    text-align: center;
    padding: 14px 20px;
    font-size: 16px;
  }

  /* Microcopy wraps cleanly */
  .tp-microcopy { gap: 6px 4px; font-size: 12px; }

  /* Touch-friendly translate selectors */
  .translate-pre-expanded {
    padding: 14px;
  }
  .translate-pre-expanded-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .translate-pre-field {
    max-width: none;
  }
  .translate-pre-arrow {
    display: none;
  }
  .translate-pre-select {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 16px;
  }
  .translate-pre-label {
    font-size: 11px;
  }

  /* Touch-friendly FAQ items */
  .tp-faq-item { padding: 16px 18px; }
  .tp-faq-q { font-size: 14px; line-height: 1.4; }
  .tp-faq-a { font-size: 14px; line-height: 1.6; }

  /* Use case cards */
  .tp-use-case-card { padding: 18px; }
  .tp-use-case-title { font-size: 15px; }
  .tp-use-case-desc { font-size: 13px; }

  /* Language chips more compact */
  .tp-lang-chip { padding: 12px 8px; font-size: 13px; }
  .tp-lang-flag { font-size: 24px; }

  /* Step cards */
  .tp-step { padding: 20px; }
  .tp-step-t { font-size: 16px; }
  .tp-step-d { font-size: 13px; }

  /* Upload widget adjustments */
  .tp-upload-widget { margin-top: 32px; }
  .tp-upload-widget .convert-form { padding: 16px; }

  /* Hero blobs smaller */
  .tp-hero-blob-1 { width: 280px; height: 280px; top: -100px; right: -80px; }
  .tp-hero-blob-2 { width: 240px; height: 240px; bottom: -100px; left: -60px; }

  /* Pricing section */
  .tp-pricing .tp-body { font-size: 15px; }

  /* Secondary CTA full-width on mobile */
  .tp-secondary-cta {
    display: block;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
  }

  /* Disclaimer */
  .tp-disclaimer { font-size: 13px; padding: 14px 16px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .tp-h1 { font-size: 24px; }
  .tp-h2 { font-size: 21px; }
  .tp-hero-inner { padding: 40px 14px 32px; }
  .tp-section-inner { padding: 40px 14px; }
  .tp-hero-blob-1, .tp-hero-blob-2 { opacity: 0.2; }
  .tp-cta-btn { font-size: 15px; padding: 12px 16px; }
}
