/* CloudLatch website. One stylesheet for all pages. No build step, no JavaScript. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #eef1f5;
  --bg-2: #e2e7ee;
  --surface: #f9fbfd;
  --surface-2: #f1f4f8;
  --line: rgba(13, 27, 46, .10);
  --line-strong: rgba(13, 27, 46, .22);
  --ink: #0d1b2e;
  --ink-2: #39475b;
  --ink-3: #536175;
  --accent: #0066b5;
  --accent-2: #004f8c;
  --sky: #2fc3ff;
  --sky-soft: rgba(47, 195, 255, .16);
  --ok: #18794e;
  --warn: #a35a00;
  --on-accent: #ffffff;
  --menubar: rgba(246, 248, 251, .82);
  --panel: rgba(250, 251, 253, .94);
  --shadow: 0 30px 60px -30px rgba(13, 27, 46, .35), 0 0 0 1px rgba(13, 27, 46, .06);
  --brush: rgba(255, 255, 255, .3);
  --sans: "Instrument Sans", ui-sans-serif, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a111d;
    --bg-2: #0f1828;
    --surface: #131e30;
    --surface-2: #192640;
    --line: rgba(190, 215, 245, .10);
    --line-strong: rgba(190, 215, 245, .22);
    --ink: #e8eef7;
    --ink-2: #b2bfd0;
    --ink-3: #93a2b6;
    --accent: #5cc8ff;
    --accent-2: #8ad8ff;
    --sky-soft: rgba(47, 195, 255, .12);
    --ok: #4fd18e;
    --warn: #ffb44d;
    --on-accent: #04121e;
    --menubar: rgba(22, 30, 46, .85);
    --panel: rgba(28, 38, 58, .96);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(190, 215, 245, .08);
    --brush: rgba(255, 255, 255, .012);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 70% -12%, var(--sky-soft), transparent 64%),
    repeating-linear-gradient(to bottom, transparent 0 2px, var(--brush) 2px 3px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
code { font-family: var(--mono); font-size: .78em; padding: .12em .4em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; font-family: var(--sans); letter-spacing: -.02em; line-height: 1.05; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand:hover { color: var(--ink); }
.brand span { white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 7px; }
@media (max-width: 640px) { .site-nav .wide { display: none; } }

/* ---------- buttons ---------- */
.button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15.5px; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset; transition: transform .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--ink); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; }
.hero h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 700; font-stretch: 82%; letter-spacing: -.035em; line-height: .94; margin-bottom: 24px; }
.hero h1 span { color: var(--accent); }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); margin: 0 0 28px; max-width: 30em; }
.hero .pill { margin-top: 24px; }

/* the menu bar stage */
.stage { margin: 0; position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); background:
    radial-gradient(500px 300px at 80% 10%, rgba(47,195,255,.35), transparent 70%),
    radial-gradient(500px 340px at 10% 100%, rgba(0,102,181,.35), transparent 70%),
    linear-gradient(160deg, #1b3a63, #0d1b2e 70%); min-height: 520px; }
.menubar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; height: 30px; padding: 0 14px; background: var(--menubar); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); }
.menubar .left { margin-right: auto; display: flex; gap: 16px; font-weight: 600; }
.menubar .left span + span { font-weight: 400; color: var(--ink-2); }
.status-item { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 102, 181, .14); font-weight: 600; }
.status-item svg { width: 14px; height: 14px; }
.menubar .clock { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.popover { position: absolute; top: 40px; right: clamp(12px, 6%, 64px); width: min(340px, calc(100% - 24px)); background: var(--panel); color: var(--ink); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6), 0 0 0 1px var(--line-strong); padding: 14px 16px 12px; font-size: 13.5px; line-height: 1.45; }
.popover::before { content: ""; position: absolute; top: -7px; right: 48px; width: 14px; height: 14px; background: var(--panel); transform: rotate(45deg); box-shadow: -1px -1px 0 var(--line-strong); }
.popover .row { margin: 0 0 7px; }
.popover .sec { color: var(--ink-3); }
.popover .ok { color: var(--ok); }
.popover h3, .popover .ph { font-size: 15px; font-weight: 700; letter-spacing: 0; margin: 4px 0 8px; }
.popover .menu-btn { display: flex; justify-content: space-between; align-items: center; padding: 5px 9px; margin: 0 -4px 6px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; }
.popover .menu-btn::after { content: "⌄"; color: var(--ink-3); }
.popover .menu-btn.plain::after { content: ""; }
.popover .menu-btn.focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 102, 181, .18); }
.popover hr { border: 0; border-top: 1px solid var(--line-strong); margin: 8px 0; }
.mfa { margin: 8px -4px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.mfa b { display: block; font-size: 13px; margin-bottom: 6px; }
.mfa .field { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--accent); background: var(--surface); }
.mfa .acts { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 500; }
.mfa .acts span:last-child { background: var(--accent); color: var(--on-accent); padding: 2px 10px; border-radius: 6px; }
.stage-caption { position: absolute; left: 16px; bottom: 14px; right: 16px; font-family: var(--mono); font-size: 10.5px; color: rgba(255,255,255,.75); }
@media (max-width: 520px) { .stage { min-height: 560px; } .menubar .left span + span, .menubar .clock { display: none; } .popover { right: 12px; } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 18px 56px; align-items: end; margin-bottom: clamp(32px, 5vw, 52px); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }
.section-head h2, .doc-head h1 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 700; font-stretch: 84%; letter-spacing: -.03em; line-height: 1; }
.section-head h2 span, .doc-head h1 span { color: var(--accent); }
.section-head p { margin: 0; font-size: 19px; color: var(--ink-2); }
.kicker { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }

