/* KMP Base Styles - Shared across all static pages
 * Usage: <link rel="stylesheet" href="/css/kmp-base.css">
 */

:root {
  --maxw: 1120px;
  --pad: 16px;
  --border: #e5e5e5;
  --fg: #111;
  --muted: #666;
  --radius: 12px;
}

* { box-sizing: border-box }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fg);
  background: #fff;
  min-height: 100vh;
}

/* ========================================
   Site Header - Flex with Nav (default)
   ======================================== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.site-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.site-title {
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 15px;
}

.subline {
  color: #6b7280;
  font-size: 12px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 15px;
  margin-left: auto;
}

.nav a {
  color: inherit;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

/* ========================================
   Site Header - Centered variant
   Usage: <header class="site-header site-header--centered">
   ======================================== */
.site-header--centered .site-header-inner {
  flex-direction: column;
  text-align: center;
}

.site-header--centered .site-brand {
  justify-content: center;
}

.site-header--centered .nav {
  margin-left: 0;
  justify-content: center;
}

/* ========================================
   Main Content Area
   ======================================== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--pad);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--pad);
  border-top: 1px solid var(--border);
  color: #555;
  margin-top: 48px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========================================
   Grid + Cards (shared image grid)
   ======================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  border: 1px solid #eee;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.card-caption {
  padding: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid #d1d5db;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  cursor: pointer;
  background: #fff;
  color: var(--fg);
}

.btn:hover {
  background: #f8f8f8;
}

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

.btn-primary:hover {
  background: #333;
}

/* ========================================
   Mobile Breakpoint
   ======================================== */
@media (max-width: 640px) {
  main, .footer {
    padding: 12px;
  }
}
