/* Shared across every page: tokens, reset, typography, layout, header, buttons, footer */

/* Tokens */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #14211f;
  --muted: #55625f;
  --line: #e4e1d8;
  --brand: #0f6b5c;
  --brand-deep: #0a4a40;
  --accent: #e8a33d;
  --tint: #eaf3f0;
  --radius: 14px;
  --max: 1120px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1615;
    --surface: #162120;
    --ink: #eef3f1;
    --muted: #a3b2ae;
    --line: #263431;
    --brand: #3fb59f;
    --brand-deep: #2a8f7c;
    --accent: #f0b456;
    --tint: #1b2b28;
  }
}

/* Reset and typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

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

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

/* Layout */
section {
  padding: 80px 0;
}

section[id],
main {
  scroll-margin-top: var(--header-h);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.eyebrow {
  margin: 0 0 0.9em;
  color: var(--brand);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: inherit;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-end .pill {
  display: none;
}

@media (min-width: 560px) {
  .nav-end .pill {
    display: inline-block;
  }
}

/* Nav: dropdown below 860px, inline above */
.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  flex-direction: column;
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.nav-links.is-open {
  display: flex;
}

.nav-links a {
  padding: 12px 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 28px;
    padding: 0;
    border: 0;
    background: none;
  }

  .nav-links a {
    padding: 0;
  }

  .nav-toggle {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--ink);
}

/* Components */
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.pill {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

a.pill:hover {
  background: var(--brand);
  color: #fff;
}

/* Footer */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foot-text {
  margin: 0;
}

.foot-brand {
  color: var(--ink);
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .pill {
    transition: none;
  }

  .btn-primary:hover {
    transform: none;
  }
}
