/* The site's own look, from the Guild Buyback design system: tokens.css (built from the design tokens) holds every
   colour, space and size as a variable. Dark only, like the addon: charcoal panels on a near-black well, gold
   display titles, copper used sparingly. */

@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url("/assets/fonts/Marcellus-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--well); color-scheme: dark; }
body {
  margin: 0; background: var(--well); color: var(--text);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.6; letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--copper-text); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--panel); color: var(--cream); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }

/* Header and nav */
.site-header { background: var(--frame); border-bottom: 1px solid var(--line-dark); box-shadow: inset 0 -1px 0 var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 24px; color: var(--gold); text-decoration: none; letter-spacing: 0.5px; }
.wordmark:hover { color: var(--cream); }
.crest {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none;
  border-radius: var(--radius-round); background: radial-gradient(var(--titlebar), var(--frame));
  border: 2px solid var(--line-strong); box-shadow: 0 0 0 2px var(--line-dark);
  font-family: var(--font-display); font-size: 20px; line-height: 1; color: var(--gold);
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 4px 2px 6px; font-family: var(--font-display); font-size: 17px; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--amber); border-bottom-color: var(--flare); }

/* The launch notice */
.notice { background: var(--attention-deep); border-bottom: 1px solid var(--attention); }
.notice p { margin: 0; padding: 10px 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.notice strong { color: var(--attention); font-weight: 600; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--gold); line-height: 1.2; letter-spacing: 0.2px; }
h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 16px; color: var(--cream); }
h2 { font-size: clamp(22px, 3vw, 28px); margin: 40px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
.lead { font-size: 20px; line-height: 1.55; color: var(--text); max-width: 46em; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--copper-text); margin-bottom: 12px; }
strong { color: var(--cream); font-weight: 600; }

/* Buttons: square, uppercase, the primary in ember */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions .more { align-self: center; padding: 0 6px; font-weight: 500; } /* a link that stays on the page, not a button */
.picture { padding-top: 8px; padding-bottom: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px;
  border: 1px solid var(--line-dark); border-radius: var(--radius-none);
  background: linear-gradient(var(--titlebar-hi), var(--titlebar-lo)); box-shadow: var(--shadow-bevel);
  color: var(--text); font-size: 14px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
}
.btn:hover { color: var(--cream); border-color: var(--line-strong); }
.btn-primary { background: linear-gradient(var(--ember-hi), var(--ember-lo)); border-color: var(--ember-edge); color: var(--on-ember); }
.btn-primary:hover { color: var(--on-ember); filter: brightness(1.08); }

/* Sections */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line-dark); background: radial-gradient(ellipse at 20% 0%, var(--frame), var(--well) 70%); }
.band { background: var(--inset); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); padding: 8px 0 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-top: 40px; padding-bottom: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--line-dark); padding: 20px 22px; }
.card h2 { margin: 0 0 10px; font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--copper-deep); }
.card p { margin: 0; color: var(--text-muted); }
.prose { padding-bottom: 48px; }
.launch { margin-top: 8px; padding-bottom: 8px; }
.launch .prose { padding-bottom: 32px; }
.prose > * { max-width: 46em; } /* a readable line, on the same left edge as the rest of the page */
.prose li { margin-bottom: 8px; }
.page { padding-top: 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-dark); background: var(--frame); margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px 40px; padding-top: 28px; padding-bottom: 32px; }
.site-footer p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-subtle); }
.site-footer a { color: var(--text-muted); }

