/* ===================================================================
   Nisni Media · Skiza portal
   Light, plain and quick. Built for a mid-range Android phone on
   mobile data: big tap targets, high contrast, almost no motion.
   =================================================================== */

:root {
  --paper:      #ffffff;
  --tint:       #f4f6f5;   /* section bands, input fills */
  --line:       #e2e6e5;
  --line-firm:  #ccd3d1;

  --ink:        #15191b;   /* headings and primary text */
  --ink-soft:   #4d585d;   /* body copy */
  --ink-mute:   #74807f;   /* labels, metadata */

  /* One green, used only for things that are actionable or confirmed.
     #0b7a3b clears 4.5:1 against white in both directions. */
  --green:      #0b7a3b;
  --green-dark: #095f2e;
  --green-wash: #e9f4ed;

  --red:        #b3261e;
  --red-wash:   #fdecea;
  --amber:      #8a5a00;
  --amber-wash: #fdf3e2;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;

  --shadow:    0 1px 2px rgba(16, 24, 28, 0.06), 0 1px 3px rgba(16, 24, 28, 0.04);
  --shadow-up: 0 4px 12px rgba(16, 24, 28, 0.09);

  --gut: clamp(1rem, 4vw, 2.5rem);
  --max: 1080px;

  --font: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* An author-set `display` beats the UA rule for [hidden], which silently breaks
   every element we toggle with the attribute. Make the attribute win. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

::selection { background: var(--green-wash); }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: fixed; top: 0; left: 50%; translate: -50% -120%; z-index: 200;
  padding: 0.7rem 1.2rem; border-radius: 0 0 10px 10px;
  background: var(--green); color: #fff; font-weight: 600; text-decoration: none;
}
.skip:focus { translate: -50% 0; }

/* ── Header ───────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 60px;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gut);
}

.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green); color: #fff;
  font-weight: 800; font-size: 0.95rem; line-height: 1;
}
.brand__name { color: var(--ink); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.015em; }

.site-nav { display: flex; gap: 1.35rem; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.94rem;
  padding: 0.5rem 0;
}
.site-nav a:hover { color: var(--green); }
@media (max-width: 560px) { .site-nav { gap: 1rem; font-size: 0.9rem; } }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero { padding: clamp(2rem, 5vw, 3rem) 0 clamp(0.5rem, 2vw, 1rem); }
.hero h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.6vw, 3rem);
  max-width: 20ch;
  text-wrap: balance;
  margin-bottom: 0.7rem;
}
.hero p {
  font-size: clamp(1rem, 0.97rem + 0.2vw, 1.12rem);
  max-width: 46ch;
}

.hero__facts {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.4rem;
}
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border-radius: 100px;
  background: var(--tint); border: 1px solid var(--line);
  font-size: 0.86rem; color: var(--ink-soft);
}
.pill--on { background: var(--green-wash); border-color: #c3e3ce; color: var(--green-dark); font-weight: 600; }
.pill b { color: var(--ink); font-weight: 700; }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.6rem 1.25rem;
  border-radius: var(--r); border: 1px solid transparent;
  font-size: 0.97rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--quiet { background: var(--paper); border-color: var(--line-firm); color: var(--ink); }
.btn--quiet:hover { background: var(--tint); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}

/* ── Sections ─────────────────────────────────────────────────────── */

.section { padding: clamp(1.75rem, 4vw, 2.75rem) 0; scroll-margin-top: 70px; }
.section__head { margin-bottom: 1.1rem; }
.section__head h2 { font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.65rem); }
.section__head p { font-size: 0.92rem; color: var(--ink-mute); margin-top: 0.25rem; }

/* ── Search and filters ───────────────────────────────────────────── */

.controls { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }

.search {
  flex: 1 1 260px;
  display: flex; align-items: center; gap: 0.55rem;
  min-height: 46px; padding: 0 0.9rem;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--r);
}
.search:focus-within { border-color: var(--green); background: var(--paper); }
.search svg { width: 18px; height: 18px; color: var(--ink-mute); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0.6rem 0; }
.search input::-webkit-search-cancel-button { display: none; }
.search button {
  border: 0; background: none; cursor: pointer; color: var(--ink-mute);
  font-size: 1.3rem; line-height: 1; padding: 0 0.2rem;
}

