/* Sound Deck's one-page site, modelled on questify.page's landing.
 *
 * No web fonts, no analytics, nothing fetched from anyone else: the system
 * font stack, and every file served from here.
 *
 * The app's own palette (`lib/utils/styles.dart`): a navy ground, blue for
 * decks, orange for sounds. Dark only, as the app is.
 *
 * The hero is the store listing's "stage" background made live: an orange and
 * a blue spotlight drifting over navy, and the listing's waveform as a row of
 * bars playing. CSS only; the page's one script is the phone's tilt. Under
 * reduced motion it all stands still. */

:root {
  color-scheme: dark;

  --bg: #0e1320;
  --surface: #161d2e;
  --raised: #1f2840;
  --border: #2a3552;
  --text: #eef2fa;
  --muted: #9aa6bf;

  --deck: #1976d2;
  --deck-dark: #0d47a1;
  --deck-accent: #64b5f6;
  --sound: #e64a19;
  --sound-dark: #bf360c;
  --sound-accent: #ff8a65;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sound-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--sound-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The listing's highlight: the words in an orange box, as on the store
 * screenshots. */
em {
  font-style: normal;
}

/* --- the hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0a0f1a;
  padding: 0 16px 120px;
}

.lights,
.wave {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.lights {
  inset: 0;
}

.lights b {
  position: absolute;
  width: 820px;
  height: 680px;
  border-radius: 50%;
  will-change: transform;
}

/* Orange from the top left, blue from the right, a softer orange low down. */
.lights b:nth-child(1) {
  left: -18%;
  top: -30%;
  background: radial-gradient(closest-side, rgba(230, 74, 25, 0.55), rgba(230, 74, 25, 0));
  animation: drift-a 24s ease-in-out infinite alternate;
}

.lights b:nth-child(2) {
  right: -16%;
  top: 10%;
  background: radial-gradient(closest-side, rgba(25, 118, 210, 0.6), rgba(25, 118, 210, 0));
  animation: drift-b 30s ease-in-out infinite alternate;
}

.lights b:nth-child(3) {
  left: 20%;
  bottom: -45%;
  background: radial-gradient(closest-side, rgba(255, 112, 67, 0.28), rgba(255, 112, 67, 0));
  animation: drift-c 36s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate(240px, 120px) scale(1.15);
  }
}

@keyframes drift-b {
  to {
    transform: translate(-220px, 160px) scale(0.9);
  }
}

@keyframes drift-c {
  to {
    transform: translate(200px, -140px) scale(1.2);
  }
}

/* The waveform: 48 bars along the bottom, each pulsing at its own pace, in
 * the brand's run from orange to blue across the page. */
.wave {
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.wave i {
  flex: none;
  width: 6px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sound) 0%, #9c3a6e 50%, var(--deck) 100%) fixed;
  transform: scaleY(0.2);
  animation: bar 1.6s ease-in-out infinite alternate;
}

/* Pace and starting point vary by position, so the bars never move as one. */
.wave i:nth-child(3n + 1) {
  animation-duration: 1.1s;
}

.wave i:nth-child(4n + 2) {
  animation-duration: 1.9s;
}

.wave i:nth-child(5n + 3) {
  animation-duration: 0.8s;
}

.wave i:nth-child(7n) {
  animation-duration: 2.4s;
}

.wave i:nth-child(2n) {
  animation-delay: -0.5s;
}

.wave i:nth-child(3n) {
  animation-delay: -1.2s;
}

.wave i:nth-child(5n) {
  animation-delay: -0.9s;
}

@keyframes bar {
  0% {
    transform: scaleY(0.12);
  }

  100% {
    transform: scaleY(0.75);
  }
}

.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.hero-body {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 24px;
}

.hero h1 {
  font-size: clamp(2.8rem, 9vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}

.hero h1 .line {
  display: block;
}

.hero h1 em {
  display: inline-block;
  margin-top: 0.08em;
  padding: 0 0.16em 0.04em;
  border-radius: 0.12em;
  background: linear-gradient(135deg, var(--sound-dark), var(--sound));
  box-shadow: 0 10px 30px rgba(230, 74, 25, 0.35);
}

.hero .sub {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin: 0 0 32px;
  color: #c9d3e6;
}

.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px 15px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sound), #ff7043);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(230, 74, 25, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.play:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(230, 74, 25, 0.5);
}

.hero .note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- phones -------------------------------------------------------------------- */

.phone {
  background: linear-gradient(150deg, #5a6278 0%, #262c3c 22%, #191e2b 55%, #3a4256 100%);
  border-radius: 34px;
  padding: 7px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 1px 0 1px rgba(255, 255, 255, 0.1) inset,
    0 24px 50px rgba(0, 0, 0, 0.4);
}

.phone .screen {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 2424;
  object-fit: cover;
  border-radius: 26px;
  background: var(--bg);
}

.hero-phone {
  width: min(280px, 64vw);
  justify-self: center;
  perspective: 1400px;
}

/* The clip plays; under reduced motion the still grid stands in for it. */
.hero-phone .still {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone .motion {
    display: none;
  }

  .hero-phone .still {
    display: block;
  }
}

@media (min-width: 820px) {
  .hero {
    padding-bottom: 140px;
  }

  .hero-body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
  }

  .hero-phone {
    width: 290px;
    margin-right: 24px;
  }
}

