/* ==========================================================================
   Clio Fit: base.css (shared by every page)
   Owner: legal-pages agent. The homepage may APPEND rules (or use home.css),
   but should not rewrite what is here.

   Contents
     1. Tokens        6. Header and mobile menu
     2. Font          7. Footer
     3. Reset         8. Buttons and links
     4. Layout        9. Legal pages (long text)
     5. Helpers      10. 404 page, motion helpers

   --------------------------------------------------------------------------
   HEADER: paste right after <body>. On the homepage, swap the hrefs
   "index.html#why" -> "#why" etc. if you like; keep the classes.
   Works without JS (the menu is a <details>); assets/site.js only adds
   closing on Escape, on a link tap and on a tap outside.

   <a class="skip-link" href="#main">Skip to content</a>
   <header class="site-header" id="top">
     <div class="wrap site-header__inner">
       <a class="brand" href="index.html" aria-label="Clio Fit home">
         <img src="clio-wordmark.svg" alt="clio" width="58" height="29">
       </a>
       <nav class="site-nav" aria-label="Main">
         <ul>
           <li><a href="index.html#why">Why Clio?</a></li>
           <li><a href="index.html#faq">FAQ</a></li>
           <li><a href="support.html">Support</a></li>
         </ul>
       </nav>
       <details class="menu">
         <summary class="menu__button"><span class="menu__icon" aria-hidden="true"></span><span class="menu__label">Menu</span></summary>
         <nav class="menu__panel" aria-label="Menu">
           <ul>
             <li><a href="index.html">Home</a></li>
             <li><a href="index.html#why">Why Clio?</a></li>
             <li><a href="index.html#faq">FAQ</a></li>
             <li><a href="support.html">Support</a></li>
             <li><a href="privacy.html">Privacy</a></li>
             <li><a href="terms.html">Terms</a></li>
             <li><a href="health-data.html">Health data</a></li>
           </ul>
         </nav>
       </details>
     </div>
   </header>

   Mark the current page's link with aria-current="page".

   --------------------------------------------------------------------------
   FOOTER: paste right before </body> (wording is the original site's).

   <footer class="site-footer">
     <div class="wrap site-footer__inner">
       <div class="site-footer__brand">
         <img src="clio-wordmark.svg" alt="clio" width="52" height="26">
         <p>The coach who never clocks out. Coaching in the app is automated and isn't medical advice.</p>
       </div>
       <nav class="site-footer__nav" aria-label="Footer">
         <a href="https://www.instagram.com/cliofitness/" target="_blank" rel="noopener noreferrer"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="3.5" y="3.5" width="17" height="17" rx="5"></rect><circle cx="12" cy="12" r="4"></circle><circle cx="17.2" cy="6.8" r="0.6" fill="currentColor" stroke="none"></circle></svg>@cliofitness<span class="sr-only"> (opens in a new tab)</span></a>
         <a href="privacy.html">Privacy</a>
         <a href="terms.html">Terms</a>
         <a href="health-data.html">Health data</a>
         <a href="support.html">Support</a>
         <a href="mailto:hello@cliofit.app">hello@cliofit.app</a>
       </nav>
     </div>
     <div class="wrap site-footer__legal">© 2026 Fullyear Services Inc.</div>
   </footer>
   <script src="assets/site.js" defer></script>
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* v3.1: black and neutral greys; violet is a sparing accent only. */
  --bg: #000000;
  --bg-alt: #0A0A0A;         /* alternate section band */
  --card: #111111;
  --card-2: #171717;         /* raised surface inside a card */
  --input: #1F1F1F;
  --accent: #7C3AED;
  --accent-deep: #5B21B6;
  --accent-pressed: #6D28D9;
  --accent-glow: #8B5CF6;
  --accent-text: #A78BFA;   /* small text and links only */
  --accent-pale: #C4B5FD;
  --muted: #A3A3A3;
  --text: #FFFFFF;
  --text-soft: #D4D4D4;     /* long reading text */
  --logo-white: #F5F3FF;
  --hairline: #262626;
  --hairline-strong: #333333;
  --selected-bg: rgba(124, 58, 237, 0.14);
  --green: #4ADE80;
  --amber: #FBB040;          /* Lock In only */

  --radius-pill: 100px;
  --radius-card: 18px;
  --radius-card-sm: 16px;
  --radius-card-lg: 20px;

  --glow-button: 0 0 1.25rem rgba(124, 58, 237, 0.35);
  --glow-selected: 0 0 0.7rem rgba(124, 58, 237, 0.59);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 1.25rem;          /* 20px side gutter on phones */
  --header-h: 3.5rem;         /* 56px */
  --wrap: 80rem;

  color-scheme: dark;
}
@media (min-width: 640px) { :root { --gutter: 2rem; } }
@media (min-width: 1024px) { :root { --header-h: 4rem; } }

