/* Riff Trainer website. Tokens mirror lib/theme.dart in the app. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --surface: #f4f4fb;
  --ink: #171a2e;
  --sub: #5c6272;
  --line: #e6e8ec;
  --indigo: #5b5bf0;
  --indigo-deep: #4a47e0;
  --indigo-shadow: #3f3ac9;
  --indigo-soft: #e9e9ff;
  --amber: #ffb020;
  --amber-deep: #ff9f0a;
  --pink: #e0489b;
  --cyan: #12b5d6;
  --teal: #14b8a6;
  --violet: #8b5cf6;
  --green: #22c55e;
  --green-shadow: #16a34a;
  --red: #ef4444;

  --display: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--indigo-deep); text-underline-offset: 3px; }
a:hover { color: var(--indigo-shadow); }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.02; }
h3 { font-size: 1.375rem; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.top nav { display: flex; gap: clamp(14px, 3vw, 30px); }
.top nav a { color: inherit; text-decoration: none; font-weight: 800; font-size: 0.975rem; padding: 6px 2px; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons share the pressed key feel of the app */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 1.0625rem/1 var(--body);
  padding: 17px 26px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none;
  background: var(--indigo); color: var(--white); box-shadow: 0 4px 0 var(--indigo-shadow);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { color: var(--white); background: var(--indigo-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--indigo-shadow); }
.btn.on-indigo { background: var(--white); color: var(--indigo-shadow); box-shadow: 0 4px 0 rgba(23, 26, 46, 0.35); }
.btn.on-indigo:hover { background: var(--indigo-soft); color: var(--indigo-shadow); }
.btn.on-indigo:active { box-shadow: 0 0 0 rgba(23, 26, 46, 0.35); }

/* Hero: the inside of the app icon. Indigo field, white type, amber pick. */

