@font-face {
  font-family: "Chivo";
  src: url("./assets/fonts/chivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("./assets/fonts/space-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("./assets/fonts/space-mono-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f1f1f0;
  --paper-strong: #f7f5f0;
  --well: #dedddb;
  --ink: #1a1a18;
  --ink-muted: rgb(26 26 24 / 0.68);
  --primary: #3550b0;
  --primary-content: #f6f1e9;
  --accent: #b24a38;
  --shadow: rgb(31 26 22 / 0.26);
  --cell-border: rgb(31 26 22 / 0.18);
  --lv0: #d7d8dc;
  --lv1: color-mix(in srgb, var(--primary) 28%, var(--paper));
  --lv2: color-mix(in srgb, var(--primary) 55%, var(--paper));
  --lv3: var(--primary);
  --lv4: color-mix(in srgb, var(--primary) 68%, black);
  --space: clamp(1rem, 2vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(26 26 24 / 0.055) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgb(26 26 24 / 0.045) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 82% 14%, rgb(178 74 56 / 0.18), transparent 34rem),
    var(--paper);
  font-family: "Chivo", system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-shell {
  width: min(100% - 2rem, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
}

.status-pill,
.eyebrow,
.button,
.feature-kicker,
.grid-label,
.panel-topline {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  border: 1px solid var(--ink);
  background: var(--paper-strong);
  padding: 0.45rem 0.7rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-copy {
  max-width: 690px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 1.2rem;
  max-width: 12ch;
  font-size: clamp(3.5rem, 9vw, 7.25rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  max-width: 40rem;
  margin-top: 1.4rem;
  color: var(--ink-muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease;
}

.button.primary {
  background: var(--primary);
  color: var(--primary-content);
  box-shadow: 3px 3px 0 var(--shadow);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
  transform: translate(-1px, -1px);
}

.button.quiet {
  background: var(--paper-strong);
  color: var(--ink-muted);
}

.preview-panel,
.feature-strip article {
  border: 1px solid var(--ink);
  background: var(--paper-strong);
  box-shadow: 5px 5px 0 var(--shadow);
}

.preview-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.panel-topline,
.grid-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.panel-topline {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1rem;
}

.habit-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.habit-row {
  min-height: 3.4rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.75rem;
}

.habit-row span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-row strong {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}

.habit-check {
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--ink);
  background: var(--well);
}

.habit-row.is-complete .habit-check {
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--paper);
}

.grid-label {
  margin-top: 1.35rem;
  color: var(--ink-muted);
}

.activity-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 0.32rem;
  width: 100%;
  margin-top: 0.8rem;
  overflow: hidden;
}

.activity-grid span {
  aspect-ratio: 1;
  min-width: 0.82rem;
  border: 1px solid var(--cell-border);
}

.lv0 {
  background: var(--lv0);
}

.lv1 {
  background: var(--lv1);
}

.lv2 {
  background: var(--lv2);
}

.lv3 {
  background: var(--lv3);
}

.lv4 {
  background: var(--lv4);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-strip article {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.feature-kicker {
  color: var(--accent);
}

.feature-strip h2 {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #111214;
    --paper-strong: #191b20;
    --well: #242832;
    --ink: #ece9e2;
    --ink-muted: rgb(236 233 226 / 0.7);
    --primary: #6d86e0;
    --primary-content: #18120e;
    --accent: #e4734f;
    --shadow: rgb(239 233 224 / 0.2);
    --cell-border: rgb(239 233 224 / 0.16);
    --lv0: #20242c;
  }
}

@media (max-width: 840px) {
  .site-shell {
    min-height: auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-mark {
    width: 2.7rem;
    height: 2.7rem;
  }

  h1 {
    font-size: clamp(2.85rem, 18vw, 4.5rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .activity-grid span {
    min-width: 0.68rem;
  }
}
