/* Simply Guitar case study: styles only this page uses.
   Shared tokens, header, footer, type scale and the desktop zoom live in
   assets/css/case-study.css. Sections here use normal flow inside the zoomed
   1440 frame, so px values are design px on desktop and scale with the window. */

:root {
  --sg-purple: #8217ff;
  --sg-night: #200854;
  --sg-deep: #170440;
  --sg-pink: #da43b0;
  --sg-teal: #00f0bf;
  --sg-coral: #ff6f6f;
  --sg-yellow: #ffd44f;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

.bg-sg-purple { background: var(--sg-purple); }
.bg-sg-night { background: var(--sg-night); }
.on-dark .body, .body.on-dark { color: rgba(243, 240, 223, .78); }
.on-dark .body b, .on-dark .body strong { color: var(--cream); }

/* ---------- Layout ---------- */
.wrap { padding: 112px 96px; }
.wrap--tight { padding-top: 72px; padding-bottom: 72px; }
.chapter {
  display: grid; grid-template-columns: 440px 1fr; column-gap: 88px; align-items: center;
  grid-template-areas: "text device" "steps device";
  grid-template-rows: auto 1fr;
}
.chapter > .chapter__text { grid-area: text; align-self: end; }
.chapter > .chapter__device { grid-area: device; }
.chapter > .chapter__steps { grid-area: steps; align-self: start; margin-top: 28px; }
.chapter--flip { grid-template-columns: 1fr 440px; grid-template-areas: "device text" "device steps"; }
.chapter--solo { grid-template-areas: "text device"; grid-template-rows: auto; }
.chapter--solo > .chapter__text { align-self: center; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sg-purple);
}
.kicker i {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-style: normal; letter-spacing: 0; font-size: 12px; color: #fff; background: var(--sg-purple);
}
.on-dark .kicker { color: var(--sg-teal); }
.on-dark .kicker i { background: var(--sg-teal); color: var(--sg-night); }
.lead { font-size: 18px; line-height: 30px; font-weight: 300; color: var(--ink-soft); }
.on-dark .lead { color: rgba(243, 240, 223, .85); }

