/* PianoDuo's site: one stylesheet for every page. The look is the app's (docs/DESIGN.md):
   the dark stage, the four lane colours, the Duo gradient for what counts, SF Rounded,
   and the glowing strike line. */

:root {
  color-scheme: dark;
  --ground: #0d0f17;
  --marquee: #121522;
  --sheet: #151826;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.64);
  --ink-3: rgba(255, 255, 255, 0.4);
  --lane-1: #ff709e;
  --lane-2: #ffb047;
  --lane-3: #54d694;
  --lane-4: #5999ff;
  --join: #b88cff;
  --star: #ffd166;
  --duo: linear-gradient(90deg, var(--lane-1), var(--join) 50%, var(--lane-4));
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.045);
  --radius: 24px;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 17px/1.6 var(--rounded);
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--rounded); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }

a { color: var(--join); }

img, video { max-width: 100%; display: block; }

picture { display: block; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* Small capitals with wide tracking, as the app's labels ("LEVEL 4 · YOUR NEXT SONG"). */
.label {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The wordmark, as Home draws it: Piano in white, Duo in the join's purple. */
.wordmark { font-weight: 900; letter-spacing: -0.035em; }

.wordmark span span, h1.wordmark span, h2.wordmark span { color: var(--join); }

/* ---------- The strike line ---------- */

.strike {
  height: 3px;
  border: 0;
  margin: 0;
  background: var(--duo);
  box-shadow: 0 0 14px rgba(184, 140, 255, 0.75), 0 0 42px rgba(184, 140, 255, 0.35);
  border-radius: 3px;
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 15, 23, 0.74);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; }

.brand img { width: 30px; height: 30px; border-radius: 8px; }

header.site nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 650; }

header.site nav a { color: var(--ink-2); text-decoration: none; }

header.site nav a:hover { color: var(--ink); }

@media (max-width: 760px) { header.site nav .optional { display: none; } }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font: 800 16px/1 var(--rounded);
  text-decoration: none;
  white-space: nowrap;
}

.button svg { width: 18px; height: 18px; }

/* The gradient means it counts: only the way to the game wears it. */
.button.counts { background: var(--duo); color: #fff; box-shadow: 0 10px 30px rgba(184, 140, 255, 0.28); }

.button.glass { background: rgba(21, 24, 38, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.14); }

.button.glass:hover { background: rgba(255, 255, 255, 0.08); }

.soon { cursor: default; }

/* ---------- Text pages (privacy, support) ---------- */

.prose { max-width: 720px; margin: 0 auto; padding: 64px 16px 88px; }

.prose h1 { font-size: clamp(38px, 6vw, 54px); font-weight: 900; margin: 12px 0 10px; }

.prose h2 { font-size: 22px; font-weight: 800; margin: 40px 0 10px; }

.prose p, .prose li { color: var(--ink-2); }

.prose p { margin: 0 0 14px; }

.prose ul { padding-left: 22px; margin: 0 0 14px; }

.prose strong { color: var(--ink); }

.prose .updated { color: var(--ink-3); font-size: 15px; margin-bottom: 28px; }

.prose .lead { font-size: 20px; color: var(--ink); }

.prose .strike { margin: 22px 0 34px; }

.note {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}

.note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

footer.site { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 40px;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }

footer.site a { color: var(--ink-3); text-decoration: none; }

footer.site a:hover { color: var(--ink); }

/* ================= The home page ================= */

/* ---------- Hero: tiles falling onto the line ---------- */

.hero { position: relative; padding-top: clamp(48px, 9vw, 96px); overflow: hidden; }

.highway {
  position: absolute;
  inset: 0 0 auto 50%;
  height: var(--line-y, 560px);
  width: min(760px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, #000 70%);
  mask-image: linear-gradient(to bottom, transparent 10%, #000 70%);
  pointer-events: none;
}

.lane { position: relative; border-left: 1px solid rgba(255, 255, 255, 0.05); }

.lane:last-child { border-right: 1px solid rgba(255, 255, 255, 0.05); }

.lane i {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 0;
  height: 34px;
  border-radius: 10px;
  background: var(--c);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent);
  opacity: 0.42;
  transform: translateY(-60px);
  animation: fall var(--d, 4.8s) linear var(--w, 0s) infinite;
}

.lane i.hold { height: 110px; opacity: 0.38; }

.lane:nth-child(1) { --c: var(--lane-1); }
.lane:nth-child(2) { --c: var(--lane-2); }
.lane:nth-child(3) { --c: var(--lane-3); }
.lane:nth-child(4) { --c: var(--lane-4); }

@keyframes fall {
  to { transform: translateY(var(--line-y, 560px)); }
}

.hero-copy { position: relative; text-align: center; max-width: 820px; }

.hero h1 { font-size: clamp(54px, 11vw, 112px); margin: 14px 0 0; }

.hero .tagline { font-size: clamp(22px, 3.2vw, 32px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; margin: 16px 0 0; }

.hero .sub { color: var(--ink-2); font-size: clamp(17px, 2vw, 19px); max-width: 620px; margin: 16px auto 0; }

.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.hero-stage { position: relative; margin-top: clamp(44px, 7vw, 72px); }

.hero-stage .strike { position: relative; z-index: 1; }

.hero-art {
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
}

.hero-art img { width: 100%; height: auto; }

/* ---------- Sections ---------- */

section.band { padding: clamp(72px, 11vw, 128px) 0 0; }

.head { max-width: 680px; }

.head.center { margin: 0 auto; text-align: center; }

.head h2 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 900; margin-top: 10px; }

.head p { color: var(--ink-2); font-size: clamp(17px, 2vw, 19px); margin: 16px 0 0; }

.split { display: grid; gap: 40px; align-items: center; }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.flip > :first-child { order: 2; }
}

.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--marquee); }

