/*
 * trejd.app — the app's pixel system, on the web.
 *
 * There is no website frame in Claude Design yet. Every value here is read
 * from the app's own layer: colours from src/ui/tokens.ts (`color`,
 * `offContract`), the wood bar and hanging plaque from C2/C22, cards from
 * C12, buttons and tags from C5/C3, the red-bordered box from C21
 * `safety-box`, Pixelify only for the one display headline (C24). Radius 0
 * and hard drops with no blur, as `drop()` draws them. When the design
 * gets a website frame, align to it and say what moved.
 *
 * Fonts are served from here, not from Google: the site sets no cookies and
 * calls no third party, which is what /prywatnosc says about it.
 */

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Figtree_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Figtree_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Figtree_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Figtree_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/PixelifySans_700Bold.ttf") format("truetype"); }

:root {
  /* C0 */
  --ink: #180808;
  --wood: #682808;
  --woodD: #481808;
  --woodL: #8a4a22;
  --parch: #f6e6c4;
  --tan: #e8cfa4;
  --gold: #f8d828;
  --goldD: #f8a808;
  --green: #4ca838;
  --red: #c8281e;
  --white: #fff;
  /* offContract */
  --heroBg: #2a1408;
  --rivet: #c0c4cc;

  --page: 16px;
  --measure: 720px;
  --wide: 1040px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parch);
  color: var(--ink);
  /* Figtree has no `≈` or `—`; the browser's sans draws those, as in the app (tokens.ts). */
  font: 400 16px/1.55 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--wood); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--goldD); outline-offset: 2px; }

/* `hidden` must win over .btn's display, or invite.js could not hide the button. */
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--gold); color: var(--ink); padding: 8px 12px; border: 3px solid var(--ink); }

/* ── C2 · top bar: wood, 3px ink rule, the plaque hanging over the rule ─── */
.bar {
  position: relative;
  z-index: 3;
  height: 59px;
  background: var(--wood);
  border-bottom: 3px solid var(--ink);
}
.bar__in {
  max-width: var(--wide);
  height: 56px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plaque {
  position: absolute;
  left: 50%;
  top: 26px;
  transform: translateX(-50%);
  height: 48px;
  /* C2: `drop-shadow(0 4px 0 rgba(24,8,8,.5))` follows the plaque's alpha. */
  filter: drop-shadow(0 4px 0 rgba(24, 8, 8, .5));
}
.plaque img { height: 100%; width: auto; }
/* C1 · icon plate: 40px parchment, 3px ink border, 3px ink drop. */
.plate {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--parch);
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.plate:active { transform: translateY(3px); box-shadow: none; }
.plate svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bar__nav { display: none; gap: 18px; }
.bar__nav a { color: var(--tan); font-weight: 600; font-size: 14px; text-decoration: none; }
.bar__nav a:hover, .bar__nav a[aria-current="page"] { color: var(--parch); text-decoration: underline; }

/* ── Page column ─────────────────────────────────────────────────────── */
.col { max-width: var(--measure); margin: 0 auto; padding: 34px var(--page) 48px; }
.col > h2:first-child { margin-top: 0; }
.col--wide { max-width: var(--wide); }
/* C3 · title row: 700 20 ink, a step up on the web. */
h1 { font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -0.2px; margin: 16px 0 6px; }
.sub { color: var(--wood); font-size: 14px; margin: 0 0 22px; }
/* C4 · section title: 700 wood. */
h2 { font-weight: 700; font-size: 19px; line-height: 1.3; color: var(--wood); margin: 34px 0 10px; letter-spacing: -0.18px; }
h3 { font-weight: 700; font-size: 16px; line-height: 1.35; margin: 22px 0 6px; }
p, ul, ol { margin: 0 0 12px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--wood); }
strong { font-weight: 700; }

/* ── C12 · card: white, 2px wood-dark border, 3px wood-dark drop ─────── */
.card {
  background: var(--white);
  border: 2px solid var(--woodD);
  box-shadow: 0 3px 0 var(--woodD);
  padding: 14px 16px;
  margin: 0 0 16px;
}
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ── C21 · safety box: white, 3px red border ─────────────────────────── */
.safety {
  background: var(--white);
  border: 3px solid var(--red);
  padding: 12px 14px;
  margin: 0 0 16px;
}
.safety > :last-child { margin-bottom: 0; }
.safety strong { display: block; font-size: 16px; margin-bottom: 4px; }
.safety a[href^="tel:"] { color: var(--red); font-weight: 700; white-space: nowrap; }

