/* Gil Sweep website. The app's own tokens (src/GilSweep.Desktop/Themes/Tokens.axaml), dark like the app,
   laid out like XIV Vault's site. Text3 is lighter than the app's so small text passes WCAG AA here. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg0: #0a0c10;
  --bg1: #0f1218;
  --bg2: #151920;
  --bg3: #1b2029;
  --bg4: #222834;
  --border1: #1e242e;
  --border2: #2a3240;
  --border3: #3a4453;
  --text1: #e8ecf1;
  --text2: #98a2b3;
  --text3: #838f9e;
  --text-inverse: #0a0c10;
  --accent: #d9a94a;
  --accent-hover: #e8be6a;
  --accent-active: #c4933a;
  --accent-text: #f0cf85;
  --accent-subtle: rgb(217 169 74 / 0.1);
  --accent-border: rgb(217 169 74 / 0.38);
  --heart: #ff8a90;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 68ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg0);
  scrollbar-color: var(--border3) var(--bg0);
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.6 var(--sans);
  color: var(--text2);
  caret-color: var(--accent);
  /* A gold wash from the top left, a little blue from the right. */
  background:
    radial-gradient(1200px 600px at 8% -10%, rgb(217 169 74 / 0.07), transparent 65%),
    radial-gradient(1100px 620px at 100% 0%, rgb(91 156 255 / 0.04), transparent 65%),
    var(--bg0);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgb(217 169 74 / 0.35); color: var(--text1); }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { color: var(--text1); font-weight: 600; text-wrap: balance; margin: 0; }

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(240 207 133 / 0.4);
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}
/* Low specificity, so buttons and the skip link keep their own hover colors. */
a:where(:not(.button, .skip)):hover { color: var(--text1); text-decoration-color: currentColor; }

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

code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--text1);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  white-space: nowrap;
}
/* Long names may wrap on a phone rather than push the page sideways. */
@media (max-width: 720px) {
  code { white-space: normal; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus { top: 12px; }
.skip:hover { color: var(--text-inverse); background: var(--accent-hover); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(10 12 16 / 0.92);
  border-bottom: 1px solid var(--border1);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgb(10 12 16 / 0.78); backdrop-filter: blur(12px) saturate(1.2); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text1);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--text1); }
.brand .mark { width: 24px; height: 24px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text1); background: var(--bg3); }
.site-nav .icon { font-size: 16px; }

@media (max-width: 720px) {
  .site-nav .wide { display: none; }
}

/* Buttons, as in the app: primary is the gold accent, secondary a raised dark surface. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: var(--bg3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
  color: var(--text1);
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.button:hover { background: var(--bg4); border-color: var(--border3); }
.button:active { transform: translateY(1px); }
.button .icon { font-size: 18px; }
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 20px -10px rgb(0 0 0 / 0.8);
}
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.primary:active { background: var(--accent-active); }

/* Hero */

.hero { padding: clamp(40px, 6vw, 72px) 0 0; }
.hero h1 {
  font-size: clamp(2.25rem, 1.2rem + 3vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
.lede {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--text2);
}
.lede strong { color: var(--text1); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text3);
}
.fine li { display: inline-flex; align-items: center; gap: 8px; }
.fine .icon { color: var(--accent); font-size: 15px; }

/* The Sweep screen sits in a window frame at about the app's own size. */

.window { margin: clamp(32px, 5vw, 48px) 0 0; }
.window img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--bg1);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.4), 0 30px 80px -20px rgb(0 0 0 / 0.8);
}
.window figcaption { margin-top: 14px; font-size: 14px; color: var(--text3); }

/* Sections: one column of short answers, each opened by the question it answers. */

.section { padding: clamp(64px, 10vw, 112px) 0 0; }
.section > .wrap > h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.section-intro { margin-top: 16px; max-width: var(--measure); font-size: 1.05rem; }
.prose { max-width: var(--measure); margin-top: 16px; }
.prose strong { color: var(--text1); font-weight: 500; }

/* A screenshot from the app, framed like the hero but quieter. */

.shot { margin: 0; }
.shot a { display: block; border-radius: 10px; cursor: zoom-in; }
.shot a:hover img { border-color: var(--border3); }
.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border2);
  border-radius: 10px;
}
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--text3); }

/* Two columns where an answer pairs a list with a picture. */

.pair { display: grid; gap: 40px; align-items: start; margin-top: 36px; }
@media (min-width: 980px) {
  .pair { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
}

/* The six screens, and the score's signals: a name with its answer beside it. */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border1);
}
.rows li {
  display: grid;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border1);
}
.rows h3 { font-size: 1rem; font-weight: 500; }
@media (min-width: 640px) {
  .rows li { grid-template-columns: 9.5rem minmax(0, 1fr); }
}
.rows .weight { display: block; font: 400 13px/1.5 var(--mono); color: var(--text3); }

.after-note { margin-top: 20px; max-width: var(--measure); font-size: 15px; color: var(--text3); }

/* Steps */

.steps {
  counter-reset: step;
  display: grid;
  gap: 4px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  max-width: 760px;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent-text);
  font: 500 14px/1 var(--mono);
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--border2);
}
.steps strong { color: var(--text1); font-weight: 500; }
.pair .steps { margin-top: 0; }

/* Every network call, set as a table like the list it is. */

.calls {
  margin-top: 36px;
  border: 1px solid var(--border1);
  border-radius: 10px;
  background: var(--bg1);
  overflow: hidden;
}
.calls table { width: 100%; border-collapse: collapse; }
.calls th, .calls td { padding: 12px 20px; text-align: left; vertical-align: top; border-top: 1px solid var(--border1); }
.calls thead th {
  padding-block: 10px;
  border-top: 0;
  background: var(--bg2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
}
.calls tbody th { color: var(--text1); font-weight: 500; white-space: nowrap; }
.calls td.when { font-size: 15px; color: var(--accent-text); }
.calls tr.never th, .calls tr.never td.when { color: var(--text3); }
@media (min-width: 721px) {
  .calls tbody th { width: 24%; }
  .calls td.when { width: 30%; }
}
@media (max-width: 720px) {
  .calls table, .calls tbody { display: block; }
  .calls thead { display: none; }
  .calls tbody tr { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--border1); }
  .calls tbody tr:first-child { border-top: 0; }
  .calls th, .calls td { padding: 0; border: 0; }
}

/* Short answers at the end, two to a row on wide screens. */

.answers { display: grid; gap: 40px 56px; }
@media (min-width: 900px) { .answers { grid-template-columns: 1fr 1fr; } }
.answers h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
.answers p { margin-top: 12px; }

.ui { color: var(--text1); font-weight: 500; }

/* Disclaimer and footer */

.disclaimer {
  margin-top: clamp(64px, 10vw, 112px);
  padding: 24px 0;
  border-top: 1px solid var(--border1);
  font-size: 14px;
  color: var(--text3);
}
.disclaimer p { max-width: 90ch; }
.disclaimer p + p { margin-top: 8px; }

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border1);
  font-size: 14px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.made {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--text2);
  text-decoration: none;
}
.made:hover { color: var(--text1); }
.made .heart { color: var(--heart); fill: currentColor; stroke: currentColor; font-size: 15px; }
.made strong { color: var(--text1); font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--text3); text-decoration: none; }
.footer-links a:hover { color: var(--text1); }
