/* KaraMIDI website — night stage palette from the app */
:root {
  color-scheme: dark;
  --night: #120e3a;
  --violet: #241a5e;
  --violet-2: #2f2378;
  --pink: #ff4fa8;
  --gold: #ffd84d;
  --cyan: #3ee0ff;
  --paper: #f2eeff;
  --muted: #b9b2e0;
  --line: rgba(242, 238, 255, 0.14);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bungee", "Onest", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 14, 58, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font-weight: 800; background: linear-gradient(90deg, #4f8cff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer;
}
.btn-play { background: var(--paper); color: var(--night); }
.btn-play:hover { background: #fff; color: var(--night); }
.btn-play svg { width: 20px; height: 20px; }
.btn-ghost { color: var(--paper); border: 1.5px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 0.95rem; white-space: nowrap; }
.nav a.btn-play, .nav a.btn-play:hover { color: var(--night); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 72% 40%, rgba(138, 53, 255, 0.35), transparent 70%), var(--night);
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 800; margin: 0 0 22px; max-width: 13ch;
}
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 0 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 0.95rem; }
.facts li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 2px; }

/* floating phone (hero) */
.phone-stage { justify-self: center; position: relative; padding: 20px 0 30px; }
.phone-stage::before {
  content: ""; position: absolute; inset: 12% -12% 4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 79, 168, 0.45), rgba(138, 53, 255, 0.25) 55%, transparent 75%);
  filter: blur(18px); z-index: 0;
}
.phone {
  position: relative; z-index: 1; width: min(300px, 70vw); aspect-ratio: 720 / 1600;
  padding: 11px; border-radius: 46px;
  background: linear-gradient(145deg, #3a3a46, #0d0d12 45%, #24242c);
  box-shadow: 0 50px 80px -20px rgba(0, 0, 0, 0.7), 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  animation: float 7s ease-in-out infinite;
}
.phone::after { /* side button */
  content: ""; position: absolute; right: -3px; top: 22%; width: 4px; height: 64px; border-radius: 2px; background: #1a1a20;
}
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #0d0a2a; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-screen::before { /* camera hole */
  content: ""; position: absolute; top: 12px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: #050507; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05); z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* "Try the keypad" section */
.try-sec .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }

