/* Demi's Music site styles. Colours and fonts come from theme.css variables. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--body-size);
  line-height: 1.55;
}

h1, h2, h3 { margin: 0; line-height: 1.1; font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
h2 { font-size: clamp(30px, 4vw, 42px); }

/* ---- hero ---- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--hero-glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--hero-glow-2), transparent 60%),
    linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  padding: 0 24px 160px;
}
.topbar {
  max-width: 1120px; margin: 0 auto; padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand img { height: 50px; width: auto; display: block; }
.topbar__links { display: flex; align-items: center; gap: 22px; }
.topbar__links .theme-switch { margin-left: 4px; }
.topbar__links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.topbar__links a:hover { text-decoration: underline; }
.topbar__cta { background: var(--contrast); color: var(--on-contrast) !important; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.topbar__cta:hover { text-decoration: none !important; background: var(--contrast-hover); }

.hero__inner {
  max-width: 1120px; margin: 0 auto; padding-top: 40px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
.hero h1 { font-size: clamp(48px, 8vw, 92px); }
.hero h1 em {
  font-style: var(--em-style);
  background: linear-gradient(90deg, var(--brand), var(--brand-mid) 55%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__copy p { font-size: 19px; color: var(--muted); max-width: 480px; margin: 20px 0 0; }
.hero__notes { width: 100%; height: auto; color: var(--staff); }
.bob { animation: bob 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---- converter card ---- */
main { padding: 0 24px; }
.card {
  max-width: 1040px; margin: -112px auto 0; position: relative;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: 28px;
  box-shadow: 0 2px 4px rgba(29, 27, 34, 0.05), 0 40px 80px -40px var(--shadow-tint);
  padding: 32px;
}
.card__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.card__top h2 { font-size: 30px; }

.progress { display: flex; list-style: none; margin: 0; padding: 4px; gap: 4px; background: var(--cream); border-radius: 999px; font-size: 13px; font-weight: 700; }
.progress li { padding: 6px 14px; border-radius: 999px; color: var(--soft); }
.progress li.is-done { color: var(--brand); }
.progress li.is-active { background: var(--contrast); color: var(--on-contrast); }

.card__body--split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: 0; background: none; cursor: pointer; padding: 0 0 10px;
  font: 700 15px var(--body); color: var(--soft); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 36px 20px; border-radius: 20px; cursor: pointer;
  background: var(--cream); border: 2px dashed var(--drop-border);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.drop:hover, .drop:focus-visible, .drop.is-dragover { border-color: var(--brand); background: var(--cream-hover); outline: none; }
.drop.is-dragover { transform: scale(1.01); }
.drop__badge {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 8px;
  font-size: 28px; color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--accent));
}
.drop__title { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 26px; }
.drop__sub { color: var(--muted); }
.drop__hint { margin-top: 10px; font-size: 13px; color: var(--muted); }

.url label { display: block; font-weight: 700; margin-bottom: 8px; }
.url__row { display: flex; gap: 8px; }
.url input {
  flex: 1; min-width: 0; padding: 13px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); font: 15px var(--body); color: var(--ink); background: var(--surface);
}
.url input:focus { outline: none; border-color: var(--brand); }
.url-result { margin-top: 16px; padding: 18px; border-radius: 18px; background: var(--cream); }
.url-result p { margin: 0 0 8px; }
.url-result ol { margin: 0 0 14px; padding-left: 20px; }
.url-result a { color: var(--brand-dark); font-weight: 700; }

.perks { background: var(--panel); color: var(--on-ink); border-radius: 20px; padding: 24px; }
.perks__price { margin: 0 0 14px; font-family: var(--display); font-weight: var(--display-weight); font-size: 44px; line-height: 1; }
.perks__price small { font-family: var(--body); font-size: 14px; color: var(--on-ink-muted); }
.perks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks li::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--brand), var(--accent)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 14px; padding: 13px 20px;
  font: 700 15px var(--body); cursor: pointer; text-decoration: none;
}
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--brand:hover { background: var(--brand-dark); }
.btn--brand:disabled { opacity: 0.7; cursor: progress; }
.btn--dark { background: var(--contrast); color: var(--on-contrast); }
.btn--big { width: 100%; padding: 16px 20px; font-size: 16px; }
.btn--link { background: none; color: var(--muted); text-decoration: underline; padding: 12px 0 0; }

.working { text-align: center; padding: 24px 0; }
.working__bar { height: 8px; border-radius: 99px; background: var(--cream); overflow: hidden; max-width: 420px; margin: 0 auto 20px; }
.working__bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #FF0000, #FF8000, #009900, #0000FF, #8C008C);
  border-radius: inherit; animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.working__title { font-family: var(--display); font-weight: var(--display-weight); font-size: 24px; margin: 0; overflow-wrap: anywhere; }
.working__text { color: var(--muted); margin: 6px 0 0; }

