/* PianoSprout site. Light by default, dark when the system is dark.
   Purples come from the app's ScoreLinePalette, the rainbow from RainbowNotes. */
:root {
  --bg: #F7F6FB;
  --glow: rgba(185, 167, 255, .28);
  --surface: #FFFFFF;
  --surface-2: #F8F6FF;
  --text: #1D1B26;
  --text-2: #5C586B;
  --text-3: #6E6A7C;
  --accent: #6B3FF0;         /* text and links: 5.4:1 on the background */
  --accent-deco: #7C4DFF;    /* the app's deep purple, for icons only */
  --accent-soft: #B9A7FF;    /* the app's light purple */
  --accent-tint: rgba(124, 77, 255, .08);
  --on-accent: #FFFFFF;
  --shadow-card: 0 1px 2px rgba(29, 27, 38, .04), 0 6px 20px rgba(29, 27, 38, .05);
  --shadow-device: 0 1px 2px rgba(29, 27, 38, .08), 0 22px 50px -18px rgba(60, 40, 120, .30);
  --bezel: #0B0B0E;
  --nav-bg: rgba(247, 246, 251, .82);
  --staff-line: #B7B3C2;
  --note: #3A3644;
  --radius: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0A0F;
    --glow: rgba(124, 77, 255, .24);
    --surface: #16151C;
    --surface-2: #1D1C24;
    --text: #F2F2F7;
    --text-2: #ACA8B8;
    --text-3: #8A8696;
    --accent: #B9A7FF;
    --accent-deco: #B9A7FF;
    --accent-tint: rgba(185, 167, 255, .12);
    --on-accent: #1C1C1E;
    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .05);
    --shadow-device: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 80px -24px rgba(124, 77, 255, .38);
    --bezel: #1C1B22;
    --nav-bg: rgba(11, 10, 15, .8);
    --staff-line: #58585D;
    --note: #D1D1D6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
body:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
body:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
body:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h3 { line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
/* Chinese and Korean headings break at punctuation and spaces only; Japanese keeps its normal breaking */
:is(h1, h2, h3):lang(zh), :is(h1, h2, h3):lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:is(h1, h2, h3):lang(ja) { line-break: strict; word-break: auto-phrase; }
/* the Japanese hero title marks its phrases with <wbr> */
.hero h1:lang(ja) { word-break: keep-all; overflow-wrap: anywhere; }
:is(h1, h2, h3):lang(de), :is(h1, h2, h3):lang(fr), :is(h1, h2, h3):lang(es), :is(h1, h2, h3):lang(pt) { hyphens: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: .02em; margin-bottom: 12px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--surface); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow-card); }
.skip:focus { top: 12px; }

/* Top bar */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14); }
.brand small { font-weight: 450; color: var(--text-3); font-size: 14px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--text-2); }
.nav-cta { font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-tint); padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.nav-cta:hover { text-decoration: none; filter: brightness(.97); }

/* Language menu */
.lang { position: relative; font-size: 15px; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 5px; color: var(--text-2); padding: 6px 4px; border-radius: 8px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 17px; height: 17px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px; z-index: 30; }
.lang li a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--text); }
.lang li a:hover { background: var(--accent-tint); text-decoration: none; }
.lang li a[aria-current] { color: var(--accent); font-weight: 600; }

