/* Zivvi website. Colours and type follow docs/design-system.md:
   Night by default, Day when the visitor's system is set to light. */

@font-face {
  font-family: "Outfit";
  src: url("/assets/outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ground: #0D0A26;   /* Night */
  --card: #1A1640;     /* Dusk */
  --line: #2A2560;     /* Twilight */
  --ink: #F4F2FF;      /* Moon */
  --muted: #A9A3D6;    /* Mist */
  --faint: #8680B8;    /* Fog */
  --action: #2EE6D6;   /* Glow */
  --on-action: #0D0A26;
  --link: #2EE6D6;
  --violet: #7B5CFF;
  --spark: #FF3DA8;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #F5F4FB;
    --card: #FFFFFF;
    --line: #E6E3F2;
    --ink: #0D0A26;
    --muted: #5C5878;
    --faint: #6A6589;
    --action: #5B3FE0; /* Ink Violet: Glow can't carry text on white */
    --on-action: #FFFFFF;
    --link: #5B3FE0;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { padding: 28px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.wordmark { height: 22px; width: auto; color: var(--ink); }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: Outfit, system-ui, sans-serif; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; margin: 24px 0 16px; }
h2 { font-size: 26px; font-weight: 650; margin: 48px 0 12px; }
h3 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; }
p, li { color: var(--ink); }
.lede { font-size: 20px; color: var(--muted); max-width: 34em; }
.meta { color: var(--faint); font-size: 15px; }
strong { font-weight: 650; }

/* Home */
.hero { padding: 32px 0 16px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero-mark { width: 168px; height: 168px; border-radius: 47px; box-shadow: 0 24px 60px rgba(46, 230, 214, 0.12); }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { width: 104px; height: 104px; border-radius: 29px; order: -1; }
}

.soon {
  display: inline-block; margin-top: 8px; padding: 12px 20px; border-radius: 14px;
  background: var(--action); color: var(--on-action);
  font: 600 16px/1.2 Outfit, system-ui, sans-serif;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.cards h3 { margin-top: 0; }
.cards p { margin: 0; color: var(--muted); font-size: 16px; }
.tile { display: block; width: 22px; height: 22px; border-radius: 6px; background: var(--line); margin-bottom: 14px; }

/* Long text (policy) */
.doc { padding-bottom: 32px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }

.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--card); font-weight: 600; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.toc { columns: 2; column-gap: 32px; padding-left: 1.2em; font-size: 15px; }
@media (max-width: 640px) { .toc { columns: 1; } }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 40px; color: var(--faint); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot a { color: var(--muted); }
