/* Coast site: tokens, font, header, footer, buttons, legal prose.
   Shared by the home page and the four legal pages. No third-party requests:
   the font is self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* teal is the app's brand colour (frontend/src/theme/colors.js);
     rickshaw yellow is the one accent, used only where the eye should land */
  --teal: #0F7C7A;
  --teal-mid: #0A5856;
  --teal-night: #073B3A;
  --teal-tint: #DCEEEC;
  --teal-text: #1E6F6B;
  --rick: #F4C23D;
  --rick-deep: #E0A91C;
  --ink: #08201F;
  --ink-2: #3F5957;
  --glass: #EAF2F0;
  --white: #FFFFFF;
  --line: rgba(8, 32, 31, 0.14);
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1180px;
  --focus: var(--teal);
}

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

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

body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 760;
  font-stretch: 82%;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.on-dark { --focus: var(--rick); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--white);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-head.is-stuck {
  background: color-mix(in srgb, var(--teal-night) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-head--static { position: static; color: var(--ink); background: transparent; }
.site-head__row {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-size: 1.55rem; font-weight: 780; font-stretch: 85%; letter-spacing: -0.02em;
}
.logo svg { width: 30px; height: 30px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 1.5rem;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 640; font-size: 1rem; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--rick { background: var(--rick); color: var(--ink); }
.btn--rick:hover { background: #FFD257; }
.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: var(--teal-mid); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: .95rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: default; }

/* ---------- footer ---------- */
.site-foot { background: var(--teal-night); color: #C5DAD8; padding: 3rem 0 2.5rem; }
.site-foot__row {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem;
  align-items: flex-start; justify-content: space-between;
}
.site-foot .logo { color: var(--white); }
.site-foot__nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; font-size: .95rem; }
.site-foot__nav a { color: #C5DAD8; text-decoration: none; padding: 4px 0; }
.site-foot__nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-foot__fine {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between;
  font-size: .88rem; color: #9DBAB7;
}
.site-foot__fine a { color: inherit; }

/* ---------- legal pages ---------- */
.prose { max-width: 46rem; margin: 0 auto; padding: 1.5rem var(--gutter) 5rem; }
.prose h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); margin-bottom: .5rem; }
.prose h2 { font-size: 1.55rem; margin: 2.6rem 0 .6rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; font-stretch: 90%; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: .8rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--teal-text); text-underline-offset: 3px; }
.prose a:hover { color: var(--teal-mid); }
.prose .updated { color: var(--ink-2); font-size: .92rem; }
.prose .note {
  background: var(--white); border-left: 4px solid var(--teal);
  padding: .7rem 1rem; border-radius: 0 10px 10px 0; font-size: .97rem;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; background: var(--white); }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--teal-tint); color: var(--ink); }
.prose .box { background: var(--white); border-radius: 16px; padding: 1rem 1.3rem; margin: 1.5rem 0; }
.prose .box p { margin: .5rem 0; }
.table-scroll { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