/* ---------- Phone mock (landscape) ---------- */
/* A CSS device: the screen image sets the size, so it always sits exactly inside the frame. */
.phone {
  position: relative; container-type: inline-size; margin: 0;
  padding: 2.1% 3.6%; border-radius: 6.4% / 11.6%;
  background: linear-gradient(145deg, #3a3150, #120d22 55%, #2a2340);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 30px 60px -20px rgba(17, 0, 52, .45), 0 12px 24px -12px rgba(17, 0, 52, .35);
}
.phone::before { /* camera, on the left edge in landscape */
  content: ""; position: absolute; left: 1.35%; top: 50%; width: .9%; aspect-ratio: 1; transform: translateY(-50%);
  border-radius: 50%; background: #05030a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);
}
.phone__screen { position: relative; overflow: hidden; border-radius: 2.6cqw; background: #000; isolation: isolate; }
.phone__screen > img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.on-dark .phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 30px 70px -20px rgba(0, 0, 0, .6); }

.caption { margin-top: 14px; font-size: 13px; line-height: 20px; color: #8a859c; text-align: center; }
.on-dark .caption { color: rgba(243, 240, 223, .6); }

/* ---------- Sequences (data-seq) ---------- */
.seq .phone__screen > img + img { position: absolute; inset: 0; }
.seq .phone__screen > img { transition: opacity .45s var(--ease-out); }
.seq.is-ready .phone__screen > img:not(.is-active) { opacity: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.steps button {
  position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; width: 100%;
  padding: 11px 14px 11px 10px; border: 0; border-radius: 12px; align-items: center; background: transparent; cursor: pointer;
  font: inherit; text-align: left; color: inherit; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .07); /* faint container outline on every step */
  transition: background .25s ease, box-shadow .25s ease;
}
.steps button::before {
  counter-increment: step; content: counter(step);
  grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; align-self: start; border-radius: 50%;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); background: rgba(17, 0, 52, .07);
  transition: background .25s ease, color .25s ease;
}
/* Feature lists get no number; numbers only for real sequences or pins on the screen (Amir, 2026-10-23, all projects) */
.steps--plain button { grid-template-columns: 1fr; padding-left: 16px; }
.steps--plain button::before { content: none; }
.steps b { font-size: 15px; font-weight: 600; line-height: 26px; color: var(--ink); }
.steps span { font-size: 14px; line-height: 22px; color: var(--ink-soft); display: block; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--ease-out), opacity .3s ease; }
.steps button:hover { background: rgba(17, 0, 52, .04); box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .13); }
.steps .is-active button, .steps .is-active button:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .12), 0 4px 16px rgba(17, 0, 52, .06); }
.steps .is-active button::before { background: var(--sg-purple); color: #fff; }
.steps .is-active span { max-height: 90px; opacity: 1; margin-top: 2px; }
.steps button::after { /* time left on the current step */
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--sg-purple); transform-origin: left; transform: scaleX(0); opacity: .5;
}
.steps .is-active.is-running button::after { animation: step-fill var(--dur, 3s) linear forwards; animation-play-state: var(--play, running); }
.steps li { position: relative; }
.steps .is-active button:first-child { padding-right: 52px; }
.steps li .step-pause {
  position: absolute; top: 9px; right: 10px; display: grid; grid-template-columns: 1fr; column-gap: 0; place-items: center; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; background: rgba(17, 0, 52, .06); color: var(--ink); box-shadow: none; overflow: visible;
  opacity: 0; pointer-events: none; transform: scale(.8); transition: opacity .25s ease, transform .25s var(--ease-out), background .2s ease;
}
.steps li .step-pause::before, .steps li .step-pause::after { content: none; }
.steps li .step-pause svg { display: block; width: 14px; height: 14px; fill: currentColor; }
.steps li.is-held .step-pause svg { transform: translateX(1px); } /* the play triangle sits optically left of centre */
.steps li .step-pause:hover { background: rgba(130, 23, 255, .12); color: var(--sg-purple); }
.steps li.is-active .step-pause { opacity: 1; pointer-events: auto; transform: none; background: rgba(17, 0, 52, .06); box-shadow: none; }
.steps li.is-active .step-pause:hover { background: rgba(130, 23, 255, .12); color: var(--sg-purple); }
.steps li.is-held.is-active .step-pause { background: var(--sg-purple); color: #fff; }
.on-dark .steps li.is-active .step-pause { background: rgba(243, 240, 223, .12); color: var(--cream); }
.on-dark .steps li.is-held.is-active .step-pause { background: var(--sg-teal); color: var(--sg-night); }
.steps button:focus-visible { outline: 3px solid var(--sg-purple); outline-offset: 2px; }
@keyframes step-fill { to { transform: scaleX(1); } }
.on-dark .steps b { color: var(--cream); }
.on-dark .steps span { color: rgba(243, 240, 223, .75); }
.on-dark .steps button::before { color: var(--cream); background: rgba(243, 240, 223, .12); }
.on-dark .steps button { box-shadow: inset 0 0 0 1px rgba(243, 240, 223, .09); }
.on-dark .steps button:hover { background: rgba(243, 240, 223, .05); box-shadow: inset 0 0 0 1px rgba(243, 240, 223, .17); }
.on-dark .steps .is-active button, .on-dark .steps .is-active button:hover { background: rgba(243, 240, 223, .1); box-shadow: inset 0 0 0 1px rgba(243, 240, 223, .16); }
.on-dark .steps .is-active button::before { background: var(--sg-teal); color: var(--sg-night); }
.on-dark .steps button::after { background: var(--sg-teal); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 760px; display: grid; grid-template-columns: 520px 1fr; align-items: center; padding: 64px 0 64px 96px; }
.hero__logo { height: 200px; width: auto; filter: brightness(0) invert(1); }
.hero__sub { margin-top: 28px; font-size: 22px; line-height: 32px; font-weight: 300; color: #fff; max-width: 420px; }
.hero__meta { margin-top: 24px; display: grid; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sg-yellow); }
.hero__meta span { color: rgba(255, 255, 255, .8); }
.hero__stage { position: relative; height: 640px; }
.hero__stage .phone { position: absolute; }
.hero__stage .p1 { width: 640px; left: 150px; top: 40px; transform: rotate(-4deg); z-index: 2; }
.hero__stage .p2 { width: 430px; left: 0; top: 390px; transform: rotate(5deg); z-index: 3; }
.hero__stage .p3 { width: 400px; left: 470px; top: 400px; transform: rotate(-2deg); z-index: 1; }
.float { animation: float 7s ease-in-out infinite; }
.float--b { animation-duration: 8s; animation-delay: -3s; }
.float--c { animation-duration: 9s; animation-delay: -5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* Brand sparkles (the four-point star from the logo) */
.sparkle { position: absolute; z-index: 4; pointer-events: none; width: 34px; animation: twinkle 3.2s ease-in-out infinite; }
.sparkle svg { display: block; width: 100%; height: auto; }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .6; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
.confetti { position: absolute; z-index: 0; pointer-events: none; border-radius: 6px; animation: drift 10s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(var(--r, 0deg)); } 50% { transform: translate(10px, -16px) rotate(calc(var(--r, 0deg) + 25deg)); } }

/* ---------- No lone word on a last line (Amir's rule for every page) ---------- */
main h1, main h2, main h3, .steps b { text-wrap: balance; }
main p, main li, .steps span, .focus__card p { text-wrap: pretty; }

/* ---------- My role + audience ---------- */
.about { display: grid; grid-template-columns: 1fr 460px; column-gap: 96px; align-items: start; }
.about__main .audience { margin-top: 56px; }
.focus { display: grid; gap: 16px; padding-top: 34px; }
.focus__label { font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); }
.focus__card { padding: 24px 28px; border-radius: 18px; background: #fff; box-shadow: 0 6px 24px rgba(17, 0, 52, .05); }
.focus__tag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: rgba(130, 23, 255, .1); color: var(--sg-purple); font-size: 12px; font-weight: 600; line-height: 18px; }
.focus__card h3 { margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 24px; }
.focus__card p { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--ink-soft); }

