/* ClearFeed Unified Design System */

/* Color Variables */
:root {
  --cf-blue: #009eed;
  --cf-dark: #213847;
  --cf-light-blue: #e8f6fd;
  --cf-border: #213847;
  --cf-muted: #5f6f7a;
  --cf-green: #1f9d55;
  --cf-warning: #fff3cd;
  --cf-warning-border: #f0b429;
  --cf-bg: linear-gradient(180deg, #e7f7ff 0%, #ffffff 42%, #e7f7ff 100%);
}

/* global styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--cf-bg);
  font-family: Helvetica, Arial, sans-serif;
  color: var(--cf-dark);
  line-height: 1.6;
}

/* typography */

h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

p {
  font-size: 16px;
  line-height: 1.6;
}

li {
  font-size: 16px;
  line-height: 1.6;
}

strong {
  font-weight: 700;
}

/* cards */

.hero-card {
  background: white;
  border: 3px solid var(--cf-border);
  border-radius: 8px;
  padding: 36px;
  box-shadow: 0 10px 0 rgba(33, 56, 71, 0.15);
  text-align: center;
  margin-bottom: 32px;
}

.hero-card h1 {
  margin: 0 0 12px;
}

.hero-card p {
  color: var(--cf-muted);
  margin: 0;
}

.hero-logo {
  width: 110px;
  margin-bottom: 18px;
}

.center-card {
  width: 100%;
  max-width: 500px;
  background: white;
  border: 3px solid var(--cf-dark);
  border-radius: 28px;
  padding: 42px 36px;
  text-align: center;
  box-shadow: 0 10px 0 rgba(33, 56, 71, 0.14);
  margin: 0 auto;
}

.center-card h1 {
  font-size: 40px;
  margin-bottom: 12px;
}

.center-card p {
  color: var(--cf-muted);
  font-size: 17px;
  margin-bottom: 28px;
}

.step-card {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: 0 5px 0 rgba(33, 56, 71, 0.12);
}

.step-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.step-number {
  background: var(--cf-blue);
  color: white;
  border: 2px solid var(--cf-border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.step-card h2 {
  margin: 0;
}

.step-card p,
.step-card li {
  margin-bottom: 12px;
}

.step-card ul,
.step-card ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

/* buttons */

.primary-button,
.secondary-button {
  display: inline-block;
  margin-top: 14px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--cf-border);
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.2);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.primary-button {
  background: var(--cf-blue);
  color: white;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(33, 56, 71, 0.25);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.2);
}

.primary-button.disabled {
  background: #c9d2d8;
  color: #667782;
  pointer-events: none;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  background: white;
  color: var(--cf-dark);
}

.secondary-button:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(33, 56, 71, 0.25);
}

.secondary-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.2);
}

.button-full-width {
  width: 100%;
  display: block;
  text-align: center;
  padding: 16px 24px;
}

/* banners */

.banner {
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 16px;
  border: 2px solid;
}

.banner-success {
  background: #e9f8ef;
  border-color: var(--cf-green);
  color: #14532d;
}

.banner-warning {
  background: var(--cf-warning);
  border-color: var(--cf-warning-border);
  color: #213847;
}

/* Notes */

.note,
.mini-note {
  background: var(--cf-light-blue);
  padding: 14px 16px;
  margin-top: 14px;
  border-radius: 4px;
  font-size: 14px;
}

/* FAQs */

.faq-section {
  margin-top: 36px;
}

.faq-section h2 {
  font-size: 30px;
  margin-bottom: 18px;
}

details {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
}

details[open] {
  background: #f9f9f9;
}

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--cf-dark);
  user-select: none;
}

details p {
  margin-top: 12px;
  margin-bottom: 0;
}

/* layour wrappers */

.onboarding-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.center-wrapper {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* forms */

form {
  margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 2px solid var(--cf-border);
  border-radius: 6px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--cf-dark);
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--cf-blue);
  box-shadow: 0 0 0 3px rgba(0, 158, 237, 0.1);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--cf-dark);
}

/* ========================================
   Form Validation & Help Text
   ======================================== */

.errorlist {
  list-style: none;
  padding: 12px 14px;
  background: #e9f8ef;
  border: 2px solid var(--cf-green);
  border-radius: 8px;
  color: #14532d;
  margin-bottom: 18px;
  font-size: 14px;
}

.errorlist li {
  margin-bottom: 8px;
}

.errorlist li:last-child {
  margin-bottom: 0;
}

.helptext {
  display: block;
  font-size: 13px;
  color: var(--cf-muted);
  margin-top: 4px;
  margin-bottom: 12px;
}

.fieldWrapper {
  margin-bottom: 16px;
}

/* links */

a {
  color: var(--cf-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.nav-link {
  color: var(--cf-dark);
  text-decoration: none;
  font-weight: 600;
}

a.nav-link:hover {
  color: var(--cf-blue);
}

/* utility classes */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--cf-muted);
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.gap-lg { gap: 24px; }

/* privacy page styles */

.privacy-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 20px 80px;
}

