:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --surface: #111827;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
  --shadow-subtle: 0 8px 26px rgba(15, 23, 42, 0.6);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --max-width: 1040px;
  --transition-fast: 150ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 52%, #000 100%);
  color: var(--text);
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent),
              rgba(5, 10, 22, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.0rem 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 26px;
  height: 26px;
  display: block;
}

.brand-wordmark {
  font-family: "Inter", -apple-system, system-ui, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1.20rem;
  letter-spacing: 0.22em;
  color: #F4F5F7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.9rem;
  color: rgba(243, 244, 246, 0.78);
  text-decoration: none;
  transition: color 150ms ease-out, opacity 150ms ease-out;
}

.nav-link:hover {
  color: #ffffff;
  opacity: 1;
}

.nav-cta {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent);
  color: #f9fafb;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 150ms ease-out, border-color 150ms ease-out, transform 120ms ease-out;
}

.nav-cta:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

/* Hero */

.hero {
  padding: 5.5rem 0 2rem;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-body + .hero-body {
  margin-top: -0.35rem;
}

.hero-title {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.0rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #F9FAFB;
  margin: 0;
}

.hero-body {
  font-size: 1.0rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.82);
  max-width: 38rem;
  margin: 0;
}

.hero-teaser-link {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7DD3FC;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 120ms ease, transform 120ms ease;
}

.hero-teaser-link:hover {
  color: #E0F2FE;
  transform: translateY(-1px);
}

/* Hero product card */

.hero-product {
  margin-top: 0.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.hero-product-logo {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  flex-shrink: 0;
}

.hero-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-product-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}

.hero-product-sub {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.82);
  margin: 0;
  max-width: 32rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 55px rgba(88, 80, 236, 0.55);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

.btn.secondary:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.9);
}

/* Teaser section */

.teaser-inner {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.teaser-line {
  margin-top: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.82);
  max-width: 36rem;
}

/* Principles section */

.principles-inner {
  max-width: 900px;
  margin: 0 auto;
}

.principles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.principles-list li {
  color: rgba(226, 232, 240, 0.90);
  max-width: 40rem;
  line-height: 1.55;
}

/* Store badges */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.55);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.store-badge:hover {
  transform: translateY(-1px);
  border-color: rgba(209, 213, 219, 0.9);
  color: var(--text);
}

.store-badge.disabled {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

/* Sections */

.section {
  padding: 2.5rem 0;
}

.section-alt {
  padding: 3.5rem 0;
  background: radial-gradient(circle at top, #020617, #020617 45%, #000 100%);
}

.section h2 {
  font-size: 1.4rem;
  margin: 0 0 var(--space-md);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  color: #f8fafc;
}

.section p {
  color: var(--text-muted);
  max-width: 42rem;
}

/* Apps */

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.app-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 20px;
  padding: var(--space-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.app-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1.1rem;
}

.app-tagline {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.app-card p {
  margin: 0 0 var(--space-md);
}

.app-features {
  margin: 0 0 var(--space-md);
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Support */

.support-inner {
  max-width: 900px;
  margin: 0 auto;
}

.support-text {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(209, 213, 219, 0.9);
}

.support-text a {
  color: #7DD3FC;
  text-decoration: none;
}

.support-text a:hover {
  color: #E0F2FE;
}

/* Legal summary on home page */

.legal-summary {
  max-width: 900px;
  margin: 0 auto;
}

.section-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.82);
  margin: 0.75rem 0 0;
}

.legal-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.legal-links a {
  font-size: 0.95rem;
  color: #7dd3fc;
  text-decoration: none;
}

.legal-links a:hover {
  color: #e0f2fe;
}

/* Legal pages (privacy.html, terms.html) */

.legal-main {
  padding: 4rem 0 5rem;
}

.legal-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  line-height: 1.65;
  font-size: 16px;
}

.legal-title {
  font-size: 2rem;
  font-weight: 700;
  color: #f9fafb;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
  display: block;
  text-align: left;
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  color: #e5e7eb;
  display: block;
  text-align: left;
}

.legal-section p {
  font-size: 1rem;
  line-height: 1.65;
  color: #d6d6d6;
  margin-bottom: 1rem;
}

.legal-section a {
  color: #7dd3fc;
  text-decoration: none;
  transition: color 120ms ease;
}

.legal-section a:hover {
  color: #e0f2fe;
}

/* Active nav state */

.nav-link.is-active {
  color: #f9fafb;
}

/* Legal links (deprecated - keeping for backwards compatibility) */

.link-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.muted-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
  padding-bottom: 2px;
  font-size: 0.9rem;
}

