/* ============================================================
   ExBook Landing — Fresh cyan, clean & modern
   Works in both light and dark mode via CSS variables
   ============================================================ */

/* --- Hero --- */

.mdx-hero {
  padding: 5rem 0 4rem;
  overflow: hidden;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--md-primary-fg-color) 6%, transparent) 0%,
    transparent 100%);
}

.mdx-hero__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mdx-hero__content {
  flex: 1;
}

.mdx-hero__content h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  color: var(--md-default-fg-color);
}

.mdx-hero__highlight {
  background: linear-gradient(135deg, var(--md-primary-fg-color), #22C55E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="slate"] .mdx-hero__highlight {
  background: linear-gradient(135deg, #34D399, #4ADE80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mdx-hero__content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--md-default-fg-color--light);
  max-width: 32rem;
  margin-bottom: 1rem;
}

.mdx-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-primary-fg-color) 18%, transparent);
  border-radius: .5rem;
  padding: .5rem 1rem;
  margin-bottom: 1.5rem;
  max-width: 32rem;
}

.mdx-hero__badge-icon {
  display: flex;
  flex-shrink: 0;
}

.mdx-hero__actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.mdx-hero__image {
  flex: 0 0 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-primary-fg-color);
  opacity: .7;
}

/* --- Section Shared --- */

.mdx-section {
  padding: 5rem 0;
}

.mdx-section:nth-child(even) {
  background: color-mix(in srgb, var(--md-primary-fg-color) 4%, transparent);
}

.mdx-section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.mdx-section__header h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  color: var(--md-default-fg-color);
}

.mdx-section__header p {
  font-size: .95rem;
  color: var(--md-default-fg-color--light);
  max-width: 32rem;
  margin: 0 auto;
}

/* --- Product Cards --- */

.mdx-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.mdx-card {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  padding: 1.75rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .5rem;
  text-decoration: none;
  color: inherit;
  background: var(--md-default-bg-color);
  transition: border-color .2s, box-shadow .2s;
}

.mdx-card:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

[data-md-color-scheme="slate"] .mdx-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}

.mdx-card__icon {
  width: 44px;
  height: 44px;
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mdx-card__icon--blue {
  background: color-mix(in srgb, var(--md-primary-fg-color) 14%, transparent);
  color: var(--md-primary-fg-color);
}

.mdx-card__icon--emerald {
  background: color-mix(in srgb, #22C55E 14%, transparent);
  color: #16A34A;
}

[data-md-color-scheme="slate"] .mdx-card__icon--emerald {
  background: color-mix(in srgb, #4ADE80 18%, transparent);
  color: #4ADE80;
}

.mdx-card__icon--violet {
  background: color-mix(in srgb, #A855F7 14%, transparent);
  color: #9333EA;
}

[data-md-color-scheme="slate"] .mdx-card__icon--violet {
  background: color-mix(in srgb, #C084FC 18%, transparent);
  color: #C084FC;
}

.mdx-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
  color: var(--md-default-fg-color);
}

.mdx-card p {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
  margin: 0;
  flex: 1;
}

.mdx-card__link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--md-primary-fg-color);
  margin-top: .25rem;
  transition: transform .15s;
}

.mdx-card:hover .mdx-card__link {
  transform: translateX(3px);
}

/* --- Features --- */

.mdx-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.mdx-feature {
  padding: 1.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .5rem;
  background: var(--md-default-bg-color);
}

.mdx-feature__icon {
  width: 32px;
  height: 32px;
  border-radius: .375rem;
  background: color-mix(in srgb, var(--md-primary-fg-color) 14%, transparent);
  color: var(--md-primary-fg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
}

.mdx-feature h3 {
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 .375rem;
  letter-spacing: -.01em;
  color: var(--md-default-fg-color);
}

.mdx-feature p {
  font-size: .825rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
  margin: 0;
}

/* --- Stats --- */

.mdx-stats__grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
}

.mdx-stat {
  text-align: center;
}

.mdx-stat__number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  letter-spacing: -.02em;
}

.mdx-stat__label {
  display: block;
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
  margin-top: .25rem;
}

/* --- CTA --- */

.mdx-cta__inner {
  text-align: center;
  padding: 3rem 0;
}

.mdx-cta__inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--md-default-fg-color);
}

.mdx-cta__inner p {
  color: var(--md-default-fg-color--light);
  margin-bottom: 1.25rem;
}

.mdx-cta__links {
  margin-top: 1rem;
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
}

.mdx-cta__links a {
  color: var(--md-typeset-a-color);
  text-decoration: none;
}

.mdx-cta__links a:hover {
  text-decoration: underline;
}

/* --- Responsive --- */

@media (max-width: 960px) {
  .mdx-hero__inner {
    flex-direction: column;
    text-align: center;
  }
  .mdx-hero__content p {
    margin-left: auto;
    margin-right: auto;
  }
  .mdx-hero__actions {
    justify-content: center;
  }
  .mdx-hero__image {
    display: none;
  }
  .mdx-card-grid {
    grid-template-columns: 1fr;
  }
  .mdx-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .mdx-hero {
    padding: 3rem 0 2.5rem;
  }
  .mdx-section {
    padding: 3rem 0;
  }
  .mdx-feature-grid {
    grid-template-columns: 1fr;
  }
  .mdx-stats__grid {
    gap: 1.5rem;
  }
}

/* --- Modal --- */

.mdx-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.mdx-modal-overlay[hidden] {
  display: none;
}

.mdx-modal {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .75rem;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.mdx-modal h3 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.mdx-modal__close {
  position: absolute;
  top: .75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--md-default-fg-color--light);
  line-height: 1;
}

.mdx-modal__close:hover {
  color: var(--md-default-fg-color);
}

.mdx-modal__links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.mdx-modal__link {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  padding: .875rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}

.mdx-modal__link:hover {
  border-color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 6%, transparent);
}

.mdx-modal__link strong {
  font-size: .95rem;
  color: var(--md-default-fg-color);
}

.mdx-modal__link span {
  font-size: .8rem;
  color: var(--md-default-fg-color--light);
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  .mdx-card,
  .mdx-card__link {
    transition: none !important;
  }
}
