:root {
  --brand-violet: #7c3aed;
  --brand-lilac: #c4b5fd;
  --brand-ink: #120820;
}

html,
body {
  overflow-x: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  margin-top: 8px;
  padding: 6px 10px;
  gap: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 42px rgba(20, 8, 40, .14);
}

:root[data-theme="dark"] .topbar {
  background: rgba(12, 8, 28, .76);
  box-shadow: 0 12px 42px rgba(20, 8, 40, .24);
}

.brand {
  gap: 9px;
  min-width: 150px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, .28);
}

.brand strong {
  font-size: .94rem;
  letter-spacing: -.035em;
}

.brand small {
  font-size: .66rem;
}

.topnav {
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.topnav a {
  padding: 7px 10px;
  font-size: .8rem;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.topbar .ghost-button,
.topbar .language-select {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

.topbar .ghost-button {
  min-width: 76px;
}

.language-select {
  width: auto;
  min-width: 108px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
}

:root[data-theme="dark"] .language-select {
  background: rgba(255, 255, 255, .055);
}

.hero {
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  overflow: hidden;
  padding-top: 56px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 720px;
}

.hero-showcase {
  width: min(440px, 100%);
  min-height: 430px;
  justify-self: end;
  transform: scale(.88);
  transform-origin: center right;
}

.promoai-hero-art {
  position: absolute;
  inset: auto 0 34px auto;
  width: min(360px, 86%);
  border-radius: 26px;
  opacity: .20;
  filter: saturate(1.02);
  box-shadow: 0 22px 70px rgba(124, 58, 237, .16);
  pointer-events: none;
}

.showcase-card-main {
  position: relative;
  z-index: 2;
  max-width: 370px;
  margin-left: auto;
  transform: rotate(-3deg) rotateY(-8deg) rotateX(3deg) scale(.88);
}

.showcase-app-icon {
  background: url("../img/branding/promoai-app-icon-192.png") center/cover no-repeat;
  box-shadow: 0 18px 42px rgba(124, 58, 237, .30);
}

.floating-metric {
  z-index: 1;
  transform: scale(.82);
  opacity: .84;
}

.metric-one {
  left: -26px;
  top: 138px;
}

.metric-two {
  right: -18px;
  bottom: 96px;
}

.primary-button {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed 44%, #06b6d4);
  box-shadow: 0 18px 40px rgba(124, 58, 237, .28);
}

.feature-grid article,
.timeline article,
.preview-section,
.generator-card,
.wizard-panel {
  box-shadow: 0 18px 70px rgba(18, 8, 32, .18);
}

.feature-grid article:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(255, 255, 255, .055)),
    var(--panel);
}

.footer span:first-child::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  border-radius: 5px;
  background: url("../img/branding/promoai-app-icon-192.png") center/cover no-repeat;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .topnav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    border-radius: 20px;
  }

  .brand {
    min-width: 0;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .topnav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-showcase {
    width: min(400px, 100%);
    min-height: 380px;
    justify-self: center;
    transform: scale(.82);
    transform-origin: center;
  }

  .promoai-hero-art {
    opacity: .16;
    width: min(320px, 90%);
  }
}

@media (max-width: 680px) {
  .topbar {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding: 7px 8px;
    gap: 8px;
    border-radius: 18px;
  }

  .brand {
    max-width: 178px;
  }

  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: .9rem;
  }

  .brand small {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .topbar .ghost-button,
  .topbar .language-select {
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    font-size: .72rem;
  }

  .topbar .ghost-button {
    min-width: 62px;
  }

  .language-select {
    min-width: 94px;
    max-width: 116px;
  }

  .topnav {
    margin: 2px -2px 0;
    gap: 4px;
    padding: 1px 2px 3px;
  }

  .topnav a {
    padding: 7px 9px;
    font-size: .75rem;
  }

  .hero {
    display: block;
    padding-top: 44px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 14vw, 4.25rem);
    line-height: .98;
    letter-spacing: -.075em;
  }

  .hero-text {
    font-size: .98rem;
    line-height: 1.65;
  }

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

  .hero-actions a,
  .form-actions button,
  .primary-button,
  .secondary-button,
  .ghost-button.full {
    width: 100%;
    justify-content: center;
  }

  .trust-row {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .trust-row::-webkit-scrollbar {
    display: none;
  }

  .trust-row span {
    flex: 0 0 auto;
    font-size: .72rem;
    padding: 8px 10px;
  }

  .hero-showcase {
    width: min(330px, 100%);
    min-height: 300px;
    margin: 20px auto 0;
    transform: none;
  }

  .showcase-card-main {
    max-width: 300px;
    transform: rotate(-2deg) scale(.78);
    transform-origin: center;
  }

  .promoai-hero-art {
    right: 4px;
    bottom: 26px;
    width: min(260px, 86%);
    opacity: .12;
  }

  .floating-metric {
    transform: scale(.72);
    opacity: .68;
  }

  .metric-one {
    left: 0;
    top: 78px;
  }

  .metric-two {
    right: 0;
    bottom: 54px;
  }

  .app-shell,
  .examples,
  .roadmap {
    margin-top: 56px;
  }

  .section-heading-row,
  .preview-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .wizard-layout,
  .ai-lab-grid,
  .video-lab-grid,
  .form-grid.two,
  .upload-grid,
  .style-grid,
  .feature-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-panel,
  .generator-card,
  .preview-section,
  .ai-lab,
  .video-lab,
  .feature-grid article,
  .timeline article {
    border-radius: 22px;
    padding: 18px;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(142px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .steps li {
    min-width: 142px;
  }

  .preview-grid,
  .ai-result-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preview-grid canvas,
  .video-result video,
  .ai-result-grid img {
    max-width: 100%;
    height: auto;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .topbar {
    width: calc(100% - 12px);
    padding: 6px;
  }

  .brand {
    max-width: 138px;
  }

  .brand strong {
    font-size: .84rem;
  }

  .language-select {
    min-width: 86px;
    max-width: 98px;
  }

  .topbar .ghost-button {
    min-width: 56px;
    padding-inline: 8px;
  }

  .hero-copy h1 {
    font-size: clamp(2.15rem, 15vw, 3.35rem);
  }

  .hero-showcase {
    width: 100%;
    min-height: 260px;
  }

  .showcase-card-main {
    transform: rotate(-2deg) scale(.68);
  }
}
