/* Тихий мозг — стили. Цвета меняются в :root (тёмная тема по умолчанию) */
:root {
  --bg: #1D2621;          /* тёмный шалфей */
  --surface: #243029;
  --ink: #ECE5D9;         /* лён */
  --ink-2: #CFC8BB;
  --muted: #A3ADA4;
  --rule: #3A463E;
  --soft: #31403A;
  --dot: #D08D66;         /* терракотовая точка */
  --on-ink: #1D2621;
  --focus: #ECE5D9;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --text: 42rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ECE5D9; --surface: #F4EFE6; --ink: #2C3B33; --ink-2: #44524A;
  --muted: #56625A; --rule: #CFC4B2; --soft: #DFE0D4; --dot: #C4805A; --on-ink: #F4EFE6;
  --focus: #2C3B33;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-quiet="on"] { scroll-behavior: auto; }
html[data-quiet="on"] *, html[data-quiet="on"] *::before, html[data-quiet="on"] *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1.1875rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; letter-spacing: -.015em; }
p { margin: 0; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: calc(var(--text) + 2 * var(--gutter)); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 12px; }

/* ---------- шапка ---------- */
.top__inner { display: flex; align-items: center; min-height: 72px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.brand__mark { width: 52px; height: 26px; }
.dot { fill: var(--dot); }
.toggles { display: flex; gap: 8px; margin-left: auto; }
.toggle {
  border: 1px solid var(--rule); background: transparent; border-radius: 999px;
  padding: 8px 16px; font-size: .95rem; font-weight: 600; cursor: pointer; min-height: 44px;
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2);
}
.toggle::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; }
.toggle[aria-pressed="true"] { background: var(--soft); border-color: var(--soft); color: var(--ink); }
.toggle[aria-pressed="true"]::before { background: var(--dot); border-color: var(--dot); }
.toggle--icon { padding: 0; width: 44px; justify-content: center; }
.toggle--icon::before { display: none; }
.toggle--icon svg { width: 20px; height: 20px; }

/* ---------- главный экран ---------- */
.hero { min-height: calc(100svh - 72px); display: flex; align-items: center; padding: 24px 0 64px; }
.hero__inner { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__brand { margin: 0; }
.wm { display: block; width: clamp(200px, 30vw, 300px); height: auto; }
.wm--on-light { display: none; }
:root[data-theme="light"] .wm--on-dark { display: none; }
:root[data-theme="light"] .wm--on-light { display: block; }
.hero__wave { position: relative; width: min(100%, 560px); height: 64px; margin: 18px 0 36px; padding-right: 30px; }
.hero__wave svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero__wave path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hero__dot { position: absolute; right: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--dot); }
.hero__title { font-size: clamp(2.1rem, 5.6vw, 4rem); font-weight: 600; max-width: 15ch; line-height: 1.08; letter-spacing: -.025em; }
.hero__lead { margin-top: 20px; max-width: 30ch; font-size: clamp(1.1875rem, 2vw, 1.375rem); color: var(--ink-2); }
.hero .btn--xl { margin-top: 36px; }
.hero__note { margin-top: 16px; font-size: 1rem; color: var(--muted); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 12px 24px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.0625rem; cursor: pointer;
}
.btn:hover { background: var(--soft); }
.btn--solid { background: var(--ink); color: var(--on-ink); }
.btn--solid:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--xl { min-height: 64px; padding: 16px 40px; font-size: 1.25rem; }
.btn--ghost { border-color: transparent; text-decoration: underline; }

/* ---------- разделы ---------- */
.block { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }
.block h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.block__text { margin-top: 16px; color: var(--ink-2); }

.points { margin-top: 28px; display: grid; gap: 18px; }
.points li { position: relative; padding-left: 34px; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }

.quote { margin: 0; }
.quote p { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.quote::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--dot); margin-top: 24px; }
.about { margin-top: 24px; color: var(--ink-2); }

.next { margin-top: 28px; display: grid; gap: 0; }
.next li { padding: 20px 0; border-top: 1px solid var(--rule); }
.next h3 { font-size: 1.3125rem; }
.next p { margin-top: 6px; color: var(--ink-2); }

.channels { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.channels li { padding: 14px 0; border-top: 1px solid var(--rule); }
.channels a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; font-size: 1.1875rem; }
.channels p { color: var(--muted); font-size: 1.0625rem; }
[data-todo] { opacity: .65; cursor: default; text-decoration: none; }
[data-todo] small { font-size: .78em; font-weight: 600; margin-left: 8px; color: var(--muted); }

