:root {
  --primary: #161a42;
  --primary-soft: rgba(22, 26, 66, 0.1);
  --heading: #121723;
  --body: #788293;
  --bg: #fcfcfc;
  --surface: #ffffff;
  --muted: #f0f2f9;
  --stroke: #e3e8ef;
  --input: #f8f8f8;
  --yellow: #fbb040;
  --shadow: 0 5px 15px rgba(6, 8, 15, 0.05);
  --header: rgba(255, 255, 255, 0.8);
}

html.dark {
  --heading: #ffffff;
  --body: #959cb1;
  --bg: #000000;
  --surface: #1d2430;
  --muted: #171c28;
  --stroke: rgba(255, 255, 255, 0.12);
  --input: #2c303b;
  --header: rgba(30, 35, 46, 0.85);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3,
h4,
h5 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
}

.container {
  max-width: 1320px;
}

.section {
  padding: 80px 0;
}

.section-lg {
  padding: 100px 0;
}

.section-title {
  max-width: 570px;
  margin-bottom: 70px;
}

.section-title.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  margin-bottom: 16px;
}

.section-title p,
.lead-copy {
  font-size: 1.05rem;
  margin: 0;
}

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 14px 32px;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(4, 10, 34, 0.1);
  transition: 0.3s ease;
}

.btn-primary-custom:hover {
  color: #fff;
  opacity: 0.9;
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
  background: transparent;
}

.site-header.sticky {
  position: fixed;
  background: var(--header);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 96px;
  gap: 12px;
}

.main-nav {
  flex: 1;
  margin-left: 12px;
}

.site-header.sticky .header-inner {
  min-height: 76px;
}

.logo {
  width: 180px;
  flex: 0 0 180px;
}

.logo img {
  width: 100%;
  display: block;
}

.logo img.logo-dark,
.footer-logo.logo-dark,
html.dark .logo img.logo-light,
html.dark .footer-logo.logo-light {
  display: none;
}

html.dark .logo img.logo-dark,
html.dark .footer-logo.logo-dark {
  display: block;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--heading);
  font-size: 1rem;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

html.dark .main-nav a {
  color: rgba(255, 255, 255, 0.72);
}

.main-nav a:hover,
.main-nav a.active,
html.dark .main-nav a:hover,
html.dark .main-nav a.active {
  color: var(--primary);
}

html.dark .main-nav a.active,
html.dark .main-nav a:hover {
  color: #fff;
}

.has-sub {
  position: relative;
}

.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(6, 8, 15, 0.12);
  padding: 8px;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  z-index: 20;
}

.has-sub:hover > .submenu,
.has-sub.open > .submenu {
  display: flex;
}

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.92rem;
}

.caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-signup {
  background: var(--primary);
  color: #fff !important;
  border-radius: 4px;
  padding: 12px 28px !important;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(4, 10, 34, 0.15);
}

.theme-toggle,
.nav-toggle {
  border: 0;
  background: var(--muted);
  color: var(--heading);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border-radius: 8px;
  background: transparent;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--heading);
  margin: 5px 0;
}

.icon-sun {
  display: none;
}

html.dark .icon-moon {
  display: none;
}

html.dark .icon-sun {
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  padding: 180px 0 140px;
  text-align: center;
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero p {
  max-width: 760px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
}

.hero-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.hero-shape.right {
  top: 0;
  right: 0;
  width: min(450px, 45vw);
  opacity: 0.85;
}

.hero-shape.left {
  left: 0;
  bottom: 0;
  width: min(360px, 40vw);
  opacity: 0.85;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}

html.dark .feature-icon {
  color: #8ea2ff;
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.check-list {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--body);
  font-size: 1.05rem;
  font-weight: 500;
}

.check {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex: 0 0 30px;
}

.about-photo {
  max-width: 500px;
  margin-left: auto;
  filter: drop-shadow(0 8px 24px rgba(6, 8, 15, 0.08));
}

.video-wrap {
  position: relative;
  max-width: 770px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 77 / 40;
  object-fit: cover;
}

.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
}

.play-btn:hover {
  background: #fff;
}

