/* Gainova legal site. Strictly monochrome, same tokens as the app (src/constants/tokens.ts). */
:root {
  --black: #000000;
  --charcoal: #1c1c1e;
  --dark-grey: #3a3a3c;
  --mid-grey: #8e8e93;
  --silver: #d1d1d6;
  --hairline: #e5e5ea;
  --light-grey: #ededf0;
  --background: #f5f5f7;
  --white: #ffffff;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gutter: 16px;
  --measure: 760px;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--charcoal);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--silver);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--black);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--dark-grey);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--light-grey);
  color: var(--black);
}

.site-nav a[aria-current='page'] {
  background: var(--black);
  color: var(--white);
}

/* Page */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
}

.doc-title {
  margin: 8px 0 4px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

.doc-meta {
  margin: 0 0 24px;
  color: var(--mid-grey);
  font-size: 14px;
}

.lead {
  font-size: 18px;
  color: var(--dark-grey);
  margin: 0 0 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 0 0 16px;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.dark {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--light-grey);
}

.card.dark h2,
.card.dark h3,
.card.dark strong {
  color: var(--white);
}

.card.dark a {
  color: var(--white);
  text-decoration-color: var(--mid-grey);
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 40px 0 12px;
  scroll-margin-top: 80px;
}

h3 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--black);
  margin: 24px 0 8px;
  scroll-margin-top: 80px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 0 0 6px;
}

strong {
  font-weight: 600;
  color: var(--black);
}

/* Table of contents */
.toc {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 0 0 32px;
}

.toc p {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 24px;
  font-size: 15px;
}

.toc li {
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
  color: var(--dark-grey);
}

.toc a:hover {
  color: var(--black);
  text-decoration: underline;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}

th {
  background: var(--light-grey);
  color: var(--black);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

/* Callouts */
.note {
  border-left: 3px solid var(--black);
  background: var(--white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 0 0 16px;
}

.note > :last-child {
  margin-bottom: 0;
}

.caps {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* Steps (delete account) */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: 0 0 14px;
  min-height: 30px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

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

.button.secondary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--silver);
}

/* Home links */
.link-grid {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  color: var(--charcoal);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.link-card:hover {
  border-color: var(--silver);
  transform: translateY(-1px);
}

.link-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.link-card span {
  color: var(--mid-grey);
  font-size: 15px;
}

.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 16px;
}

.email {
  font-weight: 600;
  word-break: break-all;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--mid-grey);
  font-size: 14px;
}

.site-footer .inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

.site-footer a {
  color: var(--dark-grey);
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .link-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .doc-title {
    font-size: 40px;
  }
  main {
    padding-top: 48px;
  }
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
  .brand span {
    display: none;
  }
  .card {
    padding: 20px;
  }
  .doc-title {
    font-size: 30px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }
  body {
    background: var(--white);
  }
  .card {
    border: 0;
    padding: 0;
  }
}