.muted-link:hover {
  color: var(--text);
  border-bottom-style: solid;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: var(--space-md) 0 var(--space-lg);
  background: rgba(2, 6, 23, 0.96);
  margin-top: var(--space-xl);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-divider {
  opacity: 0.6;
}

/* Links */

a {
  color: var(--accent);
}

a:hover {
  color: #a5b4fc;
}

/* FAQ page */

.faq-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
  margin-bottom: 2rem;
}

.faq-footer-links {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.faq-footer-sep {
  color: rgba(148, 163, 184, 0.4);
}

.faq-footer-links a {
  font-size: 0.9rem;
  color: #7dd3fc;
  text-decoration: none;
  transition: color 120ms ease;
}

.faq-footer-links a:hover {
  color: #e0f2fe;
}


/* Hero product links (homepage) */

.hero-product-logo-link {
  display: inline-block;
  width: max-content;
  border-radius: 16px;
  transition: transform 150ms ease;
}

.hero-product-logo-link:hover {
  transform: translateY(-1px);
}

.hero-product-logo-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.8);
  outline-offset: 3px;
}

.hero-product-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}

.hero-product-title-link:hover {
  color: #a5b4fc;
}

.hero-product-link {
  font-size: 0.88rem;
  color: #7dd3fc;
  text-decoration: none;
  transition: color 120ms ease, transform 120ms ease;
}

.hero-product-link:hover {
  color: #e0f2fe;
  transform: translateX(2px);
}

/* ============================================================
   Krexile landing page (/krexile)
   ============================================================ */

.krex-hero {
  padding: 5.5rem 0 1.5rem;
  text-align: center;
}

.krex-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.krex-hero-logo {
  width: 144px;
  height: 144px;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.25rem;
}

.krex-hero-title {
  font-size: clamp(2.4rem, 4vw + 1rem, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  color: #f9fafb;
  background: linear-gradient(180deg, #ffffff 0%, #c7d2fe 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.krex-hero-sub {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.82);
  max-width: 34rem;
  margin: 0;
}

/* Shared badge row */
.krex-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.krex-badge-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

.krex-badge-link:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.krex-badge-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.8);
  outline-offset: 2px;
}

.krex-badge-img {
  height: 48px;
  width: auto;
  display: block;
}

/* Social row */
.krex-socials {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.krex-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 7.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.krex-social-link:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(30, 41, 59, 0.75);
  transform: translateY(-1px);
}

.krex-social-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.8);
  outline-offset: 2px;
}

/* CTA / content blocks */
.krex-cta {
  padding: 2.5rem 0;
  text-align: center;
}

.krex-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.krex-cta-title {
  font-size: clamp(1.5rem, 2.5vw + 0.6rem, 1.85rem);
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
  letter-spacing: -0.01em;
}

.krex-cta-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.78);
  margin: 0;
}

.krex-cta-help {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.krex-cta-help a {
  color: #7dd3fc;
  text-decoration: none;
}

.krex-cta-help a:hover {
  color: #e0f2fe;
}

/* Download section */
.krex-download {
  padding-bottom: 4rem;
}

/* Krexile page responsiveness */
@media (max-width: 720px) {
  .krex-hero {
    padding: 3.5rem 0 1rem;
  }
  .krex-hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 26px;
  }
  .krex-cta {
    padding: 2rem 0;
  }
  .krex-download {
    padding-bottom: 3rem;
  }
  .krex-badge-img {
    height: 42px;
  }
}

/* Responsiveness */

@media (max-width: 800px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    order: 3;
  }

  .hero {
    padding: 4rem 0 1.5rem;
  }

  .hero-title {
    font-size: 2.0rem;
  }

  .section {
    padding: 2rem 0;
  }

  .teaser-inner {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .legal-main {
    padding: 3rem 0 3.5rem;
  }

  .legal-title {
    font-size: 1.6rem;
  }

  .hero-product-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .hero-product-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .brand-wordmark {
    font-size: 1.05rem;
    letter-spacing: 0.18em;
  }

  .header-inner {
    padding: 1.0rem 1.25rem;
  }
}