/* ---------- Brand photos ---------- */
.photo-band { position: relative; height: clamp(320px, 44vw, 640px); overflow: hidden; background: var(--sg-night); }
.photo-band img, .photo-pair img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; transform: translateY(var(--py, 0px)); will-change: transform; }
.photo-band img { object-position: 50% 40%; }
.wrap.photo-pair { padding-bottom: 0; }
.photo-pair { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.photo-pair + .outro { padding-top: 64px; }
.photo-pair figure { position: relative; margin: 0; height: 440px; border-radius: 24px; overflow: hidden; background: var(--sg-night); }
.photo-pair__big img { object-position: 60% 40%; }
.photo-pair__tall img { object-position: 30% 40%; }

/* ---------- Closing ---------- */
.outro > div { max-width: 720px; }
.outro__path { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 0; }
.outro__path li { display: flex; align-items: center; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--sg-purple); }
.outro__path li + li::before { content: ""; width: 28px; height: 2px; margin: 0 10px; border-radius: 2px; background: rgba(130, 23, 255, .25); }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 560px 1fr; column-gap: 120px; align-items: start; }
.pains { display: grid; gap: 16px; }
.pain {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  background: #fff; border-radius: 18px; padding: 22px 24px; box-shadow: 0 6px 24px rgba(17, 0, 52, .05);
}
.pain__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; }
.pain h3 { font-size: 16px; font-weight: 600; line-height: 24px; }
.pain p { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--ink-soft); }
.goal { margin-top: 36px; padding: 24px 28px; border-left: 3px solid var(--sg-purple); background: rgba(130, 23, 255, .06); border-radius: 0 16px 16px 0; }
.goal p { font-size: 17px; line-height: 28px; font-weight: 400; color: var(--ink); }
.goal b { font-weight: 600; }

/* ---------- Journey ---------- */
.journey-head { text-align: center; max-width: 620px; margin: 0 auto; }
.journey { position: relative; margin-top: 64px; }
.journey__line { position: absolute; left: 0; top: 0; width: 100%; height: 240px; overflow: visible; }
.journey__line path { fill: none; stroke: rgba(243, 240, 223, .35); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.journey__line path.draw { stroke: var(--sg-teal); stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.journey.is-in .journey__line path.draw { transition: stroke-dashoffset 2.4s var(--ease-out); stroke-dashoffset: 0; }
.journey ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); height: 300px; }
.journey li { position: relative; }
.journey li:nth-child(odd) { padding-top: 0; }
.journey li:nth-child(even) { padding-top: 130px; }
.journey a { display: grid; justify-items: center; text-align: center; text-decoration: none; color: var(--cream); }
.journey__dot {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: var(--sg-night); background: var(--c, var(--sg-teal));
  box-shadow: 0 0 0 8px rgba(243, 240, 223, .08); transform: scale(0); transition: transform .5s var(--ease-out), box-shadow .3s ease;
}
.journey.is-in .journey__dot { transform: scale(1); transition-delay: calc(var(--i) * .3s + .2s); }
.journey a:hover .journey__dot, .journey a:focus-visible .journey__dot { box-shadow: 0 0 0 12px rgba(243, 240, 223, .16); }
.journey a:focus-visible { outline: none; }
.journey__label { margin-top: 16px; font-size: 16px; font-weight: 600; line-height: 22px; }
.journey__sub { margin-top: 4px; font-size: 13px; line-height: 19px; color: rgba(243, 240, 223, .65); max-width: 170px; }

/* ---------- Chapter 1: playable chord ---------- */
.fret { position: absolute; left: 15%; width: 57%; top: 37%; height: 42%; z-index: 3; cursor: pointer; touch-action: pan-y; }
.fret__string { position: absolute; left: 3.8%; right: 0; height: 0; }
.fret__string i {
  position: absolute; left: 0; right: 0; top: -1px; height: 3px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(0, 240, 191, 0), var(--sg-teal) 20%, var(--sg-teal) 80%, rgba(0, 240, 191, 0));
  box-shadow: 0 0 10px rgba(0, 240, 191, .9);
}
.fret__string.is-plucked i { animation: pluck .9s ease-out; }
@keyframes pluck {
  0% { opacity: 1; transform: scaleY(3); }
  10% { transform: scaleY(1) translateY(-2px); }
  20% { transform: translateY(2px); }
  30% { transform: translateY(-1.5px); }
  45% { transform: translateY(1px); }
  60% { transform: translateY(-.5px); opacity: .8; }
  100% { transform: none; opacity: 0; }
}
.finger { position: absolute; z-index: 2; width: 4.9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; }
.finger.is-on { animation: finger-ok .7s var(--ease-out); }
@keyframes finger-ok { 0% { box-shadow: 0 0 0 0 rgba(0, 240, 191, .9); background: rgba(0, 240, 191, .55); } 100% { box-shadow: 0 0 0 14px rgba(0, 240, 191, 0); background: rgba(0, 240, 191, 0); } }
.next-arrow {
  position: absolute; z-index: 3; left: 12.35%; width: 3.15%; transform: translateY(-50%);
  transition: top .35s var(--ease-out); pointer-events: none; animation: nudge 1.2s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 18% 0; } }