/* 2. Font (self-hosted, no external requests) ---------------------------- */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 3. Reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus: visible ring for keyboards, none for taps. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-pale);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 4. Layout ---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
}
main { flex: 1 0 auto; }

/* 5. Helpers --------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.nw { white-space: nowrap; }
.hl { color: var(--text); }
.display {
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.eyebrow {
  font-size: 0.8125rem;      /* 13px */
  line-height: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* 6. Header and mobile menu ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--hairline);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(0, 0, 0, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  margin-left: -4px;
  padding: 4px;
  border-radius: 8px;
}
.brand img { height: 1.625rem; width: auto; }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.875rem;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: #fff; background: #141414; }
.site-nav a[aria-current="page"] { color: #fff; }

/* The menu is a <details>, so it opens without JS. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.95rem 0 0.8rem;
  margin-right: -0.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.menu__icon,
.menu__icon::before,
.menu__icon::after {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu__icon { position: relative; }
.menu__icon::before, .menu__icon::after { content: ""; position: absolute; left: 0; }
.menu__icon::before { top: -5px; }
.menu__icon::after { top: 5px; }
.menu[open] .menu__icon { background: transparent; }
.menu[open] .menu__icon::before { transform: translateY(5px) rotate(45deg); }
.menu[open] .menu__icon::after { transform: translateY(-5px) rotate(-45deg); }
.menu[open] .menu__button { border-color: #525252; background: #141414; }

.menu__panel {
  position: absolute;
  right: -0.25rem;
  top: calc(100% + 0.5rem);
  width: min(17rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.menu__panel ul { list-style: none; padding: 0; display: grid; }
.menu__panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 0.875rem;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.menu__panel a:hover, .menu__panel a:focus-visible { background: #1A1A1A; }
.menu__panel a[aria-current="page"] { color: var(--accent-pale); }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__panel { animation: menu-in 0.18s ease-out; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

@media (min-width: 900px) {
  .site-nav { display: block; }
  .menu { display: none; }
  .brand img { height: 1.8rem; }
}

/* 7. Footer ----------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 0;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 1.25rem;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 0.75rem; }
.site-footer__brand img { height: 1.6rem; width: auto; align-self: flex-start; }
.site-footer__brand p { max-width: 20rem; font-size: 0.875rem; line-height: 1.45; color: var(--muted); }
.site-footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  font-size: 0.9375rem;
}
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer__nav a:first-child, .site-footer__nav a:last-child { grid-column: 1 / -1; }
.site-footer__nav a:hover { color: var(--accent-text); }
.site-footer__nav svg { width: 1.25rem; height: 1.25rem; color: var(--muted); flex-shrink: 0; }
.site-footer__legal {
  font-size: 0.875rem;
  color: var(--muted);
  padding-bottom: max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
}
@media (min-width: 640px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
  }
  .site-footer__nav { display: flex; flex-flow: row wrap; justify-content: flex-end; column-gap: 1.5rem; max-width: 34rem; }
}

/* 8. Buttons and links ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding-inline: 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--glow-button); }
.btn-primary:active { box-shadow: 0 0 0.75rem rgba(124, 58, 237, 0.35); }
.btn-secondary { background: transparent; color: #fff; border-color: var(--hairline-strong); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-pressed); }
  .btn-secondary:hover { border-color: #525252; background: #111111; }
}

.link {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s;
}
@media (hover: hover) { .link:hover { text-decoration-color: var(--accent-text); } }

/* 9. Legal pages (Terms, Privacy, Health data, Support) --------------------- */
.legal {
  width: 100%;
  max-width: 44rem;              /* about 68 characters of body text */
  margin-inline: auto;
  padding: 1.75rem max(var(--gutter), env(safe-area-inset-left, 0px)) 3.5rem;
}
@media (min-width: 640px) { .legal { padding-top: 3.5rem; padding-bottom: 5rem; } }

.legal h1 {
  margin-top: 0.5rem;
  font-size: 2.25rem;            /* 36px on phones */
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
@media (min-width: 640px) { .legal h1 { font-size: 3rem; } }

.legal .lede {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-soft);
}
.legal .lede > * + * { margin-top: 0.875rem; }

/* On this page */
.toc {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card-sm);
}
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-card-sm);
  -webkit-tap-highlight-color: transparent;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc ol {
  list-style: none;
  padding: 0 0.5rem 0.5rem;
  margin: 0;
  counter-reset: toc;
  border-top: 1px solid var(--hairline);
  padding-top: 0.375rem;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.375rem 0.5rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text-soft);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc);
  flex-shrink: 0;
  min-width: 1.5rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.toc a:hover { background: #1A1A1A; color: #fff; }
@media (min-width: 640px) {
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.5rem; }
}

