/* =============================================
   PushList — Design Tokens & Component Styles
   ============================================= */

/* --- Type Scale (fluid) --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* --- Spacing (4px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* --- Transition --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* --- Fonts --- */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* =============================================
   PushList Brand Palette — Dark-first, green accent
   ============================================= */

:root {
  /* Surfaces — deep charcoal with warm undertones */
  --color-bg:             #0c0f0e;
  --color-surface:        #131716;
  --color-surface-2:      #1a1f1d;
  --color-surface-offset: #161b19;
  --color-surface-offset-2: #1e2422;
  --color-surface-dynamic: #252b29;
  --color-divider:        #2a312e;
  --color-border:         #343b38;

  /* Text */
  --color-text:           #e8e6e1;
  --color-text-muted:     #9a9892;
  --color-text-faint:     #5e5d58;
  --color-text-inverse:   #0c0f0e;

  /* Primary — forest green */
  --color-primary:        #3db86a;
  --color-primary-hover:  #2fa058;
  --color-primary-active: #258a4a;
  --color-primary-highlight: #1a3426;

  /* Warning */
  --color-warning:        #d4942a;
  --color-warning-hover:  #b87e20;
  --color-warning-active: #9a6818;
  --color-warning-highlight: #3d3020;

  /* Error */
  --color-error:          #d94f4f;
  --color-error-hover:    #c43c3c;
  --color-error-active:   #a82e2e;
  --color-error-highlight: #3d2020;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}



/* =============================================
   Layout
   ============================================= */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

.container--narrow {
  max-width: var(--content-default);
}

/* =============================================
   Header
   ============================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-4) 0;
  background: oklch(from var(--color-bg) l c h / 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--scrolled {
  box-shadow: 0 1px 0 var(--color-divider);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .header__nav { display: flex; }
}

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-interactive);
}

.header__nav a:hover {
  color: var(--color-text);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-dynamic);
}

/* =============================================
   Hero
   ============================================= */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(from var(--color-bg) l c h / 0.97) 0%,
    oklch(from var(--color-bg) l c h / 0.90) 35%,
    oklch(from var(--color-bg) l c h / 0.55) 65%,
    oklch(from var(--color-bg) l c h / 0.25) 100%
  );
}

@media (max-width: 767px) {
  .hero__bg::after {
    background: linear-gradient(
      to bottom,
      oklch(from var(--color-bg) l c h / 0.70) 0%,
      oklch(from var(--color-bg) l c h / 0.90) 60%,
      oklch(from var(--color-bg) l c h / 0.97) 100%
    );
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding-block: var(--space-24);
}

@media (max-width: 767px) {
  .hero {
    min-height: 90vh;
    align-items: flex-end;
  }
  .hero__content {
    padding-block: var(--space-12) var(--space-8);
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.hero__title-accent {
  color: var(--color-primary);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-8);
  max-width: 520px;
  opacity: 0.85;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}

/* =============================================
   Sections
   ============================================= */

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section--alt {
  background: var(--color-surface);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--space-10);
}

/* =============================================
   Problem Section — asymmetric 2-col
   ============================================= */

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.problem__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.problem__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.problem__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.stat-card {
  padding: var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* =============================================
   Solution Section
   ============================================= */

.solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .solution-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .solution-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.solution-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.solution-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.solution-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.solution-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.solution-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =============================================
   How It Works — Steps
   ============================================= */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.step {
  counter-increment: step;
  position: relative;
}

.step__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary-highlight);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Connector line between steps */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    right: calc(-1 * var(--space-3));
    width: var(--space-6);
    height: 2px;
    background: var(--color-divider);
  }
}

/* =============================================
   Full-bleed Image Moment
   ============================================= */

.full-bleed {
  position: relative;
  overflow: hidden;
  max-height: 400px;
}

.full-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.full-bleed__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(from var(--color-bg) l c h / 0.60) 0%,
    oklch(from var(--color-bg) l c h / 0.85) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
}

.full-bleed__text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  max-width: 700px;
  line-height: 1.3;
}

.full-bleed__text span {
  color: var(--color-primary);
}

/* =============================================
   Market Section
   ============================================= */

.market-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .market-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.market-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
}

.market-card__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.market-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.market-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =============================================
   Technology Section
   ============================================= */

.tech-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .tech-list {
    grid-template-columns: 1fr 1fr;
  }
}

.tech-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
}

.tech-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  margin-top: 2px;
}

.tech-item__name {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.tech-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* =============================================
   CTA Section
   ============================================= */

.cta-section {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  text-align: center;
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.cta-section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* =============================================
   Footer
   ============================================= */

.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-divider);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.footer__brand-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__links {
  display: flex;
  gap: var(--space-4);
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__links a:hover {
  color: var(--color-text);
}

/* =============================================
   Scroll Animations
   ============================================= */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Fallback for browsers without scroll-driven animations */
@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .fade-in.visible {
    opacity: 1;
  }
}

/* =============================================
   Mobile menu
   ============================================= */

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}

.mobile-menu-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-dynamic);
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: var(--space-20) var(--space-6);
}

.mobile-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.mobile-nav__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

/* =============================================
   Responsive tweaks
   ============================================= */

@media (max-width: 639px) {
  .stat-card__number {
    font-size: var(--text-lg);
  }
}
