/* Droneboard — Fog Sleeve. One fog photograph, vast quiet space, the keyboard as the only sharp object. */

@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ptsans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ptsans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ptsans-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ptsans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ptsans-400i-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PT Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ptsans-400i-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --slate: #2e3a44;
  --slate-deep: #20282f;
  --water: #2a333a;
  --fog: #c9d1d3;
  --mist: #9aa8b1;
  --ink: #f2f2ee;
  --red: #b23a2e;
  --red-lit: #d0584b;
  --rule: rgba(201, 209, 211, 0.16);
  --sans: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  /* the hero scales with the smaller side of the viewport, like the square sleeve it comes from */
  --u: min(1vw, 1svh);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--slate-deep);
  color: var(--fog);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(242, 242, 238, 0.45); }
a:hover { text-decoration-color: var(--red-lit); }
:focus-visible { outline: 2px solid var(--red-lit); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--red); color: var(--ink); }
code { font: inherit; letter-spacing: 0.04em; color: var(--ink); }
html { scrollbar-color: #4a5862 var(--slate-deep); }

.skip { position: absolute; left: -999px; top: 0; padding: 0.6rem 1rem; background: var(--ink); color: var(--slate); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ───── the sleeve: first viewport ───── */
.sleeve {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  isolation: isolate;
}
.sleeve .fog {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 50%;
}
.sleeve::after {
  /* the water in the photograph runs darker than the comp's; lift its bottom third back to the approved tone */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(92, 106, 114, 0) 55%, rgba(92, 106, 114, 0.2) 100%);
}
.masthead {
  position: absolute; top: calc(3.2 * var(--u)); left: calc(3.7 * var(--u)); right: calc(3.5 * var(--u));
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
}
.wordmark {
  font-size: max(17px, calc(2.15 * var(--u)));
  letter-spacing: 0.3em; text-transform: lowercase;
  color: var(--ink); text-decoration: none;
}
.topnav { display: flex; align-items: baseline; gap: max(12px, calc(1.1 * var(--u))); font-size: max(14px, calc(1.56 * var(--u))); }
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: max(10px, calc(1.1 * var(--u))); }
.topnav a { text-decoration: none; color: var(--ink); text-transform: lowercase; }
.topnav a:hover { text-decoration: underline; text-decoration-color: var(--red-lit); }
.topnav .langs { margin-left: max(8px, calc(1.2 * var(--u))); }
.topnav .langs a[aria-current] { text-decoration: underline; text-decoration-color: var(--red-lit); }

