/* Sakoo Support Society, sakoo.io. One stylesheet for every page; no scripts. */

:root {
  --paper: #fbfaf7;
  --panel: #f3f1ec;
  --ink: #17191c;
  --muted: #5b5f65;
  --rule: #dfdcd4;
  --rule-strong: #b8b4aa;
  --accent: #1f4e45;        /* links and keyboard focus only */
  --accent-strong: #133730;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.25rem, 7vw, 5.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121416;
    --panel: #1a1d20;
    --ink: #ebe8e2;
    --muted: #a6aaaf;
    --rule: #2c3034;
    --rule-strong: #4b5056;
    --accent: #95c7ba;
    --accent-strong: #bfe0d7;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--paper); text-decoration: none;
}
.skip:focus { top: 0.75rem; color: var(--paper); }

/* Small capitals label used above headings and for field names. */
.label {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header and navigation */
.site-header { position: relative; border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-block: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 1.08rem; letter-spacing: 0.005em; line-height: 1.2;
}
.brand:hover { color: var(--ink); }
.mark { width: 2rem; height: 2rem; flex: none; color: var(--ink); }

.nav-list { display: flex; gap: 0.25rem 1.6rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.nav-list a { display: inline-block; padding: 0.35rem 0; min-height: 24px; font-size: 1rem; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.45em; }

/* Phones and small tablets: the same links behind a disclosure, no script needed. */
.menu { display: none; }
.menu summary {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.5rem;
  padding: 0.4rem 0.85rem; border: 1px solid var(--rule-strong); border-radius: 2px;
  color: var(--ink); font-size: 1rem; cursor: pointer; list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 1.1rem; height: 1.1rem; }
.menu[open] summary { border-color: var(--ink); }
.menu ul {
  position: absolute; z-index: 5; left: 0; right: 0; top: 100%;
  padding: 0.25rem var(--gutter) 1.25rem;
  background: var(--paper); border-bottom: 1px solid var(--rule-strong);
}
.menu li a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); font-size: 1.15rem; color: var(--ink); }

@media (max-width: 55.99rem) {
  .nav-list { display: none; }
  .menu { display: block; }
}

/* Home: hero */
.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) var(--section); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 {
  font-size: clamp(2.35rem, 1.55rem + 3.3vw, 4.15rem);
  line-height: 1.07;
  letter-spacing: -0.018em;
  max-width: 16ch;
}
.lede { margin-top: 1.6rem; max-width: 36rem; font-size: 1.12em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; margin-top: 2.2rem; }
.button {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.72rem 1.25rem; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.button:hover { background: transparent; color: var(--ink); }
.more { font-weight: 600; font-size: 1rem; }
.arrow { display: inline-block; margin-left: 0.35em; transition: transform 0.15s ease; }
a:hover .arrow { transform: translateX(3px); }

.hero-art { width: 100%; max-width: 26rem; height: auto; justify-self: center; }
.hero-art .ring { fill: var(--ink); fill-opacity: 0.05; stroke: var(--ink); stroke-width: 1.25; }
.hero-art .core { fill: var(--ink); }
.hero-art .art-label { font-family: var(--serif); font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; fill: var(--muted); }

/* Home: statement */
.statement { padding-block: var(--section); border-top: 1px solid var(--rule); background: var(--panel); }
.statement .wrap { display: grid; gap: 0 3rem; }
.statement-text {
  max-width: 34ch; margin: 0;
  font-size: clamp(1.45rem, 1.05rem + 1.7vw, 2.35rem); line-height: 1.3; letter-spacing: -0.01em;
}

/* Sections */
.section { padding-block: var(--section); border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2, .split-head h2 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.01em; max-width: 22ch; }
.section-head p, .split-head p { max-width: var(--measure); color: var(--muted); }
.section-foot { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin-top: clamp(2rem, 4vw, 2.75rem); }

/* Heading on the left, content on the right */
.split { display: grid; gap: 1.5rem 3rem; }
.split-head p { margin-top: 1rem; font-size: 1rem; }

/* Inner pages: title block */
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.75rem, 5vw, 4rem); }
.page-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.7vw, 3.6rem); line-height: 1.1; letter-spacing: -0.016em; max-width: 20ch; }

.prose { max-width: var(--measure); }
.prose .big { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem); line-height: 1.4; }

