/* OmVibra App - przestrzeń częstotliwości */

:root {
  --gold: #B8A46A;
  --cta: #A9704F;
  --cta-hover: #9D6647;
  --text: #30302A;
  --muted: #77736C;
  --bg: #F7F1E8;
  --bg-card: #FFFFFF;
  --bg-warm: #F1E9DF;
  --line: #E3DDD3;
  --r-card: 18px;
  --r-pill: 999px;
  --tabbar-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
}

img {
  max-width: 100%;
}

a {
  color: var(--cta);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 12px;
  z-index: 40;
  padding: 8px 12px;
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.brand__name {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand__sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.top__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.install {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--cta);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--cta);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
}

.install:hover,
.install:focus-visible {
  background: var(--bg-warm);
}

.install--block {
  width: 100%;
  max-width: 320px;
  height: 48px;
  margin: 8px 0 0;
  background: var(--cta);
  color: #fff;
  border-color: var(--cta);
  font-size: 12px;
}

.install--block:hover,
.install--block:focus-visible {
  background: var(--cta-hover);
}

body.is-standalone .install {
  display: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-b) + 16px);
  background: rgba(48, 48, 42, 0.28);
}

.sheet[hidden] {
  display: none;
}

.sheet__card {
  width: min(440px, 100%);
  padding: 28px 24px 20px;
  border-radius: var(--r-card);
  background: #fff;
  text-align: center;
}

.sheet__lead {
  margin: 0 0 20px;
  color: var(--muted);
}

.sheet .btn {
  width: 100%;
  margin-bottom: 4px;
}

.sheet .btn[hidden] {
  display: none;
}

.top__shop {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cta);
  text-decoration: none;
}

.view {
  display: none;
  padding: 8px 22px 32px;
}

.view.is-active {
  display: block;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 8px auto 8px;
  width: min(360px, 100%);
  aspect-ratio: 1;
}

#viz {
  width: 100%;
  height: 100%;
}

.hz {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.hz__value {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(52px, 14vw, 72px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hz__unit {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.hz__name {
  margin: 10px 0 0;
  max-width: 200px;
  font-size: 13px;
  color: var(--muted);
}

.panel {
  max-width: 520px;
  margin: 0 auto;
}

.play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  margin: 8px 0 28px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--cta);
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.play:hover,
.play:focus-visible {
  background: var(--cta-hover);
}

.play.is-on {
  background: var(--text);
}

.play__icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}

.play.is-on .play__icon {
  width: 11px;
  height: 11px;
  border: 0;
  background: #fff;
}

.field {
  margin-bottom: 22px;
}

.field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.hz-row {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 12px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cta);
}

input[type="number"],
input[type="search"],
select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}

.chips,
.waves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip,
.wave {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 13px;
}

.chip.is-on,
.wave.is-on {
  border-color: var(--cta);
  background: var(--bg-warm);
  color: var(--cta);
}

.hint,
.timer {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.view-head {
  max-width: 640px;
  margin: 12px auto 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

h1 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 400;
  line-height: 1.15;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
}

.search {
  display: block;
}

.group {
  max-width: 720px;
  margin: 0 auto 36px;
}

.group__head {
  margin-bottom: 14px;
}

.group__title {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
}

.group__intro {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.layer {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cta);
  font-weight: 500;
}

.tone,
.seq-card {
  width: 100%;
  margin: 0 0 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-card);
  text-align: left;
  cursor: pointer;
}

.tone:hover,
.seq-card:hover,
.tone:focus-visible,
.seq-card:focus-visible {
  border-color: var(--gold);
}

.tone__top,
.seq-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.tone__name,
.seq-card__name {
  font-size: 16px;
  font-weight: 400;
}

.tone__hz {
  font-variant-numeric: tabular-nums;
  color: var(--cta);
  font-size: 14px;
}

.tone__note,
.seq-card__blurb {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.seq-player {
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--bg-card);
  border: 1px solid var(--line);
  text-align: center;
}

.seq-player__name {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
}

.seq-player__step {
  margin: 8px 0 16px;
  color: var(--muted);
}

.seq-player__bar {
  height: 3px;
  margin-bottom: 18px;
  background: var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.seq-player__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cta);
}

.seq-player__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--cta);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.text-btn {
  margin-top: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
}

.prose {
  max-width: 640px;
  margin: 0 auto;
}

.prose h2 {
  margin: 32px 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 400;
}

/* podpoziomy w O aplikacji: Fakt, Historia, Tradycja, Doświadczenie */
.prose h3 {
  margin: 24px 0 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
  font-weight: 500;
}

.closing {
  margin-top: 36px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  color: var(--text) !important;
  font-style: italic;
}

/* podpis marki pod tekstem O aplikacji */
.signoff {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signoff a {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
}

.signoff span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #fff;
  border-top: 1px solid var(--line);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tab.is-active {
  color: var(--cta);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  z-index: 30;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: #F1E9DF;
  font-size: 14px;
  transform: translateX(-50%);
}

@media (min-width: 900px) {
  .top {
    padding: 28px 48px 0;
  }

  #view-generator.is-active {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    min-height: calc(100dvh - 140px);
    padding: 24px 48px 48px;
  }

  .stage {
    width: min(460px, 100%);
  }

  .view:not(#view-generator) {
    padding: 24px 48px 48px;
  }
}
