@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===================================================================
   Light theme defaults (used by authenticated pages: dashboard, etc.)
   =================================================================== */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #f97316;
  --background-color: #f3f4f6;
  --text-color: #1f2937;
  --text-light-color: #6b7280;
  --border-color: #e5e7eb;
  --white: #ffffff;

  --font-family-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================================================
   Dark theme — scoped to public pages via .landing-page on <main>
   =================================================================== */

/* When .landing-page is present, override body background via a
   full-bleed wrapper approach. The body stays light for auth pages;
   the dark background is applied to the landing-page main + footer. */
body:has(.landing-page) {
  background-color: #0a0a0b;
  color: #e5e7eb;
}

main.landing-page {
  flex: 1;
  background-color: #0a0a0b;
  color: #e5e7eb;
}

/* --- Logo --- */
.logo {
  max-width: 250px;
  height: auto;
}

/* --- Hero --- */
.hero-section {
  text-align: center;
  padding: 120px 0 80px 0;
  background: #0a0a0b;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind hero */
.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #9ca3af;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
}

.hero-cta {
  position: relative;
}

/* --- How It Works --- */
.how-it-works-section {
  padding: 80px 0;
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.how-it-works-section .section-title {
  text-align: center;
  color: #f9fafb;
  font-size: 2rem;
  margin-bottom: 3.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.step-item {
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 0.5rem;
}

.step-description {
  font-size: 0.95rem;
  color: #9ca3af;
  line-height: 1.6;
}

/* Connector lines between steps */
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  right: -1rem;
  width: 2rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

/* --- Features --- */
.features-section {
  padding: 100px 0;
  background: #0a0a0b;
}

.features-section .section-title {
  text-align: center;
  color: #f9fafb;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.feature-item {
  background: #141416;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.feature-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  margin-bottom: 1.25rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  color: #60a5fa;
}

.feature-icon svg {
  height: 24px;
  width: 24px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f9fafb;
}

.feature-description {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Evaluation Mockup --- */
.evaluation-section {
  padding: 100px 0;
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.evaluation-section .section-title {
  color: #f9fafb;
}

.evaluation-mockup {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.mockup-header {
  background: #1a1a1e;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-header .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a2a2e;
}

.mockup-header .dot:nth-child(1) {
  background: #ff5f57;
}
.mockup-header .dot:nth-child(2) {
  background: #febc2e;
}
.mockup-header .dot:nth-child(3) {
  background: #28c840;
}

.mockup-header-title {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: #6b7280;
  margin-left: 0.5rem;
}

.mockup-body {
  padding: 1.5rem;
  font-family: var(--font-family-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #d1d5db;
}

.mockup-body .eval-title {
  color: #60a5fa;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.mockup-body .eval-meta {
  color: #6b7280;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.mockup-body .eval-text {
  color: #d1d5db;
}

.mockup-body .eval-highlight {
  color: #34d399;
}

/* --- Social Proof --- */
.social-proof-section {
  padding: 80px 0;
  background: #0a0a0b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.social-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 3.5rem;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-item {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
}

.testimonial-text {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  color: #6b7280;
  font-size: 0.85rem;
}

/* --- Security --- */
.security-section {
  padding: 80px 0;
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.security-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.security-text {
  flex-basis: 65%;
}

.security-text .section-title {
  text-align: left;
  margin-bottom: 1.5rem;
  color: #f9fafb;
}

.security-text p {
  color: #9ca3af;
  font-size: 1.05rem;
  line-height: 1.7;
}

.security-icon {
  flex-basis: 25%;
  text-align: center;
  color: #60a5fa;
}

.security-icon svg {
  width: 80px;
  height: 80px;
}

/* --- Section Title (shared) --- */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

/* --- Footer (dark for public pages) --- */
body:has(.landing-page) .footer {
  background-color: #0a0a0b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #6b7280;
}

body:has(.landing-page) .footer a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

body:has(.landing-page) .footer a:hover {
  color: #f9fafb;
}

/* Default footer (light, for auth pages) */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: #6c757d;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand .strava-logo {
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-brand .strava-logo:hover {
  opacity: 1;
}

.footer-links {
  text-align: right;
}

.footer-links a {
  text-decoration: none;
}

/* --- Support Page (dark) --- */
.support-content-section {
  padding: 40px 0;
}

.support-content-section .section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #f9fafb;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  color: #f9fafb;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: #6b7280;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p,
.faq-item ol,
.faq-item ul {
  padding: 0 1.5rem 1.25rem 1.5rem;
  margin: 0;
  color: #9ca3af;
  line-height: 1.7;
  font-size: 0.95rem;
}

.faq-item a {
  color: #60a5fa;
  text-decoration: none;
}

.faq-item a:hover {
  text-decoration: underline;
}

.troubleshooting-steps {
  padding-left: 1.25rem;
}

.troubleshooting-steps li {
  margin-bottom: 0.5rem;
}

/* --- Changelog (dark) --- */
.changelog-entry {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.changelog-entry:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.changelog-date {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.changelog-entry-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 0.5rem;
}

.changelog-summary {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
}

.changelog-tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.changelog-tag-new {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.changelog-tag-improvement {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.changelog-tag-fix {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}

/* --- Landing: What's New Section --- */
.whats-new-section {
  padding: 80px 0;
  background: #0a0a0b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.whats-new-section .section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}

.whats-new-subtitle {
  text-align: center;
  color: #9ca3af;
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.whats-new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.whats-new-grid .changelog-entry {
  margin-bottom: 0;
}

.whats-new-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.whats-new-cta a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s;
}

.whats-new-cta a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .whats-new-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

/* --- CTA Button --- */
.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.cta-button:hover {
  background-color: #2563eb;
}

/* --- Animations --- */
.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.eval-line {
  opacity: 0;
  animation: typeIn 0.3s forwards;
}

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .step-item:not(:last-child)::after {
    display: none;
  }

  .security-content {
    flex-direction: column;
    text-align: center;
  }

  .security-text .section-title {
    text-align: center;
  }

  .social-stats {
    flex-direction: column;
    gap: 2rem;
  }

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

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

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  .hero-section {
    padding: 80px 0 60px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .features-section,
  .evaluation-section,
  .social-proof-section,
  .security-section,
  .how-it-works-section,
  .whats-new-section {
    padding: 60px 0;
  }

  .mockup-body {
    font-size: 0.8rem;
    padding: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* ===================================================================
   Landing-page CTA — large, branded "Get started" button
   =================================================================== */
.cta-button {
  display: inline-block;
  padding: 16px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.cta-button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.5);
  color: #ffffff;
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

/* ===================================================================
   Auth pages — /login and /signup/profile
   Uses the default light theme so it pairs visually with the dashboard.
   =================================================================== */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 4px 24px rgba(17, 24, 39, 0.06);
  text-align: center;
}

.auth-logo {
  width: 64px;
  height: auto;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-color);
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-light-color);
  margin: 0 0 24px;
  line-height: 1.5;
}

.auth-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-align: left;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.auth-form-hidden {
  display: none;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color);
  margin-top: 4px;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font-family-sans);
  color: var(--text-color);
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.auth-code-input {
  font-family: var(--font-family-mono);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 14px 12px;
}

.auth-sent {
  font-size: 0.9rem;
  color: var(--text-light-color);
  margin: 0 0 8px;
  line-height: 1.5;
}

.auth-form-error {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.auth-submit {
  display: inline-block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-family-sans);
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
}

.auth-submit:hover {
  background: #2563eb;
  color: var(--white);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-link-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  font-family: var(--font-family-sans);
}

.auth-link-button:hover {
  text-decoration: underline;
}

.auth-link-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}