/* Three areas of work, as cards on the home page */
.cards { display: grid; gap: 2.5rem; }
.cards li { border-top: 1px solid var(--rule-strong); padding-top: 1.4rem; }
.icon { width: 1.9rem; height: 1.9rem; color: var(--ink); }
.letter { display: block; margin-top: 1.1rem; font-size: 0.95rem; color: var(--muted); }
.cards h3 { margin: 0.15rem 0 0.6rem; font-size: 1.35rem; font-weight: 600; line-height: 1.25; }

/* Two-column rows: term on the left, text on the right */
.rows { margin: 0; border-top: 1px solid var(--rule-strong); }
.rows > li, .rows > div { display: grid; gap: 0.35rem 2rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.rows h3, .rows dt { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.rows p, .rows dd { margin: 0; max-width: var(--measure); }
.ref { color: var(--muted); font-size: 0.88em; white-space: nowrap; }
p.ref { margin-top: 1rem; }

/* Our work: one article per area */
.area { display: grid; gap: 1.5rem 3rem; padding-block: var(--section); border-top: 1px solid var(--rule); }
.area:first-child { border-top: 0; padding-top: 0; }
.area h2 { margin-top: 0.2rem; font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.4rem); line-height: 1.15; }
.area-why { margin-top: 1rem; max-width: 30rem; }
.area-body h3 { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.area-body > div + div { margin-top: 1.75rem; }
.ticks { border-top: 1px solid var(--rule-strong); }
.ticks li { position: relative; padding: 0.65rem 0 0.65rem 1.6rem; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.35em; width: 0.75rem; border-top: 1px solid var(--ink); }

/* How we work: numbered principles */
.principles { counter-reset: principle; border-top: 1px solid var(--rule-strong); }
.principles li { counter-increment: principle; display: grid; gap: 0.4rem 2rem; padding-block: 1.6rem; border-bottom: 1px solid var(--rule); }
.principles li::before { content: counter(principle, decimal-leading-zero); font-size: 0.95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.principles h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
.principles p { margin: 0.4rem 0 0; max-width: var(--measure); }

/* How we work: steps before any grant */
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.4rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--ink); border-radius: 50%; font-size: 0.95rem; background: var(--paper);
}
.steps li::after { content: ""; position: absolute; left: 1.05rem; top: 2.1rem; bottom: 0.1rem; border-left: 1px solid var(--rule-strong); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.steps p { margin: 0.3rem 0 0; max-width: var(--measure); }

/* Links to other pages */
.next { display: grid; gap: 1rem; }
.next a {
  display: block; height: 100%; padding: 1.25rem 1.35rem; border: 1px solid var(--rule-strong); border-radius: 2px;
  color: var(--ink); text-decoration: none;
}
.next a:hover { border-color: var(--ink); color: var(--ink); }
.next-title { display: block; font-size: 1.2rem; font-weight: 600; }
.next-text { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 1rem; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem 3rem; }
.card { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.card-main { margin: 0.2rem 0 0.75rem; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.35; font-style: normal; }
.card-note { color: var(--muted); font-size: 1rem; }

/* Contact band */
.band { background: var(--panel); border-top: 1px solid var(--rule); }
.band .wrap { display: grid; gap: 1.25rem 3rem; padding-block: clamp(2.75rem, 6vw, 4rem); align-items: end; }
.band h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.2; }
.band .email { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--panel); font-size: 0.95rem; }
.site-footer .wrap { padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem; }
.footer-grid { display: grid; gap: 2rem 3rem; }
.footer-grid .label { margin-bottom: 0.5rem; }
.footer-brand .brand { margin-bottom: 0.9rem; }
.footer-brand p { color: var(--muted); max-width: 24rem; }
.site-footer address { font-style: normal; }
.site-footer li a { display: inline-block; padding-block: 0.15rem; min-height: 24px; }
.legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rows > li, .rows > div { grid-template-columns: minmax(11rem, 1fr) 2.4fr; }
  .principles li { grid-template-columns: 3rem 1fr; }
  .principles li::before { padding-top: 0.25rem; }
  .next { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 4rem; }
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: end; gap: 3rem; }
  .split, .statement .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
  .statement .label { padding-top: 0.75rem; }
  .area { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .band .wrap { grid-template-columns: 1fr auto; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .arrow { transition: none; }
}

@media print {
  .skip, .site-nav, .actions, .hero-art { display: none; }
  body { background: #fff; color: #000; }
  .statement, .band, .site-footer { background: none; }
}
