/* Keepsake Design System — Web */

:root {
  /* Brand */
  --ks-accent: #c77840;
  --ks-accent-light: #d4945e;
  --ks-accent-dark: #a5602e;

  /* Surfaces */
  --ks-bg: #ffffff;
  --ks-surface: #f5f5f4;
  --ks-cell: #f0efed;

  /* Text */
  --ks-text: #1a1a1a;
  --ks-text-secondary: #6b6b6b;
  --ks-text-tertiary: #999999;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Corners */
  --corner-sm: 6px;
  --corner-md: 10px;
  --corner-lg: 18px;
  --corner-xl: 24px;

  /* Shadows */
  --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-fab: 0 3px 8px rgba(0, 0, 0, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ks-bg: #111111;
    --ks-surface: #1c1c1e;
    --ks-cell: #2c2c2e;
    --ks-text: #f5f5f4;
    --ks-text-secondary: #a1a1a1;
    --ks-text-tertiary: #777777;
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--ks-bg);
  color: var(--ks-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Layout ---- */

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

/* ---- Hero ---- */

.hero {
  text-align: center;
  padding: var(--sp-4xl) var(--sp-lg);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--ks-accent), var(--ks-accent-light));
  border-radius: var(--corner-xl);
  margin-bottom: var(--sp-xl);
  box-shadow: var(--shadow-fab);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon svg {
  width: 52px;
  height: 52px;
  fill: white;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--ks-text-secondary);
  max-width: 480px;
  margin-bottom: var(--sp-2xl);
  line-height: 1.5;
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.app-store-badge:hover {
  opacity: 0.8;
}

.app-store-badge img {
  height: 54px;
}

/* ---- Features ---- */

.features {
  padding: var(--sp-4xl) var(--sp-lg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  max-width: 960px;
  margin: 0 auto;
}

.feature-card {
  background: var(--ks-surface);
  border-radius: var(--corner-lg);
  padding: var(--sp-xl);
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-md);
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--ks-text-secondary);
  line-height: 1.5;
}

/* ---- CTA Banner ---- */

.cta {
  text-align: center;
  padding: var(--sp-4xl) var(--sp-lg);
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-sm);
}

.cta p {
  color: var(--ks-text-secondary);
  margin-bottom: var(--sp-xl);
  font-size: 1.05rem;
}

/* ---- Footer ---- */

footer {
  margin-top: auto;
  border-top: 1px solid var(--ks-cell);
  padding: var(--sp-xl) var(--sp-lg);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-size: 0.85rem;
  color: var(--ks-text-tertiary);
}

.footer-links {
  display: flex;
  gap: var(--sp-lg);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--ks-text-secondary);
  transition: color 0.2s ease;
}

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

/* ---- Legal Pages ---- */

.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-lg) var(--sp-4xl);
}

.legal h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-sm);
}

.legal .last-updated {
  color: var(--ks-text-tertiary);
  font-size: 0.9rem;
  margin-bottom: var(--sp-3xl);
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
}

.legal p {
  color: var(--ks-text-secondary);
  margin-bottom: var(--sp-md);
  line-height: 1.7;
}

.legal ul {
  color: var(--ks-text-secondary);
  margin-bottom: var(--sp-md);
  padding-left: var(--sp-lg);
  line-height: 1.8;
}

.legal a {
  color: var(--ks-accent);
}

.legal a:hover {
  text-decoration: underline;
}

.legal hr {
  border: none;
  border-top: 1px solid var(--ks-cell);
  margin: var(--sp-2xl) 0;
}

/* ---- Nav Bar (legal pages) ---- */

.navbar {
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--ks-cell);
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.navbar a {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--ks-text);
}

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

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }

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

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

  .footer-inner {
    flex-direction: column;
    gap: var(--sp-md);
    text-align: center;
  }
}
