/* ==========================================================================
   Site Template — Minimalist Base Styles
   ========================================================================== */

:root {
  /* Palette — neutral, elegant, easy to retheme */
  --color-bg: #fdfcfb;
  --color-surface: #ffffff;
  --color-text: #2b2b2b;
  --color-text-muted: #6b6b6b;
  --color-border: #e6e2dc;
  --color-accent: #3a3a3a;
  --color-accent-soft: #ede9e2;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  /* Layout */
  --max-width: 1100px;
  --max-width-narrow: 680px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius: 4px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

h1 { font-size: 2.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--space-sm); color: var(--color-text); }
p.muted, .muted { color: var(--color-text-muted); }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--color-accent); }

ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

/* Layout helpers ----------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 251, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand__logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

/* Primary nav */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-md);
}

.nav__link {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--color-text);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  border-bottom-color: var(--color-text);
}

/* Mobile nav toggle (checkbox-driven, no JS required) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

@media (max-width: 720px) {
  .nav-toggle-label { display: inline-block; }

  .nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
    display: none;
  }

  .nav-toggle:checked ~ .nav__list { display: flex; }
}

/* ==========================================================================
   Page section variants ("page division options")
   ========================================================================== */

/* Base section spacing, used by every variant below */
.section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}
.section:last-of-type { border-bottom: none; }

.section__heading {
  margin-bottom: var(--space-md);
}
.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

/* 1. Full-width section — generic content block, edge-to-edge background option */
.section--full {
  background: var(--color-surface);
}

/* 2. Narrow/centered section — long-form text, legal pages, articles */
.section--narrow .container {
  max-width: var(--max-width-narrow);
}

/* 3. Split section — two columns (e.g. image + text) */
.section--split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
@media (max-width: 720px) {
  .section--split .container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* 4. Card grid section — features, links, list of items */
.section--cards .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { margin-bottom: 0; color: var(--color-text-muted); }

/* 5. Muted/tinted section — subtle background separation without a hard border */
.section--tinted {
  background: var(--color-accent-soft);
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--color-text);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--color-text); color: var(--color-bg); }

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn--primary:hover { opacity: 0.85; background: var(--color-text); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--color-surface);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__brand .brand__name { font-size: 1.1rem; }
.site-footer__tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.footer-nav__title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}
.footer-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav__list li { margin-bottom: 0.5rem; }
.footer-nav__list a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav__list a:hover { text-decoration: underline; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
@media (max-width: 720px) {
  .site-footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
