/* ==========================================================================
   Nudge Marketing Website — style.css
   ========================================================================== */

/* --- Design Tokens (Light Mode Default) --- */
:root {
  --bg-primary: #faf9f7;
  --bg-secondary: #f0eeeb;
  --text-primary: #2c2c2c;
  --text-secondary: #6b6560;
  --text-muted: #9b958f;
  --accent: #5a9e72;
  --accent-light: #82b894;
  --accent-hover: #4e8c64;
  --border: #e0dcd7;
  --shadow: rgba(0, 0, 0, 0.04);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --text-base: 1.125rem;
  --line-height: 1.6;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --radius: 12px;
  --radius-sm: 8px;
  --content-width: 48rem;
}

/* --- Dark Mode (Manual Toggle) --- */
[data-theme="dark"] {
  --bg-primary: #1a1918;
  --bg-secondary: #242220;
  --text-primary: #f2efeb;
  --text-secondary: #bdb5ab;
  --text-muted: #8a8078;
  --accent: #6db882;
  --accent-light: #4a8a60;
  --accent-hover: #7ec992;
  --border: #353230;
  --shadow: rgba(0, 0, 0, 0.2);
}


/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--accent);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Layout --- */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-surface {
  background: var(--bg-secondary);
}

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

p {
  color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
}

.btn-sm {
  padding: 0.5em 1em;
  font-size: 0.875rem;
}

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo img {
  width: 28px;
  height: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* --- Nav Icon Links --- */
.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-icon-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.nav-icon-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* --- Theme Toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

.theme-toggle.is-dark .icon-moon { display: block; }
.theme-toggle.is-dark .icon-sun { display: none; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 280px;
  height: auto;
  margin-bottom: var(--space-lg);
}

.hero-tagline {
  font-size: 1.75rem;
  font-weight: 700;
  max-width: 28ch;
  margin-bottom: var(--space-sm);
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

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

/* --- What is Nudge --- */
.what-content {
  max-width: 38rem;
}

.what-content p {
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.what-content p:last-child {
  margin-bottom: 0;
}

/* --- Feature Cards (Built for ADHD) --- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.feature-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 1px 3px var(--shadow);
}

.section-surface .feature-card {
  background: var(--bg-primary);
}

.feature-card h3 {
  color: var(--accent);
}

.feature-card p {
  font-size: 0.95rem;
}

/* --- How It Works (Steps) --- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
  margin-bottom: var(--space-xs);
}

.step h3 {
  color: var(--text-primary);
}

.step p {
  font-size: 0.95rem;
}

/* --- Tech Details (Collapsible) --- */
.tech-details {
  max-width: 38rem;
}

.tech-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  gap: var(--space-sm);
}

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

.tech-details summary::marker {
  display: none;
  content: '';
}

.tech-details summary h2 {
  margin-bottom: 0;
}

.details-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .details-icon {
    transition: none;
  }
}

.tech-details[open] .details-icon {
  transform: rotate(180deg);
}

.tech-content {
  margin-top: var(--space-md);
}

.tech-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.tech-content li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tech-content li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.55em;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.footer-tagline {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-license {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Responsive: Tablet (600px+) --- */
@media (min-width: 600px) {
  .hero-tagline {
    font-size: 2.25rem;
  }

  .hero-logo {
    width: 360px;
  }

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

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

  h2 {
    font-size: 2rem;
  }
}

/* --- Responsive: Desktop (900px+) --- */
@media (min-width: 900px) {
  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero-tagline {
    font-size: 2.5rem;
  }

  .hero-logo {
    width: 440px;
  }

  .hero-description {
    font-size: 1.3rem;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
