/* AST AI page, aligned with the Astrafic homepage. */

.ai-landing {
  --hero-container: 1200px;
  --hero-pad-x: 32px;
  --hero-pad-top: 28px;
  --hero-gap-search-next: 10px;
  position: relative;
  color: var(--text-dark);
  background: transparent;
}

.ai-hero-bar {
  padding-bottom: 10px;
}

.ai-landing .hero-top-balance {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 22px;
  border: 0;
  color: #e5e7eb;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.ai-login:hover {
  color: #f9fafb;
  background: rgba(30, 41, 59, 0.78);
}

.ai-vpn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background: var(--gradient-premium);
  background-size: var(--gradient-premium-size);
  animation: premiumGradient 8s ease infinite;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.28);
}

.ai-vpn:hover {
  color: #fff;
}

.ai-launch-arrow {
  font-size: 1.05em;
  line-height: 1;
  transform: translateY(-1px);
}

.ai-main {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.ai-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.ai-capsule {
  margin: 8px 0 22px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: rgba(241, 245, 249, 0.96);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.58)) padding-box,
    linear-gradient(135deg, rgba(99, 102, 241, 0.65), rgba(6, 182, 212, 0.42), rgba(236, 72, 153, 0.45)) border-box;
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.45);
}

.ai-landing .hero-title {
  max-width: 14em;
  word-break: normal;
  overflow-wrap: normal;
  background: none;
  animation: none;
  filter: none;
  color: #f7f8ff;
  -webkit-text-fill-color: #f7f8ff;
  text-shadow: 0 2px 22px rgba(2, 6, 23, 0.28);
}

.ai-landing .hero-title-line:last-child {
  background: var(--gradient-premium);
  background-size: var(--gradient-premium-size);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: premiumGradient 8s ease infinite;
  text-shadow: none;
}

.ai-lead {
  max-width: 40rem;
}

.ai-composer {
  position: relative;
  width: min(860px, 100%);
  min-height: 196px;
  margin-top: 28px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.ai-composer:focus-within,
.ai-composer:focus-visible {
  outline: none;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.ai-composer.is-invalid {
  border-color: rgba(244, 63, 94, 0.7);
}

.ai-composer-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 700;
}

.ai-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: url("logo-site-hero.png") left center / auto 28px no-repeat;
}

.ai-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-composer textarea {
  width: 100%;
  min-height: 88px;
  margin-top: 10px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(241, 245, 249, 0.96);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.ai-composer textarea::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.ai-composer textarea:focus,
.ai-composer textarea:focus-visible {
  outline: none;
}

.ai-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.ai-composer-bar p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.86rem;
}

.ai-composer-bar button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  background: var(--gradient-premium);
  background-size: var(--gradient-premium-size);
  animation: premiumGradient 8s ease infinite;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.28);
}

.ai-composer-bar button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.ai-status[hidden],
.ai-undo[hidden] {
  display: none;
}

.ai-status {
  margin: 12px 0 0;
  color: #fecdd3;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
}

.ai-undo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.ai-undo button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: transparent;
  color: #ddd6fe;
  font: inherit;
  cursor: pointer;
}

.ai-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(860px, 100%);
  margin-top: 16px;
}

.ai-examples button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 0;
  color: #e5e7eb;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.ai-examples button:hover,
.ai-card:hover {
  color: #f9fafb;
  background: rgba(30, 41, 59, 0.82);
}

.ai-examples svg,
.ai-card svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.ai-features {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
  margin-top: 88px;
  text-align: left;
}

.ai-kicker {
  margin: 0 0 0.7rem;
  color: var(--primary-cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-features h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: var(--gradient-premium);
  background-size: var(--gradient-premium-size);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: premiumGradient 8s ease infinite;
}

.ai-features-copy p:last-child {
  margin: 0.9rem 0 0;
  max-width: 24rem;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.55;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ai-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 148px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(196, 181, 253, 0.28);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  font: inherit;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ai-card.is-accent {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.62)) padding-box,
    linear-gradient(135deg, rgba(99, 102, 241, 0.7), rgba(6, 182, 212, 0.45), rgba(236, 72, 153, 0.4)) border-box;
}

.ai-card svg {
  color: #c4b5fd;
}

.ai-card strong {
  font-size: 1rem;
  font-weight: 700;
}

.ai-card span {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ai-landing :focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.8);
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .ai-landing {
    --hero-pad-x: 24px;
  }

  .ai-main {
    width: calc(100% - 48px);
  }

  .ai-features {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 64px;
  }
}

@media (max-width: 639px) {
  .ai-landing {
    --hero-pad-x: 16px;
    --hero-pad-top: 18px;
  }

  .ai-landing .hero-top-balance {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    grid-column: 1;
    justify-self: center;
  }

  .ai-login,
  .ai-vpn {
    min-height: 44px;
  }

  .ai-landing .hero-title-line {
    display: block;
  }

  .ai-landing .hero-title-line:not(:last-child)::after {
    content: none;
  }

  .ai-main {
    width: calc(100% - 32px);
    padding-bottom: 40px;
  }

  .ai-examples {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-composer-bar button,
  .ai-vpn,
  .ai-features h2,
  .ai-landing .hero-title,
  .ai-landing .hero-title-line:last-child {
    animation: none;
  }
}
