:root {
  --bg: #070a12;
  --bg-2: #0c1120;
  --card: #11182b;
  --card-2: #0d1424;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f5fb;
  --muted: #9aa6be;
  --faint: #6b7689;
  --accent: #7cf5c1;
  --accent-2: #2bd18c;
  --radius: 20px;
  --maxw: 640px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg-2), var(--bg) 60%);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* Warm radial glow behind the card */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 500px at 50% 18%, rgba(124, 245, 193, 0.16), transparent 70%),
    radial-gradient(500px 400px at 80% 90%, rgba(168, 100, 245, 0.1), transparent 70%);
  filter: saturate(1.1);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(18px, 5vw, 28px) 56px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.headline {
  margin: 0;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff, #c7d2e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  margin: 0 auto;
  max-width: 50ch;
  color: var(--muted);
  font-size: clamp(15px, 3.6vw, 17px);
}

/* ---------- Prompt ---------- */
.prompt {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field:focus-within {
  border-color: rgba(124, 245, 193, 0.6);
  box-shadow: 0 0 0 4px rgba(124, 245, 193, 0.12);
}

.noun-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  padding: 12px 0;
}

.noun-input::placeholder {
  color: var(--faint);
}

.icon-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn:active {
  transform: scale(0.94);
}

.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #052015;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(43, 209, 140, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.primary-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 38px rgba(43, 209, 140, 0.34);
}

.primary-btn:active {
  transform: translateY(1px);
}

.hint {
  margin: -8px 0 0;
  min-height: 1.2em;
  font-size: 14px;
  color: #ffb8c8;
  text-align: center;
}

/* ---------- Card ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Author display rules beat the UA [hidden] rule, so restore it explicitly. */
[hidden] {
  display: none !important;
}

.card-inner {
  position: relative;
  background:
    radial-gradient(420px 220px at 30% -10%, rgba(124, 245, 193, 0.1), transparent 70%),
    linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.card-logo {
  width: 100%;
  max-width: 320px;
}

.card-logo svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Loading state (shown while the company is generated fresh) */
.card-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 2px 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: spin 1.4s linear infinite;
  }
}

.chip {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}

.tagline {
  margin: 0;
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.descriptor {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 3.8vw, 17px);
}

/* AI feature callout */
.ai-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(168, 100, 245, 0.12), rgba(168, 100, 245, 0.04));
  border: 1px solid rgba(168, 100, 245, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
}

.ai-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e7c6ff;
  background: rgba(168, 100, 245, 0.18);
  border: 1px solid rgba(168, 100, 245, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}

.ai-feature-text {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #f0eafb;
}

/* Generic labelled section */
.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Founder story */
.founder-story {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  font-style: italic;
  border-left: 3px solid var(--line-strong);
  padding-left: 14px;
}

/* Testimonials */
.testimonials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.testimonials li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.testimonials .quote {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.testimonials .quote::before {
  content: "\201C";
}

.testimonials .quote::after {
  content: "\201D";
}

.testimonials .author {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.funding {
  font-size: 14px;
  font-weight: 600;
  color: #e7eefc;
  background: linear-gradient(180deg, rgba(124, 245, 193, 0.12), rgba(124, 245, 193, 0.04));
  border: 1px solid rgba(124, 245, 193, 0.22);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
}

.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats li {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 10px;
}

.card-watermark {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Actions ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-btn {
  flex: 1 1 auto;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-strong);
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn.ghost {
  background: transparent;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.parody-note {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #1b2540;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Focus visibility (a11y) ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Motion ---------- */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card.animate-in .card-inner {
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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