/* Hero */
.hero { background: radial-gradient(60% 70% at 78% 40%, var(--glow), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: 52px; line-height: 1.16; font-weight: 750; }
.hero .lead { margin-top: 20px; font-size: 19px; color: var(--text-2); max-width: 32em; }
.cta-row { display: flex; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { height: 54px; width: auto; }
.more-link { font-size: 16px; font-weight: 550; white-space: nowrap; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: 15px; color: var(--text-2); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; color: var(--accent-deco); flex: none; }

/* Device frames: screenshots are full screens of the app, which is dark */
.device { background: var(--bezel); box-shadow: var(--shadow-device); }
.phone { border-radius: 40px; padding: 11px; }
.phone img { border-radius: 30px; width: 100%; }
.ipad { border-radius: 30px; padding: 13px; }
.ipad img { border-radius: 18px; width: 100%; }

/* Sections */
.block { padding: 72px 0 96px; }
.block.tight { padding-top: 24px; }
.block.last { padding-bottom: 40px; }
.section-title { font-size: 38px; line-height: 1.22; font-weight: 720; }
.center { text-align: center; }
.section-head { max-width: 680px; margin: 0 auto 44px; }
.section-head p:last-child { margin-top: 14px; font-size: 18px; color: var(--text-2); }
#how .section-title { margin-bottom: 44px; }
#support .section-title { margin-bottom: 40px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px 26px 30px; }
.num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: var(--accent); background: var(--accent-tint); }
.step h3 { margin-top: 18px; font-size: 21px; font-weight: 680; }
.step p { margin-top: 8px; color: var(--text-2); font-size: 16px; }

.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 120px; }
.feature.flip .media { order: 2; }
.feature h2, .ipad-row h2 { font-size: 36px; line-height: 1.22; font-weight: 720; }
.feature .text > p:not(.eyebrow), .ipad-row .text > p:not(.eyebrow) { margin-top: 16px; font-size: 18px; color: var(--text-2); }
.feature .text > p.songs { margin-top: 22px; font-size: 15px; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips li { font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--accent-tint); }

.mini-keys { display: flex; gap: 6px; margin-top: 26px; }
.mini-keys span { width: 38px; height: 62px; border-radius: 0 0 8px 8px; background: #fff; color: var(--deep); box-shadow: 0 1px 2px rgba(29, 27, 38, .10), 0 6px 14px rgba(29, 27, 38, .06); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 7px; font-weight: 750; font-size: 15px; line-height: 1; }
.mini-keys span::after { content: ""; display: block; width: 22px; height: 5px; border-radius: 3px; margin-top: 6px; background: var(--light); }

.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.preset { padding: 26px 26px 28px; }
.preset .art { height: 74px; display: flex; align-items: flex-end; gap: 5px; }
.preset h3 { margin-top: 20px; font-size: 22px; font-weight: 700; }
.preset .who { margin-top: 2px; font-size: 15px; color: var(--text-3); }
.preset ul { margin-top: 16px; font-size: 15.5px; color: var(--text-2); }
.preset li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.preset li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); transform: translateY(-2px); }
.k { width: 30px; height: 56px; border-radius: 0 0 7px 7px; background: #fff; box-shadow: 0 1px 2px rgba(29, 27, 38, .12), 0 4px 10px rgba(29, 27, 38, .06); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 6px; font-size: 13px; font-weight: 750; line-height: 1; color: #3A3644; }
.k.on { background: #EFEAFF; color: #7C4DFF; }
.k.rainbow::after { content: ""; display: block; width: 16px; height: 4px; border-radius: 2px; margin-top: 5px; background: var(--light); }
.k.on.rainbow { background: #FFE3F0; color: var(--deep); }
.staff .lines { stroke: var(--staff-line); }
.staff .heads { fill: var(--note); }
.staff .stems { stroke: var(--note); }

.ipad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.ipad-row .media { max-width: 400px; width: 100%; justify-self: center; }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.more .card { padding: 26px; }
.more h3 { font-size: 20px; font-weight: 680; }
.more p { margin-top: 8px; color: var(--text-2); font-size: 16px; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deco); margin-bottom: 16px; }
.ico svg { width: 22px; height: 22px; }

.safe { padding: 44px 48px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.safe h2 { font-size: 32px; font-weight: 720; }
.safe .text > p:not(.eyebrow) { margin-top: 12px; color: var(--text-2); }
.safe .safe-link { margin-top: 14px; }
.safe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.safe-grid li { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); font-weight: 600; font-size: 16.5px; }
.safe-grid svg { width: 22px; height: 22px; color: var(--accent-deco); flex: none; }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: start; }
.faq details { border-radius: 18px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 620; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 20px; line-height: 1.3; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--text-2); font-size: 16px; }

