/* Reset, typography and the shared components used by both the landing page and the app. */

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

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

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-blue-500);
  outline-offset: 2px;
}

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

/* ------------------------------------------------------------------ typography */

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.display {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.heading {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* Coloured italic emphasis inside serif headings, as on readme.com. */
.heading em,
.display em {
  font-style: italic;
}

.accent-blue {
  color: var(--color-blue-600);
}

.accent-violet {
  color: var(--color-violet-500);
}

.accent-teal {
  color: var(--color-teal-500);
}

.accent-sky {
  color: var(--color-blue-400);
}

.lede {
  color: var(--color-ink-muted);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--color-ink-muted);
}

/* Section label: "01. HOW IT WORKS" in a small outlined box with corner dots. */
.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-blue-600);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--violet {
  color: var(--color-violet-500);
}

.eyebrow--dark {
  border-color: var(--color-navy-line);
  background: transparent;
  color: var(--color-blue-400);
}

/* ------------------------------------------------------------------ corner dots */

/* Small square markers on the corners of a framed block (readme's blueprint motif). */
.corners {
  position: relative;
}

/* One pseudo-element paints all four 5px squares, just outside the box. */
.corners::after {
  --dot: linear-gradient(var(--corner-color, var(--color-blue-600)), var(--corner-color, var(--color-blue-600)));

  position: absolute;
  inset: -3px;
  background:
    var(--dot) left top / 5px 5px no-repeat,
    var(--dot) right top / 5px 5px no-repeat,
    var(--dot) left bottom / 5px 5px no-repeat,
    var(--dot) right bottom / 5px 5px no-repeat;
  content: "";
  pointer-events: none;
}

.corners--violet {
  --corner-color: var(--color-violet-500);
}

/* ------------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--color-blue-600);
  color: #fff;
}

.button--primary:hover {
  background: var(--color-blue-500);
}

.button--ghost {
  border-color: var(--color-line-strong);
  background: var(--color-surface);
  color: var(--color-ink);
}

.button--ghost:hover {
  border-color: var(--color-ink-faint);
}

.button--light {
  background: #fff;
  color: var(--color-navy-900);
}

.button--small {
  min-height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.button--wide {
  width: 100%;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ------------------------------------------------------------------ verdict badge */

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.verdict::before {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.verdict--holds_up {
  background: var(--color-verdict-holds-bg);
  color: var(--color-verdict-holds);
}

.verdict--doesnt_hold_up {
  background: var(--color-verdict-not-bg);
  color: var(--color-verdict-not);
}

.verdict--unclear,
.verdict--failed {
  background: var(--color-verdict-unclear-bg);
  color: var(--color-verdict-unclear);
}

/* ------------------------------------------------------------------ chips and avatars */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.avatar {
  flex: none;
  width: var(--avatar-size, 36px);
  height: var(--avatar-size, 36px);
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------------ cards */

.card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* ------------------------------------------------------------------ layout */

.container {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Faint blueprint grid behind a section. */
.grid-bg {
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-position: center top;
  background-size: 64px 64px;
}

/* ------------------------------------------------------------------ brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand__mark {
  width: 28px;
  height: 20px;
}

.brand__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--color-navy-900);
  box-shadow: var(--shadow-float);
  color: #fff;
  font-size: var(--text-sm);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 200ms var(--ease-out),
    transform 200ms var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
