/* Lusis — Nordic Forest theme
 * Colors match constants/Colors.ts in the mobile app.
 */

:root {
  --bg: #F5F2EC;          /* birch white */
  --card: #FFFFFF;
  --text: #2D2D2D;
  --text-secondary: #6B7C6F;  /* lichen */
  --tint: #2E5A3E;        /* deep forest green */
  --tint-soft: #7FB895;   /* sage */
  --border: #D8DDD5;
  --accent: #C8964E;      /* warm amber */
  --shadow: rgba(46, 90, 62, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A2420;
    --card: #243028;
    --text: #F0EDE7;
    --text-secondary: #9BA89E;
    --tint: #7FB895;
    --tint-soft: #2E5A3E;
    --border: #344038;
    --accent: #C8964E;
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

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

html {
  scroll-behavior: smooth;
}

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

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

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px;
}

header.site-header {
  text-align: center;
  padding: 48px 20px 32px;
}

header.site-header .logo {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px var(--shadow);
}

header.site-header h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--tint);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

header.site-header .tagline {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
}

main {
  padding: 0 20px 64px;
}

/* ── Prose (privacy/terms pages) ────────────────────────── */

article.prose {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 40px;
  box-shadow: 0 2px 8px var(--shadow);
}

@media (max-width: 640px) {
  article.prose {
    padding: 28px 20px;
    border-radius: 12px;
  }
}

article.prose h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--tint);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

article.prose .updated {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  margin-bottom: 24px;
}

article.prose h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--tint);
  margin-top: 32px;
  margin-bottom: 12px;
}

article.prose h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

article.prose p {
  margin-bottom: 14px;
  color: var(--text);
}

article.prose ul,
article.prose ol {
  margin: 12px 0 18px 24px;
}

article.prose li {
  margin-bottom: 6px;
  color: var(--text);
}

article.prose li strong {
  color: var(--tint);
}

article.prose a {
  color: var(--tint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

article.prose code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

article.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

article.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ── Landing page specific ──────────────────────────────── */

.hero {
  text-align: center;
  padding: 32px 20px 48px;
}

.hero .pitch {
  font-size: 20px;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.hero .subpitch {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 32px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 880px;
  margin: 48px auto 0;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 2px 6px var(--shadow);
}

.feature h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--tint);
  margin-bottom: 6px;
}

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

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cta {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Keyboard focus: consistent visible outline for all interactive elements.
   Uses :focus-visible so mouse clicks don't show a ring, only keyboard nav. */
.cta:focus-visible,
article.prose a:focus-visible,
footer.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.cta-primary {
  background: var(--tint);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--shadow);
}

.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.cta-secondary {
  background: var(--card);
  color: var(--tint);
  border: 1px solid var(--border);
}

.cta-secondary:hover {
  border-color: var(--tint);
}

/* ── Commitments section (landing page) ─────────────────── */

.commitments {
  max-width: 720px;
  margin: 64px auto 16px;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.commitments h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--tint);
  margin-bottom: 12px;
}

.commitments p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}

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

.commitments strong {
  color: var(--tint);
}

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

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 32px 20px 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

footer.site-footer .footer-links a {
  color: var(--tint);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
}

footer.site-footer .footer-links a:hover {
  text-decoration: underline;
}

footer.site-footer .no-sell {
  margin-top: 16px;
  padding: 12px 16px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

footer.site-footer .no-sell strong {
  color: var(--tint);
}

footer.site-footer .no-sell a {
  color: var(--tint);
}

footer.site-footer .copyright {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.8;
  line-height: 1.6;
}
