/* Qevio website: the Iris design language (docs/ARCHITECTURE.md §6). Dark first; the light palette
   follows the visitor's system setting. No scripts, no third-party requests: fonts are self-hosted
   Latin subsets of Bricolage Grotesque and Manrope (SIL Open Font License, see fonts/). */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg: #08090f;
  --surface-1: #10121b;
  --surface-2: #171a26;
  --surface-3: #222639;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef0f8;
  --text-2: #a0a6bc;
  --text-3: #7d839a;
  --iris: #8c7bff;
  --iris-text: #a99cff;
  --on-iris: #0b0a1a;
  --peach: #ffb199;
  --glow: rgba(140, 123, 255, 0.24);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --ui: 'Manrope', system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f3f8;
    --surface-1: #ffffff;
    --surface-2: #eceaf3;
    --surface-3: #e2dfec;
    --line: rgba(18, 19, 28, 0.08);
    --text: #12131c;
    --text-2: #5b6072;
    --text-3: #6e7385;
    --iris-text: #5b47e0;
    --peach: #e07a55;
    --glow: rgba(140, 123, 255, 0.2);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--iris-text);
  text-underline-offset: 0.2em;
}

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 1;
  padding: 8px 14px;
  background: var(--surface-2);
  border-radius: 999px;
}

/* Header and footer */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.wordmark {
  font: 700 1.6rem/1 var(--display);
  letter-spacing: -0.055em;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--text-3);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

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

.site-footer a {
  color: var(--text-2);
}

/* Home */

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 24px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding-top: 56px;
  }

  .hero-visual {
    order: 2;
  }
}

.hero-visual {
  display: grid;
  place-items: center;
}

.orb {
  position: relative;
  width: min(62vw, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed var(--surface-3);
  display: grid;
  place-items: center;
}

.orb::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(140, 123, 255, 0.35);
  background: radial-gradient(
    circle,
    var(--glow) 0%,
    rgba(140, 123, 255, 0.08) 38%,
    rgba(140, 123, 255, 0) 68%
  );
}

.orb img {
  position: relative;
  width: 34%;
  height: auto;
}

.orb .dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--iris);
}

.orb .dot-1 {
  top: 9%;
  right: 22%;
}

.orb .dot-2 {
  top: 34%;
  right: 1%;
  width: 10px;
  height: 10px;
}

.orb .dot-3 {
  bottom: 12%;
  left: 18%;
  width: 10px;
  height: 10px;
  background: var(--peach);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
}

.badge::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--peach);
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  font-weight: 800;
  margin-top: 20px;
}

.lead {
  font-size: clamp(1.1rem, 3.6vw, 1.3rem);
  font-weight: 400;
  color: var(--text-2);
  margin: 20px 0 0;
  max-width: 34ch;
}

.note {
  color: var(--text-3);
  margin: 24px 0 0;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 600;
}

.chips svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--iris-text);
}

.section {
  margin-top: 88px;
}

.section > h2 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 800;
  max-width: 22ch;
}

.section > .intro {
  color: var(--text-2);
  margin: 14px 0 0;
  max-width: 62ch;
}

.cards {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.card p {
  margin: 10px 0 0;
  color: var(--text-2);
}

.ledger {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

@media (min-width: 700px) {
  .ledger {
    grid-template-columns: 1fr 1fr;
  }
}

.ledger .card ul {
  margin: 14px 0 0;
  padding-left: 1.2em;
  color: var(--text-2);
}

.ledger .card li + li {
  margin-top: 6px;
}

.ledger .cannot h3 {
  color: var(--iris-text);
}

/* Legal pages */

.doc {
  max-width: 760px;
  padding-top: 24px;
}

.doc h1 {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 800;
}

.doc h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 44px;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.doc strong {
  color: var(--text);
}

.doc .meta {
  color: var(--text-3);
  margin-top: 12px;
}

.draft-note {
  margin: 24px 0 8px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--peach);
  background: var(--surface-1);
  color: var(--text);
}

.draft-note strong {
  color: var(--peach);
}

mark.placeholder {
  background: var(--surface-3);
  color: var(--peach);
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.95rem;
}

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

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

th {
  background: var(--surface-1);
  font-weight: 700;
}

td {
  color: var(--text-2);
}

.not-found {
  padding-top: 64px;
  max-width: 560px;
}

.not-found p {
  color: var(--text-2);
}

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