/* Peaks & Pints homepage.
   Colours mirror the app's light and dark tokens (src/theme/tokens.ts).
   Card and button styles match the GPX site's social module.
   Sizes are in rem so they follow the reader's text-size setting. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/dm-sans-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/dm-serif-display-latin.woff2) format('woff2');
}

:root {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --text: #22302F;
  --text-muted: #5C6B6A;
  --brand: #456573;
  --brand-strong: #2F4856;
  --on-brand: #FFFFFF;
  --card-shadow: 0 2px 12px rgba(28,46,56,0.07), 0 0 0 1px rgba(28,46,56,0.055);
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

/* Dark scheme (app tokens, dark). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15201F;
    --surface: #1E2C2B;
    --text: #EDE8DC;
    --text-muted: #9DACA8;
    --brand: #7E97A3;
    --brand-strong: #A9BCC6;
    --on-brand: #0E1918;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
  }
}
:root[data-theme="dark"] {
  --bg: #15201F;
  --surface: #1E2C2B;
  --text: #EDE8DC;
  --text-muted: #9DACA8;
  --brand: #7E97A3;
  --brand-strong: #A9BCC6;
  --on-brand: #0E1918;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p, ul, ol, h1, h2 { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand-strong); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: 0; z-index: 10; transform: translateY(-120%);
  background: var(--brand-strong); color: var(--on-brand);
  padding: .6rem 1rem; border-radius: 0 0 10px 10px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { transform: none; }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

/* Single centred column, at most about 680px wide. */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2.5rem;
  display: grid;
  gap: 1.5rem;
}

.brand-mark { display: flex; justify-content: center; }
.brand-mark img { width: 5rem; height: 5rem; }

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Social and walks cards: the same styling as the GPX site's Instagram card. */
.card {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  display: grid;
  gap: .75rem;
}
.card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.1;
  text-wrap: balance;
}
.card p { overflow-wrap: break-word; }
.card p a { text-decoration: underline; }
.note { font-size: .875rem; color: var(--text-muted); }

/* Outlined button: the same as the GPX site's Instagram button. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3rem;
  padding: .625rem 1.125rem;
  border-radius: 999px;
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn:focus-visible { outline-color: var(--brand); }

/* === shared footer: filled at build time from shared/footer.css === */
.site-footer { background: #2F4856; color: rgba(255,255,255,.80); padding-block: 2rem 2.5rem; font-size: .875rem; line-height: 1.7; }
.site-footer .wrap { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.footer-wordmark { font-family: var(--serif); font-size: 1.25rem; color: #FFFFFF; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-nav a { color: #FFFFFF; font-weight: 600; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer p { color: rgba(255,255,255,.80); margin: 0; overflow-wrap: anywhere; }
.site-footer a { color: #FFFFFF; overflow-wrap: anywhere; }
.site-footer :focus-visible { outline-color: #FFFFFF; }
/* === end shared footer === */

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
