/* PromptCraft v2.0
   Global visual system — intentionally framework-light and easy to extend. */

:root {
  --bg: #0a0a0f;
  --panel: rgba(22, 22, 31, 0.78);
  --panel-strong: rgba(24, 24, 35, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --muted: #97a0b4;
  --accent-a: #7c6af7;
  --accent-b: #e05bff;
  --success: #62e6a7;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 15%, rgba(124, 106, 247, 0.10), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(224, 91, 255, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
}

::selection {
  background: rgba(224, 91, 255, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0b0b11;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #0b0b11;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
}

a,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  transition: 180ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #b88aff;
  outline-offset: 3px;
}

.container-shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.68);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.brand-mark > span:last-child {
  display: grid;
  line-height: 1;
}

.brand-mark strong {
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.brand-mark small {
  margin-top: 4px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 10px 30px rgba(124, 106, 247, 0.25);
  font-weight: 800;
}

.nav-link {
  position: relative;
}

.nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  transition: right 180ms ease;
}

.nav-link:hover::after {
  right: 0;
}

.ambient-orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  opacity: 0.22;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-one {
  width: 320px;
  height: 320px;
  top: 12%;
  left: -120px;
  background: var(--accent-a);
}

.orb-two {
  width: 250px;
  height: 250px;
  top: 45%;
  right: -100px;
  background: var(--accent-b);
  animation-duration: 16s;
}

.orb-three {
  width: 180px;
  height: 180px;
  bottom: 3%;
  left: 55%;
  background: #5d91ff;
  animation-duration: 14s;
}

@keyframes floatOrb {
  from { transform: translate3d(0, -10px, 0) scale(0.96); }
  to { transform: translate3d(24px, 24px, 0) scale(1.08); }
}