.brand-bar {
  background: var(--muted);
  border-radius: 4px;
  padding: 36px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.brand-bar a {
  width: 16.66%;
  min-width: 140px;
  padding: 14px;
  text-align: center;
  opacity: 0.7;
}

.brand-bar a:hover {
  opacity: 1;
}

.brand-bar img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-light,
html.dark .brand-dark {
  display: none;
}

html.dark .brand-light {
  display: inline;
}

.muted-band {
  background: var(--muted);
}

.testimonial,
.blog-card,
.panel,
.auth-card,
.side-card {
  background: var(--surface);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.testimonial {
  padding: 32px;
  height: 100%;
}

.stars {
  color: var(--yellow);
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.testimonial p {
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.person img,
.author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.person h3,
.author h4 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.person span,
.meta {
  font-size: 0.85rem;
  color: var(--body);
}

.blog-card {
  overflow: hidden;
  height: 100%;
}

.blog-card .thumb {
  position: relative;
  display: block;
}

.blog-card .thumb img {
  width: 100%;
  aspect-ratio: 37 / 22;
  object-fit: cover;
}

.tag {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  text-transform: capitalize;
}

.blog-card .body,
.panel,
.side-card {
  padding: 28px;
}

.blog-card h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card .excerpt {
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 16px;
  margin-right: 16px;
  border-right: 1px solid var(--stroke);
}

.panel h2,
.auth-card h3 {
  margin-bottom: 8px;
}

.field {
  width: 100%;
  border: 1px solid var(--stroke);
  background: var(--input);
  color: var(--heading);
  border-radius: 4px;
  padding: 12px 18px;
  margin-bottom: 16px;
  outline: none;
}

.field:focus {
  border-color: var(--primary);
}

textarea.field {
  min-height: 140px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 500;
}

.newsletter p.rule {
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.site-footer {
  background: var(--surface);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.footer-logo {
  width: 150px;
  margin-bottom: 22px;
}

.socials {
  display: flex;
  gap: 18px;
}

.socials a:hover {
  color: var(--primary);
}

.site-footer h2 {
  font-size: 1.2rem;
  margin-bottom: 22px;
}

.site-footer li {
  list-style: none;
  margin-bottom: 12px;
}

.site-footer ul {
  padding: 0;
  margin: 0;
}

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

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210, 216, 225, 0.6), transparent);
  margin-top: 20px;
}

.copy {
  text-align: center;
  padding: 28px 0;
}

.page-hero {
  padding: 160px 0 40px;
  position: relative;
  overflow: hidden;
}

.crumb {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  color: var(--body);
}

.crumb .current {
  color: var(--primary);
}

.crumb .sep {
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--body);
  border-right: 2px solid var(--body);
  transform: rotate(45deg);
}

.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 30px 0 0;
}

.pager a,
.pager span {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(120, 130, 147, 0.15);
  color: var(--body);
}

.pager a:hover,
.pager a.active {
  background: var(--primary);
  color: #fff;
}

.article {
  padding-top: 40px;
}

.article h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 16px;
  margin-bottom: 28px;
}

.cover {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 28px;
  aspect-ratio: 97 / 44;
  object-fit: cover;
}

.quote {
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 28px;
  font-style: italic;
  text-align: center;
  margin: 24px 0;
}

.chip {
  display: inline-block;
  background: var(--muted);
  color: var(--heading);
  border-radius: 4px;
  padding: 6px 14px;
  margin: 0 8px 8px 0;
  font-size: 0.9rem;
}

.chip:hover {
  background: var(--primary);
  color: #fff;
}

.related {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.related img {
  width: 78px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row .field {
  margin: 0;
}

.search-row button {
  width: 50px;
  border: 0;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
}

.side-card h3 {
  font-size: 1.05rem;
  border-bottom: 1px solid var(--stroke);
  margin: -28px -28px 18px;
  padding: 16px 28px;
}

.auth-card {
  max-width: 520px;
  margin: 40px auto 0;
  padding: 48px 40px;
}

.auth-card h3,
.auth-card > p {
  text-align: center;
}

.social-btn {
  width: 100%;
  border: 1px solid var(--stroke);
  background: var(--input);
  color: var(--body);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 22px;
  color: var(--body);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--stroke);
  flex: 1;
}

.link {
  color: var(--primary);
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 180px 16px 80px;
}

.error-mark {
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -4px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 10px;
}

.scroll-up {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 0;
  background: var(--primary);
  color: #fff;
  display: none;
  z-index: 50;
}

.scroll-up.show {
  display: grid;
  place-items: center;
}

.about-dark,
html.dark .about-light {
  display: none;
}

html.dark .about-dark {
  display: block;
}

@media (max-width: 991px) {
  .nav-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 28px;
  }

  .header-actions {
    margin-right: 54px;
  }

  .btn-signup {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 88px;
    right: 16px;
    width: 250px;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    padding: 16px 22px;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .main-nav .submenu {
    position: static;
    box-shadow: none;
    padding: 0 0 0 10px;
    background: transparent;
  }

  .brand-bar a {
    width: 33%;
  }

  .crumb {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .hero {
    padding: 140px 0 80px;
  }
}

@media (max-width: 575px) {
  .brand-bar a {
    width: 50%;
  }

  .auth-card {
    padding: 32px 20px;
  }

  .author-block {
    border: 0;
    margin-right: 0;
    padding-right: 0;
  }
}
