/* Mycrometer website. One stylesheet, no web fonts, nothing loaded from elsewhere.
   The look: a dark room at the microscope. The system sans-serif (SF Pro on Apple devices, like the app),
   measurements in monospace, and the stage micrometer's tick marks as the recurring ornament. Colours are the app's. */

:root {
  color-scheme: dark;
  --bg: #121315;
  --bg-2: #1b1c1e;
  --panel: #222326;
  --line: #34353a;
  --text: #e8e6e1;
  --muted: #9d9ea3;
  --title: #b2e8ee;
  --accent: #7fd1b9;
  --accent-ink: #0f2a22;
  --len: #ffd23f;
  --wid: #ff5fa2;
  --one: #6cc6ff;
  --field: #b2e8ee;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  --gut: clamp(18px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(178, 232, 238, .07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(127, 209, 185, .04), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
img, svg { max-width: 100%; }
a { color: var(--title); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(255, 210, 63, .35); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }

/* ---------- small-caps labels, numbers ---------- */
.label, .kicker, th, .step-n {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
}
.top nav a, .btn { font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.mono, code, kbd { font-family: var(--mono); font-size: .86em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--panel); }

/* ---------- the micrometer rule ---------- */
.rule {
  height: 28px; margin: 0 auto; max-width: var(--wrap);
  background:
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 100px) center / 100% 28px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50px) center / 100% 20px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px) center / 100% 10px no-repeat;
  opacity: .9;
}

/* ---------- header ---------- */
.top {
  max-width: var(--wrap); margin: 0 auto; padding: 20px var(--gut);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: auto; }   /* the logo: mark + "mycrometer" (Manrope 650) outlined, from brand/ */
.top nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--len); border-bottom-color: var(--len); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 14px 20px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); background: var(--panel); transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { color: #fff; border-color: var(--muted); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #9be3ce; color: var(--accent-ink); border-color: #9be3ce; }
.btn-small { padding: 9px 16px; font-size: 14px; }
/* "App coming soon" before the App Store page exists (build.py's pre-launch mode): a label, not a link */
.btn-soon { cursor: default; border-style: dashed; color: var(--muted); background: transparent; }
.btn-soon:hover { color: var(--muted); border-color: var(--line); transform: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 760px; }
section { padding-block: clamp(48px, 8vw, 96px); }
h1, h2, h3 { font-family: var(--sans); font-weight: 650; color: var(--title); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(40px, 6.2vw, 72px); font-weight: 700; letter-spacing: -.022em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.016em; }
h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 1.9vw, 21px); color: #d8d6d0; max-width: 34em; }
.kicker { color: var(--accent); margin: 0 0 18px; }
.muted { color: var(--muted); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding-top: clamp(24px, 6vw, 72px); }
.hero h1 em { font-style: normal; color: var(--len); }
.scope { position: relative; margin: 0; }
.scope svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); }
.readout {
  position: relative; margin: -46px 0 0 auto; width: min(100%, 440px);
  background: rgba(27, 28, 30, .92); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font: 13.5px/1.6 var(--mono); color: var(--text);
  box-shadow: 0 20px 40px rgba(0,0,0,.4); backdrop-filter: blur(6px);
}
.readout .label { color: var(--muted); font-size: 11px; display: block; margin-bottom: 4px; }
.readout .L { color: var(--len); } .readout .W { color: var(--wid); }

