/*
  mrfrisby.com design tokens. Drop-in, works on any domain.
  Reference: https://mrfrisby.com/brand.md
  Source of truth: src/styles/global.css in the mrfrisby.com repo. If this file and that one disagree, that one wins.

  Usage:  <link rel="stylesheet" href="https://mrfrisby.com/brand/mrfrisby-tokens.css">
  Then style with var(--bg), var(--text), var(--accent) and so on. Never hard-code the colours.
*/

/* ── Fonts (served by mrfrisby.com with CORS enabled) ── */
@font-face {
  font-family: 'Oswald';
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  src: url('https://mrfrisby.com/fonts/oswald-700.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('https://mrfrisby.com/fonts/barlow-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Special Elite';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('https://mrfrisby.com/fonts/special-elite.woff2') format('woff2');
}

/* ── Colour: dark is the default, light follows the system ── */
:root {
  color-scheme: light dark;
  --bg:            #111411;
  --bg-surface:    #171b17;
  --bg-elevated:   #1e231e;
  --border-subtle: #2a312a;
  --border:        #3f493f;
  --text-mid:      #a3aea3;
  --text:          #ebefeb;
  --accent:        #3ddc84;
  --opposite:      #d5150b;
  --pad:           1.75rem;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg:            #afe4c8;
    --bg-surface:    #95dfb8;
    --bg-elevated:   #7fd7a8;
    --border-subtle: #6fc899;
    --border:        #4ab07a;
    --text-mid:      #2f513f;
    --text:          #020303;
    --accent:        #1a7a42;
    --opposite:      #fcc8c5;
  }
}
/* Same palette in OKLCH for browsers that support it (wider gamut on capable displays) */
@supports (color: oklch(0 0 0)) {
  :root {
    --bg:            oklch(0.185 0.008 145);
    --bg-surface:    oklch(0.22 0.010 145);
    --bg-elevated:   oklch(0.26 0.012 145);
    --border-subtle: oklch(0.32 0.015 145);
    --border:        oklch(0.40 0.020 145);
    --text-mid:      oklch(0.76 0.020 145);
    --text:          oklch(0.94 0.006 145);
    --accent:        oklch(0.80 0.19 150);
    --opposite:      oklch(0.63 0.220 27);
  }
  @media (prefers-color-scheme: light) {
    :root {
      --bg:            oklch(0.87 0.075 158);
      --bg-surface:    oklch(0.82 0.095 155);
      --bg-elevated:   oklch(0.77 0.110 152);
      --border-subtle: oklch(0.72 0.100 150);
      --border:        oklch(0.63 0.115 147);
      --text-mid:      oklch(0.38 0.075 144);
      --text:          oklch(0.12 0.010 147);
      --accent:        oklch(0.42 0.210 145);
      --opposite:      oklch(0.88 0.070 27);
    }
  }
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: var(--text-mid) var(--bg);
}
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-wrap: pretty;
}
::selection { background: var(--opposite); color: var(--text); }

a { color: inherit; text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { color: var(--text); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
p a {
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: text-underline-offset 0.2s ease, text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
}
p a:hover { text-decoration-color: var(--border); text-underline-offset: 0.3em; text-decoration-thickness: 2px; }

img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Layout primitives ── */
/* The page sits inside a single hairline frame, inset from the viewport edge */
.page-frame {
  border: 1px solid var(--border);
  margin: 1.25rem 1.5rem;
  position: relative;
  overflow: clip;
  background: var(--bg);
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* Only this class applies horizontal padding */
.col-pad { padding-left: var(--pad); padding-right: var(--pad); }

/* A section label: small tracked Oswald capitals, with a rule filling the rest of the row */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0 0.65rem var(--pad);
  border-bottom: 1px solid var(--border);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

.rule-thin  { height: 0; border: none; border-top: 1px solid var(--border); }
.rule-heavy { height: 0; border: none; border-top: 2px solid var(--text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.two-col > * { min-width: 0; min-height: 0; }
.two-col .col-right { border-left: 1px solid var(--border); }

@media (max-width: 640px) {
  .page-frame { margin: 0.75rem; }
  .two-col { grid-template-columns: 1fr; }
  .two-col .col-right { border-left: none; border-top: 1px solid var(--border); }
}

/* ── Type helpers ── */
/* Display and headings: Oswald 700, uppercase */
.display, h1, h2, h3 { font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; line-height: 1; }
/* Small caps-style label */
.label { font: 700 0.68rem 'Oswald', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
/* Metadata: small monospace in the secondary colour */
.meta { font: 0.72rem ui-monospace, monospace; letter-spacing: 0.04em; color: var(--text-mid); }

/* Text link, as used for calls to action */
.link {
  font: 700 0.75rem 'Oswald', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-thickness 0.12s;
}
.link:hover { text-decoration-thickness: 3px; }

/* Pill: a bordered, fully rounded tag or filter chip */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font: 700 0.68rem 'Oswald', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
