/*
  reckonry.app

  A ledger of estimates. Cream paper, IBM Plex Mono for every heading and
  figure, as the app sets its verdicts, and IBM Plex Sans for reading. The
  five divergence stages, Teal to Magenta, are the only color, and only
  where a miss is being shown.

  The home page is a reckoning of its own: the visitor estimates how long
  reading it will take, the estimate locks, and End shows how it landed.

  No analytics. The privacy policy says the site collects nothing, so keep
  it that way.
*/

:root {
  --cream: #f8f5f0;
  --cream-2: #efeae2;
  --card: #ffffff;
  --ink: #2a2622;
  --soft: #6b655d;
  --dim: #b9b2a8;
  --hair: rgba(42, 38, 34, 0.12);

  --teal-1: #1f5f5b;    --teal-2: #3e8a82;
  --petrol-1: #2e4e6e;  --petrol-2: #4e7899;
  --indigo-1: #46406e;  --indigo-2: #6e689c;
  --violet-1: #6e3a78;  --violet-2: #9a5fa6;
  --magenta-1: #8e2358; --magenta-2: #c04a80;

  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --page: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.08rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--petrol-2); text-underline-offset: 0.2em; }

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

h1, h2, h3 { font-family: var(--mono); font-weight: 400; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }

p { margin: 0 0 1rem; }

.eyebrow { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin-bottom: 1.25rem; }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
}

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 2rem; }
.buy span { font-size: 0.98rem; color: var(--soft); }

/* Stage gradients, used wherever a miss is shown. */
[data-stage="teal"]    { --s1: var(--teal-1);    --s2: var(--teal-2); }
[data-stage="petrol"]  { --s1: var(--petrol-1);  --s2: var(--petrol-2); }
[data-stage="indigo"]  { --s1: var(--indigo-1);  --s2: var(--indigo-2); }
[data-stage="violet"]  { --s1: var(--violet-1);  --s2: var(--violet-2); }
[data-stage="magenta"] { --s1: var(--magenta-1); --s2: var(--magenta-2); }

/* ---------- Bar ---------- */

.bar-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark { display: flex; align-items: center; gap: 0.65rem; font-family: var(--mono); font-weight: 500; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.02em; }
.mark img { border-radius: 8px; }

.bar nav { display: flex; align-items: center; gap: 1.5rem; font-weight: 500; font-size: 1rem; }
.bar nav a { text-decoration: none; }
.bar-cta { border: 1px solid var(--ink); padding: 0.35rem 0.95rem; border-radius: 10px; }

/* ---------- The live slip ---------- */

.live {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 50%;
  z-index: 10;
  width: min(36rem, calc(100% - 1.5rem));
  transform: translateX(-50%);
  border-radius: 22px;
  background: #1d1b19;
  color: #f3efe8;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  animation: drop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes drop { from { transform: translate(-50%, -140%); } }

.live-inner { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.6rem 0.55rem 1rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 0 4px rgba(62, 138, 130, 0.25); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(62, 138, 130, 0); } }
.live-task { font-size: 0.92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-clock { font-family: var(--mono); font-size: 1.35rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.live-est { font-size: 0.82rem; opacity: 0.7; white-space: nowrap; }

.live-end, .end {
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.live-end { padding: 0.45rem 1rem; background: #f3efe8; color: #1d1b19; }

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

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3.5rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.2rem); font-weight: 300; line-height: 1.02; letter-spacing: -0.045em; }

.lede { margin-top: 1.75rem; max-width: 32rem; font-size: 1.22rem; color: var(--soft); }

/* The reckoning card, drawn like the app's Home */

.reckon {
  background: var(--card);
  border-radius: 26px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(42, 38, 34, 0.05), 0 20px 50px rgba(42, 38, 34, 0.1);
}

.reckon-label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin-bottom: 0.9rem; }

.reckon-task {
  background: var(--cream);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-weight: 500;
  margin-bottom: 1.1rem;
}

.reckon-q { font-size: 0.9rem; color: var(--soft); margin-bottom: 0.6rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
}

.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.start {
  display: block;
  width: 100%;
  margin-top: 1.3rem;
  font: inherit;
  font-weight: 600;
  padding: 0.85rem;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
}

.start:disabled { background: var(--cream-2); color: var(--dim); cursor: default; }

.reckon.is-running .chips, .reckon.is-running .start, .reckon.is-running .reckon-q { display: none; }

.locked { text-align: center; padding: 0.4rem 0 0.2rem; }
.locked-clock { font-family: var(--mono); font-size: 3.4rem; line-height: 1; margin: 0.2rem 0 0.5rem; font-variant-numeric: tabular-nums; }
.locked-est { font-size: 0.92rem; color: var(--soft); }
.end { padding: 0.7rem 2.2rem; background: var(--ink); color: var(--cream); }

.reckon-note { margin: 1rem 0 0; font-size: 0.86rem; color: var(--soft); }

/* ---------- Sections ---------- */

.moments, .arc-sec, .app, .refuse, .landed, .private {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6rem) var(--gutter);
  border-top: 1px solid var(--hair);
}

h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 300; line-height: 1.08; letter-spacing: -0.04em; }

.sec-lede { margin-top: 1.4rem; max-width: 40rem; color: var(--soft); font-size: 1.15rem; }
.sec-note { margin-top: 1.75rem; max-width: 40rem; color: var(--soft); }

