/* Sprig website — shared styles */

:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-900: #14532d;

  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-500: #78716c;
  --gray-700: #44403c;
  --gray-900: #1c1917;

  --bg: #ffffff;
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --accent: var(--green-600);
  --accent-hover: var(--green-700);
  --accent-soft: var(--green-50);

  --max-width: 1100px;
  --radius: 12px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --text: #fafaf9;
    --text-muted: #a8a29e;
    --border: #292524;
    --accent: #4ade80;
    --accent-hover: #22c55e;
    --accent-soft: #14532d;
  }
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(12, 10, 9, 0.85);
  }
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 8px;
  color: white;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}

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

@media (max-width: 640px) {
  .nav-links {
    gap: 20px;
  }
  .nav-links a {
    font-size: 14px;
  }
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--text);
}

/* Phone mockup */
.phone-display {
  margin: 64px auto 0;
  max-width: 320px;
  aspect-ratio: 9/19;
  background: linear-gradient(135deg, var(--green-100) 0%, var(--green-50) 100%);
  border-radius: 40px;
  border: 8px solid var(--gray-900);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .phone-display {
    background: linear-gradient(135deg, #14532d 0%, #052e16 100%);
    border-color: #44403c;
  }
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 64px;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .feature-card {
    background: #1c1917;
  }
}

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

.feature-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

/* FAQ */
.faq-list {
  max-width: 720px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-q {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq-q::after {
  content: '+';
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
}

details[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA section */
.cta-section {
  text-align: center;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: 80px 32px;
  margin: 0 24px;
}

@media (prefers-color-scheme: dark) {
  .cta-section {
    background: #052e16;
  }
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 100px;
}

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

.footer-brand {
  max-width: 280px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.5;
}

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

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 10px;
  transition: color 0.15s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* Legal pages (privacy, terms) */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px;
}

.legal-page h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-page .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 48px;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal-page p,
.legal-page li {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 16px;
}

.legal-page ul,
.legal-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page strong {
  font-weight: 600;
}

.legal-page a {
  color: var(--accent);
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 32px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text);
}

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

  .section {
    padding: 60px 0;
  }

  .cta-section {
    padding: 60px 24px;
    margin: 0 16px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    gap: 32px;
  }
}
