/* site.css v0.12.1 (Last Rev: 2026-11-26)
   ilhs.app styles. Colors and fonts follow the ILHS Brand Guide (ilhs-internal org/brand/BRANDING.md).
   Dark first; light follows the system setting. Every size comes from the ILHS Shared Sizing Spec block
   below (ilhs-internal org/brand/SIZING.md, pinned in docs/shared/ilhs-sizing-tokens.css), the same block
   every ILHS site uses. Never edit the block in place. */

@font-face { font-family: "Familjen Grotesk"; font-weight: 500; font-display: swap; src: url("../fonts/familjen-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 700; font-display: swap; src: url("../fonts/familjen-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap; src: url("../fonts/source-sans-3-var.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); }

/* ILHS Shared Sizing Spec v2.0.0 start: from ilhs-internal org/brand/SIZING.md, do not edit here */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Phones 0.85x -> 1x at 800 px; 1x to 1920 px; then up to 1.15x at 3840 x 2160. */
  font-size: max(clamp(0.85rem, 0.7rem + 0.6vw, 1rem), min(0.85rem + 0.125vw, 0.85rem + 0.2222vh, 1.15rem));
}
:root {
  --fs-small: clamp(0.8125rem, 0.7851rem + 0.112vw, 0.875rem);    /* 13 -> 14 px */
  --fs-label: 0.8125rem;                                          /* 13 px */
  --fs-nav: clamp(0.875rem, 0.8476rem + 0.112vw, 0.9375rem);      /* 14 -> 15 px */
  --fs-body: clamp(1rem, 0.9726rem + 0.112vw, 1.0625rem);         /* 16 -> 17 px */
  --fs-lede: clamp(1.0625rem, 1.0351rem + 0.112vw, 1.125rem);     /* 17 -> 18 px */
  --fs-h3: clamp(1.0625rem, 1.0077rem + 0.225vw, 1.1875rem);      /* 17 -> 19 px */
  --fs-card: clamp(1.125rem, 1.0702rem + 0.225vw, 1.25rem);       /* 18 -> 20 px */
  --fs-h2: clamp(1.3125rem, 1.1756rem + 0.562vw, 1.625rem);       /* 21 -> 26 px */
  --fs-h1: clamp(1.625rem, 1.4059rem + 0.899vw, 2.125rem);        /* 26 -> 34 px */
  --fs-hero: clamp(1.875rem, 1.4916rem + 1.573vw, 2.75rem);       /* 30 -> 44 px */

  --wrap-max: 75rem;                                              /* 1200 px with gutters */
  --measure: 42rem;                                               /* 672 px reading width */
  --gutter: clamp(1rem, 0.5618rem + 1.798vw, 2rem);               /* 16 -> 32 px */
  --section-pad: clamp(2rem, 1.3427rem + 2.697vw, 3.5rem);        /* 32 -> 56 px */
  --hero-pad: clamp(2rem, 1.1236rem + 3.596vw, 4rem);             /* 32 -> 64 px */
  --card-pad: clamp(1rem, 0.7809rem + 0.899vw, 1.5rem);           /* 16 -> 24 px */
  --inset-pad: clamp(0.75rem, 0.5309rem + 0.899vw, 1.25rem);      /* 12 -> 20 px */
  --gap: clamp(0.75rem, 0.5309rem + 0.899vw, 1.25rem);            /* 12 -> 20 px */
  --tap: max(2.75rem, 44px);                                      /* buttons, fields, menu items */
  --tap-inline: max(1.5rem, 24px);                                /* text links in lines and footers */
  --header-h: max(3.5rem, 56px);                                  /* one-row site header */
}
/* ILHS Shared Sizing Spec v2.0.0 end */

:root {
  /* Color: dark (default) */
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #1a222d;
  --line: #263241;
  --text: #e6edf3;
  --muted: #94a3b5;
  --accent: #2dd4bf;        /* signal-teal */
  --accent-ink: #04201c;
  --accent-soft: #0f2e2b;
  --amber: #f5b544;         /* alert-amber: security add-ons, warnings, Coming Soon */
  --red: #ff7a72;           /* fault-red: errors only */

  /* Type families */
  --display: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", monospace;

  --radius: 0.625rem;

  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fa; --surface: #ffffff; --surface-2: #eef2f6; --line: #d5dde6;
    --text: #111820; --muted: #4f5d6e; --accent: #0f766e; --accent-ink: #ffffff;
    --accent-soft: #e0f4f1; --amber: #9a5b00; --red: #b42318;
    color-scheme: light;
  }
}
/* Same light values for an explicit choice, so a future theme switch can override the system setting both ways. */
:root[data-theme="light"] {
  --bg: #f6f8fa; --surface: #ffffff; --surface-2: #eef2f6; --line: #d5dde6;
  --text: #111820; --muted: #4f5d6e; --accent: #0f766e; --accent-ink: #ffffff;
  --accent-soft: #e0f4f1; --amber: #9a5b00; --red: #b42318;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: var(--fs-body); line-height: 1.6; }
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.1875rem; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.25rem; }
code, kbd, .mono { font-family: var(--mono); }

.wrap { max-width: var(--wrap-max); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

.skip { position: absolute; left: -9999px; top: 0.5rem; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.875rem; border-radius: 0.5rem; font-weight: 600; z-index: 10; }
.skip:focus { left: 1rem; }

/* Header: one row, var(--header-h) tall at every width (sizing spec page budget). Below 600 px the menu
   links move into a Menu button (a <details> element, so it works without JavaScript). */
.top { position: relative; border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); padding-block: 0.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); color: var(--text); text-decoration: none; flex: none; }
.brand img { width: 1.75rem; height: 1.75rem; display: block; }
.wordmark { font: 800 var(--fs-lede)/1 var(--mono); letter-spacing: .02em; }
.wordmark::after { content: ""; display: inline-block; width: .55em; height: .9em; margin-left: .12em; vertical-align: -.08em; background: var(--accent); }
nav ul { list-style: none; display: flex; flex-wrap: nowrap; gap: 0 0.25rem; margin: 0; padding: 0; font-size: var(--fs-nav); }
nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 0.5rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.menu { display: none; }
.menu summary { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 0.5rem; font: 600 var(--fs-nav) var(--body); color: var(--text); cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.45em; height: 0.45em; margin-left: 0.5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.15em) rotate(45deg); }
.menu[open] summary::after { transform: translateY(0.1em) rotate(-135deg); }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.25rem var(--gutter) 0.5rem; }
.menu nav ul { flex-direction: column; }
.menu nav a { display: flex; }
.menu nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent); }
@media (max-width: 599px) {
  .nav-wide { display: none; }
  .menu { display: block; }
}

