/* YeahFilter website in the Graphit Instrument world of the app (central DESIGN.md):
   ramp steps, one cobalt accent, modules as a face in a bezel ring, lit status lights. */

@font-face {
  font-family: "Geist";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Geist-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Geist-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Geist-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/GeistMono-Regular.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --ground: #FAFAFA;
  --face: #FFFFFF;
  --frame: #F3F3F5;
  --frame-edge: #DFDFE4;
  --rule: #EEEEF0;
  --edge-strong: #B4B4BC;
  --ink: #18181B;
  --ink-2: #5F5F68;
  --accent: #2550E8;
  --accent-text: #2147D6;
  --allowed: #16A34A;
  --allowed-text: #136C34;
  --glow: rgba(22, 163, 74, 0.55);
  --selection: rgba(37, 80, 232, 0.18);
  --bezel: 0 18px 32px -18px rgba(0, 0, 0, 0.12), 0 0 0 7px var(--frame-edge), 0 0 0 6px var(--frame);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0A0A0B;
    --face: #0F0F11;
    --frame: #151518;
    --frame-edge: #212126;
    --rule: #212126;
    --edge-strong: #45454D;
    --ink: #EDEDEF;
    --ink-2: #9B9BA4;
    --accent: #3366FF;
    --accent-text: #82A8FF;
    --allowed: #3DDC84;
    --allowed-text: #5BE495;
    --glow: rgba(61, 220, 132, 0.9);
    --selection: rgba(51, 102, 255, 0.35);
    --bezel: 0 20px 40px -16px #000, 0 0 0 7px var(--frame-edge), 0 0 0 6px var(--frame);
  }
}

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

html {
  background: var(--ground);
  scrollbar-color: var(--edge-strong) var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.6 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

code {
  font: 0.875em/1.5 "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.875rem;
  background: var(--face);
  border-radius: 8px;
  box-shadow: var(--bezel);
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 3rem, 46rem);
  margin-inline: auto;
}

/* Bar */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
}

.mark {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.bar nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.bar nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.bar nav a:hover,
.bar nav a[aria-current="page"] {
  color: var(--ink);
}

/* Reading column */

main {
  padding-block: 3.5rem 5rem;
}

h1 {
  margin: 0 0 1.25rem;
  max-width: 15em;
  font-size: clamp(2rem, 1.35rem + 2.8vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  margin: 3.5rem 0 0.875rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-2);
}

p,
ul {
  max-width: 42.5rem;
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.125rem;
}

li {
  padding-left: 0.25rem;
}

li + li {
  margin-top: 0.5rem;
}

li::marker {
  color: var(--edge-strong);
}

.lead {
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.updated {
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* Modules: a face set into a bezel ring drawn as a shadow, so nothing clips. */

.label {
  margin: 3.5rem 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

.module {
  margin: 0 0 2rem;
  background: var(--face);
  border-radius: 10px;
  box-shadow: var(--bezel);
}

/* Fields: a printed hairline grid, two columns where the width holds them. */

.fields {
  display: grid;
  grid-template-columns: 1fr;
}

.field {
  padding: 1.125rem 1.25rem 1.25rem;
}

.field + .field {
  border-top: 1px solid var(--rule);
}

.field p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (min-width: 40rem) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }

  .field + .field {
    border-top: 0;
  }

  .field:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .field:nth-child(even) {
    border-left: 1px solid var(--rule);
  }
}

/* Rows with lit status: a word always stands beside the light. */

.rows {
  max-width: none;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
}

.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
}

.rows li + li {
  background: linear-gradient(var(--rule), var(--rule)) 1rem 0 / calc(100% - 2rem) 1px no-repeat;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--allowed-text);
}

.state::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--allowed);
  box-shadow: 0 0 8px var(--glow);
}

@media (prefers-reduced-motion: no-preference) {
  .state::before {
    animation: lit 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .rows li:nth-child(2) .state::before { animation-delay: 120ms; }
  .rows li:nth-child(3) .state::before { animation-delay: 240ms; }
  .rows li:nth-child(4) .state::before { animation-delay: 360ms; }
  .rows li:nth-child(5) .state::before { animation-delay: 480ms; }
}

@keyframes lit {
  from {
    opacity: 0.35;
    box-shadow: 0 0 0 transparent;
  }
}

/* Contents of the privacy policy */

.contents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.5rem 1.5rem;
  max-width: none;
  margin: 0;
  padding: 1.125rem 1.25rem;
  list-style: none;
  font-size: 0.9375rem;
}

.contents li {
  margin: 0;
  padding: 0;
}

/* Footer */

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 1.75rem 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}

footer a {
  color: var(--ink-2);
}

footer a:hover {
  color: var(--ink);
}
