/* GainShare.fit shared styles: brand tokens, header, footer, buttons and
   legal-page layout. Used by index.html, privacy.html and terms.html.
   Colors and type follow the GainShare Brand Guidelines (Aug 2026). */

:root {
  --gs-blue: #1171B8;
  --gs-blue-dark: #0D5C96;   /* hover/pressed state only */
  --gs-blue-tint: #E8F1F9;
  --white: #FFFFFF;
  --black: #000000;
  --ink: #111827;
  --gray: #667085;
  --surface: #F5F8FB;
  --border: #E3E8EF;

  --radius: 10px;
  --max: 1120px;
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gs-blue); }
a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gs-blue);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Logo artwork is used exactly as supplied; the SVG viewBox only crops the
   file's built-in padding so it can be sized precisely. */
.logo svg { display: block; height: 100%; width: auto; }

h1, h2, h3 { color: var(--black); margin: 0; line-height: 1.12; }
h1 { font-weight: 800; font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.015em; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--gs-blue);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rule { width: 48px; height: 4px; background: var(--gs-blue); border: 0; margin: 0 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.site-header .brand { display: flex; align-items: center; gap: 14px; flex: none; }
.site-header .logo { height: 22px; flex: none; }
.site-header .brand-tag {
  padding-left: 14px;
  border-left: 2px solid var(--border);
  color: var(--gs-blue);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 22px;
}
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a.link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site-header nav a.link:hover { color: var(--gs-blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid var(--gs-blue);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--gs-blue); color: var(--white); }
.btn-primary:hover { background: var(--gs-blue-dark); border-color: var(--gs-blue-dark); }
.btn-secondary { background: var(--white); color: var(--gs-blue); }
.btn-secondary:hover { background: var(--surface); }
.btn-light { background: var(--white); color: var(--gs-blue); border-color: var(--white); }
.btn-light:hover { background: var(--gs-blue-tint); border-color: var(--gs-blue-tint); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 14px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 20px 32px;
}
.site-footer .logo { display: block; height: 16px; margin-bottom: 14px; }
.site-footer .tagline { margin: 0 0 10px; color: var(--gs-blue); font-weight: 800; font-size: 15px; }
.site-footer .company { margin: 0; font-style: normal; color: var(--ink); font-weight: 500; }
.site-footer .copyright { margin: 6px 0 0; }
.site-footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer .legal-links a { color: var(--gray); font-weight: 600; text-decoration: none; }
.site-footer .legal-links a:hover,
.site-footer .legal-links a[aria-current] { color: var(--gs-blue); }

/* ---------- Legal pages (privacy.html, terms.html) ---------- */
.page-head {
  padding: clamp(40px, 7vw, 72px) 0 clamp(32px, 5vw, 48px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: clamp(34px, 5.5vw, 52px); }
.effective { margin: 16px 0 0; color: var(--gray); font-weight: 600; font-size: 15px; }
.summary { margin: 20px 0 0; max-width: 62ch; font-size: clamp(17px, 1.8vw, 19px); }

.policy { padding: clamp(40px, 6vw, 64px) 0 clamp(56px, 9vw, 96px); }
.policy .wrap > * { max-width: 72ch; }
.policy section { margin-top: 48px; scroll-margin-top: 88px; }
.policy section:first-of-type { margin-top: 0; }
.policy .rule { margin-bottom: 16px; }
.policy h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.01em; }
.policy h3 { font-weight: 700; font-size: 18px; margin-top: 28px; }
.policy p, .policy ul, .policy ol { margin: 14px 0 0; }
.policy ul, .policy ol { padding-left: 1.25em; }
.policy li + li { margin-top: 6px; }
.policy strong { font-weight: 700; color: var(--black); }

.note {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gs-blue);
  border-radius: var(--radius);
}
.note p:first-child { margin-top: 0; }

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gs-blue);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.steps li + li { margin-top: 10px; }

.toc {
  margin: 0 0 48px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc p { margin: 0; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); }
.toc ol { margin: 10px 0 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; margin: 4px 0; font-weight: 600; font-size: 15px; }
.toc li + li { margin-top: 4px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-header .wrap {
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 10px;
    row-gap: 8px;
  }
  .site-header nav { width: 100%; justify-content: space-between; gap: 12px; }
  .site-header nav a.link { font-size: 14px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
@media (max-width: 520px) {
  .site-header .logo { height: 18px; }
  .site-header .brand { gap: 10px; }
  .site-header .brand-tag { padding-left: 10px; font-size: 13px; line-height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
