/* ── Animations ── */

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-45px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(45px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Section labels & titles ── */

.mdx-section-label {
  font-family: var(--md-code-font-family);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--md-primary-fg-color);
  margin-bottom: 0.8rem;
  display: block;
  font-weight: 500;
}

.mdx-section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 620px;
  margin: 0;
  color: var(--md-default-fg-color);
}

.mdx-section-title em {
  font-style: italic;
  color: var(--md-primary-fg-color);
}

.mdx-section-header {
  margin-bottom: 3rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero ── */

.mdx-container {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, #3949ab 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 60%, #512da8 0%, transparent 60%),
    linear-gradient(
      160deg,
      #1a237e 0%,
      #283593 40%,
      #303f9f 70%,
      #3f51b5 100%
    );
  padding: 3rem 0 0;
  color: #f5f5f5;
  overflow: hidden;
  position: relative;
}

.mdx-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--md-default-bg-color));
  z-index: 2;
  pointer-events: none;
}

[data-md-color-scheme="slate"] .mdx-container {
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(57, 73, 171, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 75% 60%, rgba(81, 45, 168, 0.25) 0%, transparent 60%),
    linear-gradient(
      160deg,
      #0d1117 0%,
      #131a2e 40%,
      #1a237e 100%
    );
}

.mdx-hero {
  text-align: center;
  padding: 2rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.mdx-hero__badge {
  display: inline-block;
  font-family: var(--md-code-font-family);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.8rem;
  animation: fade-in-up 0.8s 0.2s both;
}

.mdx-hero__icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.mdx-hero__icon svg {
  width: 0.85em;
  height: 0.85em;
  fill: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

.mdx-hero h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
  animation: fade-in-up 0.8s 0.4s both;
}

.mdx-hero__tagline {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: fade-in-up 0.8s 0.55s both;
}

.mdx-hero__tagline strong {
  color: #ffffff;
}

.mdx-hero__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2.2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: fade-in-up 0.8s 0.65s both;
  line-height: 1.6;
}

.mdx-hero__sub a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.mdx-hero__sub a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.mdx-hero__actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  animation: fade-in-up 0.8s 0.8s both;
}

.mdx-hero__actions .md-button {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
  padding: 0.6rem 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  transition: all 0.3s;
}

.mdx-hero__actions .md-button--primary {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.mdx-hero__actions .md-button:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── Waveform canvas ── */

.mdx-hero__waveform {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  animation: fade-in 1.2s 0.9s both;
  pointer-events: none;
}

.mdx-hero__waveform canvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media screen and (max-width: 44.984375em) {
  .mdx-hero h1 {
    font-size: 2.4rem;
  }
}

/* ── Section transitions ── */

.mdx-features-section,
.mdx-code-section,
.mdx-notebooks-section,
.mdx-cta-section {
  position: relative;
}

.mdx-code-section::before,
.mdx-notebooks-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
}

.mdx-code-section::before {
  background: linear-gradient(to bottom, var(--md-default-bg-color), var(--md-code-bg-color));
}

.mdx-notebooks-section::before {
  background: linear-gradient(to bottom, var(--md-code-bg-color), var(--md-default-bg-color));
}

.mdx-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--md-default-bg-color), var(--md-code-bg-color));
}

/* ── Features ── */

.mdx-features-section {
  padding: 5rem 0 3rem;
  background: var(--md-default-bg-color);
}

.mdx-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: 960px;
  margin: 0 auto;
}

@media screen and (max-width: 76.25em) {
  .mdx-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 44.984375em) {
  .mdx-features__grid {
    grid-template-columns: 1fr;
  }
}

.mdx-features__item {
  display: block;
  padding: 1.4rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--md-default-fg-color--lightest);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.mdx-features__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--md-primary-fg-color), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.mdx-features__item:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

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

.mdx-features__item:hover::before {
  opacity: 1;
}

.mdx-features__icon {
  margin-bottom: 0.7rem;
}

.mdx-features__icon .twemoji svg {
  width: 2rem;
  height: 2rem;
  fill: var(--md-primary-fg-color);
  opacity: 0.8;
}

.mdx-features__item h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--md-default-fg-color);
}

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

