/* Credible Technologies Apps - Mave-inspired design */
:root {
  --bg: #0a0a0a;
  --bg-alt: #111;
  --fg: #f5f5f5;
  --fg-muted: #a3a3a3;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --border: rgba(255,255,255,0.08);
  --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --space: clamp(1.5rem, 4vw, 4rem);
  --container: min(1200px, 100vw - 2rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Typography */
h1, .hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.condensed-headline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.9;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: var(--space) 0;
  position: relative;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s;
}
.site-header.scrolled {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--fg);
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--fg); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
  padding-bottom: 4rem;
}
.hero .condensed-headline {
  margin-bottom: 1rem;
  opacity: 0.7;
}
.hero-title {
  margin-bottom: 1.5rem;
  max-width: 14ch;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--fg-muted);
  max-width: 42ch;
  margin-bottom: 2rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-2px);
}

.featured-today {
  margin-top: 1.75rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.featured-today-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: rgba(248, 250, 252, 0.7);
}
.featured-today a {
  color: var(--accent);
  font-weight: 600;
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Section with alternating background */
.section-dark { background: var(--bg); }
.section-alt { background: var(--bg-alt); }

/* Two-column block (Mave-style) */
.block-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space);
  align-items: center;
}
@media (max-width: 768px) {
  .block-split { grid-template-columns: 1fr; }
}
.block-split .section-title {
  margin-bottom: 1rem;
}
.block-split p {
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* Feature pills */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* App grid */
.apps-section .section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.apps-section .section-subtitle {
  text-align: center;
  color: var(--fg-muted);
  margin-bottom: var(--space);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}
.suggested-text {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.app-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.app-card:hover .app-card-title { color: var(--accent); }
.app-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
  display: block;
}
.app-card-icon-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}
.app-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.app-card-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
}
.app-card-cta {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: auto;
}
.app-card-cta::after {
  content: ' →';
}

/* Steps (Ready, Set, Go style) */
.steps-section .section-title {
  text-align: center;
  margin-bottom: var(--space);
}
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .steps-list { grid-template-columns: 1fr; }
}
.step-item {
  text-align: center;
}
.step-num {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.step-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.step-item p {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* Stats strip */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  padding: var(--space) 0;
}
.stat {
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  display: block;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* Marquee (logo strip) */
.marquee-wrap {
  overflow: hidden;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.marquee {
  display: flex;
  gap: 4rem;
  animation: marquee 30s linear infinite;
}
.marquee span {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg-muted);
  white-space: nowrap;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: calc(var(--space) * 2) 0;
}
.cta-section .section-title {
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  padding: var(--space) 0;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
.site-footer .logo { font-size: 1.25rem; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a { color: var(--fg-muted); font-size: 0.9rem; }
.footer-legal {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* App detail page */
.app-detail-hero {
  padding-top: 6rem;
  padding-bottom: 3rem;
}
.app-detail-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.app-detail-hero .breadcrumb a { color: var(--fg-muted); }
.app-detail-hero .breadcrumb a:hover { color: var(--fg); }
.app-detail-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}
.app-detail-icon-img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
}
.app-screenshots {
  margin-top: 2rem;
}
.app-screenshots h3 {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.app-screenshots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.app-screenshot {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.app-detail-hero .section-title { margin-bottom: 0.5rem; }
.app-detail-tagline {
  color: var(--fg-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.app-detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s;
}
.app-detail-cta:hover { background: var(--accent-hover); color: var(--bg); }
.app-detail-body {
  max-width: 720px;
  margin: 0 auto;
}
.app-detail-body p {
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}

/* Article redirect page */
.redirect-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.redirect-page h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.redirect-page p { color: var(--fg-muted); margin-bottom: 1rem; }
.redirect-page a { text-decoration: underline; }

/* 404 handling for SPA-style app subpages (optional fallback) */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .marquee { animation: none; }
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .site-header .container {
    padding: 0.5rem 0.9rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .nav-links {
    gap: 1.25rem;
  }
  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
  h1, .hero-title {
    font-size: clamp(2.3rem, 8vw, 3.3rem);
    line-height: 1.15;
  }
  .hero-subtitle {
    max-width: 34ch;
  }
  .featured-today {
    display: block;
    text-align: left;
    line-height: 1.5;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
  .app-card {
    padding: 1.25rem;
  }

  .steps-list {
    gap: 1.5rem;
  }

  .marquee span {
    font-size: 1.05rem;
    gap: 2rem;
  }

  .stats-strip {
    gap: 2rem;
  }
}