.privacy-header {
  text-align: center;
  margin-bottom: 50px;
}

.privacy-header h1 {
  font-size: 44px;
  margin-bottom: 16px;
}

.privacy-header p {
  font-size: 18px;
  color: var(--cf-muted);
}

.privacy-section {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

.privacy-section h2 {
  color: var(--cf-blue);
  font-size: 24px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cf-light-blue);
}

.privacy-section p {
  margin-bottom: 14px;
  line-height: 1.8;
  color: var(--cf-dark);
}

.privacy-section ul {
  margin-left: 24px;
  margin-bottom: 14px;
}

.privacy-section li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.privacy-highlight {
  background: var(--cf-light-blue);
  border-left: 4px solid var(--cf-blue);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 6px;
}

.privacy-highlight strong {
  color: var(--cf-blue);
}

.privacy-contact {
  background: linear-gradient(135deg, #e7f7ff 0%, #f0fbff 100%);
  border: 2px solid var(--cf-blue);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
  margin-top: 40px;
}

.privacy-contact h2 {
  border: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}

.privacy-contact p {
  font-size: 16px;
  margin-bottom: 18px;
}

/* landing page style */

.landing-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.landing-hero {
  text-align: center;
  margin-bottom: 60px;
}

.landing-hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.landing-hero-subtitle {
  font-size: 18px;
  color: var(--cf-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.landing-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 50px;
}

.content-block {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

.content-block h2 {
  color: var(--cf-blue);
  font-size: 22px;
  margin-bottom: 14px;
}

.content-block p {
  color: var(--cf-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* signup page styles */

.signup-logo {
  width: 95px;
  display: block;
  margin: 0 auto 18px;
}

.signup-title {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
}

.signup-subtitle {
  text-align: center;
  color: var(--cf-muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.signup-button {
  width: 100%;
  background: var(--cf-blue);
  color: white;
  border: 2px solid var(--cf-dark);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 800;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.18);
}

.signup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(33, 56, 71, 0.25);
}

.signup-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.18);
}

.login-link {
  text-align: center;
  margin-top: 22px;
  font-size: 15px;
  color: var(--cf-muted);
}

.login-link a {
  color: var(--cf-blue);
  text-decoration: none;
  font-weight: 700;
}

.login-link a:hover {
  text-decoration: underline;
}

.helptext {
  font-size: 13px;
  color: var(--cf-muted);
  margin-top: -8px;
  margin-bottom: 14px;
}

.errorlist {
  list-style: none;
  padding: 12px 14px;
  background: #fde8e8;
  border: 1px solid #f5b5b5;
  border-radius: 10px;
  color: #9b1c1c;
  margin-bottom: 18px;
}

/* User scroll */

.deck {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.page {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 60px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content {
  width: 100%;
  max-width: 1000px;
}

/* Viz 1: Topics */
.page-topics {
  background: var(--cf-bg);
}

.page-topics h1 {
  text-align: center;
  font-size: 44px;
  margin-bottom: 40px;
  color: var(--cf-dark);
}

.chart-card {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

#barChart {
  width: 100%;
  min-height: 500px;
}

/* Viz 2: Promoted */
.page-promoted {
  background: linear-gradient(135deg, #f0fbff 0%, #ffffff 100%);
}

.promoted-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.dollar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

.dollar-svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  opacity: 0;
  transition: opacity 0.8s ease-in;
}

.dollar-svg.visible {
  opacity: 1;
}

.fill-rect {
  transition: y 2s cubic-bezier(0.65, 0, 0.35, 1),
              height 2s cubic-bezier(0.65, 0, 0.35, 1);
}

.promoted-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.text-block {
  font-size: 18px;
  line-height: 1.8;
  color: var(--cf-dark);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.text-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-block strong {
  color: var(--cf-blue);
  font-weight: 800;
}

.users-list {
  list-style: none;
  margin-top: 16px;
  padding-left: 20px;
}

.users-list li {
  font-size: 16px;
  padding: 8px 0;
  color: var(--cf-dark);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.users-list li.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Viz 3: Sentiment */
.page-sentiment {
  background: var(--cf-bg);
}

.sentiment-content {
  max-width: 900px;
  margin: 0 auto;
}

.sentiment-header {
  text-align: center;
  margin-bottom: 40px;
}

.sentiment-header h1 {
  font-size: 44px;
  color: var(--cf-dark);
  margin-bottom: 12px;
}

.sentiment-header p {
  color: var(--cf-muted);
  font-size: 16px;
}

.summary-card {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

.summary-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--cf-dark);
}

.summary-text .num {
  color: var(--cf-blue);
  font-weight: 800;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  margin: 0 4px;
  border: 2px solid;
}

.tag.positive {
  background: #e9f8ef;
  border-color: var(--cf-green);
  color: #14532d;
}

.tag.negative {
  background: #fde8e8;
  border-color: #f5b5b5;
  color: #9b1c1c;
}

.tag.neutral {
  background: var(--cf-light-blue);
  border-color: var(--cf-blue);
  color: var(--cf-dark);
}

.blurb {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--cf-light-blue);
  font-size: 14px;
  color: var(--cf-muted);
  font-style: italic;
}

.dial-card {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

.dial-svg {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
}

.needle {
  transform-origin: 300px 220px;
  transform: rotate(-90deg);
  transition: transform 1400ms cubic-bezier(0.34, 1.2, 0.64, 1);
}

.scale-row {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin: 24px auto 0;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-muted);
}

/* Viz 4: Word Cloud */
.page-wordcloud {
  background: var(--cf-bg);
}

.wordcloud-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

.wordcloud-header {
  text-align: center;
  margin-bottom: 40px;
}

.wordcloud-header h1 {
  font-size: 44px;
  color: var(--cf-dark);
  margin-bottom: 12px;
}

.wordcloud-header p {
  color: var(--cf-muted);
  font-size: 16px;
}

.wordcloud-container {
  background: white;
  border: 2px solid var(--cf-border);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 0 rgba(33, 56, 71, 0.08);
}

#wordcloud {
  width: 100%;
  height: 500px;
  background: var(--cf-light-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wordcloud svg {
  max-width: 100%;
  height: auto;
}

.word-text {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.word-text:hover {
  opacity: 0.7;
}

.tooltip {
  position: fixed;
  background: rgba(33, 56, 71, 0.95);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
  white-space: nowrap;
}

.tooltip.visible {
  opacity: 1;
}

/* responsive design */

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 20px;
  }

  .hero-card {
    padding: 24px;
  }

  .center-card {
    padding: 32px 24px;
  }

  .step-card {
    padding: 18px;
  }

  .onboarding-wrapper {
    padding: 32px 16px 60px;
  }

  .step-header {
    gap: 12px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .page {
    padding: 40px 16px;
  }

  .page-topics h1,
  .sentiment-header h1,
  .wordcloud-header h1 {
    font-size: 32px;
  }

  .promoted-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dollar-container {
    padding: 24px;
  }

  .dollar-svg {
    max-width: 200px;
  }

  .text-block {
    font-size: 16px;
  }

  .chart-card,
  .summary-card,
  .dial-card,
  .wordcloud-container {
    padding: 24px;
  }

  #barChart {
    min-height: 400px;
  }

  #wordcloud {
    height: 400px;
  }

  .landing-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .landing-cta {
    flex-direction: column;
    gap: 12px;
  }

  .landing-cta .primary-button,
  .landing-cta .secondary-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 18px;
  }

  .hero-card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .center-card {
    padding: 24px;
    border-radius: 20px;
  }

  .step-card {
    padding: 16px;
    margin-bottom: 16px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    padding: 12px 16px;
  }

  .onboarding-wrapper {
    padding: 24px 12px 48px;
  }

  .page {
    padding: 32px 12px;
  }

  .page-topics h1,
  .sentiment-header h1,
  .wordcloud-header h1 {
    font-size: 28px;
  }

  .text-block,
  .summary-text {
    font-size: 14px;
  }

  .users-list li {
    font-size: 14px;
  }
}

.page-intro {
  background: var(--cf-bg);
}

.intro-card {
  background: white;
  border: 3px solid var(--cf-border);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 10px 0 rgba(33, 56, 71, 0.14);
  max-width: 620px;
  margin: 0 auto;
}

.intro-card h1 {
  font-size: 44px;
  color: var(--cf-dark);
  margin-bottom: 20px;
}

.intro-card p {
  color: var(--cf-muted);
  font-size: 17px;
  line-height: 1.7;
}

/* Scroll Navigator */
.scroll-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
}

.scroll-nav-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--cf-dark);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 56, 71, 0.1);
    position: relative;
}

.scroll-nav-dot::after {
    content: attr(title);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--cf-dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.scroll-nav-dot:hover::after {
    opacity: 1;
}

.scroll-nav-dot:hover {
    background: var(--cf-dark);
    transform: scale(1.2);
}

.scroll-nav-dot.active {
    background: var(--cf-dark);
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .scroll-nav {
        left: 12px;
        gap: 12px;
    }

    .scroll-nav-dot::after {
        left: 20px;
        font-size: 11px;
    }
}

/* Logout Button */
.logout-btn {
  background: none;
  border: none;
  color: #9d9d9d;
  text-decoration: none;
  font-weight: 400;
  cursor: pointer;
  font-size: 16px;
  padding: 14px 0;
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  transition: color 0.2s ease;
}

.logout-btn:hover {
  color: white;
  text-decoration: none;
}

.logout-btn:focus {
  outline: none;
}

/* Navbar Logo */
.navbar-logo {
  height: 30px;
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 4px;
}