/**
 * agenteam.org — the app's "old print" theme, on a page.
 * The palette is copied from src/renderer/tokens.css [data-theme='paper'],
 * so the site and the app are the same colour of paper.
 */

:root {
  --paper: #efe4cd;
  --paper-lit: #e2d4b8;
  --edge: #5d4a35;
  --edge-soft: #bfa981;
  --ink: #32271b;
  --muted: #8a7658;
  --accent: #b4503a;
  --accent-ink: #fdf6e8;
  --danger: #a33a2a;
  --code-bg: rgba(93, 74, 53, 0.12);
  --hover: rgba(93, 74, 53, 0.12);
  --busy: #c98a2e;
  --plate: #4a3a29;
  --plate-ink: #f6eeda;
  --surface: #e5d9bf;
  --surface-soft: #dbcdad;
  --card: #efe4cd;

  --font-ui: ui-rounded, 'SF Pro Rounded', 'Avenir Next', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --border: 2px;
  --radius: 14px;
  --radius-sm: 11px;
  --drop: 0 3px 0 var(--edge);
  --measure: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background-color: var(--paper);
  /* Print never lies flat: a little grain, and the fibres of the stock. */
  background-image:
    repeating-linear-gradient(0deg, rgba(93, 74, 53, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.5), transparent 55%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: clamp(25px, 3.4vw, 34px); }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }

a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ---------- the one button in the product ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  text-decoration: none;
  box-shadow: var(--drop);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
}
.btn:hover { background: var(--surface-soft); color: var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #a4462f; color: var(--accent-ink); }
.btn--sm { padding: 6px 12px; font-size: 14px; }
.btn--lg { padding: 13px 24px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }

/* ---------- masthead ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(239, 228, 205, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--border) solid var(--edge);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}
/* The mark is four faces already: a frame around it only crowds them. */
.brand img { display: block; }

.bar-nav { display: flex; gap: 18px; margin-left: auto; font-size: 15px; }
.bar-nav a { color: var(--muted); text-decoration: none; }
.bar-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 64px) clamp(16px, 4vw, 40px);
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.lede { font-size: 18px; color: var(--ink); max-width: 46ch; }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 26px; }
.cta-note { font-size: 13px; color: var(--muted); }

/* ---------- the drawn desktop ---------- */

.hero-art { display: flex; justify-content: center; }

.desk {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 3.2;
  background: var(--paper-lit);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 10px 0 var(--edge-soft);
  overflow: hidden;
}

.desk-window {
  position: absolute;
  inset: 12% 10% 20% 8%;
  background: var(--paper);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 26px 16px 16px;
}
.desk-window .dot {
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--edge-soft);
}
.desk-window .dot:nth-of-type(1) { left: 12px; }
.desk-window .dot:nth-of-type(2) { left: 26px; }
.desk-window .dot:nth-of-type(3) { left: 40px; }

.desk-lines { display: flex; flex-direction: column; gap: 9px; }
.desk-lines i { height: 7px; border-radius: 4px; background: var(--edge-soft); opacity: 0.65; }

.agent { position: absolute; }
.agent--fox { right: 4%; bottom: 8%; text-align: center; }
.agent--cat { left: 6%; bottom: 6%; text-align: center; }

/* The face, with its name plate under it, and the box hugging both so the
   busy dot lands beside the sprite rather than out in the margin. */
.sprite {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin-inline: auto;
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 3px 0 rgba(93, 74, 53, 0.3));
  animation: bob 3.4s ease-in-out infinite;
}
.agent--cat .sprite { font-size: 38px; animation-delay: -1.4s; }

.plate {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--plate-ink);
  background: var(--plate);
  border-radius: 7px;
  padding: 2px 8px;
}

.sprite--busy::after {
  content: '';
  position: absolute;
  top: 2px;
  right: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--busy);
  border: 2px solid var(--paper-lit);
  animation: pulse 1.5s ease-in-out infinite;
}

