/* ============================================
   Solace Scoop - Design System
   ============================================ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

:root {
  --navy: #093B5F;
  --navy-deep: #03213B;
  --green: #00C895;
  --green-light: #ABFF88;
  --green-tint: rgba(0, 200, 149, 0.08);
  --green-glow: rgba(0, 200, 149, 0.25);
  --teal: #14A5A7;
  --gray-50: #f8fafb;
  --gray-100: #f1f5f4;
  --gray-200: #e2e8e6;
  --gray-400: #94a3a0;
  --gray-600: #4a5e59;
  --gray-800: #1a2e29;
  --white: #ffffff;
  --red: #ef4444;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--navy); background: var(--white); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

.section__title {
  font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; text-align: center; color: var(--navy);
}
.section__subtitle { font-size: 1.0625rem; color: var(--gray-600); text-align: center; margin-top: 0.625rem; }

/* ── Button ──────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem; border-radius: 100px; border: none; cursor: pointer;
  background: linear-gradient(101deg, var(--green-light) 1%, var(--green) 105%);
  color: var(--navy-deep);
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 200, 149, 0.15);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 200, 149, 0.25); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; white-space: nowrap; }
.btn--full { width: 100%; }
.spinner { width: 16px; height: 16px; animation: spin 0.8s linear infinite; }

/* ── Nav ─────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; color: var(--navy); }
.nav__logo-img { height: 28px; display: block; }
.nav__badge {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem; border: 1.5px solid var(--gray-200); border-radius: 100px; color: var(--navy);
}
.nav__links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9375rem; color: var(--gray-600); }
.nav__links a:hover { color: var(--navy); }

/* ── Hero ────────────────────────────── */

.hero {
  padding: 140px 0 80px; text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,200,149,0.06) 0%, transparent 70%);
}
.hero__label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--green); text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1.12; color: var(--navy);
}
.hero__title em { font-style: italic; color: var(--green); }
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem); color: var(--gray-600);
  margin-top: 1.25rem; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.7;
}
.hero__form { display: flex; gap: 0.75rem; max-width: 480px; margin: 2.5rem auto 0; }
.hero__input {
  flex: 1; font-family: var(--font-body); font-size: 1rem;
  padding: 1rem 1.25rem; border: 1.5px solid var(--gray-200); border-radius: 100px;
  background: var(--white); color: var(--navy); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero__input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.hero__input::placeholder { color: var(--gray-400); }

/* ── Steps ───────────────────────────── */

.steps { padding: 5rem 0; background: var(--gray-50); }
.steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.steps__item {
  text-align: center; padding: 1.25rem; border-radius: 12px;
  transition: transform 0.2s var(--ease-out-expo), background 0.2s;
}
.steps__item:hover {
  transform: translateY(-2px);
  background: rgba(0, 200, 149, 0.04);
}
.steps__icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--green-tint); color: var(--green); border-radius: 12px; margin: 0 auto 1rem;
}
.steps__item h3 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.375rem; color: var(--navy); }
.steps__item p { font-size: 0.8125rem; color: var(--gray-600); line-height: 1.6; }

/* ── Setup Form ──────────────────────── */

.setup { padding: 5rem 0; }

.setup-form {
  max-width: 640px; margin: 2rem auto 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 16px;
  padding: 2rem; box-shadow: 0 8px 30px rgba(9, 59, 95, 0.06); text-align: left;
  transition: box-shadow 0.3s;
}
.setup-form:focus-within { box-shadow: 0 8px 40px rgba(9, 59, 95, 0.10); }

.setup-form__fields { display: grid; gap: 1.25rem; }
.setup-form__field--full { grid-column: 1 / -1; }
.setup-form__label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--navy); margin-bottom: 0.375rem; }
.setup-form__hint { font-weight: 400; color: var(--gray-400); }

.setup-form__input,
.setup-form__textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.9375rem;
  padding: 0.75rem 1rem; border: 1.5px solid var(--gray-200); border-radius: 8px;
  background: var(--white); color: var(--navy); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.setup-form__input:focus,
.setup-form__textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.setup-form__input::placeholder,
.setup-form__textarea::placeholder { color: var(--gray-400); }
.setup-form__textarea { resize: vertical; min-height: 130px; line-height: 1.8; }
.setup-form .btn { margin-top: 1.25rem; }
.setup-form__error { font-size: 0.8125rem; color: var(--red); margin-top: 0.25rem; }

/* ── Results Section ─────────────────── */

