/* Thistleyard Ltd — site styles
   Palette is thistle-biased: the neutrals carry a trace of the accent hue
   so greys read as chosen rather than inherited. */

:root {
  color-scheme: light dark;
  --ground:      #f4f3f6;
  --surface:     #ffffff;
  --surface-2:   #eceaf1;
  --ink:         #1b1924;
  --ink-soft:    #423e52;
  --muted:       #6b6878;
  --line:        #ddd9e5;
  --line-soft:   #e8e5ee;
  --accent:      #5b4b8a;
  --accent-ink:  #453a6b;
  --accent-wash: #ece9f4;
  --on-accent:   #ffffff;
  --timber:      #8a5a2f;
  --focus:       #0b5fd0;
  --shadow:      0 1px 2px rgba(27,25,36,.05), 0 10px 30px -22px rgba(27,25,36,.5);
  --radius:      12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground:      #131119;
    --surface:     #1c1a24;
    --surface-2:   #23202d;
    --ink:         #eae7f1;
    --ink-soft:    #bdb8cb;
    --muted:       #8b8699;
    --line:        #322e3d;
    --line-soft:   #272433;
    --accent:      #a493d8;
    --accent-ink:  #c0b2ea;
    --accent-wash: #221e2e;
    --on-accent:   #17141f;
    --timber:      #c79765;
    --focus:       #6fa8ff;
    --shadow:      0 1px 2px rgba(0,0,0,.5), 0 10px 30px -22px rgba(0,0,0,.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground:      #131119;
  --surface:     #1c1a24;
  --surface-2:   #23202d;
  --ink:         #eae7f1;
  --ink-soft:    #bdb8cb;
  --muted:       #8b8699;
  --line:        #322e3d;
  --line-soft:   #272433;
  --accent:      #a493d8;
  --accent-ink:  #c0b2ea;
  --accent-wash: #221e2e;
  --on-accent:   #17141f;
  --timber:      #c79765;
  --focus:       #6fa8ff;
  --shadow:      0 1px 2px rgba(0,0,0,.5), 0 10px 30px -22px rgba(0,0,0,.9);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border-radius: 0 0 8px 0; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- shell ---------- */

.shell { max-width: 940px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

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

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.018em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.wordmark:hover { color: var(--accent-ink); }

nav.top {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

nav.top a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
}
nav.top a:hover { background: var(--surface-2); color: var(--ink); }
nav.top a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }

/* ---------- type ---------- */

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

h1 {
  font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.08;
  letter-spacing: -.028em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

h3 {
  font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 18.5px;
  line-height: 1.3;
  letter-spacing: -.012em;
  margin: 0;
}

p { margin: 0; max-width: 68ch; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 60ch; }

strong { font-weight: 600; }

code, .mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
}

/* ---------- sections ---------- */

main { padding: 52px 0 20px; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-lg { display: flex; flex-direction: column; gap: 30px; }

section.band { padding: 44px 0; border-top: 1px solid var(--line); }
section.band:first-of-type { border-top: 0; padding-top: 0; }

.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }

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

.hero { display: flex; flex-direction: column; gap: 20px; padding-bottom: 48px; }
.hero .lede { font-size: 20px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 9px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); color: var(--on-accent); }
.btn-ghost { border-color: var(--muted); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---------- product panel ---------- */

.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-head h3 { font-size: 24px; }

.status {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--timber);
  border: 1px solid currentColor;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.feature-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 620px) { .feature-list { grid-template-columns: 1fr 1fr; gap: 14px 26px; } }

.feature-list li { position: relative; padding-left: 25px; font-size: 15.5px; color: var(--ink-soft); }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.feature-list li b { color: var(--ink); font-weight: 600; }

/* ---------- principles ---------- */

.principles { display: grid; gap: 22px; }
@media (min-width: 700px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 26px; } }

.principle { display: flex; flex-direction: column; gap: 9px; padding-top: 16px; border-top: 2px solid var(--ink); }
.principle p { font-size: 15px; color: var(--ink-soft); }

/* ---------- prose pages ---------- */

.prose { display: flex; flex-direction: column; gap: 20px; max-width: 68ch; }
.prose h2 { margin-top: 20px; }
.prose h3 { margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; color: var(--ink-soft); }
.prose li { max-width: 64ch; }
.prose li strong { color: var(--ink); }
.prose p { color: var(--ink-soft); }
.prose p.plain { color: var(--ink); }

.updated {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--muted);
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  padding: 14px 16px;
  border-radius: 0 9px 9px 0;
  font-size: 15.5px;
  color: var(--ink);
  max-width: 66ch;
}

.note-small { font-size: 15px; color: var(--ink-soft); }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.contact-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.contact-row dt { font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); min-width: 130px; }
.contact-row dd { margin: 0; font-size: 16px; }
dl.contact { margin: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---------- table ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
td { color: var(--ink-soft); }

/* On a phone the third column — the lawful basis — would sit off-screen behind an
   invisible overlay scrollbar. Stack each row instead, and label the cells. */
@media (max-width: 619px) {
  .table-scroll { overflow-x: visible; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: block; padding: 4px 0 10px; border-bottom: 1px solid var(--line-soft); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: block; border-bottom: 0; padding: 4px 14px; }
  td:first-child { white-space: normal; font-size: 16px; padding-top: 12px; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

/* ---------- footer ---------- */

footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 34px 0 44px;
}

.foot-grid { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 720px) { .foot-grid { flex-direction: row; justify-content: space-between; gap: 40px; } }

.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--accent-ink); text-decoration: underline; }

.disclosure {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 44ch;
}
.disclosure b { color: var(--ink-soft); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
