/* Design tokens — направление «Земное спокойствие» (утверждено владельцем) */
:root {
  --color-bg: #2d2a24;
  --color-surface: #3d382f;
  --color-text: #e6dfd1;
  --color-muted: #b3aa92;
  --color-accent: #7a9e7e;
  --color-accent-2: #a6b49b;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Source Serif 4', serif;
  --radius: 14px;
  --ease: 1.6s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(122, 158, 126, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(166, 180, 155, .08), transparent 60%),
    var(--color-bg);
  background-attachment: fixed;
  animation: drift 24s ease-in-out infinite alternate;
  min-height: 100vh;
}
@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: -40px 20px, 30px -15px, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .bars i { animation: none !important; }
}

.wrap {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}
@media (min-width: 1200px) { .wrap { max-width: 880px; } }

.hero { order: 1; }
.now-playing { order: 2; }
.sound-block { order: 3; }
.sound-block:nth-of-type(3) { order: 4; }
.sound-block:nth-of-type(4) { order: 5; }
.about { order: 6; }
.faq { order: 7; }
.controls { order: 8; }
footer { order: 9; }

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 600;
  margin: 18px 0 6px;
  letter-spacing: .01em;
}
.tagline { color: var(--color-muted); font-size: 17px; line-height: 1.55; margin: 0 0 26px; max-width: 46ch; }
.tagline strong { color: var(--color-text); font-weight: 600; }

/* --- Now playing --- */
.now-playing {
  margin-top: 24px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  min-height: 60px;
}
.now-playing h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 12px;
}
.empty-hint {
  color: var(--color-muted);
  font-size: 14px;
  margin: 6px 0 0;
}
.active-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.active-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  padding: 8px 10px;
  flex-wrap: wrap;
}
.active-name {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-2);
  min-width: 90px;
  padding-right: 4px;
}
@media (min-width: 500px) {
  .active-name { flex: 0 0 140px; font-size: 14px; }
}
.sound-vol {
  flex: 1;
  accent-color: var(--color-accent);
  min-width: 60px;
}
.stop-btn {
  appearance: none;
  border: 1px solid rgba(230,223,209,.15);
  background: transparent;
  color: var(--color-muted);
  font-size: 18px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: border-color var(--ease), color var(--ease);
}
.stop-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- Sound grids --- */
.sounds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px) { .sounds { grid-template-columns: repeat(3, 1fr); } }

.sound {
  appearance: none;
  border: 1px solid rgba(230, 223, 209, .08);
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 16px 40px 14px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--ease), background .6s ease, transform .6s ease;
  font-family: var(--font-body);
  position: relative;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.sound:hover { transform: translateY(-2px); }
.sound.active { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.sound .name { display: block; font-size: 15px; font-weight: 600; margin-top: 8px; padding-right: 2px; line-height: 1.2; }
@media (min-width: 400px) { .sound .name { font-size: 16px; } }
.sound .hint { display: block; color: var(--color-muted); font-size: 13px; margin-top: 2px; line-height: 1.3; }

.bars { display: inline-flex; gap: 3px; height: 18px; align-items: flex-end; }
.bars i {
  width: 4px; height: 6px;
  background: var(--color-muted);
  border-radius: 2px;
  transition: background var(--ease);
}
.sound.active .bars i { background: var(--color-accent); animation: sway 1.8s ease-in-out infinite; }
.sound.active .bars i:nth-child(2) { animation-delay: .35s; }
.sound.active .bars i:nth-child(3) { animation-delay: .7s; }
.sound.active .bars i:nth-child(4) { animation-delay: 1.05s; }
@keyframes sway { 0%, 100% { height: 6px; } 50% { height: 18px; } }
.sound .bars { position: absolute; top: 16px; right: 12px; }

/* --- Controls always at bottom --- */
.controls {
  margin-top: 34px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
}
.control {
  display: flex;
  flex-direction: column;
}
.control label, .control .label {
  display: block;
  color: var(--color-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
  height: 24px;
}

.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timer button {
  appearance: none;
  border: 1px solid rgba(230, 223, 209, .12);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  padding: 12px 4px;
  min-height: 44px;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--ease), color var(--ease);
}
@media (min-width: 540px) { .timer button { font-size: 15px; padding: 12px 6px; } }
.timer button.active { border-color: var(--color-accent); color: var(--color-accent-2); }
.timer-status { color: var(--color-muted); font-size: 13px; min-height: 1em; margin: 8px 0 0; }

.block { margin-top: 30px; }
.block h2 { font-family: var(--font-heading); font-weight: 600; font-size: 30px; margin: 0 0 2px; }
.block .sub { color: var(--color-muted); font-size: 14.5px; margin: 0 0 14px; }
.badge { font-family: var(--font-body); font-size: 12px; vertical-align: middle; color: var(--color-bg); background: var(--color-accent); border-radius: 8px; padding: 3px 9px; margin-left: 8px; letter-spacing: .03em; }

.hero-art { width: 100%; height: auto; display: block; margin-bottom: -8px; opacity: .9; }

.about { margin-top: 34px; }
.about h2 { font-family: var(--font-heading); font-weight: 600; font-size: 28px; margin: 0 0 8px; }
.about p { color: var(--color-muted); line-height: 1.6; font-size: 15px; max-width: 62ch; }

/* --- FAQ section --- */
.faq {
  margin-top: 34px;
}
.faq h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 18px;
}
.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(230, 223, 209, .06);
}
.faq-item h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 6px;
  color: var(--color-accent-2);
}
.faq-item p {
  color: var(--color-muted);
  line-height: 1.65;
  font-size: 15px;
  margin: 0;
  max-width: 64ch;
}

.ad-slot { margin-top: 24px; }

footer { margin-top: 40px; border-top: 1px solid rgba(230, 223, 209, .08); padding-top: 16px; }
footer p { color: var(--color-muted); font-size: 14px; line-height: 1.5; }
