/* theclef.app (landing + download pages). Same layout and type as thecallboard.app.
   theClef's colour is BenchFocus green: wordmark, headline emphasis, buttons and accents.
   The yellow / blue / green set from the logo is only used for the colour tape and marks. */
:root {
  --ink: #142030; --ink-2: #4a5665; --ink-3: #7b8696;
  --paper: #f3f5f8; --sheet: #ffffff; --rule: #dde2e8;
  --accent: #23905a; --accent-ink: #1d7a4c; --on-accent: #ffffff;
  --stage: #0b1119; --stage-ink: #e6edf4; --stage-ink-2: #9fb0c3;
  --yellow: #f2c230; --blue: #3b82e0; --green: #2fa66a; --slate: #8593a5;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, sans-serif;
  --shadow: 0 24px 60px rgba(8, 14, 22, 0.28);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6edf4; --ink-2: #aeb9c7; --ink-3: #7d8a9b;
    --paper: #0b1119; --sheet: #121b26; --rule: #243243;
    --accent: #2fa66a; --accent-ink: #4cc487; --on-accent: #06200f;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6edf4; --ink-2: #aeb9c7; --ink-3: #7d8a9b;
  --paper: #0b1119; --sheet: #121b26; --rule: #243243;
  --accent: #2fa66a; --accent-ink: #4cc487; --on-accent: #06200f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
p { margin: 0; }
a { color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.2rem; border-radius: 8px;
  font: 600 1rem/1 var(--body); text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn.primary { background: var(--green); color: #16202b; }
.btn.primary:hover { background: #36b374; }
.btn.ghost { color: var(--stage-ink); border-color: rgba(255,255,255,0.22); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.5); }
.eyebrow { font: 600 0.85rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.wm { color: var(--green); }   /* two-tone wordmark: "the" + "Clef" in brand green */

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 30; background: rgba(11, 17, 25, 0.86); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.top .wrap { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font: 700 1.45rem/1 var(--display); }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.top nav { display: flex; gap: 1.4rem; margin-left: 1.5rem; }
.top nav a { color: var(--stage-ink-2); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: #fff; }
.top .actions { margin-left: auto; display: flex; gap: 0.6rem; }
.top .btn { padding: 0.55rem 1rem; }
@media (max-width: 820px) { .top nav { display: none; } }
@media (max-width: 420px) { .top .btn.ghost { display: none; } }

/* ------------------------------------------------------------------- hero */
.hero { background: radial-gradient(1200px 500px at 70% -10%, rgba(47,166,106,0.18), transparent 60%), var(--stage); color: var(--stage-ink); padding: 5rem 0 5.5rem; overflow: hidden; }
.hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.2rem); font-weight: 700; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--stage-ink-2); max-width: 46ch; margin-top: 1.25rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero .cta .btn { padding: 0.9rem 1.4rem; font-size: 1.05rem; }
.hero .note { margin-top: 0.9rem; color: var(--stage-ink-2); font-size: 0.92rem; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; }
.platforms li { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem 0.3rem 0.6rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  color: var(--stage-ink-2); border: 1px solid color-mix(in srgb, var(--stage-ink-2) 35%, transparent); }
.platforms svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tape { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.tape i { height: 6px; width: 44px; border-radius: 2px; }

.hero-top > * { min-width: 0; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 3rem; align-items: center; }
/* The fan-out, a 12 s loop. The big icon is the leader's screen: it zooms from the logo into the
   yellow page, then swipes to blue and green (the next songs). Each change runs down the wires and
   every player's screen swipes to the same page. Then it zooms back out to the logo with the dots
   flowing. Timings here match the pulse windows in the SVG (0.8, 3.4 and 6.2 s). The equal,
   gapless columns keep the wire ends (10%, 30%, 50%, 70%, 90%) over each screen. */
.fanout { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 0; row-gap: 0.5rem; text-decoration: none; color: var(--stage-ink); }
.mf-box { grid-column: 1 / -1; justify-self: center; display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
.mf-logo { position: relative; display: block; width: 112px; height: 112px; border-radius: 26px; background: #16202B; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 0 0 8px rgba(47,166,106,0.07), 0 18px 50px rgba(0,0,0,0.45), 0 0 60px rgba(47,166,106,0.14);
  transition: transform 300ms cubic-bezier(0.22,0.8,0.24,1), box-shadow 300ms; }
.mf-logo .lg, .mf-logo .main { position: absolute; inset: 0; }
.mf-logo .lg svg { width: 100%; height: 100%; }
/* zoom: the logo's page sits at 49.5% / 33.6%; scaling about it, then dropping it 16% (18px), lands it where the big page is */
.mf-logo .lg { transform-origin: 49.5% 33.6%; animation: cf-logo 12s infinite; }
.mf-logo .main { overflow: hidden; opacity: 0; animation: cf-main 12s infinite; }
.mf-logo .main .strip { animation: cf-main-strip 12s infinite; }
.mf-box b { font: 700 1.6rem/1 var(--display); letter-spacing: -0.01em; margin-top: 0.45rem; }
.mf-box small { font: 500 0.88rem/1.2 var(--body); color: var(--stage-ink-2); }

/* a page: a document in its song's colour, with three lines and the corner cut */
.strip { display: flex; width: 400%; height: 100%; }
.pg { flex: 0 0 25%; display: grid; place-items: center; }
.pg b { display: block; height: 70%; aspect-ratio: 3 / 4; border-radius: 6%;
  clip-path: polygon(0 0, 70% 0, 100% 23%, 100% 100%, 0 100%);
  background: linear-gradient(#16202b, #16202b) 50% 44% / 62% 6% no-repeat, linear-gradient(#16202b, #16202b) 50% 60% / 62% 6% no-repeat,
    linear-gradient(#16202b, #16202b) 50% 76% / 62% 6% no-repeat, var(--pc); }

.mf-wires { grid-column: 1 / -1; display: block; width: 100%; height: auto; overflow: visible; margin: 0.2rem 0 0; }
.mf-lines path { fill: none; stroke-width: 2; stroke-linecap: round; opacity: 0.32; }
.mf-pulses circle, .mf-flow circle { filter: drop-shadow(0 0 4px currentColor); }
.mf-flow { opacity: 0; animation: cf-flow 12s infinite; }

.mf-dev { display: grid; justify-items: center; gap: 0.35rem; font-size: 0.72rem; min-width: 0; padding: 0 0.15rem; overflow-wrap: anywhere; color: var(--stage-ink-2); text-align: center; }
.mf-dev .chip { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.13); }
.mf-dev .scr { display: block; overflow: hidden; background: #0d1520; border: 1.6px solid color-mix(in srgb, var(--stage-ink-2) 80%, transparent); }
.mf-dev .scr.phone { width: 15px; height: 25px; border-radius: 3.5px; }
.mf-dev .scr.tab { width: 21px; height: 27px; border-radius: 3.5px; }
.mf-dev .scr.tv { width: 31px; height: 20px; border-radius: 3px; }
.mf-dev .pg b { height: 76%; border-radius: 1px; }
.mf-dev .scr .strip { transform: translateX(-50%); animation: cf-dev-strip 12s infinite; }

.mf-more { grid-column: 1 / -1; justify-self: center; margin-top: 0.6rem; font: 500 0.88rem/1.2 var(--body); color: var(--stage-ink-2); transition: color 200ms; }
.fanout:hover .mf-logo { transform: translateY(-2px); box-shadow: 0 0 0 8px rgba(47,166,106,0.12), 0 22px 56px rgba(0,0,0,0.5), 0 0 70px rgba(47,166,106,0.22); }
.fanout:hover .mf-more { color: var(--green); }

@keyframes cf-logo {
  0%, 76.67%, 100% { opacity: 1; transform: none; }
  6.67%, 70% { opacity: 0; transform: translateY(16%) scale(2); }
}
@keyframes cf-main {
  0% { opacity: 0; transform: translateY(-16%) scale(0.5); }
  6.67%, 70% { opacity: 1; transform: none; }
  76.67%, 100% { opacity: 0; transform: translateY(-16%) scale(0.5); }
}
@keyframes cf-main-strip {   /* yellow, swipe to blue at 3.0 s, to green at 5.8 s */
  0%, 25% { transform: translateX(0); }
  29.17%, 48.33% { transform: translateX(-25%); }
  52.5%, 85% { transform: translateX(-50%); }
  85.01%, 100% { transform: translateX(0); }
}
@keyframes cf-dev-strip {    /* each screen follows when the pulse arrives: yellow 1.3 s, blue 3.9 s, green 6.7 s */
  0%, 10.83% { transform: translateX(-50%); }
  14.17% { transform: translateX(-75%); }
  14.18%, 32.5% { transform: translateX(0); }
  35.83%, 55.83% { transform: translateX(-25%); }
  59.17%, 100% { transform: translateX(-50%); }
}
@keyframes cf-flow {
  0%, 75% { opacity: 0; }
  79%, 96% { opacity: 1; }
  99%, 100% { opacity: 0; }
}
/* Phones and tablets: text, then the fan-out (centered), then the buttons. */
@media (max-width: 900px) {
  .hero { padding-bottom: 4rem; }
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 0; text-align: center; }
  .hero-copy { display: contents; }
  .hero-top .fanout { order: 1; justify-self: center; width: 100%; max-width: 420px; margin: 2rem 0 0.5rem; }
  .hero-top .cta { order: 2; }
  .hero-top .note { order: 3; }
  .hero-top .platforms { order: 4; justify-content: center; }
  .hero-top .tape, .hero-top .cta { justify-content: center; }
  .hero-top h1, .hero-top .lede { margin-inline: auto; }
}
@media (max-width: 420px) { .mf-dev .chip { width: 38px; height: 38px; } .mf-logo { width: 92px; height: 92px; border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) {   /* still picture: the logo, wires, and every screen on the yellow page */
  .mf-logo .lg, .mf-logo .main, .mf-logo .main .strip, .mf-dev .scr .strip, .mf-flow { animation: none; }
  .mf-dev .scr .strip { transform: none; }
  .mf-pulses, .mf-flow { display: none; }
  .mf-lines path { opacity: 0.6; }
}

/* ------------------------------------------------------------ sections */
section { padding: 6rem 0; }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2.2rem, 4.2vw, 3.3rem); margin-top: 0.6rem; }
.section-head p { color: var(--ink-2); font-size: 1.15rem; margin-top: 1rem; }

.trust { background: var(--sheet); border-bottom: 1px solid var(--rule); padding: 3.5rem 0 2.5rem; }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust div { border-left: 3px solid var(--c); padding-left: 1rem; }
.trust b { display: block; font: 600 1.35rem/1.1 var(--display); }
.trust span { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 820px) { .trust .wrap { grid-template-columns: 1fr 1fr; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.steps li { background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.5rem; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 700 1.1rem/1 var(--display); color: var(--ink-3); margin-bottom: 0.9rem; }
.steps h3 { font-size: 1.45rem; }
.steps p { color: var(--ink-2); margin-top: 0.5rem; font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.who { background: var(--sheet); border-block: 1px solid var(--rule); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.side { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); padding: 1.8rem 1.6rem; }
.side h3 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); }
.side > p { color: var(--ink-2); margin-top: 0.5rem; }
.side ul { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: 0.65rem; }
.side li { position: relative; padding-left: 1.6rem; }
.side li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 14px; height: 5px; border-radius: 1px; background: var(--c); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tile { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.5rem; }
.tile i { display: block; width: 32px; height: 6px; border-radius: 2px; margin-bottom: 1rem; }
.tile h3 { font-size: 1.45rem; }
.tile p { color: var(--ink-2); margin-top: 0.5rem; font-size: 0.98rem; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; }
details { border-bottom: 1px solid var(--rule); padding: 1.1rem 0; }
details:first-child { border-top: 1px solid var(--rule); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font: 600 1.3rem/1.2 var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-ink); font-size: 1.5rem; line-height: 1; transition: transform 150ms ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); margin-top: 0.7rem; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; gap: 2rem; } }

.closing { background: var(--stage); color: var(--stage-ink); text-align: center; }
.closing h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.closing p { color: var(--stage-ink-2); margin: 1rem auto 0; max-width: 46ch; font-size: 1.15rem; }
.closing .cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.closing .cta .btn { padding: 0.9rem 1.4rem; font-size: 1.05rem; }
footer { background: var(--stage); color: var(--stage-ink-2); border-top: 1px solid rgba(255,255,255,0.07); padding: 2rem 0; font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer a { color: var(--stage-ink-2); text-decoration: none; }
footer a:hover { color: #fff; }
footer .links { display: flex; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ------------------------------------------------------------ download page */
.hero.short { padding: 4.5rem 0 4rem; }
.hero.short h1 { max-width: 18ch; }
.dl-section { padding-top: 3.5rem; }
.downloads { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dl-card { background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 1.8rem 1.6rem; }
.dl-card h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.dl-card > p { color: var(--ink-2); margin-top: 0.5rem; }
.dl-card .btn { margin-top: 1.4rem; padding: 0.9rem 1.4rem; font-size: 1.05rem; }
.dl-card .meta { margin-top: 0.7rem; color: var(--ink-3); font-size: 0.92rem; min-height: 1.4em; }
.dl-card ol { margin: 1.4rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; color: var(--ink-2); }
.dl-card ol b { color: var(--ink); font-weight: 600; }
.dl-side { display: grid; gap: 1rem; }
.dl-card.small { padding: 1.4rem 1.4rem 1.5rem; }
.dl-card.small h2 { font-size: 1.55rem; }
.dl-fine { margin-top: 2rem; color: var(--ink-3); font-size: 0.92rem; max-width: 70ch; }
.dl-fine a { color: var(--ink-2); }
@media (max-width: 860px) { .downloads { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ privacy / support pages */
.doc > * { max-width: 760px; }
.doc .updated { color: var(--ink-3); margin-top: 0.4rem; }
.doc h2 { font-size: 1.7rem; margin-top: 2.6rem; }
.doc h3 { font-size: 1.25rem; margin-top: 1.6rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-top: 0.8rem; }
.doc ul, .doc ol { margin: 0.8rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.doc code { font-size: 0.92em; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 0 0.3em; }