/* Sections */
.legal .sections { margin-top: 2.25rem; display: flex; flex-direction: column; gap: 2.25rem; }
@media (min-width: 640px) { .legal .sections { margin-top: 3rem; gap: 3rem; } }
.legal-section { scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal h2 {
  font-size: 1.5rem;             /* 24px on phones */
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}
@media (min-width: 640px) { .legal h2 { font-size: 1.75rem; } }
.legal h3 {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.legal .prose {
  margin-top: 0.875rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-soft);
}
.legal .prose > * + * { margin-top: 0.875rem; }
.legal .prose > h3 + * { margin-top: 0.625rem; }
.legal .prose ul, .legal .prose ol { padding-left: 1.25rem; }
.legal .prose ul { list-style: disc; }
.legal .prose ol { list-style: decimal; }
.legal .prose li + li { margin-top: 0.5rem; }
.legal .prose li::marker { color: var(--muted); }
.legal .prose strong, .legal .prose b { color: #fff; font-weight: 500; }

/* Term / meaning rows (dl). One column on phones, two from 640px. */
.rows { border-top: 1px solid var(--hairline); }
.rows .row {
  display: grid;
  gap: 0.25rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--hairline);
}
.rows dt { font-weight: 500; color: #fff; line-height: 1.45; }
.rows dd { margin: 0; }
@media (min-width: 640px) {
  .rows .row { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 1.5rem; }
}

/* Tables, if a page ever has one: scroll inside their own box, never the page. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hairline); border-radius: var(--radius-card-sm); }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.legal th, .legal td { padding: 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.legal th { color: #fff; font-weight: 500; }

/* Also read, and back to top */
.also-read { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.also-read ul { list-style: none; padding: 0; margin-top: 0.5rem; display: flex; flex-direction: column; }
.also-read a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; }
@media (min-width: 640px) {
  .also-read ul { flex-direction: row; flex-wrap: wrap; column-gap: 1.5rem; }
}
.to-top { margin-top: 2.5rem; }
.to-top a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-inline: 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.to-top a::before {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}
@media (hover: hover) { .to-top a:hover { border-color: #525252; background: #141414; } }

/* 10. 404 page ---------------------------------------------------------------- */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 36rem;
  margin-inline: auto;
  padding: 4rem var(--gutter);
  text-align: center;
}
.notfound h1 { font-size: 2.25rem; }
@media (min-width: 640px) { .notfound h1 { font-size: 3rem; } }
.notfound p { font-size: 1.0625rem; color: var(--text-soft); }
.clio-face {
  width: 5rem;
  height: 5rem;
  overflow: visible;
  flex-shrink: 0;
  filter: drop-shadow(0 0 0.4rem rgba(139, 92, 246, 0.6));
}
.clio-face .orbit { transform-box: view-box; transform-origin: 50% 50%; animation: orbit 1.4s linear infinite; }
.clio-face .blink { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 4.6s infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@media (prefers-reduced-motion: reduce) {
  .clio-face .orbit, .clio-face .blink { animation: none !important; }
}

/* Reveal on scroll (assets/site.js). Content is visible without JS and under
   Reduce Motion: only html.js-reveal hides [data-reveal] before it scrolls in. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
}

/* verify fix: inline links in legal text get a taller hit area (about 40px) without changing the layout */
.legal p a.link, .legal li a.link, .legal dd a.link { padding-block: 0.6rem; }