.stack {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: 57%;
  width: min(92vw, max(320px, calc(50.4 * var(--u))));
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.stack h1 {
  margin: 0;
  font-weight: 400;
  font-size: max(26px, calc(3.22 * var(--u)));
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-transform: lowercase;
  text-wrap: balance;
}
.stack .sub {
  margin: calc(0.9 * var(--u)) 0 0;
  width: max(100%, min(92vw, calc(62 * var(--u))));
  max-width: 92vw;
  font-size: max(15px, calc(1.56 * var(--u)));
  line-height: 1.38;
  color: #e6ecee;
  text-wrap: balance;
}

/* the keyboard: the one sharp object */
.kb {
  margin-top: calc(1.95 * var(--u));
  width: max(300px, calc(28.5 * var(--u)));
  padding: calc(0.7 * var(--u)) calc(0.6 * var(--u)) calc(0.8 * var(--u));
  border-radius: calc(1.6 * var(--u));
  background: rgba(30, 34, 39, 0.92);
  box-shadow: 0 calc(1.2 * var(--u)) calc(3 * var(--u)) rgba(8, 12, 16, 0.45), inset 0 0 0 1px rgba(201, 209, 211, 0.10);
  position: relative;
  color: #dfe5e8;
  font-size: max(10px, calc(1.15 * var(--u)));
}
.kb-strip { display: grid; grid-template-columns: 1.4em 1fr 1fr 1fr 1.4em; align-items: center; height: 1.9em; color: #c3cbcf; }
.kb-strip .w { text-align: center; transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.kb.playing .kb-strip .w { opacity: 0.18; transition-duration: 120ms; }
.kb-strip svg { width: 1.1em; height: 1.1em; justify-self: center; }
.kb-rows { display: grid; gap: 0.42em; position: relative; }
.kb-row { display: flex; gap: 0.32em; }
.kb-row.mid { padding: 0 calc((100% - 0.32em * 9) / 20); }
.kb-row .k {
  flex: 1 1 0; min-width: 0; height: 2.3em;
  display: grid; place-items: center;
  border-radius: 0.45em;
  background: #3a4249; color: #e4e9eb;
}
.kb-row .k svg { width: 1.25em; height: 1.25em; }
.kb-row .k.fn { background: #2c3338; }
.kb-row .k.wide { flex-grow: 1.55; }
.kb-row .k.space { flex-grow: 4.6; }
.kb canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.install { margin-top: calc(3.0 * var(--u)); display: flex; align-items: baseline; gap: calc(1.4 * var(--u)); flex-wrap: wrap; justify-content: center; }
.install .primary {
  font-size: max(18px, calc(1.86 * var(--u)));
  line-height: 1.2;
  color: #eef2f2; text-decoration: none;
  padding-bottom: 0.4em;
  background: linear-gradient(#c9989b, #c9989b) 0 100% / 100% 2px no-repeat;
}
.install .primary:hover { background-size: 100% 3px; }
.install .alt { display: flex; gap: calc(1.5 * var(--u)); font-size: max(13px, calc(1.25 * var(--u))); }
.install .alt a { color: #e7eced; }

.cue {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(-0.35 * var(--u));
  display: flex; flex-direction: column; align-items: center; gap: 0.55em;
  font-size: max(11px, calc(1.17 * var(--u))); letter-spacing: 0.06em;
  color: #9fa9ae; text-decoration: none;
}
.cue svg { width: 1.9em; height: 1.9em; }

/* ───── the back of the sleeve ───── */
main { background: var(--slate-deep); }
.panel { max-width: 70rem; margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 5vw, 3rem); border-top: 1px solid var(--rule); }
.panel:first-child, .held + .panel { border-top: 0; }
.panel h2 {
  margin: 0 0 1.1rem;
  font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15;
  color: var(--ink); text-transform: lowercase; letter-spacing: 0.01em;
}
.panel .lede { margin: 0 0 3rem; max-width: 60ch; color: var(--mist); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); }

/* track listing */
.side-label { font-size: 0.95rem; letter-spacing: 0.08em; color: var(--mist); text-transform: lowercase; margin: 0 0 0.6rem; }
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tracks li { display: grid; grid-template-columns: 3rem minmax(0, 15rem) minmax(0, 1fr); gap: 0 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.tracks .no { font-variant-numeric: tabular-nums; color: var(--mist); letter-spacing: 0.05em; }
.tracks h3 { margin: 0; font-weight: 400; font-size: 1.15rem; line-height: 1.3; color: var(--ink); text-transform: lowercase; }
.tracks p { margin: 0; max-width: 62ch; }
.tracks.b li { grid-template-columns: 3rem minmax(0, 1fr); }
.tracks.b h3 { color: var(--fog); }
.side-b { margin-top: 3.5rem; }

.shots { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 4rem; align-items: flex-end; }
.shots figure { margin: 0; flex: 1 1 0; max-width: 22rem; }
.shots img { border-radius: 1.1rem; box-shadow: 0 1.2rem 2.6rem rgba(5, 8, 11, 0.5); }
.shots figcaption { margin-top: 0.9rem; font-size: 0.92rem; color: var(--mist); }
.held { position: relative; margin: 0; isolation: isolate; }
.held img { width: 100%; height: clamp(18rem, 42vw, 34rem); object-fit: cover; object-position: 40% 55%; }
.held figcaption {
  position: absolute; left: 50%; bottom: clamp(1.5rem, 5vw, 3.5rem); transform: translateX(-50%);
  width: min(90vw, 38rem); text-align: center;
  font-style: italic; font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.5; color: #eef1f1;
  text-wrap: balance;
}
.held::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(32, 40, 47, 0) 45%, rgba(32, 40, 47, 0.55) 100%); }
.held img { position: relative; z-index: -2; }

/* privacy + numbers */
.plainlist { list-style: none; margin: 0; padding: 0; }
.plainlist li { padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.check { margin: 2rem 0 0; padding-left: 1rem; border-left: 1px solid var(--red-lit); max-width: 52ch; }
.check strong { font-weight: 400; color: var(--ink); }
table.stats { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
table.stats caption { text-align: left; caption-side: bottom; padding-top: 1rem; font-size: 0.92rem; color: var(--mist); }
table.stats th, table.stats td { padding: 0.85rem 0; border-top: 1px solid var(--rule); text-align: left; font-weight: 400; vertical-align: baseline; }
table.stats thead th { color: var(--mist); font-size: 0.92rem; letter-spacing: 0.06em; text-transform: lowercase; border-top: 0; }
table.stats td.n, table.stats th.n { text-align: right; width: 5.5rem; }
table.stats tr.us th, table.stats tr.us td { color: var(--ink); }

/* install */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(s); font-variant-numeric: tabular-nums; color: var(--mist); }
.routes { display: grid; gap: 1.6rem; align-content: start; }
.routes .primary { font-size: 1.45rem; color: var(--ink); text-decoration: none; padding-bottom: 0.25em; background: linear-gradient(var(--red-lit), var(--red-lit)) 0 100% / 100% 2px no-repeat; justify-self: start; }
.routes .primary:hover { background-size: 100% 3px; }
.route { display: grid; gap: 0.2rem; }
.route .what { color: var(--mist); font-size: 0.95rem; }
.inst-note { margin-top: 2.5rem; color: var(--mist); max-width: 60ch; }

/* nostr: the shared nostr-live widget, themed only through its custom properties */
.nostr-feed {
  --nl-font: var(--sans); --nl-heading-font: var(--sans);
  --nl-fg: var(--fog); --nl-muted: var(--mist); --nl-bg: transparent; --nl-card-bg: transparent;
  --nl-border: var(--rule); --nl-accent: var(--red); --nl-accent-fg: var(--ink); --nl-link: var(--ink);
  --nl-radius: 2px; --nl-media-radius: 0.6rem; --nl-avatar-radius: 50%; --nl-avatar-size: 44px;
  --nl-gap: 1.4rem; --nl-pad: 0; --nl-card-pad: 1.4rem 0; --nl-leading: 1.6;
  margin-top: 1rem;
}
.nostr-links { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; color: var(--mist); }

/* credits */
.credits dl { margin: 0; display: grid; grid-template-columns: 12rem minmax(0, 1fr); }
.credits dt, .credits dd { margin: 0; padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.credits dt { color: var(--mist); text-transform: lowercase; }
.foot { max-width: 70rem; margin: 0 auto; padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 3.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; font-size: 0.92rem; color: var(--mist); border-top: 1px solid var(--rule); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.foot a[aria-current] { text-decoration-color: var(--red-lit); }

/* ───── narrow screens: the photograph crops to fog, the keyboard spans the thumb's reach ───── */
@media (max-width: 760px) {
  .sleeve::after { background: linear-gradient(to bottom, rgba(32, 40, 47, 0) 30%, rgba(32, 40, 47, 0.62) 62%, rgba(32, 40, 47, 0.8) 100%); }
  .masthead { top: 1.1rem; left: 1.1rem; right: 1.1rem; flex-wrap: wrap; }
  .topnav .sections { display: none; }
  .stack { top: auto; bottom: 4.5rem; width: calc(100vw - 2rem); }
  .kb { width: min(100%, 22rem); font-size: 11.5px; }
  .two { grid-template-columns: 1fr; }
  .tracks li { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .tracks li p { grid-column: 2; margin-top: 0.4rem; }
  .shots { flex-direction: column; align-items: stretch; }
  .shots figure { max-width: 20rem; }
  .credits dl { grid-template-columns: 1fr; }
  .credits dd { border-top: 0; padding-top: 0; }
}
@media (max-width: 760px) and (max-height: 700px) { .stack { bottom: 3.5rem; } }