.pick {
  position: relative;
  display: flex; align-items: center;
  min-height: 46px;
  background: var(--paper); border: 1px solid var(--line-firm); border-radius: var(--r);
}
.pick select {
  appearance: none; background: none; border: 0; outline: 0; cursor: pointer;
  padding: 0.6rem 2.1rem 0.6rem 0.9rem;
  font-size: 0.94rem; color: var(--ink);
}
.pick::after {
  content: ''; position: absolute; right: 0.85rem; pointer-events: none;
  width: 8px; height: 8px; border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute);
  rotate: 45deg; translate: 0 -2px;
}

/* ── Tune list ────────────────────────────────────────────────────── */

.grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card:hover { border-color: var(--line-firm); }
.card.is-playing { border-color: var(--green); }

.card__top { display: flex; align-items: center; gap: 0.85rem; }

.play {
  flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--green); background: var(--paper); color: var(--green);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.play:hover { background: var(--green-wash); }
.play[data-state="playing"] { background: var(--green); color: #fff; }
.play svg { width: 15px; height: 15px; }
.play[data-state="loading"] { color: var(--ink-mute); border-color: var(--line-firm); }

.card__id { min-width: 0; flex: 1; }
.card__title {
  font-size: 1.06rem; font-weight: 700; letter-spacing: -0.015em;
  overflow-wrap: anywhere; margin-bottom: 0.1rem;
}
.card__by { font-size: 0.9rem; color: var(--ink-mute); }
.card__by span { color: var(--line-firm); margin-inline: 0.35rem; }

.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
}
.card__price { font-size: 0.92rem; color: var(--ink-soft); }
.card__price b { color: var(--ink); font-weight: 700; }

.card__go {
  min-height: 42px; padding: 0.45rem 1.1rem;
  border: 0; border-radius: 10px;
  background: var(--green); color: #fff;
  font-size: 0.93rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s;
}
.card__go:hover { background: var(--green-dark); }

/* The one piece of motion kept: it tells you the preview is running. */
.card__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--line); opacity: 0; }
.card.is-playing .card__bar { opacity: 1; }
.card__bar i { display: block; height: 100%; width: 0; background: var(--green); }

.tag {
  display: inline-block;
  font-size: 0.78rem; color: var(--ink-mute);
  background: var(--tint); border: 1px solid var(--line);
  padding: 0.1rem 0.45rem; border-radius: 5px;
}

.loading, .empty { padding: 2.5rem 0; text-align: center; color: var(--ink-mute); }

.more { display: flex; justify-content: center; margin-top: 1.5rem; }

/* ── How it works ─────────────────────────────────────────────────── */

.how { background: var(--tint); border-block: 1px solid var(--line); }
.how__in { max-width: var(--max); margin-inline: auto; padding: clamp(1.75rem, 4vw, 2.5rem) var(--gut); }
.how__list {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.how__list li { display: flex; gap: 0.7rem; align-items: flex-start; }
.how__n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: #fff;
  font-size: 0.78rem; font-weight: 700;
}
.how__list b { display: block; color: var(--ink); font-size: 0.97rem; }
.how__list p { font-size: 0.9rem; color: var(--ink-soft); }

/* ── My tunes ─────────────────────────────────────────────────────── */

.mine-empty {
  padding: 2rem 1.25rem; text-align: center;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink-mute); font-size: 0.94rem;
}
.mine-list { display: grid; gap: 0.6rem; }
.mine-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
}
.mine-item__id { flex: 1 1 200px; min-width: 0; }
.mine-item__id b { display: block; color: var(--ink); font-size: 0.98rem; }
.mine-item__id span { font-size: 0.86rem; color: var(--ink-mute); }
.mine-item__stop {
  min-height: 40px; padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-firm); border-radius: 9px;
  background: var(--paper); color: var(--ink-soft);
  font-size: 0.88rem; cursor: pointer;
}
.mine-item__stop:hover { border-color: var(--red); color: var(--red); }

.badge {
  font-size: 0.76rem; font-weight: 600;
  padding: 0.15rem 0.5rem; border-radius: 5px;
}
.badge--live { background: var(--green-wash); color: var(--green-dark); }
.badge--demo { background: var(--amber-wash); color: var(--amber); }

/* ── Sheet ────────────────────────────────────────────────────────── */

.sheet { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; }
.sheet[hidden] { display: none; }
@media (min-width: 640px) { .sheet { place-items: center; } }

