/* BrightLoom. One stylesheet for every page; no scripts anywhere on the site. */

:root {
  color-scheme: light dark;
  --bg: #f8f5ef;
  --surface: #fffdf9;
  --ink: #1b1f33;
  --muted: #595e72;
  --line: #e4ddd0;
  --accent: #3b4790;
  --gold: #f2b437;
  --button-bg: #1b1f33;
  --button-ink: #f8f5ef;
  --weave-bg: #1b1f33;
  --weave-warp: #5d6aa8;
  --weave-weft: #f1eadf;
  --weave-gold: #f2b437;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1119;
    --surface: #161a27;
    --ink: #ece7de;
    --muted: #a4a9bb;
    --line: #272c3e;
    --accent: #aeb8f2;
    --button-bg: #ece7de;
    --button-ink: #11142a;
    --weave-bg: #1f2439;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--button-bg);
  color: var(--button-ink);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header and footer */

.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand span { font: 600 1.375rem/1 var(--serif); letter-spacing: -0.01em; }
.mark { width: 28px; height: 28px; flex: none; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover { color: var(--ink); background: var(--line); }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-row nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--ink); }

/* Weave colours, used by the inline artwork */

.w-bg { fill: var(--weave-bg); }
.w-warp { fill: var(--weave-warp); }
.w-weft { fill: var(--weave-weft); }
.w-gold { fill: var(--weave-gold); }

/* Home */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 64px;
  padding-block: 88px 64px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--gold); }

.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); line-height: 1.04; }
.lede { margin-top: 24px; max-width: 34em; font-size: 1.2rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--button-bg);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
}
.button:hover { text-decoration: none; filter: brightness(1.12); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--ink); filter: none; }

.hero-art { justify-self: end; width: 100%; max-width: 380px; }
.weave { width: 100%; height: auto; aspect-ratio: 1; }

.section { padding-top: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.section-note { color: var(--muted); }

.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 32px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.app-icon { width: 96px; height: 96px; border-radius: 22px; }

.app h3 { font-size: 1.75rem; }
.app-kind { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.app-desc { margin-top: 16px; max-width: 40em; }
.app .actions { margin-top: 24px; }

.app-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.app-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-facts dd { margin: 4px 0 0; overflow-wrap: break-word; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 22px; }
.panel h3 { font-size: 1.3rem; margin-bottom: 10px; }
.panel p { color: var(--muted); }
.panel .email { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 1.05rem; }

/* Policy pages and 404 */

.prose { max-width: 720px; padding-block: 72px 0; }
.prose h1 { font-size: clamp(2.25rem, 4.5vw, 3rem); }
.prose .updated { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.prose .intro { margin-top: 28px; font-size: 1.15rem; }
.prose h2 { font-size: 1.4rem; margin: 44px 0 12px; }
.prose ul { padding-left: 1.2em; margin: 1em 0 0; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-size: 0.9em; }

.notfound { padding-block: 120px 40px; text-align: center; }
.notfound .mark { width: 56px; height: 56px; margin: 0 auto 28px; }
.notfound h1 { font-size: clamp(2.25rem, 5vw, 3rem); }
.notfound p { margin-top: 16px; color: var(--muted); }
.notfound .actions { justify-content: center; }

/* Narrow screens */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-block: 56px 32px; }
  .hero-art { justify-self: start; max-width: 300px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-nav a { padding: 8px 9px; }
  .brand span { font-size: 1.25rem; }
  .app { grid-template-columns: 1fr; gap: 20px; padding: 24px; border-radius: 22px; }
  .app-icon { width: 72px; height: 72px; border-radius: 17px; }
  .app-facts { grid-template-columns: 1fr; }
}