.eyebrow,
.overline {
  display: inline-block;
  color: #cbbaff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 860px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-copy,
.section-copy {
  color: #a4acbd;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.8;
}

.hero-copy {
  max-width: 720px;
}

.gradient-text {
  background: linear-gradient(90deg, #a899ff, #e979ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  box-shadow: 0 14px 35px rgba(124, 106, 247, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(124, 106, 247, 0.32);
}

.btn-primary.compact {
  padding: 9px 15px;
  border-radius: 11px;
  font-size: 0.85rem;
}

.btn-secondary,
.btn-ghost {
  padding: 11px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #e8e9ef;
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: rgba(190, 153, 255, 0.45);
  background: rgba(255, 255, 255, 0.065);
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 26, 38, 0.85), rgba(18, 18, 28, 0.70));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-demo {
  padding: 18px;
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.window-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.mini-field,
.demo-output {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.mini-field {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  color: #cdd2de;
  font-size: 0.88rem;
}

.mini-label {
  color: #8f7df8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
}

.demo-output {
  padding: 17px;
}

.demo-output p {
  color: #9fa8b8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.75;
}

.score-pill,
.privacy-badge {
  border: 1px solid rgba(98, 230, 167, 0.18);
  border-radius: 999px;
  background: rgba(98, 230, 167, 0.08);
  color: #9cf0c6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
}

.score-pill {
  padding: 5px 8px;
}

.privacy-badge {
  padding: 7px 10px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: #8891a4;
  font-size: 0.82rem;
}

.hero-proof span::before {
  content: "•";
  margin-right: 8px;
  color: #b491ff;
}

.section-space {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.05em;
}

.feature-card {
  min-height: 260px;
  padding: 26px;
}

.feature-number {
  color: #9b8df8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.feature-card h3 {
  margin-top: 52px;
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-card p {
  margin-top: 10px;
  color: #929bad;
  font-size: 0.92rem;
  line-height: 1.75;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.comparison-card {
  padding: 30px;
}

.comparison-card-featured {
  border-color: rgba(188, 134, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(124, 106, 247, 0.12), rgba(22, 22, 31, 0.84)),
    rgba(22, 22, 31, 0.82);
}

.version-badge {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(190, 153, 255, 0.26);
  border-radius: 999px;
  background: rgba(124, 106, 247, 0.10);
  color: #cfc2ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.version-badge.muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #8f98ab;
}

.comparison-card h3 {
  margin-top: 20px;
  font-size: 1.5rem;
  font-weight: 600;
}

.comparison-card ul {
  display: grid;
  gap: 13px;
  margin-top: 22px;
  color: #9ca5b7;
  font-size: 0.92rem;
}

.comparison-card li::before {
  content: "✓";
  margin-right: 10px;
  color: #bc9cff;
}

.comparison-card code {
  color: #e999ff;
  font-family: "JetBrains Mono", monospace;
}

.developer-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(30px, 6vw, 90px);
  padding: clamp(28px, 5vw, 56px);
}

.developer-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  color: #a0a8b9;
  line-height: 1.8;
}

.cta-panel {
  padding: clamp(40px, 8vw, 90px) 24px;
  border: 1px solid rgba(189, 143, 255, 0.25);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 106, 247, 0.20), transparent 40%),
    rgba(20, 20, 29, 0.65);
  text-align: center;
}

.footer-shell {
  border-top: 1px solid var(--line);
  background: rgba(8, 8, 12, 0.7);
}

.footer-shell a:hover {
  color: #d4c2ff;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 720ms cubic-bezier(.2,.7,.2,1), transform 720ms cubic-bezier(.2,.7,.2,1);
}

.reveal.pop-delay {
  transform: translateY(26px) scale(0.975);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Application */
.tab-shell {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.tab-button {
  padding: 10px 14px;
  border-radius: 11px;
  color: #8992a5;
  font-size: 0.85rem;
  font-weight: 600;
}

.tab-button.active {
  background: linear-gradient(135deg, rgba(124, 106, 247, 0.22), rgba(224, 91, 255, 0.16));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(190, 153, 255, 0.2);
}

.app-card {
  padding: clamp(20px, 3vw, 30px);
}

.app-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.app-card-heading h2 {
  margin-top: 3px;
  font-size: 1.35rem;
  font-weight: 600;
}

.text-button {
  color: #8f98aa;
  font-size: 0.82rem;
}

.text-button:hover {
  color: #fff;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group > span,
.field-label {
  color: #dfe3ec;
  font-size: 0.88rem;
  font-weight: 500;
}

.field-group small {
  color: #686f80;
  font-size: 0.72rem;
}

.field-group input,
.field-group textarea,
.field-group select,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8, 8, 13, 0.58);
  color: #eff1f6;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field-group input,
.field-group textarea,
.field-group select {
  border-radius: 13px;
  padding: 12px 13px;
  font-size: 0.88rem;
}

.field-group textarea {
  resize: vertical;
  min-height: 104px;
}

.field-group input::placeholder,
.field-group textarea::placeholder,
.search-box input::placeholder {
  color: #555d6e;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus,
.search-box input:focus {
  border-color: rgba(175, 136, 255, 0.55);
  background: rgba(10, 10, 18, 0.82);
  box-shadow: 0 0 0 4px rgba(124, 106, 247, 0.08);
  outline: none;
}

.field-group select option {
  background: #12121b;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tone-chip,
.category-chip {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #8f98a8;
  font-size: 0.78rem;
}

.tone-chip:hover,
.category-chip:hover,
.tone-chip.active,
.category-chip.active {
  border-color: rgba(188, 143, 255, 0.35);
  background: rgba(124, 106, 247, 0.11);
  color: #d7cbff;
}

.preview-card {
  min-height: 640px;
}

.quality-wrap {
  margin-top: 26px;
}

.quality-track {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.quality-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  transition: width 260ms ease;
}

.prompt-preview {
  min-height: 400px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px),
    rgba(7, 7, 12, 0.65);
  background-size: 24px 24px;
  color: #c8cfda;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.85;
  white-space: pre-wrap;
}

.preview-stats {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  color: #6f788a;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 8, 13, 0.55);
  padding-left: 13px;
}

.search-box svg {
  width: 18px;
  min-width: 18px;
  fill: none;
  stroke: #6c7487;
  stroke-width: 1.7;
}

.search-box input {
  border: 0;
  background: transparent;
  padding: 12px 14px 12px 0;
  box-shadow: none !important;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.prompt-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  padding: 20px;
}

.prompt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-badge {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(167, 136, 255, 0.20);
  border-radius: 999px;
  background: rgba(124, 106, 247, 0.08);
  color: #bcaeff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.prompt-card h3 {
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 600;
}

.prompt-card p {
  margin-top: 10px;
  color: #8f98aa;
  font-size: 0.82rem;
  line-height: 1.65;
}

.prompt-snippet {
  flex: 1;
  max-height: 116px;
  overflow: hidden;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.16);
  color: #798294;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  line-height: 1.65;
}

.variable-highlight {
  color: #f0a2ff;
  background: rgba(224, 91, 255, 0.10);
  border-radius: 5px;
  padding: 1px 4px;
  white-space: nowrap;
}

.prompt-card-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.prompt-card-actions button {
  flex: 1;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.copy-library-btn {
  background: linear-gradient(135deg, rgba(124, 106, 247, 0.18), rgba(224, 91, 255, 0.13));
  color: #ded6ff;
  border: 1px solid rgba(180, 143, 255, 0.22);
}

.copy-library-btn:hover {
  border-color: rgba(196, 160, 255, 0.45);
  background: linear-gradient(135deg, rgba(124, 106, 247, 0.26), rgba(224, 91, 255, 0.18));
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 14px;
  border: 1px solid rgba(174, 147, 255, 0.22);
  border-radius: 12px;
  background: rgba(20, 20, 29, 0.92);
  box-shadow: var(--shadow);
  color: #e9e5ff;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 24px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: #7d8699;
  text-align: center;
}

@media (max-width: 1024px) {
  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .comparison-grid,
  .developer-card {
    grid-template-columns: 1fr;
  }

  .hero-demo {
    transform: none;
  }
}

@media (max-width: 640px) {
  .container-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-title {
    font-size: clamp(2.7rem, 15vw, 4.2rem);
  }

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

  .tab-shell {
    width: 100%;
  }

  .tab-button {
    flex: 1;
    padding-inline: 8px;
    font-size: 0.76rem;
  }

  .app-card-heading {
    align-items: center;
  }

  .preview-card {
    min-height: 0;
  }

  .prompt-preview {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
