/*
 * The public site's stylesheet (CASH-85).
 *
 * Hand-written, and deliberately not Tailwind. The application compiles Tailwind
 * because it is thousands of utility classes across fifty templates; this is two
 * pages whose classes were already hand-written rules in the app's stylesheet.
 *
 * ---------------------------------------------------------------------------
 * The token block below is the one thing shared with the application, and it is
 * shared by copy rather than by import — the two surfaces deploy separately and
 * an import would put the app's build on the static site's critical path, which
 * is exactly the coupling this module exists to remove.
 *
 * It is a curated subset: the palette, the type scale and the two control
 * tokens. It is not the app's @theme block. If a colour changes in
 * app/src/main/css/app.css it must be changed here too, and that is the
 * accepted cost of the split. Keep this list short so that stays true.
 * ---------------------------------------------------------------------------
 */

:root {
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --color-ink:      oklch(0.22 0.01 260);
  --color-muted:    oklch(0.55 0.01 260);
  --color-hairline: oklch(0.92 0.005 260);
  --color-ground:   oklch(0.975 0.003 260);
  --color-panel:    white;
  --color-on-ink:   white;

  --color-accent:    #3f50c8;
  --color-accent-dk: #3244b0;
  --color-edge-hover: oklch(0.84 0.008 260);

  --text-body: 0.8125rem;
  --text-meta: 0.75rem;

  --control-h:      2.25rem;
  --radius-control: 0.5rem;
  --spacing-section: 2rem;
}

/* The app raises the control height on coarse pointers; the public site has
   exactly two controls, and both are links, so it keeps the one size. */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
  background-color: var(--color-ground);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- shell --- */

.page { max-width: 64rem; margin-inline: auto; padding-inline: 1rem; }

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 60;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-control);
  background-color: var(--color-ink);
  color: var(--color-on-ink);
  font-size: var(--text-meta);
  transition: top 120ms ease;
}
.skip-link:focus { top: 0.5rem; }

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--color-hairline);
}

.app-wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  text-decoration: none;
}

/* The public nav is the public pages plus the way in. It is not the app's nav:
   linking to the calendar from a page a signed-out visitor is reading would be
   a link that bounces straight back to sign-in. */
.site-nav { display: flex; gap: 1.25rem; font-size: var(--text-meta); margin-left: auto; }
.site-nav a { color: var(--color-muted); text-decoration: none; }
.site-nav a:hover { color: var(--color-ink); }
.site-nav [aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 0 var(--color-accent);
  padding-bottom: 0.875rem;
}

.app-footer {
  margin-top: var(--spacing-section);
  padding-block: 1rem;
  border-top: 1px solid var(--color-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: var(--text-meta);
  color: var(--color-muted);
}
.app-footer-meta { display: flex; justify-content: space-between; gap: 1rem; }
.app-footer a { color: inherit; }

/* --------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--control-h);
  padding-inline: 0.75rem;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-control);
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  color: var(--color-on-ink);
  border-radius: 999px;
}
.btn-primary:hover {
  background-color: var(--color-accent-dk);
  border-color: var(--color-accent-dk);
}

.btn-secondary {
  border-color: var(--color-hairline);
  background-color: var(--color-panel);
  color: var(--color-ink);
}
.btn-secondary:hover {
  border-color: var(--color-edge-hover);
  background-color: var(--color-ground);
}

/* --------------------------------------------------------------- content --- */

.measure { max-width: 42rem; }

.landing { padding: 3rem 0 4rem; }
.landing-lede {
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 .75rem;
  max-width: 30rem;
}
.landing-sub {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0 0 1.75rem;
  max-width: 34rem;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 3rem; }

.landing-points {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border-top: 1px solid var(--color-hairline);
  padding-top: 2rem;
}
.landing-point h2 { font-size: .9375rem; margin: 0 0 .35rem; }
.landing-point p {
  font-size: .875rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 40rem) {
  .app-header { flex-wrap: wrap; gap: 0.75rem; }
}