.balloon {
  position: relative;
  width: 210px;
  margin-bottom: 14px;
  background: var(--card);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--drop);
  text-align: left;
}
.balloon p { margin: 0; font-size: 12px; }
.balloon p:first-child { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.balloon-line { line-height: 1.4; }
/* The tail points at the sprite, which sits centred under the balloon. */
.balloon .tail {
  position: absolute;
  bottom: -9px;
  left: 50%;
  margin-left: -7px;
  width: 14px;
  height: 14px;
  background: var(--card);
  border-right: var(--border) solid var(--edge);
  border-bottom: var(--border) solid var(--edge);
  transform: rotate(45deg);
}

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- bands ---------- */

.band {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 76px) clamp(16px, 4vw, 40px);
}
/* Full-bleed paper, but the words keep the same left edge as every other band:
   the centring happens in the padding, not on each child. */
.band--soft {
  max-width: none;
  background: var(--surface);
  border-top: var(--border) solid var(--edge);
  border-bottom: var(--border) solid var(--edge);
  padding-inline: max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter)));
}
.band > h2 { max-width: 20ch; }
.band-lede { font-size: 17px; max-width: 58ch; color: var(--ink); }

/* Words on the left, the list of what it drives on the right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.chips--stack { flex-direction: column; align-items: flex-start; margin-top: 0; }

/* Four of them, so two by two rather than three and a straggler. */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  background: var(--card);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 18px 6px;
  box-shadow: var(--drop);
}
.card h3 { color: var(--accent); }
.card p { font-size: 15px; color: var(--ink); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 22px 0 18px;
}
.chips li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  background: var(--card);
  border: var(--border) solid var(--edge);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: var(--drop);
}
.chip-mark { color: var(--accent); flex: none; }

.fine { font-size: 13px; color: var(--muted); max-width: 60ch; }
.fine--center { text-align: center; margin: 12px auto 0; }

/* ---------- price ---------- */

.price-wrap {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  margin-top: 26px;
}

/* Free beside paid, the same width: neither is the small print. */
.price-wrap--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }

.price-aside--wide { margin-top: 34px; max-width: 760px; }

.price-card {
  background: var(--card);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 6px 0 var(--edge);
}

/* Says what the number is before you read the number. */
.tag--quiet {
  color: var(--ink);
  background: var(--surface);
}

.tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border: var(--border) solid var(--edge);
  border-radius: 999px;
  box-shadow: var(--drop);
}

.price-tag {
  font-size: 62px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--accent);
}
.price-cur { font-size: 30px; vertical-align: 22px; margin-right: 2px; }
.price-note { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 34ch; }

.ticks { list-style: none; padding: 0; margin: 18px 0 22px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  margin-bottom: 8px;
}
.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 700;
  color: var(--accent);
}

.price-aside h3 { margin-top: 18px; }
.price-aside h3:first-child { margin-top: 4px; }
.price-aside p { color: var(--ink); max-width: 52ch; }

/* Three things to do after the zip lands. */
.steps {
  max-width: 460px;
  margin: 18px auto 20px;
  padding-left: 20px;
  text-align: left;
  font-size: 15px;
}
.steps li { margin-bottom: 8px; }

/* The key, big enough to select in one drag. */
.licence-key {
  margin: 18px auto;
  max-width: 560px;
  padding: 12px 14px;
  font-size: 13px;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: var(--code-bg);
  border: var(--border) solid var(--edge);
  border-radius: var(--radius-sm);
}

/* ---------- faq ---------- */

.faq { margin: 24px 0 0; max-width: 62ch; }
.faq dt { font-weight: 700; margin-top: 20px; }
.faq dt:first-of-type { margin-top: 0; }
.faq dd { margin: 6px 0 0; color: var(--ink); }

/* ---------- closer ---------- */

.closer {
  text-align: center;
  padding: clamp(48px, 7vw, 88px) 20px;
}
.closer img {
  display: block;
  margin: 0 auto 18px;
}
.closer h2 { margin-bottom: 22px; }

.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 20px 34px;
  font-size: 14px;
  color: var(--muted);
  border-top: var(--border) solid var(--edge);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot-sep { opacity: 0.6; }

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; }
  .price-wrap, .price-wrap--pair { grid-template-columns: minmax(0, 1fr); }
  .bar-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sprite, .sprite--busy::after { animation: none; }
}