.sheet__scrim { position: absolute; inset: 0; background: rgba(16, 24, 28, 0.45); }

.sheet__panel {
  position: relative; z-index: 1;
  width: min(100%, 440px); max-height: 94svh; overflow-y: auto;
  background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 1.4rem;
  box-shadow: 0 -8px 40px rgba(16, 24, 28, 0.18);
}
@media (min-width: 640px) {
  .sheet__panel { border-radius: var(--r-lg); margin: var(--gut); box-shadow: 0 16px 50px rgba(16, 24, 28, 0.22); }
}

.sheet__x {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-mute); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.sheet__x:hover { background: var(--tint); color: var(--ink); }

.sheet h2 { font-size: 1.3rem; padding-right: 2.5rem; }
.sheet__by { font-size: 0.92rem; color: var(--ink-mute); margin-bottom: 1.1rem; }

/* Price facts. Always on screen, never behind a pop-up. */
.terms {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-bottom: 1.2rem;
}
.terms__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.9rem; font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}
.terms__row:last-child { border-bottom: 0; }
.terms__row:first-child { background: var(--green-wash); }
.terms__row span { color: var(--ink-mute); }
.terms__row b { color: var(--ink); text-align: right; font-weight: 700; }

.label {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.86rem; font-weight: 600; color: var(--ink);
}

.phone {
  display: flex; align-items: center;
  min-height: 52px; padding: 0 0.9rem;
  background: var(--tint); border: 1px solid var(--line-firm); border-radius: var(--r);
}
.phone:focus-within { border-color: var(--green); background: var(--paper); }
.phone__cc { color: var(--ink-soft); padding-right: 0.6rem; margin-right: 0.6rem; border-right: 1px solid var(--line-firm); }
.phone input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  padding: 0.8rem 0; font-size: 1.08rem; letter-spacing: 0.02em;
}
.phone.is-bad { border-color: var(--red); }

.hint { margin: 0.45rem 0 1.2rem; font-size: 0.85rem; color: var(--ink-mute); }
.hint.is-bad { color: var(--red); }

/* Network recognised the line */
.he {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 0.95rem; margin-bottom: 0.45rem;
  background: var(--green-wash); border: 1px solid #c3e3ce; border-radius: var(--r);
}
.he__tick {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green); color: #fff;
}
.he__tick svg { width: 14px; height: 14px; }
.he__text b { display: block; color: var(--ink); font-size: 0.93rem; }
.he__text span { font-size: 0.85rem; color: var(--ink-soft); }

.fineprint { margin-top: 0.7rem; text-align: center; font-size: 0.82rem; color: var(--ink-mute); }

.notice {
  padding: 0.8rem 0.95rem; border-radius: var(--r);
  font-size: 0.88rem; line-height: 1.5; margin-bottom: 1.1rem;
}
.notice b { display: block; margin-bottom: 0.15rem; }
.notice--bad  { background: var(--red-wash); border: 1px solid #f3c9c5; color: #7d1a15; }
.notice--warn { background: var(--amber-wash); border: 1px solid #f0dcb4; color: var(--amber); }

.working { display: grid; place-items: center; gap: 1rem; padding: 2.5rem 0; text-align: center; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.working p { font-size: 0.94rem; color: var(--ink-soft); }

.done { text-align: center; }
.done__tick {
  width: 54px; height: 54px; margin: 0 auto 1rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--green); color: #fff;
}
.done__tick svg { width: 24px; height: 24px; }
.done__ref {
  display: inline-block; margin-top: 0.5rem; padding: 0.3rem 0.6rem;
  background: var(--tint); border-radius: 6px;
  font-size: 0.8rem; color: var(--ink-mute); overflow-wrap: anywhere;
}

/* ── Toast ────────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; translate: -50% 0; z-index: 150;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1.1rem; border-radius: var(--r);
  background: var(--ink); color: #fff;
  font-size: 0.9rem; box-shadow: var(--shadow-up);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.toast.is-on { opacity: 1; }

/* ── Footer ───────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  font-size: 0.87rem; color: var(--ink-mute);
}
.site-foot b { color: var(--ink); }
.site-foot p { max-width: 62ch; margin-top: 0.5rem; }
.site-foot__meta { margin-top: 0.75rem; font-size: 0.8rem; color: #97a1a0; }
