html, body {
  overflow-x: hidden;
}

body {
  background-color: var(--color-background);
}

.thegrid {
  display: grid;
  grid-gap: 0;
  grid-template-rows: max-content auto max-content;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "body"
    "footer";

  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* diagonal dark band behind header + top of hero */

.thegrid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65vh;
  background-color: #191919;
  clip-path: polygon(0 0, 100% 0, 100% 52%, 0 80%);
  z-index: 0;
  pointer-events: none;
}

/* header */

.header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  position: relative;
  z-index: 100;
}

.header .buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header a {
  color: var(--color-text);
}

.header .button {
  background-color: var(--color-background);
  font-size: 12px;
  font-weight: 500;
  border-style: solid;
  border-width: 2px;
  border-color: var(--color-text);
  border-radius: 8px;
  padding: 6px 16px;
}

.header .button.plugin {
  color: var(--color-text);
  border-color: var(--color-pink);
  background-color: var(--color-pink);
}

.header .button.help {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-pink);
  border-width: 0px;
  padding: 8px 16px;
  display: none;
}

.wordmark img {
  width: 140px;
  object-fit: contain;
}

/* body */

.body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* hero */

.hero {
  text-align: center;
  padding: 24px 0;
}

/* split hero layout */

.hero-split {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  text-align: left;
  padding: 48px 0 80px;
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.hero-right {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-title {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  background: linear-gradient(140deg, #4A5FD5 0%, #B030A8 55%, #E6005F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 0.35s ease, transform 0.35s ease;
  cursor: default;
}

.hero-title:hover {
  filter: drop-shadow(0 0 22px rgba(180, 50, 200, 0.55));
  transform: translateY(-3px);
}

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-body p {
  font-size: 16px;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin: 0;
  transition: filter 0.35s ease, transform 0.35s ease, color 0.35s ease;
  cursor: default;
}

.hero-body p:hover {
  color: var(--color-text);
  filter: drop-shadow(0 0 12px rgba(180, 50, 200, 0.35));
  transform: translateY(-2px);
}

/* CTA button */

.cta-button {
  display: inline-block;
  background-color: #ffffff;
  color: #111111;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 100px;
  text-decoration: none;
  align-self: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.18);
}

.cta-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  translate: -160% 0;
  transition: translate 0s;
}

.cta-button:hover::after {
  translate: 160% 0;
  transition: translate 0.55s ease;
}

/* screen mockup */

.screen-container {
  position: relative;
  width: 360px;
  flex-shrink: 0;
  perspective: 1000px;
  margin-right: -40px;
}

.screen-glow {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(74, 95, 213, 0.3) 0%, rgba(176, 48, 168, 0.2) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.screen-frame {
  position: relative;
  width: auto;
  max-width: 100%;
  max-height: 480px;
  display: block;
  border-radius: 20px;
  z-index: 1;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7));
  transition: transform 0.15s ease;
  will-change: transform;
}

/* ── Animations ─────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    translate: 0 36px;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    translate: 80px 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}

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

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1);   }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

/* entrance */

.hero-title {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.hero-body {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.cta-button {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.screen-container {
  animation:
    fadeInRight 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both,
    screenFloat 5s ease-in-out 1.5s infinite;
}

.screen-glow {
  animation: glowPulse 5s ease-in-out 1.5s infinite;
}

.screen-container:hover {
  animation-play-state: running, paused;
}

/* ── Text hover glow & lift ─────────────────────────────────── */

.section-title {
  transition: filter 0.35s ease, transform 0.35s ease;
  cursor: default;
}

.section-title:hover {
  filter: drop-shadow(0 0 16px rgba(180, 50, 200, 0.45));
  transform: translateY(-2px);
}

.feature-heading {
  transition: filter 0.3s ease, transform 0.3s ease;
}

.feature-item:hover .feature-heading {
  filter: drop-shadow(0 0 10px rgba(180, 50, 200, 0.65));
  transform: translate(2px, -1px);
}

.cta-headline {
  transition: filter 0.4s ease, transform 0.4s ease;
  cursor: default;
}

.cta-headline:hover {
  filter: drop-shadow(0 0 28px rgba(180, 50, 200, 0.6));
  transform: translateY(-4px);
}

/* ── Scroll-reveal ─────────────────────────────────────────── */

.reveal,
.reveal-right {
  opacity: 0;
}

.reveal.is-visible {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-right.is-visible {
  animation: fadeInRight 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* shared section styles */

.hero-subtitle {
  font-size: 16px;
  color: var(--color-text-tertiary);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.applinks {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.applinks img {
  height: 34px;
  object-fit: contain;
}

/* section shared */

.section-title {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 40px 0;
  color: var(--color-text);
  line-height: 1.1;
}

.section-text {
  font-size: 15px;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin: 0;
}

/* content section */

.content-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* features */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-item {
  padding: 32px;
  background-color: #141414;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
  border-color: rgba(176, 48, 168, 0.4);
  transform: translateY(-4px);
}

.feature-heading {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(140deg, #4A5FD5 0%, #B030A8 55%, #E6005F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-text {
  font-size: 15px;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin: 0;
}

/* how it works */

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.workflow-media {
  width: auto;
  max-width: 100%;
  max-height: 600px;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.steps-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background-color: #141414;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 15px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  transition: border-color 0.3s ease;
}

.step-item:hover {
  border-color: rgba(176, 48, 168, 0.4);
}

.step-item::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  background: linear-gradient(140deg, #4A5FD5 0%, #B030A8 55%, #E6005F 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

/* cta */

.cta {
  text-align: center;
  padding: 64px 0 32px;
}

.cta-headline {
  font-size: 52px;
  font-weight: 800;
  margin: 0 0 40px 0;
  line-height: 1.1;
  background: linear-gradient(140deg, #4A5FD5 0%, #B030A8 55%, #E6005F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* footer */

.footer {
  grid-area: footer;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 40px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

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

.footer .links, .footer .social {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.footer .links {
  gap: 16px;
}

.footer .social {
  gap: 32px;
}

.footer .social a {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer .social img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* desktop */

@media screen and (min-width: 768px) {
  .hero-subtitle {
    font-size: 18px;
  }

  .header .button.help {
    display: block;
  }

  .applinks img {
    height: 39px;
  }

  .footer {
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
  }

  .footer .copyright {
    order: -1;
  }
}

@media screen and (max-width: 768px) {
  .wordmark img {
    width: 100px;
  }

  .header {
    padding: 12px 20px;
    gap: 8px;
  }

  .header .buttons {
    gap: 8px;
  }

  .header .button {
    padding: 5px 10px;
    font-size: 11px;
  }

  .nav-help {
    display: none;
  }

  .nav-plugin {
    display: none;
  }

  .thegrid {
    width: 100%;
    max-width: 100%;
  }

  .body {
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    min-width: 0 !important;
    margin: 0 20px !important;
    padding: 0 0 24px;
    overflow-x: hidden;
  }

  .hero-split {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 24px;
    padding: 32px 0;
  }

  .hero-left {
    width: 100%;
  }

  .hero-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100%;
    overflow: visible;
    padding: 20px 0 40px;
  }

  .hero-title {
    font-size: clamp(32px, 9vw, 44px);
  }

  .cta-button {
    align-self: center;
  }

  .screen-container {
    width: min(280px, 75vw);
    margin: 0 auto;
    margin-right: auto;
  }

  .screen-frame {
    max-height: 360px;
    margin: 0 auto;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

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

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

  .cta-headline {
    font-size: clamp(28px, 8vw, 36px);
  }

  .cta {
    padding: 40px 0 24px;
  }
}