/* ── Code example ── */

.mdx-code-section {
  padding: 4rem 0 5rem;
  background: var(--md-code-bg-color);
}

.mdx-code-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

@media screen and (max-width: 60em) {
  .mdx-code-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.mdx-code-text p {
  margin-top: 1rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.7;
  font-size: 0.9rem;
}

.mdx-code-block {
  border-radius: 10px;
  border: 1px solid var(--md-default-fg-color--lightest);
  overflow: hidden;
  background: var(--md-code-bg-color);
}

[data-md-color-scheme="slate"] .mdx-code-block {
  border-color: rgba(255, 255, 255, 0.08);
}

.mdx-code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  background: rgba(0, 0, 0, 0.02);
}

[data-md-color-scheme="slate"] .mdx-code-header {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.mdx-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mdx-dot--red { background: #ff5f57; }
.mdx-dot--yellow { background: #febc2e; }
.mdx-dot--green { background: #28c840; }

.mdx-code-tabs {
  margin-left: auto;
  display: flex;
  gap: 0;
}

.mdx-code-tab {
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
  background: none;
  border: none;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

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

.mdx-code-tab.active {
  color: var(--md-primary-fg-color);
  background: rgba(63, 81, 181, 0.1);
}

[data-md-color-scheme="slate"] .mdx-code-tab.active {
  background: rgba(159, 168, 218, 0.12);
}

.mdx-code-pre {
  padding: 1.2rem 1.3rem;
  font-family: var(--md-code-font-family);
  font-size: 0.76rem;
  line-height: 1.8;
  overflow-x: auto;
  margin: 0;
  color: var(--md-default-fg-color--light);
}

/* Dark mode syntax colors */
.mdx-code-pre .kw { color: #c792ea; }
.mdx-code-pre .fn { color: #82aaff; }
.mdx-code-pre .str { color: #c3e88d; }
.mdx-code-pre .num { color: #f78c6c; }
.mdx-code-pre .cm { color: #546e7a; }
.mdx-code-pre .op { color: #89ddff; }

/* Light mode syntax colors */
[data-md-color-scheme="default"] .mdx-code-pre .kw { color: #6a1b9a; }
[data-md-color-scheme="default"] .mdx-code-pre .fn { color: #283593; }
[data-md-color-scheme="default"] .mdx-code-pre .str { color: #2e7d32; }
[data-md-color-scheme="default"] .mdx-code-pre .num { color: #d84315; }
[data-md-color-scheme="default"] .mdx-code-pre .cm { color: #90a4ae; }
[data-md-color-scheme="default"] .mdx-code-pre .op { color: #00695c; }

/* ── Hero install command ── */

.mdx-hero__install {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  margin-bottom: 0.8rem;
  font-family: var(--md-code-font-family);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(255, 255, 255, 0.85);
  animation: fade-in-up 0.8s 0.7s both;
}

.mdx-hero__install:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.mdx-hero__install .mdx-install__prompt {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}

.mdx-install__icon {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.mdx-hero__install:hover .mdx-install__icon {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Notebooks ── */

.mdx-notebooks-section {
  padding: 4rem 0 5rem;
  background: var(--md-default-bg-color);
}

.mdx-notebooks__sub {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--md-default-fg-color--light);
}

.mdx-notebooks__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 960px;
  margin: 2.5rem auto 0;
}

@media screen and (max-width: 44.984375em) {
  .mdx-notebooks__grid {
    grid-template-columns: 1fr;
  }
}

.mdx-notebooks__item {
  display: block;
  padding: 1.2rem 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--md-default-fg-color--lightest);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s;
}

.mdx-notebooks__item:hover {
  border-color: var(--md-primary-fg-color);
  transform: translateY(-2px);
}

.mdx-notebooks__item h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--md-default-fg-color);
}

.mdx-notebooks__item p {
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  color: var(--md-default-fg-color--light);
}

/* ── CTA ── */

.mdx-cta-section {
  padding: 5rem 0 7rem;
  background: var(--md-code-bg-color);
}

.mdx-cta__text {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: var(--md-default-fg-color--light);
}

.mdx-cta__actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.mdx-cta__actions .md-button {
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 0.6rem 1.6rem;
}

