/* Pascal Obermayer — site styles
   Graphite, monochrome. One colour on the whole site: the clip LED.
   Headlines push against a limiter ceiling and get their tops cut. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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: "Archivo";
  src: url("fonts/archivo-var-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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;
}

:root {
  color-scheme: dark;

  --bg: #1a1a1a;
  --surface: #232323;
  --line: #3a3a3a;
  --quiet: #9a9a9a;
  --text: #e8e8e8;

  --led-off: #3d2321;
  --led-on: #e5322b;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 36rem;
  --header-h: 3.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; text-decoration-color: var(--quiet); }
a:hover { text-decoration-color: var(--text); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- header with scroll meter ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}
.home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

/* Clip LED: flat, no glow. Lights on load when the name hits the ceiling,
   and stays lit once the meter reaches the top (end of page). */
.led {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--led-off);
  flex: none;
}
.led.is-lit { background: var(--led-on); }

.site-nav { display: flex; gap: clamp(0.85rem, 3vw, 2rem); }
.site-nav a { text-decoration: none; font-size: var(--step--1); font-weight: 500; color: var(--quiet); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Segmented peak meter along the bottom edge of the header */
.meter {
  --p: 0%;
  position: relative;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 17px);
}
.meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--text) 0 14px, transparent 14px 17px);
  clip-path: inset(0 calc(100% - var(--p)) 0 0);
}

/* ---------- ceiling headline ---------- */

.ceiling {
  position: relative;
  container-type: inline-size;
  border-top: 2px solid var(--text);
  margin-top: clamp(3rem, 8vw, 6rem);
}
.ceiling-label {
  position: absolute;
  right: 0;
  top: -1.75rem;
  font-size: var(--step--1);
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.clipped { margin: 0; font-weight: 900; font-stretch: 62%; letter-spacing: -0.01em; line-height: 1; }
.clipped .line { display: block; position: relative; overflow: hidden; height: 0.85em; }
.clipped .line + .line { margin-top: -0.13em; }
.clipped--tool .line + .line { margin-top: 0.02em; }
.clipped .line > span { display: block; position: absolute; left: -0.02em; bottom: 0; white-space: nowrap; }
.clipped--name { font-size: 25.5cqi; }
.clipped--tool { font-size: min(40cqi, 22rem); }

@media (prefers-reduced-motion: no-preference) {
  .clipped .line > span { animation: push 900ms cubic-bezier(0.2, 0.9, 0.25, 1) both; }
  .clipped .line + .line > span { animation-delay: 90ms; }
}
@keyframes push { from { transform: translateY(55%); } to { transform: translateY(0); } }

/* ---------- intro ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem);
}
@media (min-width: 52rem) {
  .intro { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
}
.lede {
  margin: 0 0 1.75rem;
  max-width: 28ch;
  font-size: var(--step-2);
  line-height: 1.22;
  font-weight: 450;
  font-stretch: 92%;
}

/* Spec sheet, like the back page of a hardware manual */
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--quiet); font-size: var(--step--1); padding-top: 0.15em; }
.spec dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--text);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--text); }
.btn--line:hover { background: var(--text); color: var(--bg); }
.btn small { font-weight: 450; font-size: var(--step--1); opacity: 0.75; }

/* ---------- sections ---------- */

.section { border-top: 1px solid var(--line); padding-block: clamp(3rem, 7vw, 5rem); }

.section-head {
  margin: 0 0 2rem;
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 70%;
  line-height: 1;
}
.section-intro { margin: -1rem 0 2rem; color: var(--quiet); max-width: var(--measure); }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 15rem; align-items: baseline; }
  .row .go { justify-self: end; text-align: right; }
}
.row h3 { margin: 0; font-size: var(--step-2); font-weight: 800; font-stretch: 75%; line-height: 1.05; }
.row p { margin: 0; max-width: var(--measure); color: var(--quiet); }
.row .go { font-weight: 600; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- Spotify (loads on click) ---------- */

.player {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) { .player { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }

.embed {
  min-height: 352px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}
.embed p { margin: 0.75rem 0 0; color: var(--quiet); font-size: var(--step--1); max-width: 34ch; }
.embed iframe { width: 100%; height: 352px; border: 0; border-radius: 2px; display: block; }
.embed.is-loaded { padding: 0; border: 0; background: none; }

.player-side p { margin: 0 0 1rem; color: var(--quiet); max-width: 30ch; }

/* ---------- contact form ---------- */

.contact {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 60rem) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 4rem; } }
.contact-aside p { margin: 0 0 1rem; color: var(--quiet); max-width: 32ch; }

.form { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); color: var(--quiet); }
.field .opt { color: #6f6f6f; }

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.75rem 0.85rem;
}
input::placeholder, textarea::placeholder { color: #6f6f6f; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 0; border-color: var(--text); }
textarea { min-height: 9rem; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239a9a9a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: calc(100% - 0.9rem) 50%;
  background-size: 12px 8px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { margin: 0; font-size: var(--step--1); color: var(--quiet); }
.form-status[data-state="ok"] { color: var(--text); }
.form-note { margin: 0; font-size: var(--step--1); color: #6f6f6f; max-width: 46ch; }

/* ---------- Missing Features page ---------- */

.series {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.series h1 { margin: 0; font-size: var(--step-2); font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.series p { margin: 0; color: var(--quiet); }
.issue { font-size: var(--step-1); font-weight: 700; color: var(--text); }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video p { margin: 0; color: var(--quiet); font-size: var(--step--1); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.download {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  padding-block: 2rem clamp(3rem, 7vw, 5rem);
}
@media (min-width: 52rem) { .download { grid-template-columns: auto 1fr; align-items: center; gap: 2rem; } }
.download .req { margin: 0; color: var(--quiet); font-size: var(--step--1); max-width: 44ch; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.steps li { counter-increment: step; border-top: 2px solid var(--text); padding: 1rem 0 1.75rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: var(--step-3);
  font-weight: 900;
  font-stretch: 62%;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.steps h3 { margin: 0 0 0.35rem; font-size: var(--step-1); font-weight: 750; line-height: 1.2; }
.steps p { margin: 0; color: var(--quiet); max-width: 34ch; }

.details { margin: 0; }
.details > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 2rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.details > div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .details > div { grid-template-columns: 14rem 1fr; } }
.details dt { font-weight: 700; }
.details dd { margin: 0; color: var(--quiet); max-width: var(--measure); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.1rem;
  font-weight: 700;
  font-size: var(--step-1);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--quiet); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1.25rem; color: var(--quiet); max-width: var(--measure); }

.upcoming p { color: var(--quiet); max-width: var(--measure); }
.upcoming strong { color: var(--text); }

.split { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.split p { color: var(--quiet); max-width: var(--measure); margin: 0; }

/* ---------- legal ---------- */

.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); max-width: 44rem; }
.legal h1 { font-size: var(--step-3); font-weight: 800; font-stretch: 70%; line-height: 1; margin: 0 0 2rem; }
.legal h2 { font-size: var(--step-1); font-weight: 750; margin: 2rem 0 0.5rem; }
.legal p { color: var(--quiet); }
.legal p strong { color: var(--text); }
.todo { background: #4a4a4a; color: var(--text); padding: 0 0.25em; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem 2.5rem; font-size: var(--step--1); color: var(--quiet); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer .soon { color: #6f6f6f; }
