/* Tidewall — landing page styles
   Colors and typography per branding/BRAND.md.
   Light mode by default; dark mode via prefers-color-scheme. */

:root {
  --ink: #1a1a1a;
  --accent: #0e7490;
  --bg: #fafaf9;
  --surface: #ffffff;
  --muted: #57534e;
  --border: rgba(26, 26, 26, 0.12);
  --code-bg: #f5f5f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f4;
    --accent: #22d3ee;
    --bg: #0c0a09;
    --surface: #1c1917;
    --muted: #a8a29e;
    --border: rgba(245, 245, 244, 0.1);
    --code-bg: #1c1917;
  }
}

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

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

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

main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */

.site-header img {
  height: 80px;
  width: auto;
  display: block;
}

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

.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  max-width: 560px;
}

.hero .lede {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 560px;
}

.hero .ctas {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: all 0.12s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

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

/* ---------- Quick start ---------- */

.quickstart h2,
.links h2 {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.quickstart pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.quickstart code {
  font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre;
}

.quickstart .note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Links grid ---------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.link-tile {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  transition: all 0.12s ease;
}

.link-tile:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.link-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

.link-tile:hover .link-name {
  color: var(--accent);
}

.link-detail {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

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

@media (max-width: 600px) {
  main {
    padding: 2rem 1.25rem 1rem;
    gap: 3rem;
  }

  .site-header img {
    height: 56px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .lede {
    font-size: 1rem;
  }

  .quickstart pre {
    padding: 1rem;
  }

  .quickstart code {
    font-size: 0.8rem;
  }
}
