/* ═══════════════════════════════════════════════════════════
   Universal Prompt Memory — Product Landing Page
   WCAG 2.2 AAA · SEO Optimized · Dark Mode
   Tim Mousel — Evolve AI Institute LLC
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────── */

:root {
  --accent: #435580;
  --accent-hover: #344268;
  --accent-light: #7a9fc8;
  --green: #4a956a;
  --green-hover: #3d7d59;
  --danger: #ef4444;

  --bg: #f8fafc;
  --bg-solid: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-hover: rgba(0,0,0,0.04);
  --bg-accent: rgba(67,85,128,0.06);

  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-pill: 100px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1100px;
  --section-pad: clamp(60px, 8vw, 100px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7a9fc8;
    --accent-hover: #6990b8;
    --accent-light: #a3c0dd;
    --green: #5daf7e;
    --green-hover: #4a956a;

    --bg: #0f1117;
    --bg-solid: #1a1b23;
    --bg-alt: #15161e;
    --bg-hover: rgba(255,255,255,0.06);
    --bg-accent: rgba(43,76,126,0.15);

    --text: #e2e8f0;
    --text-secondary: #b0bec5;
    --text-muted: #8896a6;
    --text-light: #64748b;

    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.12);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow: 0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  }
}

/* ── Reset ────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

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

/* ── Accessibility ────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 14px;
  z-index: 10000;
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout ───────────────────────────────────────────────── */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-pad) 0;
}

/* ── Navigation ───────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-solid);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.site-nav.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.nav-brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none !important;
  transition: background var(--transition), transform var(--transition);
  min-height: 44px;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: clamp(60px, 10vw, 120px) 0 var(--section-pad);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-accent);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-img {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 48px;
  min-width: 48px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(67,85,128,0.25);
}

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

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

.btn-chrome {
  background: var(--accent);
  color: #fff;
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-pill);
}

.btn-chrome:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(67,85,128,0.3);
}

.btn-chrome svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Features ─────────────────────────────────────────────── */

.features {
  background: var(--bg-alt);
}

.section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-accent);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--accent);
}

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

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Screenshots ──────────────────────────────────────────── */

.screenshots {
  background: var(--bg);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.screenshot-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.screenshot-item img {
  width: 100%;
  display: block;
}

.screenshot-caption {
  padding: 12px 16px;
  background: var(--bg-solid);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* ── How It Works ─────────────────────────────────────────── */

.how-it-works {
  background: var(--bg-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step {
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Use Cases ────────────────────────────────────────────── */

.use-cases {
  background: var(--bg);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.use-case {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.use-case-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-accent);
  border-radius: var(--radius-xs);
  font-size: 20px;
}

.use-case h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.use-case p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── CTA Banner ───────────────────────────────────────────── */

.cta-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .cta-banner {
    background: #2a3a5c;
  }
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
}

.cta-banner p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 28px;
  color: #fff;
}

.btn-cta-white {
  background: #fff;
  color: var(--accent);
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.btn-cta-white:hover {
  background: #f1f5f9;
  color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

@media (prefers-color-scheme: dark) {
  .btn-cta-white {
    color: #1e293b;
  }
  .btn-cta-white:hover {
    color: #1e293b;
  }
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-solid);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-brand span {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
}

.footer-copy a {
  color: var(--text-light);
}

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

/* ── Legal Pages (Terms, Privacy) ─────────────────────────── */

.legal-page {
  padding: var(--section-pad) 0;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-content {
  max-width: 720px;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 24px;
  color: var(--text-secondary);
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .screenshots-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-solid);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-links {
    flex-direction: column;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