/* Forms (the waitlist): fields in the game's inset style, errors in the design's danger colours */
[hidden] { display: none !important; }
.form { display: grid; gap: 4px; max-width: 46em; margin-top: 8px; }
.field { display: grid; gap: 6px; margin-bottom: 10px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.field-group { border: 0; padding: 0; margin: 6px 0 0; min-width: 0; }
.field-group legend { padding: 0; margin-bottom: 8px; font-family: var(--font-display); font-size: 18px; color: var(--gold); }
.field label { font-size: 15px; font-weight: 500; color: var(--text); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 10px; font: inherit; font-size: 16px;
  color: var(--cream); background: var(--field); border: 1px solid var(--field-edge); border-radius: var(--radius-field);
  box-shadow: var(--shadow-inset);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; }
.field-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--copper); }
.field-check label { font-weight: 400; color: var(--text); }
.field-check .field-error { grid-column: 1 / -1; }
.hint { font-size: 14px; color: var(--text-muted); margin: 0; font-weight: 400; }
.field-error { margin: 0; font-size: 14px; color: var(--danger-text); }
.field-error:empty { display: none; }
.cf-turnstile { min-height: 65px; margin: 8px 0 0; }
.form .actions { margin-top: 12px; margin-bottom: 0; }
.form-status { margin: 8px 0 0; min-height: 1.5em; color: var(--text-muted); }
.form-status-error { color: var(--danger-text); }
.form-done { margin-top: 8px; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--positive); }
.form-done h2 { margin-top: 0; color: var(--cream); }
.form-done p { margin: 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 28px; }
  .lead { font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* The demo player (assets/demo.js): step tabs, the window at its design size scaled to the width (or zoomed to pan),
   tooltips drawn outside the scaled window, the caption and the controls */
.gbb-player { margin-top: 20px; }
.gbb-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; }
.gbb-steps li { display: flex; }
.gbb-steps button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; white-space: nowrap; background: transparent;
  border: 1px solid var(--line-strong); color: var(--text-muted); cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; letter-spacing: 0.5px; padding: 4px 10px;
}
.gbb-step-n { font-variant-numeric: tabular-nums; color: var(--text-subtle); }
.gbb-steps button:hover { color: var(--text); }
.gbb-steps button[aria-current="step"] { background: var(--copper-deep); border-color: var(--copper); color: var(--cream); }
.gbb-steps button[aria-current="step"] .gbb-step-n { color: var(--amber); }
.gbb-scene-host { position: relative; width: 100%; }
.gbb-scene-host.gbb-zoomed { overflow: auto; max-height: 75vh; border: 1px solid var(--line); }
.gbb-scene { position: relative; transform-origin: 0 0; background: #000; box-shadow: var(--shadow-window); }
.gbb-op { position: absolute; box-sizing: border-box; }
.gbb-clip { overflow: hidden; }
.gbb-icon { display: block; object-fit: cover; }
.gbb-text { display: flex; flex-direction: column; font-kerning: none; font-variant-ligatures: none; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
.gbb-line { white-space: pre; }
.gbb-cut { overflow: hidden; text-overflow: ellipsis; }
.gbb-wrap { white-space: pre-wrap; overflow-wrap: normal; }
.gbb-glyph { display: flex; align-items: center; justify-content: center; line-height: 1; }
.gbb-hit { cursor: help; }
.gbb-hit:hover, .gbb-hit[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--line-strong); }
.gbb-hit:focus-visible { outline: 2px solid var(--amber); }
.gbb-tip-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; pointer-events: none; }
.gbb-tip {
  position: absolute; width: max-content; max-width: 300px; padding: 8px 10px; background: var(--frame);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-window); font-family: var(--font-sans); font-size: 14px; line-height: 1.4;
}
.gbb-tip-title { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.gbb-tip-full { font-size: 15px; }
.gbb-tip-line { display: flex; gap: 16px; }
.gbb-tip-right { margin-left: auto; }
.gbb-tip-static { position: static; max-width: 360px; }
.gbb-tipcard { display: flex; gap: 12px; align-items: flex-start; justify-content: center; padding: 48px 16px; background: var(--well); border: 1px solid var(--line-dark); }
.gbb-tipcard-slot { width: 56px; height: 56px; flex: none; border: 1px solid var(--line-strong); background: var(--well); }
.gbb-tipcard-icon { display: block; width: 100%; height: 100%; }
.gbb-caption { margin-bottom: 16px; }
.gbb-caption h3 { margin: 0 0 6px; font-size: 24px; color: var(--cream); }
.gbb-caption p { max-width: 46em; color: var(--text); }
.gbb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.gbb-count { color: var(--text-muted); font-size: 14px; }
.gbb-zoom { margin-left: auto; }
.gbb-zoom[aria-pressed="true"] { background: var(--copper-deep); border-color: var(--copper); color: var(--cream); }
.gbb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; }
.gbb-hint { flex: 1 1 12em; margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.btn:disabled { opacity: 0.45; cursor: default; }
.gbb-note { margin-top: 14px; color: var(--text-subtle); font-size: 14px; }
@media (min-width: 900px) { .gbb-zoom { display: none; } }
@media (max-width: 720px) {
  .gbb-steps { flex-wrap: nowrap; gap: 4px; }
  .gbb-steps li { flex: 1 1 0; }
  .gbb-steps button { width: 100%; justify-content: center; min-height: 40px; padding: 0; font-size: 15px; }
  .gbb-step-label { display: none; }
}

/* The whole cycle (How it works, and smaller on Home): six numbered boxes. A phone shows one column with arrows
   down; from 860 px two rows of three run round clockwise (1 to 3 left to right, 4 to 6 right to left), so the arrow
   from 6 points back up to 1. The arrows are clip-path shapes: no images, glyphs or inline styles. */
.prose > .cycle { max-width: none; } /* the diagram takes the page's full width; the text keeps its line */
.cycle { margin: 32px 0 8px; }
.cycle > h2 { margin-top: 0; }
.cycle-steps {
  --cycle-gap: 30px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--cycle-gap);
  list-style: none; margin: 0 0 16px; padding: 0;
}
.cycle .cycle-step {
  position: relative; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 14px 14px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-bevel);
}
.cycle-head { display: flex; align-items: center; gap: 10px; margin: 0; }
.cycle-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px;
  border: 1px solid var(--copper); border-radius: var(--radius-round); background: var(--copper-deep);
  font-family: var(--font-display); font-size: 16px; line-height: 1; color: var(--cream);
}
.cycle-who { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.cycle-who-banker { color: var(--copper-text); }
.cycle-who-member { color: var(--tan); }
.cycle-name { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.25; }
.cycle-name a { color: var(--gold); text-decoration: none; }
.cycle-name a:hover { color: var(--cream); text-decoration: underline; }
.cycle-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-muted); }
.cycle-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 0; padding: 0; }
.cycle .cycle-chips li {
  margin: 0; padding: 2px 8px; background: var(--inset); border: 1px solid var(--copper-deep);
  font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--cream);
}
.cycle-step::after { /* the arrow to the next box: down, centred in the gap */
  content: ""; position: absolute; left: 50%; top: 100%; width: 14px; height: 22px;
  margin: calc((var(--cycle-gap) - 22px) / 2) 0 0 -7px; background: var(--copper);
  clip-path: polygon(30% 0, 70% 0, 70% 55%, 100% 55%, 50% 100%, 0 55%, 30% 55%);
}
.cycle-step:last-child::after { display: none; }
.cycle-loop { margin: 0; padding: 10px 14px; border: 1px dashed var(--line-strong); font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.cycle-loop strong { color: var(--gold); }
.cycle-compact .cycle-steps { --cycle-gap: 24px; }
.cycle-compact .cycle-text { display: none; }
@media (min-width: 860px) {
  .cycle-steps { --cycle-gap: 44px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cycle-compact .cycle-steps { --cycle-gap: 36px; }
  .cycle .cycle-step { gap: 6px; padding: 14px 16px 16px; }
  .cycle-name { font-size: 20px; }
  .cycle-step:nth-child(1) { grid-area: 1 / 1; }
  .cycle-step:nth-child(2) { grid-area: 1 / 2; }
  .cycle-step:nth-child(3) { grid-area: 1 / 3; }
  .cycle-step:nth-child(4) { grid-area: 2 / 3; }
  .cycle-step:nth-child(5) { grid-area: 2 / 2; }
  .cycle-step:nth-child(6) { grid-area: 2 / 1; }
  .cycle-step:nth-child(1)::after, .cycle-step:nth-child(2)::after { /* right */
    left: 100%; top: 50%; width: 22px; height: 14px; margin: -7px 0 0 calc((var(--cycle-gap) - 22px) / 2);
    clip-path: polygon(0 30%, 55% 30%, 55% 0, 100% 50%, 55% 100%, 55% 70%, 0 70%);
  }
  .cycle-step:nth-child(4)::after, .cycle-step:nth-child(5)::after { /* left */
    left: auto; right: 100%; top: 50%; width: 22px; height: 14px; margin: -7px calc((var(--cycle-gap) - 22px) / 2) 0 0;
    clip-path: polygon(100% 30%, 45% 30%, 45% 0, 0 50%, 45% 100%, 45% 70%, 100% 70%);
  }
  .cycle-step:nth-child(6)::after { /* up, back to 1 */
    display: block; top: auto; bottom: 100%; margin: 0 0 calc((var(--cycle-gap) - 22px) / 2) -7px;
    clip-path: polygon(50% 0, 100% 45%, 70% 45%, 70% 100%, 30% 100%, 30% 45%, 0 45%);
  }
}

/* A small table of numbers in the prose (How it works: the default buy rates) */
.prose > .rates { width: 100%; max-width: 32em; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
.rates caption { caption-side: top; text-align: left; padding: 0 0 6px; font-size: 14px; color: var(--text-muted); }
.rates th, .rates td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; }
.rates thead th { color: var(--cream); font-weight: 600; border-bottom-color: var(--line-strong); }
.rates th:first-child { padding-left: 0; text-align: left; }
.rates td { font-variant-numeric: tabular-nums; }