/* ---------- подвал ---------- */
.foot { padding: 0 0 48px; }
.foot__line { position: relative; height: 16px; display: flex; align-items: center; padding-right: 26px; }
.foot__line span { flex: 1; height: 2.5px; border-radius: 3px; background: var(--ink); }
.foot__line::after { content: ""; position: absolute; right: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--dot); }
.foot__disclaimer { margin-top: 32px; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); color: var(--ink-2); }
.foot__disclaimer strong { color: var(--ink); font-weight: 650; }
.foot__disclaimer a { font-weight: 700; color: var(--ink); }
.foot__small { margin-top: 18px; font-size: .95rem; color: var(--muted); }

/* ---------- экран паузы ---------- */
.reset {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 42%, #2A3830 0%, #1D2621 55%, #151C18 100%);
  color: #ECE5D9; overflow-y: auto;
  --ink: #ECE5D9; --ink-2: #CFC8BB; --muted: #A3ADA4; --rule: #3A463E; --soft: #31403A; --on-ink: #1D2621; --focus: #ECE5D9; --dot: #D08D66;
}
.reset[hidden] { display: none; }
.reset__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sound { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sound__ctrl { display: flex; align-items: center; gap: 10px; }
.sound__ctrl[hidden], .sound__hint[hidden] { display: none; }
.sound__hint { width: 100%; font-size: .95rem; color: var(--muted); }
.sound__vol { display: inline-flex; align-items: center; min-height: 44px; }
.sound__vol input { width: clamp(110px, 22vw, 180px); accent-color: #ECE5D9; height: 44px; }
.pill {
  min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid #4A584F;
  background: rgba(236,229,217,.04); color: var(--ink); font-weight: 600; font-size: .98rem; cursor: pointer;
}
.pill:hover { background: rgba(236,229,217,.1); }
.pill[aria-pressed="false"] { color: var(--muted); }

.reset__stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 300px; padding: 16px 0; }
.circle {
  width: min(62vmin, 340px); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(236,229,217,.7); background: radial-gradient(circle, rgba(236,229,217,.10) 0%, rgba(236,229,217,.03) 70%);
  display: grid; place-items: center; transform: scale(.62);
}
.circle.is-breathing { animation: breathe 10s ease-in-out infinite; }
.circle.is-paused { animation-play-state: paused; }
html[data-quiet="on"] .circle, .circle.is-still { transform: scale(.8); }
@keyframes breathe {
  0% { transform: scale(.62); }
  40% { transform: scale(1); }
  100% { transform: scale(.62); }
}
@media (prefers-reduced-motion: reduce) { .circle.is-breathing { animation: none; transform: scale(.8); } }
.circle__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dot); }
.reset__prompt { min-height: 3.2em; max-width: 26ch; text-align: center; font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.4; color: var(--ink); }
.reset__prompt.is-off { visibility: hidden; }

.reset__bottom { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.progress { position: relative; width: 100%; height: 14px; display: flex; align-items: center; }
.progress::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #3A463E; border-radius: 2px; }
.progress__fill { position: absolute; left: 0; height: 2px; width: 0; background: #ECE5D9; border-radius: 2px; }
.progress__dot { position: absolute; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--dot); }
.reset__time { font-size: 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.reset__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.reset__end, .reset__step, .reset__stay { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.reset__end[hidden], .reset__step[hidden], .reset__stay[hidden], .reset__controls[hidden] { display: none; }
.reset__done { font-size: clamp(1.25rem, 2.6vw, 1.5rem); font-weight: 600; max-width: 30ch; line-height: 1.35; }
.reset__done:focus { outline: none; }
.steps { display: grid; gap: 10px; text-align: left; }
.steps li { position: relative; padding-left: 28px; color: var(--ink-2); }
.steps li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }

/* ---------- адаптив ---------- */
@media (max-width: 600px) {
  body { font-size: 1.125rem; }
  .channels { grid-template-columns: 1fr; }
  .reset__controls .btn { flex: 1 1 40%; }
  .btn--xl { width: 100%; }
  .toggle { padding: 8px 14px; }
}

/* экран паузы: доработки */
.reset__top { flex-wrap: nowrap; }
.sound { flex: 1; min-width: 0; }
.btn--wide { flex: 1 1 100%; }
@media (min-width: 601px) { .btn--wide { flex: 0 1 auto; } }
.reset__controls .btn--wide { flex: 1 1 100%; }
@media (min-width: 601px) { .reset__controls .btn--wide { flex: 0 1 auto; } }
.pill { white-space: nowrap; }
.sound__ctrl { flex: 1; }
.sound__vol { flex: 1; }
.sound__vol input { width: 100%; max-width: 220px; }
.reset__stage { gap: 18px; }
.link-btn { border: 0; background: none; min-height: 44px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .98rem; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.progress[hidden], .reset__time[hidden], .link-btn[hidden] { display: none; }
[data-todo] { opacity: 1; color: var(--muted); }
.pill, .toggle { border-color: #6B7A70; }
:root[data-theme="light"] .toggle { border-color: #8C9A90; }
.hero__note + .hero__note { margin-top: 6px; }
.circle.is-still { animation: none; transform: scale(.8); }