/* Hero (home page) */
.hero { padding-block: var(--hero-pad) calc(var(--hero-pad) * 0.78); }
.eyebrow { font: 600 var(--fs-label)/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: clamp(0.75rem, 1.4vw, 1.25rem); }
.hero h1 { font-size: var(--fs-hero); letter-spacing: -.015em; max-width: 14em; }
.lede { margin-top: clamp(0.875rem, 1.6vw, 1.375rem); font-size: var(--fs-lede); color: var(--muted); max-width: var(--measure); }
.secondary { margin-top: 0.875rem; font: 500 var(--fs-nav)/1.4 var(--mono); color: var(--text); }  /* mono beside body text: one size down */
.secondary span { color: var(--muted); }
.ctas { margin-top: clamp(1.5rem, 2.6vw, 2.25rem); display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0.5rem 1rem; border-radius: 0.5rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: var(--fs-nav); font-weight: 600; line-height: 1.25; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }

/* Inner page heading */
.page-head { padding-block: calc(var(--hero-pad) * 0.75) calc(var(--section-pad) * 0.5); }
.page-head h1 { font-size: var(--fs-h1); letter-spacing: -.01em; }
.page-head .ctas { margin-top: 1.5rem; }

/* Sections */
section { padding-block: var(--section-pad); border-top: 1px solid var(--line); }
section.first { border-top: 0; padding-top: 0.5rem; }
/* The first block on an inner page sits right under the page heading, with no extra top margin. */
section.first .wrap > :first-child { margin-top: 0; }
.section-head { margin-bottom: clamp(1.25rem, 2.4vw, 2rem); max-width: 44em; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { margin-top: 0.625rem; color: var(--muted); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-h2); margin-bottom: 0.75rem; }
.prose p { color: var(--muted); }
.prose p + p { margin-top: 0.875rem; }
.prose .ctas { margin-top: 1.75rem; }
.aside { margin-top: 1.5rem; color: var(--muted); }

/* Promises */
/* One column until all three fit side by side, so the grid never leaves a card alone on a row. */
.promises { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.promises li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--card-pad); }
.promises .num { font: 600 var(--fs-label) var(--mono); color: var(--accent); }
.promises h2, .promises h3 { font-size: var(--fs-h3); margin-top: 0.5rem; }
.promises p { margin-top: 0.5rem; color: var(--muted); }
.promises .proof { font-size: var(--fs-small); }

