/* TIE Checker — landing page styles. Dark-first, light-aware. */

:root {
  --bg: #0b0d12;
  --bg-elev: #11141b;
  --bg-card: #161a23;
  --border: #252a36;
  --text: #e6e8ee;
  --text-dim: #9aa3b2;
  --muted: #6b7385;
  --accent: #ff6a3d;
  --accent-dim: #e65c31;
  --success: #4ade80;
  --warning: #facc15;
  --max: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfc;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --border: #e3e6ec;
    --text: #1a1d24;
    --text-dim: #4a5263;
    --muted: #6b7385;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 20px; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 600; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 12px; }
p { margin: 0 0 16px; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.accent { color: var(--accent); }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}
.section-lead { font-size: 18px; max-width: 640px; margin-bottom: 40px; color: var(--text-dim); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.75);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) { .site-header { background: rgba(255,255,255,0.85); } }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-block;
  object-fit: contain;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-dim);
}
@media (max-width: 720px) {
  .site-header nav a:not(.btn) { display: none; }
}
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.lang-flag {
  width: 26px;
  height: 18px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.12s ease, border-color 0.12s ease;
}
.lang-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lang-flag:hover { opacity: 0.85; }
.lang-flag.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
@media (max-width: 720px) {
  .lang-switcher { gap: 2px; padding: 2px; }
  .lang-flag { width: 22px; height: 15px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  background: none;
  color: inherit;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dim); color: white; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }
.btn-wide { width: 100%; padding: 13px 20px; }

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

.hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(circle at 20% -10%, rgba(255, 106, 61, 0.12), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(255, 148, 102, 0.08), transparent 50%);
}
.hero-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-wrap { grid-template-columns: 1fr; gap: 40px; }
}
.lead { font-size: 19px; line-height: 1.55; color: var(--text-dim); max-width: 540px; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.trust { font-size: 13px; color: var(--muted); }

/* Mock popup in hero */
.hero-visual { display: flex; justify-content: center; }
.mock {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.mock-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.mock-bar span:first-child { background: #ff5f57; }
.mock-bar span:nth-child(2) { background: #ffbd2e; }
.mock-bar span:nth-child(3) { background: #28c840; }
.mock-body { padding: 18px; }
.mock-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.mock-k { color: var(--text-dim); }
.mock-v { font-weight: 500; }
.mock-available { color: var(--success); font-weight: 700; }
.mock-result { padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--border); }
.mock-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Pain section ---------- */

.pain { padding: 100px 0; border-top: 1px solid var(--border); }
.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 900px) { .pain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pain-grid { grid-template-columns: 1fr; } }
.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.pain-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255, 106, 61, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.pain-card p { margin: 0; font-size: 14px; }

/* ---------- How it works ---------- */

.how { padding: 100px 0; background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9466);
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}
.steps li p { margin: 0; font-size: 15px; }

/* ---------- Download ---------- */

.download { padding: 100px 0; }
.download-cards {
  display: grid;
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}
@media (max-width: 600px) { .download-cards { grid-template-columns: 1fr; } }
.download-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.download-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.download-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 106, 61, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.download-card h3 { margin: 0 0 4px; }
.download-card p { margin: 0; font-size: 13px; }

/* ---------- Pricing ---------- */

.pricing { padding: 100px 0; background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 20px 60px -20px rgba(255, 106, 61, 0.4);
}
.badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.plan-toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin: 12px 0 16px;
  gap: 4px;
}
.plan-toggle-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.plan-toggle-btn.active {
  background: var(--accent);
  color: white;
}
.plan-save {
  font-size: 11px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.plan-toggle-btn:not(.active) .plan-save {
  background: var(--border);
  color: var(--accent);
}
.price { margin: 4px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.price-big { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.price-note { color: var(--muted); font-size: 14px; }
.features { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.features li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.features li:last-child { border-bottom: none; }
.features li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 8px;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- FAQ ---------- */

.faq { padding: 100px 0; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--accent);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  padding: 0 22px 18px;
  margin: 0;
  font-size: 15px;
}
.faq code { background: var(--bg-elev); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.faq-contact { text-align: center; margin-top: 36px; }
.faq-contact p { margin: 0 0 14px; color: var(--muted, #718096); font-size: 15px; }

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

footer {
  padding: 60px 0 30px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer a { display: block; padding: 4px 0; color: var(--text-dim); font-size: 14px; }
footer a:hover { color: var(--accent); }
.copy { text-align: center; font-size: 13px; color: var(--muted); margin: 0; border-top: 1px solid var(--border); padding-top: 24px; }

/* ---------- Privacy trust section ---------- */

.privacy-trust {
  padding: 100px 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(72, 187, 120, 0.08), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(72, 187, 120, 0.06), transparent 50%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.privacy-trust .wrap { max-width: 960px; }
.privacy-trust .trust-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 48px;
}
@media (max-width: 640px) {
  .privacy-trust .trust-header { grid-template-columns: 1fr; }
}
.trust-shield {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #48bb78, #2f855a);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 40px;
  box-shadow: 0 20px 40px -10px rgba(72, 187, 120, 0.4);
}
.privacy-trust h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 38px);
}
.privacy-trust .section-lead {
  margin: 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .trust-grid { grid-template-columns: 1fr; }
}
.trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.trust-card .trust-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(72, 187, 120, 0.15);
  color: #38a169;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.trust-card h3 { margin: 0 0 8px; font-size: 17px; }
.trust-card p { margin: 0; font-size: 14px; }

.trust-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.trust-diagram h3 {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.flow-row {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.flow-row:last-child { border-bottom: none; }
.flow-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 500;
}
.flow-endpoint.you { border-color: var(--accent); }
.flow-arrow {
  position: relative;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}
.flow-arrow::before,
.flow-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.flow-arrow::before { left: 0; right: 58%; }
.flow-arrow::after { left: 58%; right: 0; }
.flow-arrow .arrow-label {
  position: relative;
  background: var(--bg-card);
  padding: 2px 8px;
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.flow-arrow.arrow-no { color: #c53030; }
.flow-arrow.arrow-no::before,
.flow-arrow.arrow-no::after { background: #c5303050; }
.flow-note {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  padding-left: 4px;
}
@media (max-width: 720px) {
  .flow-row { grid-template-columns: 1fr; gap: 8px; }
  .flow-arrow { padding: 4px 0; }
  .flow-arrow::before, .flow-arrow::after { display: none; }
  .flow-arrow .arrow-label { background: transparent; padding: 0; }
}

.trust-cta {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 28px;
}
.trust-cta a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s;
}
.trust-cta a:hover { border-bottom-color: var(--accent); }

/* ---------- Legal pages (privacy / terms) ---------- */

.legal {
  padding: 80px 0;
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 10px;
}
.legal .lead {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.legal h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  font-weight: 600;
}
.legal p,
.legal li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.legal ul,
.legal ol {
  padding-left: 22px;
}
.legal li { margin-bottom: 6px; }
.legal code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.legal .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Success page ---------- */

.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
}
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}
.key-box {
  margin: 24px 0;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.08em;
  user-select: all;
}