/* Chord complete: the fretboard dims, a cream card springs up with a check that draws itself, and brand sparkles burst out */
.chord-done {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none;
  background: rgba(23, 4, 64, .5); opacity: 0; transition: opacity .3s ease;
}
.chord-done.is-visible { opacity: 1; }
.chord-done__card {
  display: flex; flex-direction: column; align-items: center; padding: 2.2cqw 5.4cqw 2.4cqw; border-radius: 2.6cqw;
  background: var(--cream); color: var(--sg-night); box-shadow: 0 1.6cqw 4cqw rgba(10, 0, 40, .4);
  transform: translateY(3cqw) scale(.7); transition: transform .55s cubic-bezier(.3, 1.55, .5, 1);
}
.chord-done.is-visible .chord-done__card { transform: none; }
.chord-done__check { width: 6.4cqw; height: 6.4cqw; margin-bottom: .9cqw; }
.chord-done__check circle { fill: var(--sg-teal); }
.chord-done__check path { fill: none; stroke: var(--sg-night); stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.chord-done.is-visible .chord-done__check path { animation: check-draw .4s .3s ease-out forwards; }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
.chord-done__card b { font-size: 3.8cqw; font-weight: 800; line-height: 1.1; }
.chord-done__card span { margin-top: .3cqw; font-size: 2cqw; font-weight: 600; color: rgba(32, 8, 84, .68); white-space: nowrap; }
.chord-done__spark { position: absolute; left: 50%; top: 50%; width: calc(4.6cqw * var(--s)); margin: calc(-2.3cqw * var(--s)) 0 0 calc(-2.3cqw * var(--s)); opacity: 0; }
.chord-done__spark svg { display: block; width: 100%; height: auto; }
.chord-done.is-visible .chord-done__spark { animation: spark-burst 1.1s calc(.2s + var(--d)) cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes spark-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  25% { opacity: 1; }
  70% { opacity: 1; transform: translate(var(--x), var(--y)) scale(1) rotate(90deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.4) rotate(140deg); }
}
.minis { margin-top: 72px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.mini h3 { margin-top: 20px; font-size: 16px; font-weight: 600; line-height: 24px; }
.mini p { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--ink-soft); }
[data-loop] > img + img { position: absolute; inset: 0; opacity: 0; transition: opacity .35s var(--ease-out); }
[data-loop] > img.is-active { opacity: 1; }
/* One connected arrow (shaft + head); teal fills it top to bottom like a strum */
.strum-arrow { position: absolute; z-index: 2; left: 9.36%; top: 36.53%; width: 3.22%; height: 37.47%; overflow: visible; pointer-events: none; }
.strum-arrow__fill { transform-box: view-box; transform-origin: 50% 0; transform: scaleY(0); animation: strum-down 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes strum-down { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Chapter 3: strumming trainer ---------- */
.strum .phone__screen > img.strum-base + img.strum-base { position: absolute; inset: 0; }
.strum-base { transition: opacity .3s ease; }
.strum-base:not(.is-active) { opacity: 0; }
.strum__cell { position: absolute; top: 41.2%; width: 8.246%; height: 15.6%; z-index: 2; pointer-events: none; }
.strum__cell img { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .2s ease; }
.strum__cell.is-hit img { opacity: 1; transition: none; }
.strum__done { position: absolute; inset: 0; border-radius: .82cqw; background: rgba(32, 8, 84, .5); opacity: 0; transition: opacity .2s ease; }
.strum__cell.is-done .strum__done { opacity: 1; }
.strum__caret {
  position: absolute; z-index: 3; top: 35.2%; width: 0; height: 0; transform: translateX(-50%);
  border-left: 1.3cqw solid transparent; border-right: 1.3cqw solid transparent; border-top: 1.6cqw solid var(--sg-teal);
  filter: drop-shadow(0 0 .8cqw rgba(0, 240, 191, .6)); transition: left .18s var(--ease-out), opacity .15s ease;
}
.strum__caret.is-rest { opacity: .35; }
.strum__bar { position: absolute; z-index: 2; left: 13.49%; top: 59.1%; height: .45%; width: 0; border-radius: 2px; background: var(--sg-teal); }
.strum__count { position: absolute; z-index: 2; top: 64.5%; width: 8.246%; height: 4.5%; pointer-events: none; border-radius: 99px; background: rgba(0, 240, 191, .22); opacity: 0; transition: opacity .2s ease; }
.strum__count.is-on { opacity: 1; transition: none; }
.controls { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.btn-pill {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 99px; cursor: pointer;
  padding: 11px 20px; font: 600 14px/20px var(--font); color: var(--sg-night); background: var(--sg-teal);
  transition: transform .2s var(--ease-out), box-shadow .2s ease;
}
.btn-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 240, 191, .35); }
.btn-pill:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.btn-pill svg { width: 16px; height: 16px; }
.btn-pill--ghost { background: transparent; color: var(--cream); box-shadow: 0 0 0 1.5px rgba(243, 240, 223, .4) inset; }
.btn-pill--ghost:hover { box-shadow: 0 0 0 1.5px var(--cream) inset; }
.btn-pill--ghost[aria-pressed="true"] { background: rgba(243, 240, 223, .12); }
.bpm { font-size: 13px; color: rgba(243, 240, 223, .6); min-width: 64px; text-align: center; }

/* ---------- Chapter 4: songs ---------- */
.song-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }

/* ---------- Fingerpicking legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; font-size: 14px; color: rgba(243, 240, 223, .8); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.pluck-meter { margin-top: 28px; display: flex; gap: 6px; }
.pluck-meter i { flex: 1; height: 6px; border-radius: 3px; background: rgba(243, 240, 223, .15); transition: background .3s ease; }
.pluck-meter i.is-on { background: var(--sg-teal); }

/* ---------- Streak ---------- */
.streak-wrap { position: relative; overflow: hidden; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1099.98px) {
  .section__inner { padding: 0; display: block; }
  .wrap, .wrap--tight { padding: 64px var(--gutter); }
  .chapter, .chapter--flip, .chapter--solo { display: flex; flex-direction: column; gap: 0; }
  .chapter > .chapter__device { margin-top: 32px; width: 100%; }
  .hero__stage .sparkle { display: none; }
  .chapter > .chapter__steps { margin-top: 24px; }
  .hero { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: 56px var(--gutter) 40px; }
  .hero__logo { height: 156px; width: auto; max-width: 100%; }
  .hero__sub { font-size: 19px; line-height: 28px; margin-top: 20px; }
  .hero__stage { width: 100%; height: auto; aspect-ratio: 900 / 640; margin-top: 32px; }
  .hero__stage .p1 { width: 71%; left: 16.6%; top: 6%; }
  .hero__stage .p2 { width: 48%; left: 0; top: 61%; }
  .hero__stage .p3 { width: 44%; left: 52%; top: 62%; }
  .intro { display: block; }
  .about { display: block; }
  .about .focus { margin-top: 40px; padding-top: 0; }
  .about__main .audience { margin-top: 40px; }
  .photo-pair { grid-template-columns: 1fr; padding-bottom: 0; }
  .photo-pair + .outro { padding-top: 40px; }
  .photo-pair figure { height: 64vw; max-height: 440px; }
  .photo-pair__tall { display: none; }
  .outro__path li { font-size: 13px; }
  .outro__path li + li::before { width: 12px; margin: 0 6px; }
  .intro .pains { margin-top: 32px; }
  .journey { margin-top: 40px; }
  .journey__line { display: none; }
  .journey ol { grid-template-columns: 1fr; height: auto; gap: 0; }
  .journey li:nth-child(n) { padding: 0 0 28px; }
  .journey li:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 60px; bottom: 4px; border-left: 2px dashed rgba(243, 240, 223, .3); }
  .journey a { grid-template-columns: 56px 1fr; column-gap: 16px; justify-items: start; text-align: left; align-items: center; }
  .journey__dot { width: 56px; height: 56px; font-size: 18px; grid-row: span 2; box-shadow: 0 0 0 6px rgba(243, 240, 223, .08); }
  .journey__label { margin-top: 0; }
  .journey__sub { max-width: none; }
  .minis { grid-template-columns: 1fr; gap: 36px; margin-top: 48px; }
  .song-duo { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .lead { font-size: 17px; line-height: 28px; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .minis { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 720px) {
  .focus { grid-template-columns: 1fr; }
  .pain { padding: 18px; grid-template-columns: 44px 1fr; gap: 14px; }
  .pain__ic { width: 44px; height: 44px; font-size: 16px; }
  .goal p { font-size: 16px; line-height: 26px; }
  .sparkle { width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .float, .sparkle, .confetti, .next-arrow { animation: none; }
  .journey__dot { transform: none; }
}

.on-dark .icon-list li { color: rgba(243, 240, 223, .8); }
.chapter--solo.chapter--flip { grid-template-areas: "device text"; }
.fret__string { display: block; padding: 0; border: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.fret__string::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 24px; }
.fret__string:focus-visible { outline: 3px solid var(--sg-teal); outline-offset: 6px; }

/* Chord switching: live beat demo over the clean screen (positions in % of the 668x375 screen) */
.chsw { position: absolute; inset: 0; container-type: size; pointer-events: none; }
.chsw__card {
  position: absolute; top: 23.47%; width: 28.44%; height: 64.53%; box-sizing: border-box; padding: 1.2cqw;
  border-radius: 2.54cqw; background: #e061bd; transform: scale(1);
  transition: transform .28s var(--ease-out), background-color .15s ease, box-shadow .2s ease;
}
.chsw__card img { display: block; width: 100%; height: 100%; border-radius: 1.8cqw; object-fit: cover; }
.chsw__card.is-on { background: #3afcea; animation: chsw-bounce .55s cubic-bezier(.3, .7, .4, 1); box-shadow: 0 0 2.6cqw rgba(58, 252, 234, .5), 0 1.4cqw 3cqw -1cqw rgba(32, 8, 84, .45); }
.chsw__dot {
  position: absolute; top: 51.2%; width: 2.99%; height: 5.33%; border-radius: 50%;
  background: #e176bd; transition: background-color .1s ease;
}
.chsw__dot.is-on { background: #3afcea; animation: chsw-beat .5s var(--ease-out); }
@keyframes chsw-bounce { 0% { transform: scale(1); } 35% { transform: scale(1.1); } 60% { transform: scale(.97); } 80% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes chsw-beat { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }
.chsw__level {
  position: absolute; left: 9.28%; top: 3.1%; height: 7.6%; display: flex; align-items: center; gap: 1.6cqw;
  padding: 0 2.2cqw; border-radius: 99px; background: #742171; color: #f3f0df; transition: transform .3s var(--ease-out);
  font-size: 2cqw; font-weight: 500; line-height: 1; white-space: nowrap;
}
.chsw__name b, .chsw__count b { font-weight: 700; }
.chsw__count { opacity: .8; min-width: 4cqw; }
.chsw__level.is-up { animation: chsw-pop .6s var(--ease-out); }
@keyframes chsw-pop { 30% { transform: scale(1.12); } 100% { transform: scale(1); } }
.chsw__track { display: flex; gap: .6cqw; }
.chsw__track i { position: relative; width: 6.6cqw; height: 1.2cqw; border-radius: 99px; background: rgba(243, 240, 223, .25); overflow: hidden; }
.chsw__track i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #f3f0df; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s var(--ease-out); }
.chsw__track i.is-done::after { background: #3afcea; }
.chsw__toast {
  position: absolute; left: 50%; top: 13%; transform: translate(-50%, -30%); opacity: 0;
  padding: 1cqw 2.4cqw; border-radius: 99px; background: #3afcea; color: var(--sg-night);
  font-size: 1.9cqw; font-weight: 700; white-space: nowrap; transition: opacity .3s ease, transform .4s var(--ease-out);
}
.chsw__toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.chsw__confetti { position: absolute; inset: 0; overflow: hidden; }
.chsw__confetti i {
  position: absolute; left: 50%; top: 42%; width: 1.1cqw; height: 1.8cqw; border-radius: .3cqw; opacity: 0;
  background: var(--c); animation: chsw-burst 1.4s cubic-bezier(.2, .7, .3, 1) var(--delay, 0s) forwards;
}
@keyframes chsw-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(.4); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); }
}
.chsw__toast { font-size: 2.4cqw; padding: 1.2cqw 3cqw; top: 40%; transform: translate(-50%, -50%) scale(.5); z-index: 3; box-shadow: 0 1cqw 3cqw -1cqw rgba(32, 8, 84, .5); }
.chsw__toast.is-visible { transform: translate(-50%, -50%) scale(1); }

/* Song sheet: the line above the current chord fills over the chord's time */
.song-time { position: absolute; z-index: 2; top: 26.93%; width: 18.82%; height: .8%; border-radius: 99px; background: #9983be; overflow: hidden; opacity: 0; pointer-events: none; }
.song-time { transition: opacity .3s ease; }
.song-time.is-on { opacity: 1; }
.song-time i { position: absolute; inset: 0; border-radius: inherit; background: #39fcea; transform-origin: left; transform: scaleX(0); }
.song-time.is-on i { animation: song-time var(--dur, 3s) linear forwards; }
@keyframes song-time { to { transform: scaleX(1); } }
.song-on { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.song-on.is-on { opacity: 1; }
.song-on img { position: absolute; left: calc(8.996% + var(--c) * 20.69%); top: calc(27.733% + var(--r) * 21.867%); width: 19.79%; height: 19.467%; opacity: 0; }
.song-on img { transition: opacity .45s ease; } /* the current chord fades across, not a hard cut */
.song-on img.is-on { opacity: 1; }
.song-on .song-on__check { left: calc(23.84% + var(--c, 0) * 20.69%); top: calc(29.33% + var(--r, 0) * 21.867%); width: 4.05%; height: 6.93%; transform: scale(0); }
.song-on .song-on__check.is-on { opacity: 1; animation: song-check .35s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes song-check { from { transform: scale(0); } to { transform: scale(1); } }

/* Song tutorials: the auto-next card slides in and counts down (card at 762,594 of the 1334x750 render) */
.auto-next { position: absolute; z-index: 2; left: 57.12%; top: 79.2%; width: 42.88%; height: 20.8%; transform: translateX(105%); opacity: 0; pointer-events: none; }
.auto-next > img { display: block; width: 100%; height: 100%; }
.auto-next.is-on { transform: translateX(0); opacity: 1; transition: transform .6s var(--ease-out) .25s, opacity .3s ease .25s; }
.auto-next__ring { position: absolute; left: 7.34%; top: 26.9%; width: 7.69%; height: 28.2%; transform: translate(-50%, -50%); overflow: visible; }
.auto-next__ring circle { fill: none; stroke: rgba(243, 240, 223, .3); stroke-width: 3.5; }
.auto-next__ring .auto-next__arc { stroke: #39fcea; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 22px 22px; }
.auto-next.is-on .auto-next__arc { animation: auto-next-count var(--count, 2.1s) linear .85s forwards; }
@keyframes auto-next-count { to { stroke-dashoffset: 0; } }  /* fills clockwise from 12 o’clock */
.auto-next__ring text { fill: #f3f0df; font: 700 20px var(--font); text-anchor: middle; dominant-baseline: middle; }

/* Songs: Simply Guitar's default in-game view, built live over a clean fretboard (positions in % of the screen) */
.ingame { overflow: hidden; }
.ingame__track { position: absolute; inset: 0; }
.ingame__bar {
  position: absolute; top: 32.6%; width: 2.6%; height: 31.6%; margin-left: -1.3%; border-radius: .7cqw;
  background: linear-gradient(#fff, #e6e3d6); box-shadow: 0 .3cqw 0 rgba(0, 0, 0, .35), inset 0 -.25cqw 0 rgba(0, 0, 0, .12);
  transition: background .12s ease;
}
.ingame__bar.is-hit { background: linear-gradient(#3dffd2, #00d9ad); }
.ingame__bar.is-miss { background: linear-gradient(#ff8a8a, #f25a5a); }
.ingame__label {
  position: absolute; top: 15.2%; transform: translateX(-50%); padding: .5cqw 1.5cqw .6cqw; border-radius: 1cqw;
  background: #161616; color: #fff; font: 800 3.6cqw/1 var(--font); white-space: nowrap;
}
.ingame__label::after { content: ""; position: absolute; left: 50%; bottom: -1cqw; transform: translateX(-50%); border: .8cqw solid transparent; border-top-color: #161616; border-bottom: 0; }
.ingame__line { position: absolute; top: 31.2%; height: 55.2%; width: .25%; background: rgba(255, 255, 255, .28); }
.ingame__head { position: absolute; z-index: 2; left: 26%; top: 27%; bottom: 13.6%; width: .45%; margin-left: -.225%; background: #39fcea; box-shadow: 0 0 1.4cqw rgba(57, 252, 234, .7); }
.ingame__head::before { content: ""; position: absolute; left: 50%; top: -.4cqw; transform: translateX(-50%); border: 1.1cqw solid transparent; border-top: 1.4cqw solid #39fcea; border-bottom: 0; }

/* Phones (mobile review, 2026-10-23): hero platforms one per line; the chord-trainer minis share one screen
   with a step list built by guitar.js (.minis--seq + .minis__steps) */
.hero__meta .pl { white-space: nowrap; }
.minis__steps { display: none; }
@media (max-width: 699.98px) {
  .hero__meta .sep { display: none; }
  .hero__meta .pl { display: block; }
  .minis--seq { display: grid; grid-template-columns: 1fr; gap: 0; }
  .minis--seq > .mini { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
  .minis--seq > .mini.is-active { opacity: 1; visibility: visible; transition: opacity .4s ease; }
  .minis--seq .mini h3, .minis--seq .mini p { display: none; }
  .minis__steps { display: grid; margin-top: 20px; }
}

/* Challenge and journey icons: one drawn set, same box and 2.4 stroke, so every glyph reads at the same size */
.pain__ic .ic, .journey__dot .ic { display: block; width: 24px; height: 24px; font-family: var(--font); }
.journey__dot .ic { width: 28px; height: 28px; }
@media (max-width: 1099.98px) { .journey__dot .ic { width: 22px; height: 22px; } }
@media (max-width: 720px) { .pain__ic .ic { width: 21px; height: 21px; } }

/* Song sheet: on "Blocks that repeat" the sheet scrolls gently down to the chorus (positions in % of the 1334x750 screen) */
.song-scroll { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.song-scroll.is-on { opacity: 1; }
.song-scroll__view { position: absolute; left: 4.498%; top: 16%; width: 90.105%; height: 84%; overflow: hidden; }
.song-scroll__view img { display: block; width: 100%; height: auto; }
.song-scroll__track, .song-scroll__thumb { position: absolute; left: 95.352%; width: 1.349%; }
.song-scroll__track { top: 16%; height: 80%; }
.song-scroll__thumb { top: 16.8%; height: 19.733%; }
.song-scroll.is-on .song-scroll__view img { animation: sheet-scroll 2.8s .5s cubic-bezier(.45, 0, .25, 1) both; }
.song-scroll.is-on .song-scroll__thumb { animation: sheet-thumb 2.8s .5s cubic-bezier(.45, 0, .25, 1) both; }
@keyframes sheet-scroll { to { transform: translateY(-20.4545%); } }
@keyframes sheet-thumb { to { top: 30.133%; } }

/* Streak: the flame flickers, the freeze badge pops in, and ice flakes drift over the freeze screen */
.stk-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .45s var(--ease-out); } /* the flame lives only here: its screens carry an empty glow */
.stk-fx.is-on { opacity: 1; }
.stk-flame { position: absolute; width: 21.407%; height: auto; transform-origin: 50% 92%; }
.stk-fx.is-on .stk-flame { animation: flame-flicker 1.8s ease-in-out infinite; }
@keyframes flame-flicker {
  0%, 100% { transform: scale(1.01, 1.01); filter: drop-shadow(0 0 .6cqw rgba(255, 214, 79, .35)); }
  30% { transform: scale(1.03, 1.06) skewX(-1.2deg); filter: drop-shadow(0 0 1.6cqw rgba(255, 214, 79, .6)); }
  55% { transform: scale(1.015, 1.025) skewX(.8deg); }
  80% { transform: scale(1.035, 1.05) skewX(.4deg); filter: drop-shadow(0 0 1.2cqw rgba(255, 214, 79, .5)); }
}
.stk-badge { position: absolute; left: 8.458%; top: 64.933%; width: 16.018%; height: auto; opacity: 0; transform: scale(0) rotate(-8deg); }
.stk-fx.is-on .stk-badge { animation: badge-pop .7s .55s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes badge-pop { 60% { opacity: 1; transform: scale(1.12) rotate(2deg); } 100% { opacity: 1; transform: none; } }
.stk-ice { overflow: hidden; }
.stk-ice__glow { position: absolute; left: 49.775%; top: 16%; width: 26%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(120, 255, 240, .32), rgba(120, 255, 240, 0)); mix-blend-mode: screen; }
.stk-ice.is-on .stk-ice__glow { animation: ice-glow 2.4s ease-in-out infinite; }
@keyframes ice-glow { 50% { transform: translate(-50%, -50%) scale(1.18); opacity: .6; } }
.stk-ice i { position: absolute; left: var(--x); top: -6%; width: calc(3.2% * var(--s)); aspect-ratio: 1; opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bff8ff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.3 7l17.4 10M3.3 17L20.7 7M12 2l-2.5 2.5M12 2l2.5 2.5M12 22l-2.5-2.5M12 22l2.5-2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.stk-ice.is-on i { animation: ice-fall var(--d) linear var(--t) infinite; }
@keyframes ice-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  10% { opacity: .75; }
  50% { transform: translate(2cqw, 55cqw) rotate(120deg); }
  90% { opacity: .75; }
  100% { opacity: 0; transform: translate(-1cqw, 62cqw) rotate(240deg); }
}

/* Phones: the step list is a swipe carousel under the screen, with progress dots (Amir, 2026-10-23, all projects) */
.step-dots { display: none; }
@media (max-width: 1099.98px) {
  .steps.is-swipe {
    display: flex; gap: 10px; min-width: 0; align-self: stretch; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scroll-padding-inline: var(--gutter);
  }
  .steps.is-swipe::-webkit-scrollbar { display: none; }
  .steps.is-swipe::after { content: ""; flex: 0 0 calc(100% - min(86%, 440px) - 10px); } /* lets the last card snap to the start */
  .steps.is-swipe > li { flex: 0 0 min(86%, 440px); scroll-snap-align: start; display: flex; }
  .steps.is-swipe > li > button:first-child { height: 100%; align-content: start; padding-right: 52px; }
  .steps.is-swipe span { max-height: none; opacity: 1; margin-top: 2px; transition: none; }
  .steps.is-swipe button::after { display: none; }
  .step-dots { display: flex; margin-top: 4px; margin-left: -2px; }
  .step-dots button { display: grid; place-items: center; padding: 8px 3px; border: 0; background: none; cursor: pointer; }
  .step-dots i { display: block; position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: 4px; background: var(--dot, rgba(17, 0, 52, .14)); transition: width .3s ease; }
  .step-dots i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--dot-on); transform-origin: left; transform: scaleX(0); }
  .step-dots .is-on i { width: 28px; }
  .step-dots .is-done i::after { transform: none; opacity: .4; }
  .step-dots .is-running i::after { animation: step-fill var(--dur, 3s) linear forwards; animation-play-state: var(--play, running); }
  .step-dots button:focus-visible { outline: 2px solid var(--dot-on); outline-offset: -2px; border-radius: 8px; }
}
.step-dots { --dot-on: var(--sg-purple); }
.on-dark .step-dots { --dot: rgba(243, 240, 223, .18); --dot-on: var(--sg-teal); }
@media (min-width: 700px) { .steps.minis__steps, .minis__steps + .step-dots { display: none; } } /* the chord minis only merge into one sequence on phones */
