/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* JT Labs — neutral / tech identity */
  --bg: #FAFAFC;
  --surface: #FFFFFF;
  --surface-2: #F4F5F9;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --accent: #6366F1;
  --accent-dark: #4F46E5;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --border: #E5E7EB;
  --header-bg: rgba(250, 250, 252, 0.8);
  --store-btn-bg: #0F172A;
  --store-btn-color: #FFFFFF;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --max-width: 1120px;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg: #0B0F19;
  --surface: #151A27;
  --surface-2: #1B2130;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --accent: #818CF8;
  --accent-dark: #A5B4FC;
  --accent-soft: rgba(129, 140, 248, 0.16);
  --border: #232B3B;
  --header-bg: rgba(11, 15, 25, 0.8);
  --store-btn-bg: #F1F5F9;
  --store-btn-color: #0B0F19;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ===== Language toggle ===== */
[data-lang]:not(.active) {
  display: none !important;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.logo span {
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ===== Theme toggle ===== */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.lang-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.lang-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-ui);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* ===== Section wrapper ===== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 20px;
}

/* ===== Hub Hero ===== */
.hub-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}

.hub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hub-hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.hub-hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

/* ===== Products grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-accent, var(--accent));
}

.product-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--card-accent-soft, var(--accent-soft));
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tag.status-live {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  border-color: transparent;
}

.tag.status-soon {
  color: #D97706;
  background: rgba(217, 119, 6, 0.12);
  border-color: transparent;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}

.product-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
}

.product-card .card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.product-card:hover .card-link svg {
  transform: translateX(3px);
}

/* ===== About ===== */
.about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.value-card {
  text-align: center;
  padding: 24px;
}

.value-icon {
  font-size: 34px;
  display: block;
  margin-bottom: 14px;
}

.value-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===== Contact ===== */
.contact {
  text-align: center;
}

.contact .btn {
  margin-top: 8px;
}

/* ===== Product page hero ===== */
.product-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-soft);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 22px;
}

.product-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.product-hero p.lead {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--store-btn-bg);
  color: var(--store-btn-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.store-btn .store-label {
  text-align: left;
  line-height: 1.2;
}

.store-btn .store-label small {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
  display: block;
}

/* ===== Features ===== */
.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== How it works ===== */
.how-it-works {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.steps {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Back link (product pages) ===== */
.back-link {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
}

.back-link a {
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.back-link a:hover {
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.footer-logo span {
  color: var(--accent);
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

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

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

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===== Legal pages ===== */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.legal-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  display: block;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 16px 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.legal-content a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--text-primary);
}

.legal-note {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.legal-content code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-dark);
  word-break: break-word;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
}

.legal-content table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14px;
}

.legal-content table th,
.legal-content table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-content table th {
  background: var(--surface-2);
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

  .header-right {
    gap: 12px;
  }

  .nav-links {
    display: none;
  }

  .hub-hero {
    padding: 64px 16px 40px;
  }

  .section {
    padding: 48px 16px;
  }

  .product-hero {
    padding: 48px 16px 40px;
  }

  .features,
  .how-it-works {
    padding: 40px 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .footer-inner {
    flex-direction: column;
  }

  .legal-content {
    padding: 32px 16px 64px;
  }
}