.contact { text-align: center; padding: 52px 32px; }
.contact h2 { font-size: 32px; font-weight: 720; }
.contact > p { margin-top: 10px; color: var(--text-2); }
.btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15.5px; background: var(--accent-tint); color: var(--accent); }
.btn.solid { background: var(--accent); color: var(--on-accent); }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.contact .note { margin-top: 18px; font-size: 14px; color: var(--text-3); }
.final-cta { display: flex; justify-content: center; margin-top: 40px; }

/* Footer */
.footer { padding: 48px 0 64px; font-size: 14px; color: var(--text-3); }
.footer-top { display: flex; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; margin-top: 10px; }
.footer-links a, .footer-langs a { color: var(--text-2); }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; max-width: 680px; }
.footer-langs a[aria-current] { color: var(--accent); }
.legal { margin-top: 28px; font-size: 12.5px; line-height: 1.6; max-width: 760px; }

/* Privacy policy and other text pages */
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 72px; }
.doc h1 { font-size: 40px; line-height: 1.2; font-weight: 750; }
.doc .updated { margin-top: 10px; color: var(--text-3); font-size: 15px; }
.doc .body { margin-top: 32px; padding: 36px 40px; }
.doc .body h2 { font-size: 21px; font-weight: 680; margin-top: 30px; }
.doc .body h2:first-child { margin-top: 0; }
.doc .body p, .doc .body li { color: var(--text-2); }
.doc .body p { margin-top: 10px; }
.doc .body ul { margin-top: 10px; padding-left: 1.2em; list-style: disc; }
.doc .body li { margin-top: 4px; }
.doc .body li::marker { color: var(--accent-soft); }
.doc .body strong { color: var(--text); }
.doc .body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc .back { margin-top: 28px; }
.doc .home-list { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* Phones */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav .wrap { height: 56px; gap: 10px; }
  .nav-links { display: none; }
  .lang { margin-left: auto; }
  .lang summary span { display: none; }
  .brand small { display: none; }
  .hero { background: radial-gradient(90% 40% at 70% 78%, var(--glow), transparent 70%); }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; padding-bottom: 56px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 17px; }
  .phone { border-radius: 26px; padding: 7px; }
  .phone img { border-radius: 20px; }
  .block { padding: 56px 0 64px; }
  .section-title, .feature h2, .ipad-row h2 { font-size: 27px; }
  .section-head p:last-child, .feature .text > p:not(.eyebrow), .ipad-row .text > p:not(.eyebrow) { font-size: 16.5px; }
  #how .section-title, .section-head { margin-bottom: 28px; }
  .steps, .presets, .more, .faq { grid-template-columns: 1fr; gap: 14px; }
  .step { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 18px 18px 20px; }
  .step .num { grid-row: span 2; }
  .step h3 { margin-top: 2px; font-size: 18px; }
  .step p { margin-top: 2px; font-size: 15px; }
  .feature, .ipad-row { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .media { order: 0; }
  .feature + .feature { margin-top: 72px; }
  .ipad-row .media { max-width: 300px; }
  .mini-keys { gap: 5px; }
  .mini-keys span { width: 34px; height: 56px; }
  .preset { display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; padding: 18px; align-items: start; }
  .preset .art { grid-row: span 3; height: 60px; }
  .preset .art svg { width: 112px; height: auto; }
  .preset h3 { margin-top: 0; font-size: 19px; }
  .preset ul { margin-top: 8px; font-size: 14.5px; }
  .safe { grid-template-columns: 1fr; padding: 28px 20px; gap: 24px; }
  .safe h2, .contact h2 { font-size: 25px; }
  .safe-grid { gap: 10px; }
  .safe-grid li { padding: 12px; font-size: 15px; }
  .contact { padding: 36px 20px; }
  .doc { padding-top: 32px; }
  .doc h1 { font-size: 30px; }
  .doc .body { padding: 24px 20px; }
}
@media (max-width: 360px) {
  .nav-cta { padding: 6px 10px; }
  .brand { font-size: 16px; }
  .safe-grid { grid-template-columns: 1fr; }
}