/* Three moments */

.moments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.moment { border-top: 2px solid var(--ink); padding-top: 1rem; }
.when { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin-bottom: 0.5rem; }
.moment h3 { font-size: 1.45rem; font-weight: 400; margin-bottom: 0.6rem; }
.moment p:last-child { color: var(--soft); }

/* The arc */

.arc { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; }

.arc li {
  position: relative;
  min-height: 8.5rem;
  padding: 1rem;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--s1), var(--s2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.arc b { font-family: var(--mono); font-weight: 400; font-size: 1.3rem; }
.arc i { font-style: normal; font-size: 0.88rem; opacity: 0.85; }

.arc li.is-yours { transform: translateY(-8px); box-shadow: 0 18px 30px color-mix(in srgb, var(--s1) 40%, transparent); }
.arc li.is-yours::before {
  content: "Yours";
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0.05rem 0.45rem;
  border-radius: 5px;
}

/* The app */

.shots { margin-top: 2.75rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.shots figure { margin: 0; }
.shots img { border-radius: clamp(16px, 2vw, 28px); box-shadow: 0 18px 40px rgba(42, 38, 34, 0.12), 0 0 0 1px var(--hair); }
.shots figcaption { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.92rem; }

.duo { margin: clamp(3rem, 6vw, 4.5rem) 0 0; }
.duo img { border: 10px solid #141210; border-radius: 26px; box-shadow: 0 30px 60px rgba(42, 38, 34, 0.18); }
.duo figcaption { margin-top: 1rem; color: var(--soft); max-width: 36rem; }

/* Refusals, as a ledger with the entries struck */

.ledger {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(2rem, 5vw, 4rem);
  font-family: var(--mono);
  font-size: 1.02rem;
}

.ledger li {
  break-inside: avoid;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: line-through;
  text-decoration-color: var(--magenta-2);
  text-decoration-thickness: 2px;
}

.close { margin-top: 2.5rem; max-width: 44rem; font-family: var(--mono); font-weight: 300; font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.4; letter-spacing: -0.02em; }

/* How it landed */

.result {
  margin-top: 0.5rem;
  border-radius: 26px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  color: #fff;
  background: linear-gradient(135deg, var(--s1), var(--s2));
  box-shadow: 0 24px 50px color-mix(in srgb, var(--s1) 30%, transparent);
  transition: opacity 0.35s ease;
}

.result.is-swapping { opacity: 0; }

.result p { margin: 0; }
.result-task { font-size: 1rem; opacity: 0.85; }
.result-verdict { font-family: var(--mono); font-weight: 300; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.04em; margin: 0.4rem 0 0.8rem !important; }
.result-figures { font-size: 1.05rem; }
.result-stage { margin-top: 1.25rem !important; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }

.landed-note { margin-top: 1.25rem; color: var(--soft); }
.landed-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.end.big { padding: 0.85rem 2rem; font-size: 1rem; }

.again {
  font: inherit;
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  cursor: pointer;
}

/* Privacy */

.private { text-align: center; }
.private p { max-width: 38rem; margin: 1.5rem auto 0; color: var(--soft); font-size: 1.12rem; }
.private .buy { justify-content: center; }

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

.foot-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--hair);
  font-size: 0.95rem;
  color: var(--soft);
}

.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; font-weight: 500; color: var(--ink); }
.foot nav a { text-decoration: none; }
.foot p { margin: 0 0 0.4rem; max-width: 44rem; }

/* ---------- Document pages: privacy, support, event ---------- */

.doc { max-width: 44rem; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(4rem, 8vw, 6rem); }

.doc h1 { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.045em; }
.doc .lede, .doc .updated { margin-top: 1rem; font-size: 1.15rem; color: var(--soft); max-width: none; }
.doc h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 400; margin: 2.5rem 0 0.6rem; }
.doc .qa h2 { margin-top: 0; }
.doc .qa { margin-bottom: 2.25rem; }
.doc p, .doc li { color: #4d4740; }
.doc ul, .doc ol { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .eyebrow { margin-top: 3rem; }
.doc .duo { margin: 2.5rem 0; }

.card-teal, .contact-card {
  margin: 1.75rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-1), var(--teal-2));
}

.card-teal p, .contact-card p, .contact-card a, .contact-card div { color: #fff; margin: 0; }
.contact-card .label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin-bottom: 0.3rem; }
.contact-card a { font-family: var(--mono); font-size: 1.2rem; }

/* ---------- Small screens ---------- */

@media (max-width: 56rem) {
  .hero, .moments { grid-template-columns: minmax(0, 1fr); }
  .arc { grid-template-columns: minmax(0, 1fr); }
  .arc li { min-height: 0; flex-direction: row; justify-content: flex-start; align-items: baseline; padding: 0.9rem 1rem; }
  .arc li i { margin-left: auto; }
  .arc li.is-yours { transform: translateX(6px); }
  .arc li.is-yours::before { position: static; order: -1; margin-right: auto; margin-left: 0; }
  .arc li.is-yours b { margin-left: 0.6rem; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger { columns: 1; }
  .duo img { border-width: 6px; border-radius: 16px; }
}

@media (max-width: 34rem) {
  .bar nav { gap: 1rem; }
  .live-est { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .live, .live-dot { animation: none !important; }
  .arc li, .result { transition: none !important; }
}