/* two clocks timeline */
.clocks { border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.track { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 20px; align-items: center; margin-bottom: 22px; }
@media (max-width: 640px) { .track { grid-template-columns: 1fr; } }
.track .name { font-weight: 600; font-size: 15px; }
.track .name small { display: block; font-weight: 400; color: var(--ink-3); font-family: var(--mono); font-size: 10.5px; margin-top: 2px; }
.bar { position: relative; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 8px; display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 11px; color: #fff; white-space: nowrap; }
.bar.source .fill { width: 100%; background: linear-gradient(90deg, #0d3a66, #0066b5); }
.roles { display: flex; gap: 4px; height: 100%; }
.roles .fill { position: relative; flex: 1; inset: auto; background: linear-gradient(90deg, #1287d6, #2fc3ff); padding: 0 8px; }
.roles .fill::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 14%; background: repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 4px, transparent 4px 8px); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14.5px; color: var(--ink-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .l1 { background: #0066b5; }
.legend .l2 { background: #2fc3ff; }
.legend .l3 { background: repeating-linear-gradient(45deg, #2fc3ff 0 3px, #b8ecff 3px 6px); }
.clock-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
@media (max-width: 860px) { .clock-notes { grid-template-columns: 1fr; } }
.note { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.note h3 { font-size: 17px; margin-bottom: 6px; letter-spacing: -.01em; }
.note p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding: 24px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); position: relative; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 18px; }
.steps h3 { font-size: 21px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* credentials file */
.file-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (max-width: 900px) { .file-grid { grid-template-columns: 1fr; } }
.file { border-radius: 16px; overflow: hidden; background: #0d1b2e; color: #d8e4f2; box-shadow: var(--shadow); }
.file-bar { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-family: var(--mono); font-size: 11px; color: #8fa4bf; border-bottom: 1px solid rgba(255,255,255,.08); }
.file pre { margin: 0; padding: 14px 0; font-family: var(--mono); font-size: 12px; line-height: 1.85; overflow-x: auto; }
.file pre span { display: block; padding: 0 16px; }
.file .sec { color: #8ad8ff; font-weight: 600; }
.file .key { color: #9fb3cc; }
.file .w { background: rgba(47, 195, 255, .12); box-shadow: inset 3px 0 0 #2fc3ff; }
.file .k { opacity: .55; }
.file .tag { float: right; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #2fc3ff; }
.file .tag.keep { color: #8fa4bf; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { padding-left: 30px; position: relative; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px; border-radius: 4px; background: var(--sky); }
.points li.keep::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); }
.points strong { color: var(--ink); }

/* features */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 26px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.feature .tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 6px; background: var(--sky-soft); color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 24px; margin-bottom: 10px; }
.feature p { margin: 0 0 10px; color: var(--ink-2); font-size: 16px; }
.feature p:last-child { margin-bottom: 0; }

/* boundaries */
.bounds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .bounds { grid-template-columns: 1fr; } }
.bound { padding: 22px; border-radius: 16px; border: 1px solid var(--line-strong); }
.bound h3 { font-size: 18px; margin-bottom: 8px; }
.bound p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.scope { margin-top: 18px; padding: 16px 20px; border-radius: 14px; background: var(--surface-2); border-left: 3px solid var(--warn); color: var(--ink-2); font-size: 15.5px; }

/* release */
.release { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 860px) { .release { grid-template-columns: 1fr; } }
.release h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; font-stretch: 84%; letter-spacing: -.03em; margin-bottom: 14px; }
.release p { margin: 0 0 14px; color: var(--ink-2); }
.req { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); font-size: 15px; }
.req li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-strong); color: var(--ink-3); }
.req b { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- document pages ---------- */
.doc-head { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.doc-head p { margin: 18px 0 0; color: var(--ink-2); font-size: 20px; max-width: 36em; }
.doc-head .meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 14px; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 6vw, 72px); padding-top: clamp(32px, 5vw, 52px); padding-bottom: clamp(64px, 9vw, 112px); }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14.5px; }
@media (max-width: 900px) { .toc { position: static; } }
.toc summary { cursor: pointer; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: " ▾"; color: var(--ink-3); }
.toc[open] summary::after { content: " ▴"; }
@media (min-width: 901px) { .toc summary { display: none; } }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line-strong); }
@media (min-width: 901px) { .toc ol { margin-top: 0; } }
.toc a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--sky); }
.prose { max-width: 70ch; min-width: 0; }
.prose section { padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; font-stretch: 88%; letter-spacing: -.02em; margin-bottom: 16px; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose ol, .prose ul { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); font-weight: 600; }
.prose strong { color: var(--ink); }
.ui { font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: .05em .4em; font-size: .92em; }
.callout { border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 18px; background: var(--surface); color: var(--ink-2); margin: 16px 0; }
.callout.warn { border-left-color: var(--warn); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 18px 14px; margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 15px; color: var(--ink-3); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: start; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-inner p { margin: 8px 0 0; max-width: 46em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 500; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--d, 0) * 100ms + 60ms); }
  .popover { opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; animation: pop .5s cubic-bezier(.2,.8,.2,1) .6s forwards; }
  .bar .fill, .roles { transform-origin: left; animation: grow 1.4s cubic-bezier(.2,.8,.2,1) .3s both; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes pop { to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 380px) { .site-header .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .site-nav { gap: 12px; font-size: 14px; } }
