:root {
  --home-bg: #f3f5f9;
  --home-surface: #ffffff;
  --home-surface-soft: #f7f9fc;
  --home-surface-elevated: rgba(255, 255, 255, 0.92);
  --home-ink: #101320;
  --home-ink-soft: #5d6477;
  --home-line: rgba(16, 19, 32, 0.1);
  --home-accent: #5d17ea;
  --home-accent-soft: rgba(93, 23, 234, 0.08);
}

:root[data-theme="dark"] {
  --home-bg: #0f1012;
  --home-surface: #17181a;
  --home-surface-soft: #17181a;
  --home-surface-elevated: rgba(23, 24, 26, 0.92);
  --home-ink: #f2f4fb;
  --home-ink-soft: #adb1bb;
  --home-line: rgba(255, 255, 255, 0.08);
  --home-accent: #5d17ea;
  --home-accent-soft: rgba(93, 23, 234, 0.14);
}

body[data-page="home"] {
  background: linear-gradient(180deg, #f8fafc 0%, var(--home-bg) 100%);
  color: var(--home-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:root[data-theme="dark"] body[data-page="home"] {
  background: linear-gradient(180deg, #131416 0%, var(--home-bg) 100%);
}

.home-page {
  flex: 1 0 auto;
  padding: 54px 20px 88px;
}

.home-hero {
  padding-top: 12px;
}

.home-shell {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 48px;
  align-items: start;
}

.hero-copy,
.hero-rail {
  min-width: 0;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.hero-kicker,
.hero-rail__eyebrow {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}

.hero-kicker {
  color: var(--home-accent);
}

.hero-rail__eyebrow {
  color: var(--home-ink-soft);
}

.hero-title {
  margin: 0;
  max-width: 700px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 900;
  color: var(--home-ink);
}

.text-gradient {
  background: linear-gradient(120deg, #5d17ea 0%, #7c3aed 60%, #1f2b65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc,
.hero-rail__desc {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--home-ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.home-secondary-btn {
  min-height: 50px;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
  overflow: hidden;
  isolation: isolate;
}

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

.home-secondary-btn {
  background: transparent;
  color: var(--home-ink);
  border-color: var(--home-line);
}

html[data-theme="dark"] body[data-page="home"] .home-secondary-btn {
  background: none;
  background-color: rgba(25, 28, 38, 0.36) !important;
  background-image: none !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.btn-primary:hover,
.home-secondary-btn:hover,
.home-links a:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

.hero-fact {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--home-ink-soft);
  position: relative;
}

.hero-fact::after {
  content: "";
  width: 3px;
  height: 3px;
  margin-left: 0;
  margin-right: 0;
  position: absolute;
  left: calc(100% + 10.5px);
  top: 50%;
  transform: translateY(-50%);
  align-self: center;
  border-radius: 50%;
  background: rgba(16, 19, 32, 0.34);
  pointer-events: none;
}

:root[data-theme="dark"] .hero-fact::after {
  background: rgba(255, 255, 255, 0.28);
}

.hero-fact:last-of-type::after {
  display: none;
}

.hero-fact__value {
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  color: var(--home-ink);
}

.hero-fact__value--small {
  font-size: 16px;
}

.hero-fact__text {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--home-ink-soft);
}

.hero-rail {
  padding-top: 8px;
  padding-left: 22px;
  border-left: 1px solid rgba(16, 19, 32, 0.1);
  display: grid;
  gap: 14px;
}

:root[data-theme="dark"] .hero-rail {
  border-left-color: rgba(255, 255, 255, 0.08);
}

.hero-rail__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--home-ink);
}

.preview-list {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.preview-item {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--home-ink-soft);
  position: relative;
  padding-left: 16px;
}

.preview-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc((1.6em - 6px) / 2);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-accent);
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 19, 32, 0.08);
}

:root[data-theme="dark"] .home-links {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.home-links a {
  color: var(--home-ink-soft);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.home-links a:hover {
  color: var(--home-ink);
}

@media (max-width: 960px) {
  .home-page {
    padding: 28px 16px 72px;
  }

  .home-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-title {
    font-size: clamp(34px, 10vw, 54px);
    line-height: 1.05;
  }
@media (max-width: 980px) {
  .home-shell {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 680px;
  }

  .home-page {
    padding: 32px 20px 64px;
  }
}
}

/* ===== 2026 Home Device UX ===== */
@media (max-width: 980px) {
  .home-page {
    padding-left: var(--mobile-safe-gutter, 16px);
    padding-right: var(--mobile-safe-gutter, 16px);
  }

  .hero-copy {
    justify-items: start;
  }

  .hero-title {
    max-width: 680px;
  }
}

@media (max-width: 640px) {
  .home-page {
    padding-top: 22px;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .hero-copy {
    justify-items: stretch;
  }

  .hero-title {
    max-width: none;
    font-size: clamp(32px, 11vw, 42px);
    letter-spacing: 0;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .hero-fact {
    width: 100%;
    align-items: center;
  }

  .hero-fact--muted {
    grid-column: 1 / -1;
  }

  .hero-rail {
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .home-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-title {
    font-size: 31px;
  }

  .hero-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-fact--muted {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .home-shell {
    gap: 32px;
  }

  .hero-title {
    font-size: 38px;
    text-align: center;
  }

  .hero-desc {
    font-size: 15px;
    text-align: center;
  }

  .hero-kicker {
    text-align: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-primary,
  .home-secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-facts {
    gap: 12px 20px;
    justify-content: center;
  }

  .hero-fact {
    justify-content: center;
    background: var(--home-surface-soft);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--home-line);
  }

  .hero-fact::after {
    display: none;
  }

  .hero-rail {
    padding: 24px 16px;
    border-left: none;
    border: 1px solid var(--home-line);
    border-radius: 20px;
    background: var(--home-surface-soft);
    text-align: center;
  }

  .preview-list {
    justify-content: center;
  }

  .preview-item {
    padding-left: 0;
    text-align: center;
    margin-bottom: 12px;
  }

  .preview-item::before {
    display: none;
  }

  .hero-rail__title {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .hero-rail__desc {
    font-size: 14px;
    margin-bottom: 16px;
  }
}
