/*
 * Luch — site styles.
 * Naming: l-* layout, c-* components (BEM elements/modifiers), u-* utilities, p-* page kinds.
 * Palette comes from the owner's icon (see design/brand/BRAND.md in the project).
 */

:root {
  --c-navy: #01053C;
  --c-navy-2: #030b54;
  --c-navy-3: #06136d;
  --c-royal: #021E96;
  --c-blue: #0042FD;
  --c-blue-hover: #1f5bff;
  --c-cyan: #0CC5FE;
  --c-red: #FC2D2F;
  --c-snow: #FDFDFD;
  --c-ice: #C8D4F5;
  --c-mist: #a3b2e3;
  --c-rule: rgba(200, 212, 245, .16);
  --c-link: #8fb0ff;

  --face-display: "Avenir Next", "Segoe UI Variable Display", "Ubuntu", "Roboto Flex", "Roboto", "Noto Sans", sans-serif;
  --face-text: "Segoe UI Variable Text", "Avenir Next", "Ubuntu", "Roboto", "Noto Sans", "Helvetica Neue", sans-serif;
  --face-mono: "Cascadia Code", "JetBrains Mono", "Roboto Mono", "SF Mono", Menlo, monospace;

  --step--1: .875rem;
  --step-0: 1.03rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.75rem, 3.4vw, 2.35rem);
  --step-4: clamp(2.05rem, 5.6vw, 3.55rem);

  --edge: 4px;
  --edge-ctl: 6px;
  --gap: clamp(64px, 9vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-navy);
  color: var(--c-snow);
  font-family: var(--face-text);
  font-size: var(--step-0);
  line-height: 1.7;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--face-display); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
a { color: var(--c-link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--c-cyan); }
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
code { font-family: var(--face-mono); font-size: .9em; overflow-wrap: anywhere; }

/* ---------- layout ---------- */
.l-shell { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.l-shell--narrow { max-width: 820px; }
.l-main { display: block; min-height: 60vh; }

/* ---------- utilities ---------- */
.u-skiplink { position: absolute; left: -999px; top: 8px; background: var(--c-snow); color: var(--c-navy); padding: 6px 12px; z-index: 20; }
.u-skiplink:focus { left: 8px; }
.u-accent { color: var(--c-cyan); }

/* ---------- masthead ---------- */
.c-masthead { position: sticky; top: 0; z-index: 10; background: rgba(1, 5, 60, .92); border-bottom: 1px solid var(--c-rule); }
.c-masthead__row { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.c-masthead__home { display: inline-block; line-height: 0; }
.c-logo img { height: 44px; width: auto; display: block; }
.c-menu { display: flex; gap: 22px; margin-left: auto; }
.c-menu__link { color: var(--c-ice); text-decoration: none; font-size: var(--step--1); font-weight: 500; letter-spacing: .02em; }
.c-menu__link:hover, .c-menu__link[aria-current="page"] { color: var(--c-snow); text-decoration: underline; text-decoration-color: var(--c-cyan); }

/* ---------- controls ---------- */
.c-button {
  display: inline-flex; align-items: center; gap: .45em; justify-content: center;
  background: var(--c-blue); color: #fff; text-decoration: none; font-weight: 600;
  padding: 13px 24px; border-radius: var(--edge-ctl); border: 0; line-height: 1.2;
}
.c-button:hover { background: var(--c-blue-hover); color: #fff; }
.c-button--compact { padding: 9px 16px; font-size: var(--step--1); }
.c-masthead .c-button--compact { margin-left: 0; }
.c-button--play { font-size: 1.05rem; padding: 15px 28px; }
.c-button__pre { font-weight: 400; opacity: .85; }
.c-textlink { color: var(--c-ice); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--c-rule); }
.c-textlink:hover { color: var(--c-snow); border-bottom-color: var(--c-cyan); }

/* ---------- home: intro ---------- */
.c-intro {
  text-align: center; padding: 56px 0 170px;
  background:
    url("/img/peaks.svg") center bottom / auto 190px repeat-x,
    radial-gradient(70% 60% at 50% 0%, rgba(2, 30, 150, .9), rgba(2, 30, 150, 0) 70%),
    var(--c-navy);
}
.c-intro__inner { display: flex; flex-direction: column; align-items: center; }
.c-intro__mark img { width: 360px; display: block; margin: 0 auto 26px; }
.c-intro__title { font-size: var(--step-4); max-width: 16ch; }
.c-intro__text { color: var(--c-ice); font-size: var(--step-1); max-width: 40em; }
.c-intro__actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: center; margin-top: 10px; }
.c-intro__note { margin-top: 18px; font-size: var(--step--1); color: var(--c-mist); }

/* ---------- home: strip ---------- */
.c-strip { border-block: 1px solid var(--c-rule); background: var(--c-navy-2); }
.c-strip__list { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; margin: 0 auto; padding-block: 18px; gap: 6px 0; }
.c-strip__list li { padding: 0 22px; font-size: var(--step--1); font-weight: 600; letter-spacing: .03em; color: var(--c-ice); }
.c-strip__list li + li { border-left: 1px solid var(--c-rule); }

/* ---------- home: blocks ---------- */
.c-block { padding-block: var(--gap); }
.c-block--tinted { background: var(--c-navy-2); }
.c-block__title { font-size: var(--step-3); }
.c-block__intro { color: var(--c-ice); margin-top: -6px; margin-bottom: 30px; }

.c-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 34px; border-top: 1px solid var(--c-rule); }
.c-row:first-of-type { border-top: 0; }
.c-row--flip .c-row__copy { order: 2; }
.c-row__copy h3 { font-size: var(--step-2); }
.c-row__copy p { color: var(--c-ice); max-width: 34em; }
.c-row__art { height: 240px; border-radius: var(--edge); border: 1px solid var(--c-rule); }
.c-row__art--peaks { background: url("/img/peaks.svg") center bottom / auto 70% repeat-x, linear-gradient(160deg, var(--c-royal), var(--c-navy)); }
.c-row__art--swoosh { background: url("/img/swoosh.svg") center / 70% auto no-repeat, linear-gradient(200deg, var(--c-navy-3), var(--c-navy)); }
.c-row__art--grid {
  background:
    radial-gradient(circle at 70% 40%, var(--c-cyan) 0 5px, transparent 6px),
    repeating-linear-gradient(0deg, rgba(200, 212, 245, .07) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(200, 212, 245, .07) 0 1px, transparent 1px 28px),
    var(--c-navy-2);
}