.frame video, .frame img { width: 100%; height: auto; }

/* The three rooms. */
.rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }

.rooms figure { margin: 0; }

.rooms img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }

.rooms figcaption { color: var(--ink-3); font-size: 14px; font-weight: 700; margin-top: 10px; text-align: center; }

/* Lists with a lane-coloured tile as the bullet. */
.tiles-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }

.tiles-list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; color: var(--ink-2); }

.tiles-list li strong { color: var(--ink); display: block; font-weight: 800; }

.tiles-list li::before {
  content: "";
  width: 22px;
  height: 12px;
  margin-top: 7px;
  border-radius: 4px;
  background: var(--c, var(--lane-1));
  box-shadow: 0 0 12px color-mix(in srgb, var(--c, var(--lane-1)) 60%, transparent);
}

.tiles-list li:nth-child(4n + 2) { --c: var(--lane-2); }
.tiles-list li:nth-child(4n + 3) { --c: var(--lane-3); }
.tiles-list li:nth-child(4n + 4) { --c: var(--lane-4); }

/* Judgements, as they pop in their lanes. */
.judgements { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.judgements span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.stars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }

.stars div { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px; text-align: center; }

.stars b { display: block; color: var(--star); font-size: 20px; letter-spacing: 0.1em; text-shadow: 0 0 14px rgba(255, 209, 102, 0.5); }

.stars span { color: var(--ink-2); font-size: 14px; font-weight: 700; }

.duo-shot { max-width: 520px; margin: 0 auto; }

.duo-shot.portrait { max-width: 430px; }

.duo-shot img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6)); }

/* ---------- The chapters: Home's sheet of music ---------- */

.staff {
  position: relative;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) { .staff { grid-template-columns: repeat(4, 1fr); } }

.chapter {
  position: relative;
  padding: 30px 18px 30px 0;
  border-bottom: 1px solid var(--line);
  /* Five faint staff lines behind each chapter. */
  background: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(255, 255, 255, 0.045) 21px 22px) 0 22px / 100% 110px no-repeat;
}

.chapter .node {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 16px;
  margin-top: calc(var(--rise, 0) * -1px);
}

.chapter.free .node { background: var(--duo); background-size: 800% 100%; background-position: calc(var(--n) * 14%) 0; box-shadow: 0 0 20px rgba(184, 140, 255, 0.45); }

.chapter.full .node { border: 2px solid rgba(255, 255, 255, 0.25); color: var(--ink-2); }

.chapter h3 { font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }

.chapter p { color: var(--ink-3); font-size: 15px; margin: 6px 0 0; line-height: 1.45; }

.staff-key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; color: var(--ink-3); font-size: 14px; font-weight: 700; }

.staff-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }

.staff-key .k-free::before { background: var(--duo); }

.staff-key .k-full::before { border: 2px solid rgba(255, 255, 255, 0.3); width: 8px; height: 8px; }

/* ---------- Practice: two screens ---------- */

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 32px); }

.pair img { width: 100%; height: auto; filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55)); }

/* ---------- Devices ---------- */

.devices { display: grid; gap: 14px; margin-top: 44px; }

@media (min-width: 900px) { .devices { grid-template-columns: 1.4fr 1fr 1fr; align-items: stretch; } }

.device { background: var(--marquee); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }

.device img { width: 100%; height: auto; aspect-ratio: auto; }

.device .text { padding: 20px 22px 24px; }

.device h3 { font-size: 21px; font-weight: 850; }

.device p { color: var(--ink-2); margin: 8px 0 0; font-size: 16px; }

.poses { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }

.poses li { color: var(--ink-2); font-size: 16px; }

.poses li b { color: var(--ink); font-weight: 800; }

/* ---------- The price ---------- */

.offer { display: grid; gap: 14px; margin-top: 44px; }

@media (min-width: 900px) { .offer { grid-template-columns: repeat(3, 1fr); } }

.offer .card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }

.offer .card.counts { background: linear-gradient(var(--sheet), var(--sheet)) padding-box, var(--duo) border-box; border: 1.5px solid transparent; }

.offer .card.today .label { color: var(--star); }

.offer h3 { font-size: 24px; font-weight: 900; margin-top: 10px; }

.offer p { color: var(--ink-2); margin: 10px 0 0; font-size: 16px; }

.no-strings { text-align: center; color: var(--ink-2); font-weight: 800; margin-top: 26px; letter-spacing: 0.01em; }

/* ---------- Closing ---------- */

.closing { padding: clamp(80px, 12vw, 140px) 0 clamp(72px, 10vw, 112px); text-align: center; }

.closing .icon { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 26px; box-shadow: 0 18px 50px rgba(184, 140, 255, 0.3); }

.closing h2 { font-size: clamp(44px, 8vw, 80px); }

.closing p { color: var(--ink-2); font-size: 19px; margin: 14px 0 0; }

.closing .strike { max-width: 360px; margin: 40px auto 0; }

/* ---------- Motion ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }

.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lane i { animation: none; opacity: 0; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