/* ── C5 · buttons and C3's tag ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  background: var(--gold);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 var(--goldD), 0 4px 0 var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.btn:hover { color: var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -5px 0 var(--goldD), 0 1px 0 var(--ink); }
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--parch);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 600;
  font-size: 14px;
}

/* ── Landing: the welcome hero (C22–C25) ─────────────────────────────── */
.hero {
  position: relative;
  background: var(--heroBg);
  color: var(--parch);
  overflow: hidden;
}
.hero__art {
  position: absolute;
  inset: 0;
  background: url("/assets/img/hero.webp") 50% 38% / cover no-repeat;
}
/* A fade to the ground, not a scrim (C23): the photograph stays undarkened above it. */
.hero__art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 75%;
  background: linear-gradient(to bottom, rgba(42, 20, 8, 0) 0%, rgba(42, 20, 8, .7) 50%, var(--heroBg) 92%);
}
.hero__in {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 300px var(--page) 40px;
}
/* C24: Pixelify 700, gold, a hard 3px ink shadow. */
.display {
  font-family: "Pixelify Sans", "Figtree", sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.02;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
  margin: 0 0 14px;
  max-width: 14em;
}
/* C25: 400 15/1.45 parchment. */
.lead { font-size: 16px; line-height: 1.45; color: var(--parch); max-width: 32em; margin: 0 0 22px; }
.hero .tag { background: var(--parch); }

/* The three promises, then the steps. */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 0 0 8px; }
.grid .card { margin: 0; }
.card h3 { margin-top: 0; color: var(--wood); }
.steps { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  margin: 0 0 18px;
}
/* The number in a gold C1 plate. */
.steps li::before {
  content: counter(step);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 700;
  font-size: 18px;
}
.steps strong { display: block; font-size: 16px; }
.steps span { color: var(--woodD); font-size: 15px; }
.band {
  background: var(--tan);
  border-top: 3px solid var(--woodD);
  border-bottom: 3px solid var(--woodD);
}
.icon { width: 96px; height: 96px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.get { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.get p { margin: 0; }

/* Steps a person follows in the app: „Ja → ⚙ → …". */
.path { font-weight: 600; }
.path kbd { font: inherit; background: var(--parch); border: 2px solid var(--ink); padding: 0 6px; box-shadow: 0 2px 0 var(--ink); }
.faq details { border-top: 2px solid var(--tan); padding: 10px 0; }
.faq details:last-child { border-bottom: 2px solid var(--tan); }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.faq summary::marker { color: var(--wood); }
.faq details p { margin: 8px 0 0; }
.meta { color: var(--wood); font-size: 13px; }
.toc { font-size: 15px; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 2px; }
.big { font-size: 18px; font-weight: 700; word-break: break-all; }

/* ── C6 · footer: wood, 3px ink rule ─────────────────────────────────── */
.foot {
  background: var(--wood);
  border-top: 3px solid var(--ink);
  color: var(--tan);
  font-size: 14px;
}
.foot__in { max-width: var(--wide); margin: 0 auto; padding: 22px var(--page) 28px; display: grid; gap: 18px; }
.foot a { color: var(--parch); }
.foot a:hover { color: var(--gold); }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot li { margin: 0; }
.foot address { font-style: normal; line-height: 1.5; }
.foot small { font-size: 13px; color: var(--tan); }

@media (min-width: 720px) {
  .plaque { top: 22px; height: 60px; }
  .bar__nav { display: flex; }
  .col { padding-top: 48px; }
  h1 { font-size: 32px; }
  .hero__in { padding: 140px var(--page) 64px; min-height: 560px; display: flex; flex-direction: column; justify-content: flex-end; }
  .hero__art { background-position: 50% 42%; }
  .display { font-size: 52px; }
  .lead { font-size: 18px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .foot__in { grid-template-columns: 1fr auto; align-items: start; }
}

/* Wide screens: the picture is a phone-shaped portrait (941×1672), so instead of
   stretching it across the page it stands on the right, as large as it is drawn,
   and fades into the ground towards the text. */
@media (min-width: 960px) {
  .hero__art { left: auto; width: 52%; background-position: 50% 46%; }
  .hero__art::after { top: 0; height: auto; background: linear-gradient(to right, var(--heroBg) 0%, rgba(42, 20, 8, .55) 22%, rgba(42, 20, 8, 0) 55%); }
  .hero__in { min-height: 600px; justify-content: center; padding-top: 96px; }
  .hero__in > * { max-width: 50%; }
}
