/* Pack Peak site. Colors match Pack Peak HQ (.streamlit/config.toml there). */
:root {
  --cream: #fffaf3;        /* page */
  --cream-2: #fdf0dc;      /* cards */
  --cream-logo: #fee9cd;   /* exact logo background */
  --border: #ecdcc4;
  --blue: #0166ae;         /* royal blue */
  --blue-dark: #014f86;
  --navy: #0e2b46;         /* text */
  --muted: #4a5d70;
  --radius: 1rem;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; color: #fff; }

/* Header (scrolls with the page; nothing is fixed or sticky) */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--navy); }
.brand img { width: 54px; height: auto; }

.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.nav a:hover { background: var(--cream-2); }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; }

/* Sections */
.section { padding: 2.5rem 0; }
.section + .section { padding-top: 0; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }

.card {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Hero */
.hero {
  background: var(--cream-logo);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
}
.hero img { width: min(320px, 80%); margin: 0 auto 1rem; }
.hero h1 { margin-bottom: 0.25rem; }
.hero .tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-weight: 600;
  color: var(--blue);
  margin: 0;
}

/* "What we do" grid: equal-height cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.grid-3 .card p { margin: 0; color: var(--muted); }
.num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--blue);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.15s, color 0.15s;
}
.btn svg { width: 1.2rem; height: 1.2rem; flex: none; fill: currentColor; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-outline { background: var(--cream); color: var(--navy); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn small { font-weight: 500; opacity: 0.8; font-size: 0.85rem; }

.platforms {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
  gap: 0.75rem;
}
.platforms .btn { width: 100%; justify-content: flex-start; }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.cta p { margin: 0; color: var(--muted); max-width: 36rem; }

/* Long-form pages (privacy, terms) */
.doc { max-width: 46rem; padding: 2.5rem 0 3rem; }
.doc .meta { color: var(--muted); font-size: 0.95rem; }
.doc h2 { margin-top: 2.25rem; font-size: 1.35rem; }
.doc h3 { margin-top: 1.5rem; }
.doc ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .callout {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.doc .callout p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  overflow: hidden;
  font-size: 0.95rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); }
th { background: var(--cream-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* 404 */
.notfound { text-align: center; padding: 4rem 0; }
.notfound img { width: 160px; margin: 0 auto 1.5rem; }
.notfound .lead { margin: 0 auto 1rem; }
.notfound .btn { margin-top: 0.5rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  text-align: center;
}
.site-footer a { color: var(--navy); font-weight: 600; }
.site-footer .dot { color: var(--border); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