/* the videoke keypad */
.machine {
  justify-self: center; width: min(400px, 100%);
  background: linear-gradient(180deg, #2a1f6e, #1a1450);
  border-radius: 34px; padding: 18px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1.5px rgba(255, 79, 168, 0.55);
}
.screen {
  position: relative; border-radius: 20px; padding: 22px 16px 20px; min-height: 196px;
  background: radial-gradient(ellipse at 50% 40%, #3b1f8f, #120e3a 75%);
  text-align: center; overflow: hidden;
}
.screen .hint { font-weight: 800; font-size: 1.15rem; margin: 0; }
.screen .number {
  font-family: var(--display); color: var(--gold); font-size: clamp(2.6rem, 9vw, 3.4rem); line-height: 1.1;
  letter-spacing: 0.04em; margin: 6px 0 4px; text-shadow: 0 3px 0 #7a4b00, 0 0 24px rgba(255, 216, 77, 0.35);
}
.screen .title { margin: 0; min-height: 1.6em; color: var(--paper); font-weight: 700; }
.screen .artist { margin: 0; color: var(--muted); font-size: 0.9rem; min-height: 1.4em; }
.lyric { margin: 10px 0 0; font-weight: 800; font-size: 1.25rem; min-height: 1.8em; line-height: 1.3; }
.lyric span {
  background: linear-gradient(90deg, var(--pink) 0 var(--p, 0%), var(--paper) var(--p, 0%) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.key {
  min-height: 58px; border-radius: 16px; border: 0; cursor: pointer;
  font: 800 1.5rem/1 var(--font); color: #fff;
  background: linear-gradient(180deg, #7b5cff, #5a3ce0);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
  transition: transform 80ms ease, filter 80ms ease;
}
.key:active, .key.pressed { transform: translateY(2px); filter: brightness(1.15); }
.key.back { background: linear-gradient(180deg, #ffa53d, #f06a0f); font-size: 1.2rem; }
.key.clear { background: linear-gradient(180deg, #ff5c7a, #d81b4a); font-size: 1.2rem; }
.key.enter {
  grid-column: 1 / -1; min-height: 54px; font-size: 1.05rem; letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--pink), #8a35ff);
}
.try { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.try button { background: none; border: 0; color: var(--gold); font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */
section { padding: clamp(64px, 9vw, 112px) 0; }
.band { background: var(--violet); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 16px; font-weight: 800; max-width: 22ch; }
.intro { color: var(--muted); max-width: 58ch; margin: 0 0 40px; font-size: 1.1rem; }

/* phone strip */
.strip {
  display: flex; gap: 20px; overflow-x: auto; padding: 6px 20px 22px; margin: 0 -20px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.strip figure { margin: 0; flex: 0 0 auto; width: clamp(200px, 23vw, 250px); scroll-snap-align: start; }
.strip img { border-radius: 26px; border: 1.5px solid var(--line); background: #0d0a2a; aspect-ratio: 9 / 20; object-fit: cover; }
.strip figcaption { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }

/* TV */
.tv { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.tv-frame { border-radius: 18px; padding: 10px; background: #08061c; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.tv-frame img { border-radius: 10px; aspect-ratio: 16 / 9; }
.tv-stand { width: 34%; height: 10px; margin: 0 auto; background: #08061c; border-radius: 0 0 10px 10px; }
.tv ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.tv li { padding-left: 18px; border-left: 3px solid var(--cyan); }
.tv li strong { display: block; font-size: 1.08rem; }
.tv li span { color: var(--muted); }
.tv-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.tv-gallery img { border-radius: 12px; border: 1.5px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; }

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 56px; margin: 0; }
.features div { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; align-items: center; }
.features dd { align-self: start; }
.features dt { grid-column: 2; font-weight: 800; font-size: 1.15rem; }
.features dd { grid-column: 2; margin: 0; color: var(--muted); }
.features .ico {
  grid-row: 1; align-self: start; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; background: var(--violet-2); color: var(--gold);
}
.features .ico svg { width: 22px; height: 22px; }
.note {
  margin-top: 48px; padding: 18px 22px; border-radius: var(--radius-md);
  border: 1.5px dashed rgba(255, 216, 77, 0.5); color: var(--paper); max-width: 70ch;
}

/* steps (a real sequence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--display); color: var(--gold); font-size: 2.2rem; line-height: 1; margin-bottom: 14px;
}
.steps h3 { margin: 0 0 8px; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--muted); }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; color: var(--cyan); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 64ch; }

/* closing call */
.closing { text-align: center; }
.closing h2 { margin-inline: auto; }
.closing .cta-row { justify-content: center; margin-top: 26px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--paper); }

/* ---------- privacy page ---------- */
.doc { padding: clamp(40px, 7vw, 80px) 0 80px; }
.doc article { max-width: 72ch; }
.doc h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 10px; }
.doc .meta { color: var(--muted); margin: 0 0 34px; }
.doc h2 { font-size: 1.45rem; margin: 44px 0 12px; max-width: none; }
.doc p, .doc li { color: #dcd6f7; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.summary-box {
  background: var(--violet); border-radius: var(--radius-md); padding: 20px 24px; margin: 0 0 10px;
  border-left: 4px solid var(--gold);
}
.summary-box p { margin: 0; color: var(--paper); }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.98rem; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--violet); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap, .tv, .try-sec .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .features { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .tv-gallery { grid-template-columns: 1fr 1fr; }
  .tv-gallery img:last-child { display: none; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .nav a.keep { display: inline; }
  .site-head .wrap { gap: 12px; }
  body { font-size: 1rem; }
  .key { min-height: 52px; }
  .tv-gallery { grid-template-columns: 1fr; }
  .tv-gallery img:last-child { display: block; }
}
@media (max-width: 400px) {
  .nav a.keep { display: none; }
  .brand { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .key { transition: none; }
  .phone { animation: none; }
}
