/* YearWise landing page.
   The page is laid out on the same twelve columns as the year itself:
   the headline spans nine months, the lede six, each point a quarter. */

@font-face { font-family: "Single Dollar Serif"; src: local("Georgia"), local("Times New Roman"); unicode-range: U+0024; }

:root {
  --ground: #0E0D0C;
  --surface: #161412;
  --text: #F2EDE6;
  --muted: #A39C93;
  --dim: #8A847C;
  --line: rgba(242, 237, 230, 0.1);
  --amber: #E2A847;
  --serif: "Single Dollar Serif", "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gap: 8px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, p, dl, dd, figure, ol { margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid rgba(242, 237, 230, 0.75); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px, env(safe-area-inset-left));
}

/* ---------- Header ---------- */

.top { display: flex; justify-content: space-between; align-items: center; min-height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; text-decoration: none;
}

.quiet-link {
  color: var(--muted);
  text-decoration: underline; text-decoration-color: rgba(163, 156, 147, 0.4);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.quiet-link:hover { color: var(--text); text-decoration-color: var(--text); }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 0; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.028em;
  max-width: 13.5em;
}
.hero h1 span { display: block; }
.lede {
  margin-top: 32px;
  max-width: 34em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
}
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border-radius: 24px; background: var(--text); color: var(--ground);
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover { background: #FFFFFF; }

/* ---------- The year ---------- */

.year { margin-top: 88px; }
.grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 104px; padding: 13px;
  border-radius: 10px;
  border: 1px solid rgba(242, 237, 230, 0.07);
  background: var(--surface);
  animation: arrive 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.tile.is-paid, .tile.is-empty { background: transparent; }
.tile.is-empty { border-style: dashed; border-color: rgba(242, 237, 230, 0.1); }
.tile.is-selected { border: 1.5px solid var(--text); }

.t-top { display: flex; justify-content: space-between; align-items: center; min-height: 13px; }
.m { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.tile.is-selected .m { color: var(--text); }
.check { color: var(--dim); }
.dot { width: 6px; height: 6px; border-radius: 3px; background: var(--amber); }
.amt { font-family: var(--serif); font-size: 24px; line-height: 1; white-space: nowrap; }
.tile.is-paid .amt, .tile.is-empty .amt { color: var(--dim); }
.n { font-size: 13px; color: var(--dim); }

.year figcaption { margin-top: 18px; font-size: 15px; color: var(--dim); }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
.tile:nth-child(2) { animation-delay: 0.04s; }
.tile:nth-child(3) { animation-delay: 0.08s; }
.tile:nth-child(4) { animation-delay: 0.12s; }
.tile:nth-child(5) { animation-delay: 0.16s; }
.tile:nth-child(6) { animation-delay: 0.2s; }
.tile:nth-child(7) { animation-delay: 0.24s; }
.tile:nth-child(8) { animation-delay: 0.28s; }
.tile:nth-child(9) { animation-delay: 0.32s; }
.tile:nth-child(10) { animation-delay: 0.36s; }
.tile:nth-child(11) { animation-delay: 0.4s; }
.tile:nth-child(12) { animation-delay: 0.44s; }

/* ---------- Points, one per quarter ---------- */

.points { margin-top: 112px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px var(--gap); }
.points div { border-top: 1px solid var(--line); padding-top: 20px; }
.points dt { font-family: var(--serif); font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.points dd { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 30em; }

/* ---------- Footer ---------- */

.foot {
  margin-top: 120px; padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 15px; color: var(--dim);
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .page { padding-left: 32px; padding-right: 32px; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: 0; }
  .points div { padding-right: 24px; }
}

@media (min-width: 1040px) {
  .page { padding-left: 40px; padding-right: 40px; }
  .top { min-height: 96px; }
  .hero { padding-top: 96px; }
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tile { padding: 12px; }
  .amt { font-size: clamp(18px, 1.75vw, 23px); }
  .points { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lede { max-width: calc(50% - var(--gap) / 2); }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
  .quiet-link, .btn { transition: none; }
}