.c-facttable { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.c-facttable th, .c-facttable td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--c-rule); vertical-align: top; }
.c-facttable thead th { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .08em; color: var(--c-mist); border-bottom: 2px solid var(--c-blue); }
.c-facttable tbody th { width: 40%; font-weight: 600; }
.c-facttable td { color: var(--c-ice); }

.c-timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: tl; }
.c-timeline__step { counter-increment: tl; position: relative; padding-top: 58px; }
.c-timeline__step::before {
  content: counter(tl, decimal-leading-zero); position: absolute; top: 0; left: 0;
  font-family: var(--face-display); font-size: 2rem; font-weight: 700; color: var(--c-cyan); line-height: 1;
}
.c-timeline__step::after { content: ""; position: absolute; top: 16px; left: 64px; right: -16px; height: 1px; background: var(--c-rule); }
.c-timeline__step:last-child::after { display: none; }
.c-timeline__step h3 { font-size: var(--step-1); }
.c-timeline__step p { color: var(--c-ice); }

.c-qa { border-top: 1px solid var(--c-rule); }
.c-qa__item { border-bottom: 1px solid var(--c-rule); }
.c-qa__item summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-family: var(--face-display); font-weight: 600; font-size: var(--step-1); }
.c-qa__item summary::-webkit-details-marker { display: none; }
.c-qa__item summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; color: var(--c-cyan); }
.c-qa__item[open] summary::after { content: "−"; }
.c-qa__item > :not(summary) { color: var(--c-ice); margin-top: 0; }
.c-qa__item > :last-child { padding-bottom: 18px; }

.c-closing { text-align: center; padding-block: var(--gap); background: radial-gradient(60% 90% at 50% 100%, rgba(2, 30, 150, .85), transparent 70%), var(--c-navy); }
.c-closing__inner::before { content: ""; display: block; width: 170px; height: 40px; margin: 0 auto 22px; background: url("/img/swoosh.svg") center / contain no-repeat; }
.c-closing h2 { font-size: var(--step-3); }
.c-closing p { color: var(--c-ice); }

