/* chasecan.help — one stylesheet for the one-pager, the client areas, and the
   login gate served by functions/clients/[[path]].js */

:root {
  --paper: #faf8f4;
  --ink: #1c1a17;
  --muted: #6b6560;
  --rule: #e3ded5;
  --card: #fffefb;
  --accent: #4a6b4f;
  --error: #9a3b2e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --ink: #eeebe4;
    --muted: #9a938a;
    --rule: #2e2b25;
    --card: #1c1a16;
    --accent: #9ec0a2;
    --error: #e08a7a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 24px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding-block: clamp(3rem, 12vh, 7rem) 4rem;
}

/* ---------- masthead ---------- */

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  margin: 1rem 0 0;
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 34rem;
}

.home .contact {
  margin: 2.5rem 0 0;
  font-size: 1.0625rem;
}

/* ---------- project cards ---------- */

.cards {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.375rem 1.5rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.card__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card__link h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}

.card__link p {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.card__cue {
  margin-top: auto;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__cue::after { content: " \2192"; }

/* ---------- footer ---------- */

.foot {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}

.foot p { margin: 0 0 0.5rem; }

/* ---------- login gate ---------- */

.gate {
  max-width: 24rem;
  margin: 0 auto;
  padding-block: clamp(4rem, 18vh, 9rem) 3rem;
}

.gate__eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.gate__hint {
  margin: 0.75rem 0 1.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.gate__error {
  margin: 0 0 1.25rem;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid currentColor;
  font-size: 0.9375rem;
  color: var(--error);
}

.gate__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.gate__who {
  margin-bottom: 1rem;
  color: var(--muted);
  cursor: default;
}

.gate__who:focus { outline: none; }

.gate input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.gate button {
  width: 100%;
  margin-top: 0.875rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.gate button:hover { background: var(--accent); }

.gate__foot {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- brand tabs (CSS-only: radio + :checked, no JS) ---------- */

.tabs { margin-top: 2.5rem; }

.tabs__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.tabs__list label {
  padding-bottom: 0.625rem;
  margin-bottom: -1px;
  font-size: 0.9375rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tabs__list label:hover { color: var(--ink); }

/* Keyboard focus lands on the hidden radio; show it on the visible label. */
.tabs__radio:focus-visible ~ .tabs__list label[for],
.tabs__list label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Panels are hidden by default; the generated per-brand rules reveal the
   checked one. With CSS disabled entirely, every panel shows -- which is the
   right fallback. */
.panel { display: none; }

.panel__blurb {
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.panel .cards { margin-top: 1.5rem; }