/* Project card */
.projects { display: grid; gap: var(--gap); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--card-pad); display: grid; gap: clamp(1.25rem, 2.4vw, 1.75rem); }
.projects > *, .card > * { min-width: 0; }
@media (min-width: 860px) {
  .card { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-rows: auto 1fr; align-items: start; column-gap: clamp(1.75rem, 3vw, 3rem); row-gap: 0; }
  .card-main { grid-column: 1; grid-row: 1; }
  .card-more { grid-column: 1; grid-row: 2; }
  .install { grid-column: 2; grid-row: 1 / span 2; }
}
.card h3, .card .card-title { font-size: var(--fs-card); }
.feature-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-content: start; }
@media (min-width: 860px) {
  .card.feature { grid-template-columns: minmax(0, 1fr) minmax(15rem, auto); }
  .feature-actions { grid-column: 2; grid-row: 1; flex-direction: column; align-items: stretch; align-self: center; }
}
.card .pitch { margin-top: 0.5rem; color: var(--muted); max-width: 40em; }  /* about 85 characters a line at most */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding: 0; list-style: none; }
.tag { font: 500 var(--fs-label)/1 var(--mono); padding: 0.375rem 0.5625rem; border-radius: 0.375rem; border: 1px solid var(--line); color: var(--muted); }
.tag.foss { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tag.soon { border-color: var(--amber); color: var(--amber); }
.card ul.features { margin: 1.125rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.card ul.features li + li { margin-top: 0.25rem; }
.card .ctas { margin-top: 1.375rem; }
@media (max-width: 599px) { .card .ctas .btn, .feature-actions .btn { flex: 1 1 auto; } }

/* Install panel inside a project card */
.install { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--inset-pad); }
.install h3 { margin: 0 0 0.375rem; font: 600 var(--fs-label) var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.install > p { color: var(--muted); }
.install .ctas { margin-top: 1rem; flex-direction: column; }
.install .note { margin-top: 0.75rem; font-size: var(--fs-small); color: var(--muted); }
.install details { margin-top: 1.125rem; border-top: 1px solid var(--line); padding-top: 0.25rem; }
.install summary { display: flex; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: 600; }
.install h4 { margin: 0.875rem 0 0.375rem; font: 600 var(--fs-label) var(--mono); color: var(--muted); }
.install pre { background: var(--bg); }
/* Phones: the panel runs edge to edge inside the card instead of nesting a second box, which gives the text more room. */
@media (max-width: 599px) {
  .install { margin-inline: calc(var(--card-pad) * -1); border-radius: 0; border-inline: 0; padding-inline: var(--card-pad); }
}
pre { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 0.375rem; padding: 0.75rem 0.875rem; overflow-x: auto; font: var(--fs-small)/1.5 var(--mono); }
pre .p { color: var(--muted); user-select: none; }

/* Roadmap and contact blocks */
.roadmap { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr)); }
.roadmap .item { border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--card-pad); }
.roadmap h2, .roadmap h3 { font-size: var(--fs-h3); margin-top: 0.75rem; }
.roadmap p { margin-top: 0.5rem; color: var(--muted); }
.contact-ways { margin-top: clamp(1.5rem, 2.6vw, 2.25rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .contact-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* With an odd number of cards in two columns, the last card spans the row instead of sitting alone. */
@media (min-width: 600px) and (max-width: 1099px) { .contact-ways .item:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* Wide screens: three columns, so five cards sit as 3 + 2. */
@media (min-width: 1100px) { .contact-ways { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-ways .item { border-style: solid; background: var(--surface); }
.contact-ways h2 { margin-top: 0; }

/* Footer: the shared ILHS Site Footer (sizing spec v2, "Site Footer"). Centered lines, top to bottom:
   page links; brand mark and copyright; contact email. From 600 px the brand and contact lines join, so
   the desktop footer is two lines. At most 120 px tall on desktop and 200 px on phones. */
footer { border-top: 1px solid var(--line); padding-block: 1rem 1.25rem; font-size: var(--fs-small); color: var(--muted); }
footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; }
.foot-nav, .foot-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 1rem; }
footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--tap-inline); text-decoration: underline; }
footer a:hover { color: var(--text); }
.foot-meta > * { white-space: nowrap; }   /* each item wraps as a whole */
.foot-tag { font: 700 var(--fs-label) var(--mono); color: var(--accent); letter-spacing: .04em; }
@media (max-width: 599px) {
  .foot-meta a { flex-basis: 100%; justify-content: center; }   /* contact line on its own below 600 px */
  /* Page links in an even 3-column grid (two full rows of three), so a larger browser text size never
     leaves one link alone on a row (Edge on Android scales text up and wrapped them 5 + 1). */
  .foot-nav { display: grid; grid-template-columns: repeat(3, max-content); justify-content: center; justify-items: center; gap: 0 1.25rem; }
}

/* 404 */
.notfound { padding-block: clamp(3.5rem, 8vw, 7.5rem); }