.hero { background: linear-gradient(160deg, #6464f5 0%, var(--indigo) 38%, var(--indigo-shadow) 100%); color: var(--white); overflow: hidden; }
.hero .top nav a, .hero .brand { color: var(--white); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 104px); }

.hero h1 { font-size: clamp(2.75rem, 7.2vw, 5.5rem); line-height: 0.95; letter-spacing: -0.015em; }
.hero h1 span { display: block; }
.hero .lede { margin-top: 26px; max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: #eeeeff; }
.hero .actions { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.hero .avail { font-size: 0.975rem; color: #e4e4ff; font-weight: 700; }

.stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.pick { position: absolute; width: min(140%, 640px); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); }
.pick path { fill: url(#pickfill); }

/* Phone with the playable round */

.phone { position: relative; width: 308px; max-width: 100%; background: #0d0e1a; border-radius: 48px; padding: 10px; box-shadow: 0 30px 60px -18px rgba(18, 16, 80, 0.7); }
.screen { background: var(--white); color: var(--ink); border-radius: 39px; height: 600px; padding: 46px 18px 18px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.screen::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 14px; background: #0d0e1a; }

.bar-row { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--indigo); border-radius: 8px; transition: width 300ms ease; }
.count { font-size: 0.75rem; font-weight: 800; color: #a3a9b5; min-width: 24px; text-align: right; }

.screen h3 { font-family: var(--body); font-weight: 800; font-size: 1.05rem; letter-spacing: 0; text-align: center; margin-top: 18px; }
.screen .hint { text-align: center; font-size: 0.8rem; color: var(--sub); margin-top: 2px; }

.listen { flex: 1; display: grid; place-items: center; position: relative; min-height: 150px; }
.listen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bigplay { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; background: var(--indigo); box-shadow: 0 5px 0 var(--indigo-shadow); display: grid; place-items: center; transition: transform 80ms ease, box-shadow 80ms ease; }
.bigplay:active { transform: translateY(5px); box-shadow: 0 0 0 var(--indigo-shadow); }
.bigplay svg { width: 30px; height: 30px; fill: var(--white); margin-left: 4px; }

.pills { display: flex; justify-content: center; gap: 8px; min-height: 34px; }
.pill { font: 800 0.8rem/1 var(--body); color: var(--indigo-deep); background: var(--indigo-soft); border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pill svg { width: 12px; height: 12px; fill: currentColor; }
.pill:hover { background: #dcdcff; }

.prompt { text-align: center; font-size: 0.85rem; font-weight: 700; margin: 16px 0 12px; min-height: 2.6em; display: grid; place-items: center; }
.prompt.wrong { color: #b42323; }

.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt { font: 800 1.05rem/1 var(--body); color: var(--ink); background: var(--white); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 14px; padding: 16px 0 14px; cursor: pointer; transition: transform 80ms ease; }
.opt:hover:not(:disabled) { border-color: #c9c9f7; }
.opt:active:not(:disabled) { transform: translateY(2px); }
.opt:disabled { cursor: default; color: #a3a9b5; }
.opt.miss { border-color: #f6b4b4; color: #b42323; background: #fff5f5; animation: shake 260ms ease; }
.opt.hit { border-color: var(--green-shadow); background: var(--green); color: var(--white); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.skipq { align-self: center; margin-top: 12px; background: none; border: 0; font: 700 0.78rem/1 var(--body); color: var(--sub); cursor: pointer; padding: 8px; }
.skipq:hover { color: var(--ink); }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #eafbf1; border-top: 2px solid #c5f0d5; padding: 16px 18px 18px; transform: translateY(105%); transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.sheet.up { transform: translateY(0); }
.sheet strong { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #11703a; font-size: 1rem; }
.sheet strong svg { width: 22px; height: 22px; }
.sheet p { font-size: 0.84rem; color: #1d5a37; margin-top: 4px; }
.neck { margin: 10px 0 12px; width: 100%; height: 74px; }
.btn.go { width: 100%; padding: 15px; background: var(--green); box-shadow: 0 4px 0 var(--green-shadow); font-size: 1rem; }
.btn.go:hover { background: #1fb556; }
.btn.go:active { box-shadow: 0 0 0 var(--green-shadow); }

.done { position: absolute; inset: 0; background: var(--white); border-radius: 39px; padding: 70px 22px 22px; display: none; flex-direction: column; align-items: center; text-align: center; }
.done.show { display: flex; }
.done .cup { width: 84px; height: 84px; margin-top: 30px; }
.done h3 { font-size: 1.6rem; margin-top: 14px; }
.done p { font-size: 0.92rem; color: var(--sub); margin-top: 8px; }
.done .btn { width: 100%; margin-top: auto; }
.done .again { margin-top: 12px; background: none; border: 0; font: 800 0.9rem/1 var(--body); color: var(--indigo-deep); cursor: pointer; padding: 10px; }

/* Sections */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 40em; }
.section-head p { margin-top: 16px; color: var(--sub); font-size: 1.125rem; }

/* How a session goes: a real sequence, so it is numbered */

.steps { list-style: none; margin: clamp(36px, 5vw, 60px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 3.25rem; line-height: 1; color: var(--indigo); display: block; margin-bottom: 10px; }
.steps p { margin-top: 8px; color: var(--sub); }

.also { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 40px; padding: 0; list-style: none; }
.also li { padding-left: 22px; position: relative; }
.also li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 12px; background: var(--amber); border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; transform: rotate(-14deg); }

/* Six trainers on six strings */

.neckband { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.neckband .section-head p { color: #b8bcd0; }
.frets { position: absolute; inset: 0; pointer-events: none; }
.frets i { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.07); }
.neckband .wrap { position: relative; }

.strings { list-style: none; margin: clamp(32px, 5vw, 56px) calc(-1 * var(--gutter)) 0; padding: 0; }
.string { position: relative; }
.pluck {
  width: 100%; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; font: inherit;
  display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; column-gap: 18px;
  padding: 22px var(--gutter) 30px;
}
.pluck:hover .dot, .pluck:focus-visible .dot { background: var(--c); color: var(--ink); }
.dot { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--c); color: var(--c); display: grid; place-items: center; transition: background 120ms ease, color 120ms ease; }
.dot svg { width: 16px; height: 16px; fill: currentColor; margin-left: 3px; }
.string.ringing .dot { background: var(--c); color: var(--ink); }
.pluck .name { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.1; }
.pluck .what { color: #c6c9da; font-size: 1rem; }
.pluck .tier { font-weight: 800; font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.22); color: #d6d8e6; }
.pluck .tier.free { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.wire { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; width: 100%; pointer-events: none; overflow: visible; }
.wire path { fill: none; stroke: var(--c); stroke-width: var(--w); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.strings-note { margin-top: 26px; color: #b8bcd0; font-size: 0.95rem; }

/* Pricing */

.plans { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: stretch; }
.plan { border-radius: 26px; padding: clamp(24px, 3.4vw, 40px); }
.plan.free { background: var(--surface); }
.plan.pro { background: var(--indigo-soft); }
.plan h3 { font-size: 1.6rem; }
.plan > p { margin-top: 8px; color: var(--sub); }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { padding-left: 30px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 18px; height: 18px; border-radius: 50%; background: var(--indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.prices { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.price { background: var(--white); border-radius: 18px; padding: 18px 20px; }
.price b { display: block; font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.1; }
.price span { display: block; font-size: 0.92rem; color: var(--sub); margin-top: 4px; }
.fine { margin-top: 22px; font-size: 0.9rem; color: var(--sub); max-width: 62em; }

/* Questions */

.faq { margin-top: clamp(28px, 4vw, 44px); max-width: 780px; }
.faq details { border-top: 2px solid var(--line); }
.faq details:last-child { border-bottom: 2px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-weight: 800; font-size: 1.125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform 160ms ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 22px; color: var(--sub); max-width: 62ch; }

/* Footer */

.foot { background: var(--surface); padding-block: 40px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot nav a { color: var(--ink); font-weight: 800; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot small { color: var(--sub); font-size: 0.9rem; flex-basis: 100%; }

/* Text pages */

.page-top { border-bottom: 2px solid var(--line); }
.doc { max-width: 760px; padding-block: clamp(40px, 6vw, 80px); }
.doc h1 { font-size: clamp(2.25rem, 5.4vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; }
.doc .dated { margin-top: 14px; color: var(--sub); }
.doc h2 { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; margin-top: 44px; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-top: 6px; }
.doc .callout { background: var(--indigo-soft); border-radius: 20px; padding: 22px 24px; margin-top: 28px; }
.doc .callout p:first-child { margin-top: 0; }
.doc .btn { margin-top: 22px; }

.lost { text-align: center; padding-block: clamp(72px, 14vw, 160px); }
.lost h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); letter-spacing: -0.03em; line-height: 1; }
.lost p { margin: 18px auto 30px; color: var(--sub); max-width: 30em; }

/* Small screens */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage { min-height: 0; padding-block: 28px 8px; }
  .pick { width: min(150%, 600px); }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .pluck { grid-template-columns: 48px minmax(0, 1fr) auto; row-gap: 2px; }
  .pluck .dot { grid-row: 1 / span 2; }
  .pluck .what { grid-column: 2; grid-row: 2; font-size: 0.95rem; }
  .pluck .tier { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 520px) {
  .top nav a.hide-s { display: none; }
  .prices { grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
