/* ============================================================
   CustomDashboards Landing Page - customdashboards.us
   ============================================================ */

/* --- Font Face (self-hosted Inter variable) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-var.woff2') format('woff2');
}

/* --- Custom Properties --- */
:root {
  --color-primary: #1A1A2E;
  --color-accent: #4361EE;
  --color-accent-hover: #3451DE;
  --color-success: #22C55E;
  --color-bg-light: #F8F9FA;
  --color-bg-dark: #0F0F14;
  --color-text-primary: #1A1A2E;
  --color-text-secondary: #6B7280;
  --color-white: #FFFFFF;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --section-pad: clamp(3rem, 8vw, 7rem);
  --radius: 12px;
  --radius-sm: 8px;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #4361EE 0%, #7C3AED 100%);
  --gradient-cta: linear-gradient(135deg, #4361EE 0%, #1A1A2E 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(67, 97, 238, 0.04) 0%, transparent 100%);

  /* Shadow scale */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  --shadow-colored: 0 10px 25px -5px rgba(67, 97, 238, 0.25);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1 !important; transform: none !important; transition: none !important; }
  .currency__track { animation: none !important; }
  .phone-mockup--hero { animation: none !important; }
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
}

.section-title--light {
  color: var(--color-white);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--accent {
  background: var(--gradient-accent);
  color: var(--color-white);
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-colored);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(67, 97, 238, 0.35);
  filter: brightness(1.05);
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  border: 2px solid var(--color-accent);
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-colored);
}

.store-badge {
  display: inline-block;
  transition: transform 0.2s;
}

.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(0); opacity: 0.85; }

.store-badge img {
  height: 53px;
  width: auto;
}

/* --- Screen Reader Only (Accessibility) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Scroll Animations ---
   Default state is visible so no-JS users (and crawlers under strict CSP) see content.
   When JS boots, it adds `.js-anim` on <html>, which arms the hidden start state. */
.animate-on-scroll {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js-anim .animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
}

.js-anim .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Phone Mockup --- */
.phone-mockup {
  position: relative;
  width: 240px;
  border-radius: 28px;
  background: #1c1c1e;
  padding: 12px;
  box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(255,255,255,0.08);
}

.phone-mockup__screen {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 18px;
  background: #2a2a3e;
  overflow: hidden;
}

.phone-mockup__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-mockup--hero {
  width: 280px;
  animation: heroFloat 6s ease-in-out infinite;
}

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

.phone-mockup::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.phone-mockup--step { width: 200px; margin: 0 auto 1rem; }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--color-primary);
  color: var(--color-white);
  overflow: hidden;
  padding-bottom: var(--section-pad);
}

.hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(67, 97, 238, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 80%, rgba(124, 58, 237, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 10% 60%, rgba(67, 97, 238, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-white) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.nav {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.nav__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-white);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav__link:hover,
.nav__link:focus-visible {
  opacity: 1;
}

/* --- Mobile Hamburger Toggle --- */
.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav__toggle-icon {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
  transition: background 0.2s;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
  transition: transform 0.2s;
}

.nav__toggle-icon::before { top: -6px; }
.nav__toggle-icon::after { top: 6px; }

.nav__toggle[aria-expanded="true"] .nav__toggle-icon {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after {
  transform: rotate(-45deg) translate(4px, -4px);
}

.nav__links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem 1.5rem 1.5rem;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__links {
    display: flex;
  }
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 2rem;
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

/* Step 5: Brand tagline */
.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__image {
  display: flex;
  justify-content: center;
}

@media (max-width: 374px) {
  .phone-mockup--hero {
    width: 240px;
  }
}

@media (min-width: 768px) {
  .hero__content {
    grid-template-columns: 1fr auto;
    gap: 4rem;
    padding-top: 3rem;
  }
}

/* ============================================================
   2. TRUST BAR
   ============================================================ */
.trust-bar {
  position: relative;
  background: var(--color-white);
  padding: 2.5rem 0;
  text-align: center;
}

.trust-bar__lead {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.trust-bar__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  transition: transform 0.2s;
}

.trust-badge:hover {
  transform: translateY(-1px);
}

.trust-badge__icon {
  color: var(--color-success);
  flex-shrink: 0;
}

/* ============================================================
   3. HOW IT WORKS (Steps)
   ============================================================ */
.steps {
  padding: var(--section-pad) 0;
  background: var(--color-white);
}

.steps__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.step {
  text-align: center;
  max-width: 300px;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-colored);
}

.step__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.step__connector {
  display: none;
  height: 0;
  overflow: hidden;
}

@media (min-width: 900px) {
  .steps__grid {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
  }

  .step__connector {
    display: flex;
    align-items: center;
    padding-top: 140px;
  }
}

/* ============================================================
   4. FEATURES
   ============================================================ */
.features {
  position: relative;
  padding: var(--section-pad) 0;
  background: var(--color-bg-light);
  overflow: hidden;
}

.features::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(67, 97, 238, 0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 5rem;
}

.feature:last-child { margin-bottom: 0; }

.feature__image {
  display: flex;
  justify-content: center;
}

.feature__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature__desc {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.feature__bullets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
}

@media (min-width: 480px) {
  .feature__bullets {
    grid-template-columns: 1fr 1fr;
  }
}

.feature__bullets li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.feature__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

@media (min-width: 768px) {
  .feature {
    grid-template-columns: 1fr 1fr;
  }

  .feature--reverse .feature__image {
    order: 2;
  }

  .feature--reverse .feature__text {
    order: 1;
  }
}

/* ============================================================
   4e. COMPARISON TABLE
   ============================================================ */
.comparison {
  padding: var(--section-pad) 0;
  background: var(--color-bg-light);
}

.comparison__wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison__table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.comparison__table th,
.comparison__table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.comparison__table thead th {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}

.comparison__table td:first-child {
  font-weight: 500;
}

.comparison__highlight {
  background: rgba(67, 97, 238, 0.06);
  color: var(--color-primary);
  font-weight: 600;
}

.comparison__table thead .comparison__highlight {
  color: var(--color-accent);
  background: rgba(67, 97, 238, 0.10);
  border-left: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
  border-top: 2px solid var(--color-accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.comparison__table tbody td.comparison__highlight {
  border-left: 2px solid rgba(67, 97, 238, 0.2);
  border-right: 2px solid rgba(67, 97, 238, 0.2);
}

.comparison__table tbody tr:last-child td.comparison__highlight {
  border-bottom: 2px solid rgba(67, 97, 238, 0.2);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.comparison__table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   5. PRIVACY
   ============================================================ */
.privacy {
  position: relative;
  background: var(--color-bg-dark);
  color: var(--color-white);
  padding: var(--section-pad) 0;
}

.privacy::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--color-bg-light), var(--color-bg-dark));
  pointer-events: none;
  z-index: 1;
}

.privacy__lead {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 640px;
  margin: -1.5rem auto 3rem;
  line-height: 1.7;
}

.privacy__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.privacy-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.privacy-card__icon {
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.privacy-card:hover .privacy-card__icon {
  transform: translateY(-2px);
}

.privacy-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.privacy-card__desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.privacy-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(67, 97, 238, 0.3);
  transform: translateY(-3px);
}

@media (min-width: 640px) {
  .privacy__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   6. USE CASES
   ============================================================ */
.use-cases {
  position: relative;
  padding: var(--section-pad) 0;
  background: var(--color-bg-light);
  overflow: hidden;
}

.use-cases::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.05), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.use-cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.use-case-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}

.use-case-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.use-case-card__icon {
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.use-case-card:hover .use-case-card__icon {
  transform: translateY(-2px);
}

.use-case-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.use-case-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .use-cases__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   7. CURRENCY
   ============================================================ */
.currency {
  padding: 3rem 0;
  background: var(--color-white);
  overflow: hidden;
}

.currency .section-title { margin-bottom: 2rem; }

.currency__ticker {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.currency__track {
  display: flex;
  gap: 2.5rem;
  animation: ticker 35s linear infinite;
  width: max-content;
}

.currency__track span {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.currency__track span:nth-child(3n+1) {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.currency__track span:nth-child(3n+2) { color: var(--color-text-secondary); }
.currency__track span:nth-child(3n+3) { color: var(--color-text-primary); }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   7b. FAQ
   ============================================================ */
.faq {
  padding: var(--section-pad) 0;
  background: var(--color-bg-light);
}

.faq__grid {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq__item {
  background: var(--color-white);
  border-radius: var(--radius-sm);
  border: 1px solid #E5E7EB;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq__question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-text-primary);
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question:hover {
  color: var(--color-accent);
}

.faq__question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq__item[open] .faq__question::after {
  content: '−';
}

.faq__answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================================
   7c. LEARN PREVIEW
   ============================================================ */
.learn-preview {
  padding: var(--section-pad) 0;
}

.learn-preview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.learn-preview__card {
  display: block;
  background: var(--color-white);
  border: 1px solid #E5E7EB;
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.learn-preview__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-top-color: var(--color-accent);
}

.learn-preview__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(67, 97, 238, 0.1);
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.learn-preview__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.learn-preview__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.learn-preview__cta {
  text-align: center;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .learn-preview__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   8. SUPPORTED PLATFORMS
   ============================================================ */
.platforms {
  padding: var(--section-pad) 0;
  background: var(--color-bg-light);
}

.platforms__category {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.platforms__category:first-of-type {
  margin-top: 0;
}

.platforms__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.platforms__card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.platforms__icon {
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease;
}

.platforms__card:hover .platforms__icon {
  transform: scale(1.08);
}

.platforms__card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.platforms__detail {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.platforms__note {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .platforms__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   9. FINAL CTA
   ============================================================ */
.final-cta {
  position: relative;
  background: var(--gradient-cta);
  color: var(--color-white);
  padding: var(--section-pad) 0;
  text-align: center;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-bg-light), #4361EE);
  pointer-events: none;
}

.final-cta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.final-cta__subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.final-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ============================================================
   9b. ECOSYSTEM STRIP
   ============================================================ */
.ecosystem {
  background: var(--color-bg-light);
  padding: 2.5rem 0;
  text-align: center;
}

.ecosystem__lead {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.ecosystem__lead a {
  color: var(--color-accent);
  font-weight: 600;
  transition: color 0.2s;
}

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

.ecosystem__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.ecosystem__card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  text-align: left;
  text-decoration: none;
}

.ecosystem__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(67, 97, 238, 0.2);
}

.ecosystem__card:active {
  transform: translateY(0);
}

.ecosystem__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
}

.ecosystem__card-text {
  display: flex;
  flex-direction: column;
}

.ecosystem__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.ecosystem__tagline {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

@media (max-width: 639px) {
  .ecosystem__grid {
    flex-direction: column;
    align-items: center;
  }

  .ecosystem__card {
    width: 100%;
    max-width: 280px;
  }
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--color-white);
}

.footer__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer__more-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem 1rem;
}

.footer__more a {
  color: var(--color-accent);
  font-weight: 500;
  transition: color 0.2s;
}

.footer__more a:hover {
  color: var(--color-white);
}

.footer__more a.footer__more-all {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__more a.footer__more-all:hover {
  color: var(--color-white);
}

/* ============================================================
   PRIVACY / LEGAL PAGE
   ============================================================ */
.privacy-header {
  background: var(--color-primary);
  color: var(--color-white);
}

.legal {
  padding: var(--section-pad) 0;
  background: var(--color-white);
}

.legal__container {
  max-width: 720px;
}

.legal__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.legal__updated {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
}

.legal__section {
  margin-bottom: 2.5rem;
}

.legal__section:last-child {
  margin-bottom: 0;
}

.legal__section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.legal__section p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal__section p:last-child {
  margin-bottom: 0;
}

.legal__section ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.legal__section li {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  padding-left: 0.5rem;
  position: relative;
  list-style: disc;
}

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

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

/* ============================================================
   404 ERROR PAGE
   ============================================================ */
.error-page {
  padding: var(--section-pad) 0;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--color-bg-light);
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-page__title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.error-page__desc {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ============================================================
   LEARN / ARTICLE PAGES
   ============================================================ */

/* Article Hub */
.learn-hub__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.learn-hub__subtitle {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Article Hub - Card Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.article-card {
  background: var(--color-white);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.article-card__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(67, 97, 238, 0.1);
  color: var(--color-accent);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.article-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card h2 a {
  color: var(--color-text-primary);
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--color-accent);
}

.article-card__meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.article-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Article Page Layout */
.article-page-header {
  background: var(--color-primary);
  color: var(--color-white);
}

.article-content {
  padding: var(--section-pad) 0;
  background: var(--color-white);
}

.article-container {
  max-width: 720px;
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.article-header__meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

/* Table of Contents */
.table-of-contents {
  background: var(--color-bg-light);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}

.table-of-contents .toc-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-of-contents ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.table-of-contents li:last-child {
  margin-bottom: 0;
}

.table-of-contents a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.table-of-contents a:hover {
  color: var(--color-accent);
}

/* Article Body */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-body h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

.article-body ul, .article-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
}

.article-body strong {
  color: var(--color-text-primary);
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--color-accent-hover);
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  background: var(--color-bg-light);
  border-radius: var(--radius);
}

.related-articles h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.related-articles ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-articles li {
  margin-bottom: 0.5rem;
}

.related-articles li:last-child {
  margin-bottom: 0;
}

.related-articles a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.related-articles a:hover {
  text-decoration: underline;
}

/* Article CTA Box */
.article-cta-box {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.article-cta-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-cta-box p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Author Bio */
.author-bio {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--color-bg-light);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
}

.author-bio__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.author-bio__text strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.author-bio__text p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.author-bio__text a {
  color: var(--color-accent);
  text-decoration: none;
}

.author-bio__text a:hover {
  text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb__sep {
  color: var(--color-text-secondary);
}

/* Article Series Navigation */
.article-series-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 1px solid #E5E7EB;
}

.series-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-light);
  border: 1px solid #E5E7EB;
  transition: border-color 0.2s;
  max-width: 48%;
}

.series-link:hover {
  border-color: var(--color-accent);
}

.series-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.series-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.series-next {
  align-items: flex-end;
  margin-left: auto;
}

@media (max-width: 768px) {
  .article-header h1 { font-size: 1.75rem; }
  .article-body { font-size: 1rem; }
  .article-body h2 { font-size: 1.375rem; }
  .article-body h3 { font-size: 1.125rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-cta-box { padding: 2rem 1.5rem; }
  .table-of-contents { padding: 1.25rem 1.5rem; }
  .article-series-nav { flex-direction: column; }
  .series-link { max-width: 100%; }
  .series-next { align-items: flex-start; margin-left: 0; }
}

@media (max-width: 480px) {
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Selection --- */
::selection {
  background: rgba(67, 97, 238, 0.3);
  color: inherit;
}
