/* Design system.

One editorial system, warm ink on paper: a serif for display, a neutral sans for
running text, hairline rules instead of boxes, and a single deep pine accent used
sparingly. Values are custom properties so the whole palette can move without
touching a component.

Deliberately absent: gradient hero, glow orbs, emoji, card grids with coloured
left borders, and the indigo of default templates.
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  /* Paper and ink */
  --paper: #fbf9f5;
  --paper-raised: #ffffff;
  --paper-sunk: #f3efe7;
  --ink: #16130f;
  --ink-soft: #3d372f;
  --ink-muted: #6f6659;
  --ink-faint: #9a9083;

  /* Structure */
  --rule: #e2dbcd;
  --rule-strong: #cfc5b2;

  /* Accent: deep pine, used for state and emphasis only */
  --accent: #1f5d4c;
  --accent-deep: #163f34;
  --accent-wash: #eaf0ec;

  /* Functional */
  --danger: #a13a2b;
  --success: #2c6b46;
  --focus: #1f5d4c;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.1rem, 1.05rem + 0.25vw, 1.22rem);
  --step-2: clamp(1.32rem, 1.22rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.62rem, 1.42rem + 1vw, 2.15rem);
  --step-4: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  --step-5: clamp(2.4rem, 1.7rem + 3.4vw, 4.2rem);

  /* Space */
  --space-2xs: 0.35rem;
  --space-xs: 0.6rem;
  --space-s: 0.9rem;
  --space-m: 1.35rem;
  --space-l: 2.1rem;
  --space-xl: 3.4rem;
  --space-2xl: 5.4rem;

  /* Shape */
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-pill: 999px;

  /* Measure */
  --measure: 34rem;
  --measure-wide: 46rem;
  --page-max: 74rem;
  --page-gutter: clamp(1.15rem, 4vw, 2.75rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 140ms;
  --medium: 260ms;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--fast) var(--ease),
    text-decoration-color var(--fast) var(--ease);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

h1 {
  font-size: var(--step-5);
  letter-spacing: -0.028em;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-2);
}

h4 {
  font-size: var(--step-1);
  letter-spacing: -0.008em;
}

p {
  margin: 0 0 var(--space-s);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

small {
  font-size: var(--step--1);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-l) 0;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

code {
  background: var(--paper-sunk);
  padding: 0.12em 0.34em;
  border-radius: var(--radius-s);
}

pre {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: var(--space-s) var(--space-m);
  overflow-x: auto;
  line-height: 1.55;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: var(--space-m) 0;
  padding-left: var(--space-m);
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-soft);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.section {
  padding-block: var(--space-2xl);
}

.section--tight {
  padding-block: var(--space-xl);
}

/* The one loud typographic move: an oversized label set against the edge. */
.section-head {
  display: grid;
  gap: var(--space-s);
  margin-bottom: var(--space-l);
}

.section-head--split {
  grid-template-columns: minmax(0, 1fr);
}

.label {
  font-family: var(--font-text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.label::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure-wide);
  text-wrap: pretty;
}

.muted {
  color: var(--ink-muted);
}

.meta {
  font-size: var(--step--1);
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.prose {
  max-width: var(--measure-wide);
}

.prose > p,
.prose > ul,
.prose > ol {
  margin-bottom: var(--space-m);
}

.prose h2 {
  font-size: var(--step-3);
  margin: var(--space-xl) 0 var(--space-s);
}

.prose h3 {
  font-size: var(--step-2);
  margin: var(--space-l) 0 var(--space-xs);
}

.prose h4 {
  margin: var(--space-m) 0 var(--space-2xs);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose img {
  border-radius: var(--radius-m);
  margin-block: var(--space-m);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--space-m);
  font-size: var(--step--1);
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.prose th {
  font-weight: 600;
  border-bottom-color: var(--rule-strong);
}

.prose figcaption {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-top: var(--space-2xs);
}

/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  flex: none;
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-s);
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.nav {
  display: none;
  align-items: center;
  gap: var(--space-m);
  font-size: var(--step--1);
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-m);
  padding: 0.42rem 0.7rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-soft);
}

.menu-toggle:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  padding-block: var(--space-s) var(--space-m);
}

.mobile-nav[data-open="true"] {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.62rem 0;
  text-decoration: none;
  font-size: var(--step-1);
  font-family: var(--font-display);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 62rem) {
  .nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius-m);
  border: 1px solid transparent;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background var(--fast) var(--ease),
    color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--accent:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  padding-inline: 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.btn--quiet:hover {
  color: var(--accent-deep);
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: 1px solid var(--rule);
}

.hero__grid {
  display: grid;
  gap: var(--space-xl);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-s);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

.dot--off {
  background: var(--ink-faint);
}

.hero__title {
  margin-bottom: var(--space-s);
}

.hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  color: var(--accent);
}

.hero__intro {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: var(--space-m);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-m);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: 0.26rem 0.62rem;
  white-space: nowrap;
}

/* Visiting card in the hero: a printed card, not a dashboard tile */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: var(--space-m);
  box-shadow: 0 18px 40px -32px rgba(22, 19, 15, 0.5);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-s);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-s);
}

.card__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__role {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.card__qr {
  width: 4.6rem;
  height: 4.6rem;
  flex: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  padding: 4px;
  background: #fff;
}

.card__qr img,
.card__qr svg {
  width: 100%;
  height: 100%;
}

.card__rows {
  display: grid;
  gap: 0.55rem;
  font-size: var(--step--1);
}

.card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
}

.card__row dt {
  color: var(--ink-muted);
  flex: none;
}

.card__row dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}
