/* ==========================================================================
   tolink Landing Page Design System & CRO Styles — v2.1
   ========================================================================== */

:root {
  --bg-color: #030712;
  --bg-surface: #0b1329;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --accent-1: #3b82f6;
  --accent-2: #8b5cf6;
  --accent-hover: #2563eb;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --elevation-1: 0 4px 15px rgba(0, 0, 0, 0.3);
  --elevation-2: 0 10px 30px rgba(0, 0, 0, 0.5);
  --elevation-3: 0 20px 50px rgba(0, 0, 0, 0.7);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sticky-bar-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 4px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav & Header */
header {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.28s ease;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover {
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease;
  border: none;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 60px 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  text-align: left;
}

.hero-content h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: #ffffff;
}

.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 0 28px;
}

/* Hero Trust Pills (C1) */
.hero-trust-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: #e5e7eb;
  backdrop-filter: blur(8px);
}

.trust-pill-highlight {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.trust-microcopy {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-sphere {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
  animation: float 6s ease-in-out infinite;
  position: relative;
}

.glass-sphere::after {
  content: 'tolink';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.floating-node {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.node-1 { top: 10%; left: 15%; animation: float 5s ease-in-out infinite 0.5s; }
.node-2 { bottom: 15%; left: 25%; animation: float 7s ease-in-out infinite 1s; }
.node-3 { top: 30%; right: 10%; animation: float 6s ease-in-out infinite 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Sections Global */
section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 48px;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

/* Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.28s cubic-bezier(.34, 1.56, .64, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--elevation-2);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: 600;
  color: #ffffff;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Stream & AI Cards */
.ai-card {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  border: 1px solid var(--accent-1);
  position: relative;
  overflow: hidden;
}

/* Pricing Section & Promo Banner (C3) */
.promo-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 32px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.promo-code-badge {
  background: var(--accent-1);
  color: white;
  padding: 2px 10px;
  border-radius: 6px;
  font-family: monospace;
  letter-spacing: 1px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--accent-2);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
  transform: scale(1.03);
}

.pricing-card.popular:hover {
  transform: scale(1.03) translateY(-5px);
}

.badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  white-space: nowrap;
}

.price {
  font-size: 48px;
  font-weight: 800;
  margin: 20px 0;
  color: #ffffff;
}

.price span {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}

.features-list {
  list-style: none;
  margin: 24px 0;
  flex-grow: 1;
}

.features-list li {
  margin-bottom: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  font-size: 15px;
}

.features-list li::before {
  content: '✓';
  color: var(--accent-1);
  margin-right: 10px;
  font-weight: bold;
}

.card-refund-tag {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Blog / SEO Guide Cards */
.blog-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-main);
}

.blog-img {
  height: 180px;
  width: 100%;
}

.blog-card h3 {
  padding: 24px 24px 10px;
  font-size: 18px;
  margin: 0;
  line-height: 1.4;
  color: #ffffff;
}

.blog-card p {
  padding: 0 24px 24px;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  flex-grow: 1;
}

/* FAQ */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.faq-item h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #fff;
}

.faq-item p {
  color: var(--text-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding: 40px 0;
  margin-top: 40px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.28s ease;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Sticky Mobile CTA Bar (C4) */
.sticky-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--sticky-bar-height);
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 990;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.sticky-mobile-bar-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.sticky-mobile-bar .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  min-height: 44px;
}

/* Exit-Intent Popup (C5) */
.exit-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exit-popup-overlay.active {
  display: flex;
}

.exit-popup-card {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  text-align: center;
  animation: popupSlideIn 0.3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.exit-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.exit-popup-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.exit-popup-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.exit-popup-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.exit-popup-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.promo-copy-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed var(--accent-1);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.promo-copy-code {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-1);
  letter-spacing: 2px;
}

.btn-copy {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  background: var(--accent-1);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  min-height: 38px;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

.exit-popup-card .btn-primary {
  width: 100%;
  margin-bottom: 12px;
}

.exit-popup-trust {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-content p { margin: 0 auto 28px; }
  .hero-trust-pills { justify-content: center; }
  .hero-content .btn-group { justify-content: center; }
  .hero-visual { display: none; }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--sticky-bar-height) + env(safe-area-inset-bottom));
  }
  .hero { padding: 40px 0 30px; }
  .pricing-card.popular { transform: none; }
  .pricing-card.popular:hover { transform: translateY(-5px); }
  .btn { width: 100%; padding: 14px; }
  .footer-links { gap: 15px; }
  .grid-2 { grid-template-columns: 1fr; }
  .sticky-mobile-bar { display: block; }
  .exit-popup-overlay { display: none !important; } /* Disabled on mobile for P0 SEO safety */
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