/* measurement lines draw themselves once */
.m-line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.1s cubic-bezier(.6,.1,.2,1) forwards; }
.m-w { animation-delay: .9s; }
.m-tick { opacity: 0; animation: appear .3s forwards; animation-delay: 1.6s; }
.m-tick.w { animation-delay: 1.9s; }
.reveal { opacity: 0; transform: translateY(10px); animation: rise .7s ease-out forwards; }
.reveal.d1 { animation-delay: .1s; } .reveal.d2 { animation-delay: .25s; } .reveal.d3 { animation-delay: .4s; } .reveal.d4 { animation-delay: 1.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .m-line, .m-tick, .reveal { animation: none; opacity: 1; stroke-dashoffset: 0; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- steps ---------- */
.hero + section { padding-top: clamp(72px, 12vw, 152px); }
.steps { --step-line: rgba(255, 255, 255, .06); display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--step-line); }
.step { padding: 26px 26px 6px 0; position: relative; }
.step + .step { padding-left: 26px; border-left: 1px solid var(--step-line); }
.step-n { color: var(--len); display: block; margin-bottom: 14px; }
.step p { color: #cfcdc7; }

/* ---------- feature list ---------- */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 32px; }
.feat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { margin: 0; color: #cfcdc7; font-size: 16px; }
.feat .swatch { display: inline-block; width: 22px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }

/* example result */
.result {
  margin: 28px 0 0; padding: 22px 24px; border: 1px solid var(--line);
  background: var(--bg-2); border-radius: 14px; font: 15px/1.75 var(--mono); overflow-x: auto;
}
.result b { color: var(--title); font-weight: 600; }

/* ---------- privacy band ---------- */
.band { background: linear-gradient(180deg, rgba(178,232,238,.06), rgba(178,232,238,0)); border-block: 1px solid var(--line); }
.band .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(48px, 7vw, 96px); align-items: center; }
.band .big { font: 700 clamp(60px, 10vw, 120px)/.9 var(--sans); letter-spacing: -.04em; color: var(--wid); }
.band .big .label { display: block; color: var(--muted); margin-top: 14px; letter-spacing: .08em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 400; background: var(--bg-2); }
td.c, th.c { text-align: center; width: 120px; }
tr:last-child td { border-bottom: 0; }
.yes { color: var(--accent); font-family: var(--mono); }
.no { color: var(--muted); font-family: var(--mono); }
.later { color: var(--len); font-family: var(--mono); font-size: 13px; }
tr.group td { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.02); }

/* ---------- prose pages ---------- */
.page-head { padding-block: clamp(44px, 8vw, 96px) 10px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); }
.top .short { display: none; }
.prose { padding-top: 24px; }
body:not(.home) main { padding-bottom: clamp(40px, 6vw, 72px); }
.prose h2 { font-size: 26px; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--muted); }
.note { border: 1px solid var(--line); background: var(--bg-2); border-radius: 12px; padding: 16px 20px; margin: 1.2em 0; font-size: 16px; }
.note.warn { border-color: rgba(255, 210, 63, .45); }
.prose pre { white-space: pre-wrap; font: 14px/1.6 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; }
dl.faq dt { font-weight: 600; color: var(--title); margin-top: 1.4em; }
dl.faq dd { margin: .35em 0 0; }
.log h2 { font-size: 22px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.log h2 .label { color: var(--muted); }

/* ---------- footer ---------- */
.foot { padding: 50px var(--gut) 40px; }
.foot .rule { margin-bottom: 60px; }
.foot-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.foot p { color: var(--muted); font-size: 15px; max-width: 26em; margin-top: 12px; }
.foot .made { display: block; margin-top: 4px; }
.foot nav { display: flex; flex-direction: column; gap: 10px; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: var(--text); }
.foot .fine { max-width: var(--wrap); margin: 56px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font: 12px/1.8 var(--mono); color: #6f7075; }
.foot .fine span { white-space: nowrap; }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .readout { margin-top: -30px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 4px; border-left: 0; border-top: 1px solid var(--step-line); }
  .steps .step:first-child { border-top: 0; }
  .band .wrap { grid-template-columns: 1fr; gap: 10px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { gap: 14px; }
  .top nav { order: 3; width: 100%; margin-left: 0; gap: 18px; }
  .top .btn-small { margin-left: auto; }
  .top .long { display: none; } .top .short { display: inline; }
  /* phones: no hero picture (the spore in the field of view and its results card), just the words and buttons */
  .hero .scope { display: none; }
}
.sw-len { background: var(--len); } .sw-wid { background: var(--wid); } .sw-one { background: var(--one); }
.sw-accent { background: var(--accent); } .sw-title { background: var(--title); } .sw-muted { background: var(--muted); }
.readout .L, .readout .W { white-space: nowrap; }
@media (max-width: 640px) { .readout { font-size: 12.5px; } }
@media (max-width: 400px) { .foot .fine { font-size: 11px; } }
