/* Keyflow: tokens, reset, type, buttons, labels.
   Petrol and brass: a dark teal room and the colour of a brass key, after the Keyflow mark. */
:root {
  --ink: #0f2e33;          /* deep petrol: text, dark surfaces */
  --ink-rgb: 15 46 51;
  --ink-soft: #1d454b;
  --night: #0a2226;        /* deeper than ink: phone bezels, footer */
  --night-rgb: 10 34 38;
  --paper: #f1f4f2;        /* cool page */
  --paper-rgb: 241 244 242;
  --sheet: #ffffff;        /* cards, inputs */
  --action: #136a73;       /* petrol teal: primary actions, links, focus (6.3:1 on white) */
  --action-rgb: 19 106 115;
  --action-deep: #0d535b;
  --accent: #e3a83f;       /* brass: "switched on", live, picked, done (6.8:1 on ink) */
  --accent-rgb: 227 168 63;
  --accent-ink: #8a5a0f;   /* the same brass, dark enough for text on paper (5.3:1) */
  --accent-tint: #f8ecd4;
  --haze: #dde6e3;         /* tints on paper */
  --haze-rgb: 221 230 227;
  --line: #c5d1ce;         /* rules and quiet borders */
  --line-strong: #7f918e;  /* borders of fields and boxes, 3.3:1 on white */
  --mute: #4f6164;         /* secondary text, 5.9:1 on paper */
  --danger: #b4233c;
  --danger-tint: #fbe8eb;  /* behind danger text, 5.4:1 */
  --on-ink: #d2dfdc;       /* body text on ink, 10.5:1 */
  --on-ink-mute: #9fb7b4;  /* secondary text on ink, 6.8:1 */

  --f-display: "Geologica", "Arial", sans-serif;
  --f-text: "Piazzolla", "Georgia", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-hero: clamp(2.5rem, 1.1rem + 4.4vw, 4.75rem);
  --t-h2: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  --t-h3: 1.2rem;
  --t-body: clamp(1.06rem, 1rem + 0.25vw, 1.18rem);
  --t-small: 0.9rem;

  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius: 14px;
  --radius-small: 9px;
  --shadow-card: 0 1px 0 rgb(var(--ink-rgb) / 0.04), 0 18px 40px -18px rgb(var(--ink-rgb) / 0.28);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
  --normal: 320ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  font-variation-settings: "opsz" 14;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-variation-settings: "SHRP" 100, "CRSV" 0;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h2 { font-size: var(--t-h2); font-weight: 700; }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }

a { color: var(--action); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--action-deep); }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

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

.wrap {
  width: min(1180px, 100% - 2 * clamp(1.15rem, 4vw, 2.5rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--sheet);
  border-radius: var(--radius-small);
  font-family: var(--f-display);
}
.skip:focus { top: 1rem; color: var(--sheet); }

/* Buttons speak the UI face, not the reading face. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-small);
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color var(--fast) ease, color var(--fast) ease,
    border-color var(--fast) ease, transform var(--fast) ease;
}
.btn:active { transform: translateY(1px); }

.btn--ink { background: var(--ink); color: var(--sheet); }
.btn--ink:hover { background: var(--ink-soft); color: var(--sheet); }

.btn--action { background: var(--action); color: var(--sheet); }
.btn--action:hover { background: var(--action-deep); color: var(--sheet); }

.btn--line { background: transparent; color: var(--ink); border-color: rgb(var(--ink-rgb) / 0.28); }
.btn--line:hover { border-color: var(--ink); color: var(--ink); background: var(--sheet); }

/* On dark surfaces */
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #edbb5e; color: var(--ink); }
.btn--accent:focus-visible, .btn--ghost:focus-visible, .btn--paper:focus-visible { outline-color: var(--accent); }

.btn--ghost { background: transparent; color: var(--paper); border-color: rgb(var(--paper-rgb) / 0.32); }
.btn--ghost:hover { border-color: var(--paper); color: var(--sheet); background: rgb(var(--paper-rgb) / 0.06); }

.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: var(--sheet); color: var(--ink); }

.btn--small { min-height: 40px; padding: 0.55rem 1rem; font-size: 0.94rem; }

.btn[disabled] { opacity: 0.55; cursor: progress; }

/* A short label above a heading: says what kind of block this is. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  color: var(--action);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.eyebrow--light { color: var(--accent); }

/* Scroll reveal: only when scripts run (boot.js sets .js), so nothing stays hidden without them. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
