/*
 * Tangent Fitness & Wellness — public site.
 *
 * One stylesheet, no build step, no web fonts and no JavaScript: every page is
 * a static document that renders on first paint. The palette is taken from the
 * app's own theme so the site and the product look like the same thing.
 */

:root {
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #eef3fa;
  --border: #dee2eb;
  --blue: #0061a4;
  --blue-dark: #00497d;
  --blue-light: #d1e4ff;
  --ink: #1a1c1e;
  --ink-2: #44474e;
  --ink-muted: #74777f;
  --success: #1e8e3e;
  --flame: #e65100;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 68rem;
  --gutter: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #121417;
    --surface: #1a1c1e;
    --surface-alt: #22262b;
    --border: #33373d;
    --blue: #9ecaff;
    --blue-dark: #d1e4ff;
    --blue-light: #16324d;
    --ink: #e3e2e6;
    --ink-2: #c4c7cf;
    --ink-muted: #8e9199;
    --success: #6dd58c;
    --flame: #ffb59c;
  }
}

:root[data-theme="dark"] {
  --canvas: #121417;
  --surface: #1a1c1e;
  --surface-alt: #22262b;
  --border: #33373d;
  --blue: #9ecaff;
  --blue-dark: #d1e4ff;
  --blue-light: #16324d;
  --ink: #e3e2e6;
  --ink-2: #c4c7cf;
  --ink-muted: #8e9199;
  --success: #6dd58c;
  --flame: #ffb59c;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-2);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* Keyboard users need to see where they are. */
:where(a, button, summary, input):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand .mark {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 900;
}
/* A wrapping row of links needs no toggle button and no script; six links fit
   on two lines at 320px and on one line from about 640px up. */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
@media (min-width: 46rem) {
  .site-nav { margin-left: auto; }
}

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero .lede {
  margin: 0 0 1.5rem;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  max-width: 46rem;
  color: var(--ink-2);
}
.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
:root[data-theme="dark"] .btn-primary,
:root:not([data-theme="light"]) .btn-primary { color: #06243c; }
.btn-ghost {
  background: transparent;
  color: var(--blue);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--blue); }

/* ── content ───────────────────────────────────────────────────────────── */
main { display: block; }
section { padding-block: clamp(2rem, 5vw, 3.25rem); }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: clamp(1.35rem, 3.6vw, 1.8rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.85rem;
}
h3 {
  font-size: 1.08rem;
  color: var(--ink);
  margin: 1.75rem 0 0.4rem;
}
p { margin: 0 0 1rem; }
a { color: var(--blue); }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .ico { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: 0.6rem; }

/* A claim the reader can check beats a claim they have to trust. */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
}
.callout.warn { border-left-color: var(--flame); }
.callout.good { border-left-color: var(--success); }
.callout > :last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

.table-scroll { overflow-x: auto; margin-bottom: 1.25rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
caption {
  caption-side: top;
  text-align: left;
  font-size: 0.86rem;
  color: var(--ink-muted);
  padding-bottom: 0.5rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--ink); font-weight: 700; background: var(--surface-alt); }
tbody tr:last-child td { border-bottom: none; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

.meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
/* A comfortable measure for long text, but left-aligned: `.wrap` centres its
   own box, so a narrower `.prose` inside it used to re-centre and sit inboard
   of every full-width section above it, breaking the left rail down the page. */
.prose { max-width: 48rem; margin-inline: 0 auto; }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.site-footer h2 {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.legal {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.86rem;
}
.legal p { margin-bottom: 0.35rem; }

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* A scrollable table is focusable, so give it a visible boundary and let it
   breathe less on a narrow screen — a 3-column table at 320px needs the room
   more than it needs the padding. */
.table-scroll {
  border-radius: var(--radius);
}
.table-scroll:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
@media (max-width: 26rem) {
  th, td { padding: 0.55rem 0.6rem; }
  table { font-size: 0.88rem; }
}