.result { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.result__preview { border-radius: 16px; border: 1px solid var(--line); }
.result__side h3 { font-size: 32px; overflow-wrap: anywhere; }
.result__meta { color: var(--muted); margin: 6px 0 24px; }
.fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Logo option on the Pay step: two radio cards */
.logo-choice { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.logo-choice__legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 14px; color: var(--muted); }
.logo-choice__option {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.logo-choice__option:hover { border-color: var(--drop-border); }
.logo-choice__option:has(input:checked) { border-color: var(--brand); background: var(--cream); }
.logo-choice__option input { margin: 3px 0 0; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.logo-choice__option:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.logo-choice__text { display: grid; gap: 2px; min-width: 0; }
.logo-choice__head { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.logo-choice__price { white-space: nowrap; }
.logo-choice__sub { font-size: 13px; color: var(--muted); }
.logo-choice__sub img { height: 13px; width: auto; vertical-align: -2px; margin-right: 2px; }
.paid { color: var(--ok); font-weight: 700; margin: 0 0 12px; }

.failed { text-align: center; padding: 16px 0; }
.failed__title { font-family: var(--display); font-weight: var(--display-weight); font-size: 28px; margin: 0 0 8px; }
.failed p { color: var(--muted); }

.error { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--danger-bg); color: var(--danger); font-weight: 500; }

/* ---- sections ---- */
.benefits { max-width: 1040px; margin: 80px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefits article { padding: 28px; border-radius: 22px; background: var(--cream); }
.benefits h3 { font-size: 24px; margin-bottom: 8px; }
.benefits p { margin: 0; color: var(--muted); }

.key { max-width: 1040px; margin: 96px auto 0; text-align: center; }
.key__hint { color: var(--muted); max-width: 520px; margin: 12px auto 0; font-size: 15px; }
/* Touchscreens have no keyboard to type on - just "Tap a key to hear it." */
@media (hover: none) and (pointer: coarse) { .key__hint-keys { display: none; } }
.key__hint kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line);
  border-bottom-width: 2px; background: var(--surface); color: var(--ink); font: 700 12px var(--body); line-height: 1.5;
}
.keyboard {
  position: relative; display: grid; grid-template-columns: repeat(7, 1fr);
  max-width: 560px; height: 220px; margin: 28px auto 0;
  border-radius: 14px; overflow: hidden; border: 3px solid var(--key-frame); background: var(--key-frame); gap: 3px;
  touch-action: pan-y;            /* vertical swipes still scroll; sideways slides play keys */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.keyboard__white, .keyboard__black {
  border: 0; margin: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s ease-out, background-color 0.12s, filter 0.12s;
}
.keyboard__white { background: var(--key-white); color: var(--key-label); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 14px; border-radius: 0 0 8px 8px; position: relative; }
.keyboard__white::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 44px; height: 22px; border-radius: 6px; background: var(--note); transition: box-shadow 0.12s, transform 0.12s; }
.keyboard__white span { font-weight: 700; font-size: 18px; }
.keyboard__black {
  position: absolute; top: 0; height: 58%; width: 9%; padding: 0; z-index: 1;
  left: calc(var(--pos) * (100% / 7) - 4.5%);
  background: var(--key-frame); border-radius: 0 0 6px 6px;
}
/* Pressed: the key dips, the colour bar glows; a sharp lights up in its letter's colour. */
.keyboard__white.is-down { filter: brightness(0.93); transform: translateY(2px); }
.keyboard__white.is-down::before { box-shadow: 0 0 0 3px var(--key-white), 0 0 16px 4px var(--note); transform: scaleY(1.15); }
.keyboard__black.is-down { background: var(--note); transform: translateY(2px); }
.keyboard__white:focus-visible, .keyboard__black:focus-visible { outline: 3px solid var(--brand); outline-offset: -5px; }
.keyboard__black:focus-visible { outline-color: var(--key-white); }

.faq { max-width: 760px; margin: 96px auto 0; }
.faq h2 { text-align: center; margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 700; 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: "+"; font-size: 22px; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.footer {
  margin-top: 96px; padding: 40px 24px; background: var(--panel); color: var(--on-ink-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.footer img { height: 34px; width: auto; }
.footer p { margin: 0; font-size: 14px; }

/* Four labelled theme buttons don't fit beside the nav on mid-size screens: show dots only. */
@media (max-width: 1080px) {
  .theme-switch button { padding: 4px; }
  .theme-switch__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 860px) {
  .hero { padding: 0 16px 120px; }
  .topbar__links { gap: 10px; }
  .topbar__links a:not(.topbar__cta) { display: none; }
  .brand img { height: 40px; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 16px; gap: 16px; }
  .hero__notes { max-width: 360px; justify-self: center; }
  .hero__copy p { font-size: 17px; }
  main { padding: 0 16px; }
  .card { padding: 20px 16px; border-radius: 22px; margin-top: -88px; }
  .card__body--split, .result { grid-template-columns: 1fr; }
  .progress li { padding: 6px 10px; }
  .url__row { flex-direction: column; }
  .benefits { grid-template-columns: 1fr; margin-top: 56px; }
  .key, .faq { margin-top: 64px; }
  .keyboard { height: 180px; }
  .keyboard__white span { font-size: 15px; }
  .keyboard__white::before { left: 4px; right: 4px; bottom: 38px; height: 16px; }
}

@media (max-width: 420px) {
  .topbar { gap: 10px; }
  .topbar__links { gap: 8px; }
  .topbar__cta { padding: 8px 12px; font-size: 14px; }
  .brand img { height: 32px; }
  .theme-switch { padding: 2px; gap: 0; }
  .theme-switch button { padding: 3px; min-height: 30px; }
  .theme-switch__dot { width: 16px; height: 16px; }
}

/* Smallest phones: the converter card is just below the hero, so the jump link can go. */
@media (max-width: 359px) {
  .topbar__cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bob, .working__bar span { animation: none !important; }
  .keyboard__white.is-down, .keyboard__black.is-down { transform: none; }
}
