/* Cairnwell public landing page. One sheet, no scripts, no external requests.
   Tokens are the app's (DESIGN.md); the page is the app's brand at editorial
   scale. No animation or transition exists on this page, so reduced-motion is
   respected by construction. */

@font-face {
  font-family: "Cairnwell UI";
  src: url("fonts/public-sans-upright.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cairnwell Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #f7f8f8;
  --card-edge: #c9cdd1;
  --panel: #eef0f2;
  --ink: #0f1215;
  --ink-2: #3a4048;
  --ink-3: #5d646c;
  --rule: #d5d9dd;
  --leader: #8a9199;
  --ground: #23282d;
  --field-ink: #e8eaec;
  --field-ink-2: #aab1b8;
  --field-act: #7fd3e3;
  --act: #006e82;
  --act-ink: #00566a;
  --on-act: #ffffff;
  --focus: #0f1215;
  --focus-gap: #ffffff;
  --select: #fff0a3;
  --caution: #8a5300;
  --caution-wash: #fdf1dc;
  --caution-edge: #d9a441;
  --font-ui: "Cairnwell UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cairnwell Mono", ui-monospace, monospace;
  --measure: 66ch;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

html { background: var(--page); }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--select); color: var(--ink); }

a { color: var(--act); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--act-ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-gap), 0 0 0 4px var(--focus);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--page); padding: 0.75rem 1rem; z-index: 2;
}
.skip:focus { left: var(--pad); top: 0.5rem; }

/* running head, same register as the app's */
.head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem var(--pad);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.cairn { display: block; }
.wordmark { font-weight: 700; letter-spacing: -0.01em; font-size: 1.125rem; }
.head nav a { font-size: 0.9375rem; font-weight: 600; }

main { max-width: 46rem; margin: 0 auto; padding: 0 var(--pad); }
section { padding-top: clamp(4.5rem, 12vw, 7.5rem); }
section.hero { padding-top: clamp(2.5rem, 7vw, 4.5rem); }
section:last-of-type { padding-bottom: clamp(4.5rem, 12vw, 7.5rem); }

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.375rem, 6.5vw, 4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  margin: 0 0 1rem;
  max-width: var(--measure);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.trust {
  margin: 0 0 2rem;
  padding-left: 0.875rem;
  border-left: 3px solid var(--act);
  font-weight: 600;
  color: var(--ink);
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { margin: 0 0 0.5rem; font-size: 1.125rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1.125rem; max-width: var(--measure); }

/* the one filled act, cyan as in the app */
.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: var(--act);
  color: var(--on-act);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 6px;
}
.act:hover { background: var(--act-ink); color: var(--on-act); }
.act:focus-visible { outline-color: var(--focus); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cta-promise { color: var(--ink-2); font-size: 1rem; max-width: 34ch; }

.problem p { color: var(--ink-2); }
.three { margin-top: 1.5rem; display: grid; gap: 2rem; }
.three > div, .three h3, .three p { margin: 0; }
.three > div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.three h3 + p { margin-top: 0.5rem; }
@media (min-width: 48rem) {
  .three { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* screenshots, and the sized slots until the captures land */
.demo > p { color: var(--ink-2); }
figure { margin: 2.5rem 0 0; }
figcaption { margin-top: 0.75rem; color: var(--ink-3); font-size: 0.9375rem; max-width: var(--measure); }
.stamp {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--caution);
  background: var(--caution-wash);
  border: 1px solid var(--caution-edge);
  border-radius: 4px;
}
.slot {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--card-edge);
  border-radius: 6px;
}
.slot span {
  font-size: 0.9375rem;
  color: var(--ink-3);
}
img { max-width: 100%; height: auto; display: block; border: 1px solid var(--card-edge); border-radius: 6px; }

/* the app's checklist grammar for the four constants */
.items { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: item; }
.items li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.items li:last-child { border-bottom: 1px solid var(--rule); }
.ordinal {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}
.items h3 { display: flex; align-items: baseline; gap: 0.75rem; margin: 0; }
.leader { flex: 1; border-bottom: 2px dotted var(--leader); transform: translateY(-0.25rem); }
.fact { margin: 0.25rem 0 0; color: var(--ink-2); }

.close p { text-align: left; }

.foot {
  margin-top: clamp(4.5rem, 12vw, 7.5rem);
  padding: 3rem var(--pad);
  background: var(--ground);
  color: var(--field-ink);
}
.foot .brand { color: var(--field-ink); }
.foot p { margin: 0.75rem 0 0; max-width: none; }
.foot-mail { color: var(--field-act); }
.foot-mail:hover { color: var(--field-act); text-decoration: none; }
.fine { color: var(--field-ink-2); font-size: 0.9375rem; }

@media (forced-colors: active) {
  .act { border: 1px solid ButtonText; }
  .stamp { border-color: CanvasText; background: Canvas; color: CanvasText; }
  .slot { border-color: CanvasText; background: Canvas; }
  .slot span { color: CanvasText; }
  .items li { border-color: CanvasText; }
  .leader { border-color: CanvasText; }
  .foot { border-top: 1px solid CanvasText; }
}