.results-section { padding: 3rem 0 4rem; }

/* Per-company block */
.company-block { margin-bottom: 2rem; animation: fadeInUp 0.5s var(--ease-out-expo); }

/* Loading state */
.company-block__loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 3rem 1rem; text-align: center;
}
.company-block__loading[hidden] { display: none; }
.company-block__loading-text {
  font-size: 0.9375rem; color: var(--gray-600); line-height: 1.5;
}
.company-block__loading-text strong { color: var(--navy); }

.loading-dots {
  display: flex; gap: 6px; align-items: center;
}
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Result cards */

.result-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 1.5rem; text-align: left;
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}
.result-card--scoop {
  border-color: var(--green);
  background: var(--green-tint);
  box-shadow: 0 4px 24px rgba(9, 59, 95, 0.08);
}
.result-card__header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.result-card__icon {
  width: 28px; height: 28px; border-radius: 6px; background: var(--green-tint); color: var(--green);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.result-card--scoop .result-card__icon { background: rgba(0, 200, 149, 0.15); }
.result-card__agent {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 400;
  color: var(--navy); letter-spacing: -0.01em;
}

/* Markdown body */
.result-card__body { font-size: 0.875rem; color: var(--gray-800); line-height: 1.75; }
.result-card__body h1,
.result-card__body h2,
.result-card__body h3 { font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; color: var(--navy); margin: 0.75rem 0 0.25rem; }
.result-card__body h1:first-child,
.result-card__body h2:first-child,
.result-card__body h3:first-child { margin-top: 0; }
.result-card__body strong { color: var(--navy); }
.result-card__body a { color: var(--green); text-decoration: underline; }
.result-card__body ul { list-style: none; margin: 0.375rem 0; }
.result-card__body li { position: relative; padding-left: 1rem; margin-bottom: 0.5rem; }
.result-card__body li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.result-card__body p { margin-bottom: 0.5rem; }
.result-card__body p:last-child { margin-bottom: 0; }

.results__strategy { margin-bottom: 1.5rem; }

/* Integrated subscribe CTA inside result card */
.result-card__cta {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 200, 149, 0.2);
  text-align: center;
}
.result-card__cta-text {
  font-size: 0.8125rem; color: var(--gray-600); line-height: 1.6;
  margin-bottom: 1rem; max-width: 400px; margin-left: auto; margin-right: auto;
}
.result-card__cta-text strong { color: var(--navy); }
.result-card__subscribed {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--navy);
}
.result-card__subscribed svg { color: var(--green); }

/* ── Print / PDF ─────────────────────── */

@media print {
  .nav, .hero, .steps, .setup, .footer,
  .company-block__loading, .result-card__cta { display: none !important; }
  .results-section { padding: 0 !important; }
  .result-card { break-inside: avoid; box-shadow: none; border-color: #ddd; }
  body { font-size: 11pt; }
  .company-block { page-break-after: always; }
  .company-block:last-child { page-break-after: auto; }
}

/* ── Footer ──────────────────────────── */

.footer { padding: 2rem 0; border-top: 1px solid var(--gray-200); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; }
.footer__brand { font-size: 0.875rem; display: flex; align-items: center; }
.footer__copy { font-size: 0.75rem; color: var(--gray-400); }

/* ── Responsive ──────────────────────── */

@media (max-width: 768px) {
  .nav__links a:not(.btn) { display: none; }
  .hero { padding: 120px 0 60px; }
  .hero__form { flex-direction: column; }
  .steps__grid { grid-template-columns: repeat(2, 1fr); }
  .setup-form { padding: 1.5rem; }
  .result-card { padding: 1.25rem; }
  .result-card__cta .btn { width: 100%; }
  .footer__inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { padding: 100px 0 48px; }
  .hero__title { font-size: 2rem; }
  .hero__subtitle { font-size: 0.9375rem; }
  .steps { padding: 3rem 0; }
  .steps__grid { grid-template-columns: 1fr; gap: 1rem; }
  .setup { padding: 3rem 0; }
  .setup-form { padding: 1.25rem; }
  .result-card { padding: 1rem; }
  .result-card__body { font-size: 0.8125rem; }
  .nav__inner { height: 56px; }
}

@media (max-width: 375px) {
  .hero__title { font-size: 1.75rem; }
  .btn--lg { padding: 0.875rem 1.5rem; font-size: 0.9375rem; }
  .setup-form { padding: 1rem; border-radius: 12px; }
}
