/*
 * EveryPenny site styles.
 *
 * Design intent: look like a finance app, not a bank. Restrained
 * typography, generous whitespace, mint-teal accents that match the
 * iOS app's BrandTheme. Aggressively avoid "startup landing page"
 * clichés (gradient backgrounds, oversized emoji, hero video).
 *
 * System font stack keeps the page <5 KB of CSS and matches what
 * each OS would render for a native doc, which is what legal text
 * wants to feel like.
 */

:root {
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --ink: #1d2433;
  --ink-muted: #4a5568;
  --ink-soft: #6b7280;
  --brand: #0d8a7c;
  --brand-dark: #076457;
  --border: #e5e7eb;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1116;
    --bg-muted: #141b22;
    --ink: #e9ecf1;
    --ink-muted: #b8c0cb;
    --ink-soft: #8a93a1;
    --brand: #34bfad;
    --brand-dark: #64d4c4;
    --border: #232b34;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-dark);
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0.75rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-muted);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--bg-muted);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--ink-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  font-size: 0.95em;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--bg-muted);
}

/* ─── header ─── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.site-header nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--brand);
}

/* ─── main ─── */

main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ─── legal doc ─── */

.doc h1 {
  margin-top: 1rem;
}

.doc h2 {
  margin-top: 2.5rem;
}

.doc > *:first-child {
  margin-top: 0;
}

.doc ul,
.doc ol {
  padding-left: 1.5rem;
}

.doc li {
  margin: 0.25rem 0;
}

/* ─── landing ─── */

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero-icon {
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(13, 138, 124, 0.15);
}

.hero h1 {
  font-size: 2.4rem;
  margin-top: 1.5rem;
  letter-spacing: -0.02em;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 540px;
  margin: 1rem auto;
}

.hero .status {
  margin-top: 2rem;
  display: inline-block;
  background: var(--bg-muted);
  color: var(--ink-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 3rem 0;
}

.feature {
  padding: 1.25rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.feature h2 {
  font-size: 1.1rem;
  margin-top: 0;
}

.feature p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.contact {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact h2 {
  font-size: 1.3rem;
}

/* ─── footer ─── */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Focus + selection polish */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection {
  background: var(--brand);
  color: var(--bg);
}