/* ---------- documents (legal, open source) ---------- */
.c-document__head { padding-top: 52px; padding-bottom: 28px; border-bottom: 1px solid var(--c-rule); margin-bottom: 30px; }
.c-document__kicker { margin: 0 0 10px; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--c-cyan); font-weight: 600; }
.c-document__title { font-size: var(--step-4); hyphens: auto; overflow-wrap: break-word; }
.c-document__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 14px; font-size: var(--step--1); }
.c-document__meta div { display: flex; gap: 8px; }
.c-document__meta dt { color: var(--c-mist); }
.c-document__meta dd { margin: 0; font-weight: 600; }
.c-document__lead { color: var(--c-ice); margin: 0; }
.c-document__body { padding-bottom: var(--gap); }
.c-document__body h2 { font-size: var(--step-2); margin-top: 2.2em; padding-top: .6em; border-top: 1px solid var(--c-rule); scroll-margin-top: 80px; }
.c-document__body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.c-document__body p, .c-document__body li { color: #e4eafb; }
.c-document__body strong { color: var(--c-snow); }
.c-document__body ul { padding-left: 1.3em; }
.c-document__body li::marker { color: var(--c-cyan); }
.c-document__body code { background: var(--c-navy-3); padding: 1px 5px; border-radius: 3px; }

.c-ledger { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; }
.c-ledger th, .c-ledger td { text-align: left; vertical-align: top; padding: 14px 14px; border-bottom: 1px solid var(--c-rule); }
.c-ledger thead th { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .08em; color: var(--c-mist); border-bottom: 2px solid var(--c-blue); }
.c-ledger tbody th { width: 34%; font-weight: 600; }
.c-ledger td p:last-child { margin-bottom: 0; }
.c-ledger__aside { font-size: var(--step--1); color: var(--c-mist) !important; }
.c-ledger__hash { font-size: .8rem; color: var(--c-mist) !important; margin: 4px 0 0; }
.c-ledger__hash code { background: none !important; padding: 0 !important; }
.c-ledger--files tbody th code { background: none; padding: 0; color: var(--c-link); }

.c-spec { margin: 0 0 1.2em; border-left: 3px solid var(--c-blue); padding-left: 16px; }
.c-spec div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 4px 0; }
.c-spec dt { color: var(--c-mist); }
.c-spec dd { margin: 0; min-width: 0; }
.c-code { background: var(--c-navy-2); border: 1px solid var(--c-rule); border-radius: var(--edge); padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.6; margin: 0 0 1.2em; }
.c-code code { background: none !important; padding: 0 !important; color: var(--c-ice); }

/* ---------- help ---------- */
.c-helpdesk { padding: 52px 0 var(--gap); }
.c-contact { border: 1px solid var(--c-rule); border-left: 4px solid var(--c-cyan); background: var(--c-navy-2); padding: 20px 22px; margin: 8px 0 40px; border-radius: var(--edge); }
.c-contact p { color: var(--c-ice); margin-bottom: 6px; }
.c-contact__address { font-family: var(--face-display); font-size: var(--step-2); font-weight: 700; color: var(--c-snow); text-decoration: none; overflow-wrap: anywhere; }
.c-helpdesk__group { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--c-mist); margin: 40px 0 6px; }
.c-helpdesk .c-qa__item ol, .c-helpdesk .c-qa__item ul { padding-left: 1.3em; }

/* ---------- 404 ---------- */
.c-missing { text-align: center; padding: 90px 0 120px; }
.c-missing__code { font-family: var(--face-display); font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; line-height: 1; margin: 0 0 10px; color: var(--c-cyan); }
.c-missing p { color: var(--c-ice); }
.c-missing__links { display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- colophon ---------- */
.c-colophon { border-top: 3px solid var(--c-blue); background: var(--c-navy-2); font-size: var(--step--1); }
.c-colophon__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 44px 28px; }
.c-colophon__about p { color: var(--c-ice); margin: 12px 0 0; }
.c-colophon__heading { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--c-mist); margin-bottom: 12px; }
.c-colophon__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-colophon__list a { color: var(--c-ice); text-decoration: none; }
.c-colophon__list a:hover { color: var(--c-snow); text-decoration: underline; }
.c-colophon__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--c-rule); color: var(--c-mist); }
.c-colophon__base p { margin: 0; }
.c-langpick a[aria-current] { color: var(--c-snow); font-weight: 600; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .c-menu { display: none; }
  .c-masthead .c-button--compact { margin-left: auto; }
  .c-row { grid-template-columns: 1fr; gap: 22px; }
  .c-row--flip .c-row__copy { order: 0; }
  .c-row__art { height: 150px; }
  .c-timeline { grid-template-columns: 1fr; gap: 26px; }
  .c-timeline__step { padding: 0 0 0 64px; }
  .c-timeline__step::after { display: none; }
  .c-colophon__grid { grid-template-columns: 1fr 1fr; }
  .c-colophon__about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .l-shell { padding-inline: 18px; }
  .c-logo img { height: 38px; }
  .c-intro { padding: 36px 0 120px; background-size: auto 120px, auto, auto; }
  .c-intro__mark img { width: 220px; }
  .c-intro__actions .c-button { width: 100%; }
  .c-strip__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 0; }
  .c-strip__list li { padding: 0 12px; text-align: center; }
  .c-strip__list li + li { border-left: 0; }
  .c-facttable, .c-facttable tbody, .c-facttable tr, .c-facttable th, .c-facttable td,
  .c-ledger, .c-ledger tbody, .c-ledger tr, .c-ledger th, .c-ledger td { display: block; width: 100% !important; }
  .c-facttable thead, .c-ledger thead { display: none; }
  .c-facttable tbody th, .c-ledger tbody th { border-bottom: 0; padding-bottom: 2px; }
  .c-facttable td, .c-ledger td { padding-top: 2px; }
  .c-spec div { grid-template-columns: 1fr; gap: 0; }
  .c-colophon__grid { grid-template-columns: 1fr; }
}