/* The phone in 3D, as on questify.page: the face on a stack of 14 slabs 1 px
 * apart, so its edge shows as it turns; two keys on the side. It sways slowly
 * and turns toward the mouse (the script sets --ry and --rx). */

.p3d-sway {
  transform-style: preserve-3d;
  animation: p3d-sway 11s ease-in-out infinite alternate;
}

@keyframes p3d-sway {
  from {
    transform: rotateY(-4deg) translateY(4px);
  }

  to {
    transform: rotateY(5deg) translateY(-6px);
  }
}

.p3d-body {
  --ry: -18deg;
  --rx: 6deg;

  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(3deg);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.p3d-face {
  position: relative;
  transform: translateZ(1px);
}

.p3d-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}

.slab {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background: linear-gradient(150deg, #4a5268, #22283a 45%, #2d3448);
}

.slab:nth-child(1) { transform: translateZ(-1px); }
.slab:nth-child(2) { transform: translateZ(-2px); }
.slab:nth-child(3) { transform: translateZ(-3px); }
.slab:nth-child(4) { transform: translateZ(-4px); }
.slab:nth-child(5) { transform: translateZ(-5px); }
.slab:nth-child(6) { transform: translateZ(-6px); }
.slab:nth-child(7) { transform: translateZ(-7px); }
.slab:nth-child(8) { transform: translateZ(-8px); }
.slab:nth-child(9) { transform: translateZ(-9px); }
.slab:nth-child(10) { transform: translateZ(-10px); }
.slab:nth-child(11) { transform: translateZ(-11px); }
.slab:nth-child(12) { transform: translateZ(-12px); }
.slab:nth-child(13) { transform: translateZ(-13px); }

/* The back plate, darker, carries the shadow. */
.slab:nth-child(14) {
  transform: translateZ(-14px);
  background: #0e1320;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.key {
  position: absolute;
  right: -3px;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #5c6478, #2a3040);
  transform: translateZ(-7px);
}

.key-power {
  top: 22%;
  height: 54px;
}

.key-volume {
  top: 36%;
  height: 92px;
}

/* --- below the hero ---------------------------------------------------------------- */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 72px 0 24px;
}

.points ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .points ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

.point {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Icons alternate the app's two colours: decks blue, sounds orange. */
.point-icon {
  display: inline-flex;
  color: var(--deck-accent);
}

.point:nth-child(2) .point-icon {
  color: var(--sound-accent);
}

.point h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 12px 0 6px;
}

.point p {
  margin: 0;
  color: var(--muted);
}

/* The listing's five screens, sideways, each under its caption. */
.strip {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 24px;
  margin: 0 -4px;
  scrollbar-color: var(--border) transparent;
}

.strip:focus-visible {
  outline: 2px solid var(--sound-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.shot {
  flex: 0 0 236px;
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shot figcaption {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  min-height: 7.2em;
  /* A longer caption (Finnish, German) takes the slack: the phones stay level. */
  flex: 1;
}

.shot figcaption strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.shot em {
  color: var(--sound-accent);
}

/* One price: a card with the deck blue's border. */
.panel {
  padding: 24px;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.35), rgba(22, 29, 46, 0.6)), var(--surface);
  border: 1px solid var(--deck);
  border-radius: 12px;
  max-width: 680px;
}

.panel-lead {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
}

/* Two by two, never three and one (the user, 15 Nov 2026); one column on
 * narrow phones. */
@media (min-width: 480px) {
  .panel ul {
    grid-template-columns: 1fr 1fr;
  }
}

.panel li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.panel li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--deck-accent);
  border-bottom: 2px solid var(--deck-accent);
  transform: rotate(-45deg);
}

/* --- footer -------------------------------------------------------------------------- */

.site-footer {
  max-width: 1080px;
  margin: 72px auto 0;
  padding: 24px 16px 56px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer p {
  margin: 16px 0 0;
}

.languages a {
  color: var(--muted);
  text-decoration: none;
}

.languages a:hover {
  color: var(--text);
}

.languages a[aria-current] {
  color: var(--text);
  font-weight: 700;
}

/* --- the text pages: privacy policy, terms, 404 ---------------------------------------- */

body.doc {
  padding: 0 16px 64px;
}

.doc main {
  max-width: 720px;
  padding: 0;
}

.doc header {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 24px 0 24px;
  border-bottom: 1px solid var(--border);
}

.doc header .brand {
  margin-bottom: 32px;
}

.doc h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.doc .updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc h2 {
  font-size: 1.25rem;
  margin: 40px 0 8px;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 6px;
}

.doc li::marker {
  color: var(--muted);
}

/* The short version on top, as a card. */
.doc .summary {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--deck-accent);
  border-radius: 8px;
}

.doc .summary p {
  margin: 0;
}

.doc .site-footer {
  max-width: 720px;
  padding: 24px 0 0;
}

.doc .site-footer ul {
  padding-left: 0;
}

/* --- reduced motion: everything stands still ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .lights b,
  .wave i,
  .p3d-sway {
    animation: none;
  }

  .wave i:nth-child(odd) {
    transform: scaleY(0.45);
  }

  .play,
  .p3d-body {
    transition: none;
  }
}
