/* Сантех Студія — лендінг. Кольори й шрифт ті самі, що в магазині (frontend/src/assets/styles/index.css). */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --t: «температура» регулятора, 0 = холодна (фіолетовий), 1 = гаряча (помаранчевий).
   Зареєстрована як число, щоб її можна було анімувати. */
@property --t {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.56;
}

:root {
  --violet: #8c52fe;
  --violet-deep: #7a3de8;
  --orange: #fc904f;
  --ink: #373d43;
  --mist: #f8f7ff;
  --night: #160a33;
  --night-2: #23104f;
  --rule: #e2d8ff;

  --pad: 32px;
  --radius: 32px;
}

@media (max-width: 760px) {
  :root {
    --pad: 16px;
    --radius: 24px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  max-width: 1264px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ───── Кнопки ───── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--hot {
  background: var(--orange);
  color: var(--night);
  box-shadow: 0 10px 30px rgba(252, 144, 79, 0.35);
}

.btn--hot:hover {
  background: #ffa268;
  box-shadow: 0 14px 40px rgba(252, 144, 79, 0.5);
}

.btn--glass {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn--glass:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

/* ───── Шапка: «плаваюча» скляна панель ───── */

.top {
  position: sticky;
  top: 12px;
  z-index: 20;
  height: 64px;
  margin: 12px auto -76px;
  max-width: calc(1264px - 2 * var(--pad));
  width: calc(100% - 2 * var(--pad));
  padding: 0 10px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: rgba(22, 10, 51, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(22, 10, 51, 0.25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 40px;
  height: 40px;
  display: block;
}

.nav {
  display: flex;
  gap: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.top__call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--night);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.top__call:hover {
  background: var(--orange);
}

.top__call-short {
  display: none;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .top__call-full {
    display: none;
  }

  .top__call-short {
    display: inline;
  }
}

/* ───── Hero ───── */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--night);
  border-radius: 0 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px);
  /* оголошено тут, а не в :root, щоб колір перераховувався разом із --t */
  --temp: color-mix(in oklab, var(--violet), var(--orange) calc(var(--t) * 100%));
}

@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: warm-up 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s backwards;
  }
}

@keyframes warm-up {
  from {
    --t: 0;
  }
}

/* світіння: постійне фіолетове зліва і «температурне» за регулятором */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 70% at 10% 0%, rgba(140, 82, 254, 0.55), transparent 70%),
    radial-gradient(46% 62% at 80% 58%, color-mix(in oklab, var(--temp), transparent 30%), transparent 72%),
    radial-gradient(40% 50% at 100% 100%, color-mix(in oklab, var(--temp), transparent 62%), transparent 70%);
}

/* плитка: тонка сітка, що проступає біля регулятора */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 76px 76px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(70% 85% at 78% 55%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 85% at 78% 55%, #000 10%, transparent 75%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  min-height: min(100svh, 860px);
  padding-block: 150px 96px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.875rem;
  font-weight: 600;
}

.chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(252, 144, 79, 0.25);
}

h1 {
  margin-top: 28px;
  font-size: clamp(2.5rem, 6.6vw, 5.75rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lede {
  max-width: 32em;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* ───── Регулятор температури ───── */

.dial-box {
  justify-self: center;
  text-align: center;
}

.dial {
  position: relative;
  width: min(440px, 36vw);
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dial:active {
  cursor: grabbing;
}

/* шкала з поділок: 270° від холодної до гарячої */
.dial__scale {
  opacity: 0.28;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 225deg, var(--violet) 0deg, var(--orange) 270deg, transparent 270deg);
  -webkit-mask-image:
    repeating-conic-gradient(from 225deg, #000 0deg 1.3deg, transparent 1.3deg 5deg),
    radial-gradient(closest-side, transparent 86%, #000 86.5%);
  mask-image:
    repeating-conic-gradient(from 225deg, #000 0deg 1.3deg, transparent 1.3deg 5deg),
    radial-gradient(closest-side, transparent 86%, #000 86.5%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* активна частина шкали */
.dial__fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask-image: conic-gradient(from 225deg, #000 calc(var(--t) * 270deg), transparent calc(var(--t) * 270deg));
  mask-image: conic-gradient(from 225deg, #000 calc(var(--t) * 270deg), transparent calc(var(--t) * 270deg));
}

.dial__fill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 225deg, var(--violet) 0deg, var(--orange) 270deg, transparent 270deg);
  -webkit-mask-image:
    repeating-conic-gradient(from 225deg, #000 0deg 1.3deg, transparent 1.3deg 5deg),
    radial-gradient(closest-side, transparent 86%, #000 86.5%);
  mask-image:
    repeating-conic-gradient(from 225deg, #000 0deg 1.3deg, transparent 1.3deg 5deg),
    radial-gradient(closest-side, transparent 86%, #000 86.5%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.dial__knob {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(150deg, #34197a, #170a38 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -18px 40px rgba(0, 0, 0, 0.35),
    0 30px 70px rgba(5, 0, 20, 0.6),
    0 0 110px color-mix(in oklab, var(--temp), transparent 45%);
}

/* позначка на ручці */
.dial__mark {
  position: absolute;
  inset: 0;
  transform: rotate(calc(-135deg + var(--t) * 270deg));
}

.dial__mark::before {
  content: '';
  position: absolute;
  top: 7%;
  left: 50%;
  width: 3.2%;
  height: 11%;
  margin-left: -1.6%;
  border-radius: 99px;
  background: var(--temp);
  box-shadow: 0 0 18px var(--temp);
}

.dial__temp {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: clamp(3.5rem, 8.4vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.dial__val {
  position: relative;
}

.dial__val sup {
  position: absolute;
  top: 0.35em;
  left: calc(100% + 0.2em);
  font-size: 0.3em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--temp);
}

/* справжній повзунок для клавіатури та скрінрідерів */
.dial__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.dial:has(.dial__input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 8px;
}

/* підказка стоїть у розриві шкали знизу */
.dial__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1%;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  pointer-events: none;
}

/* ───── Секції ───── */

.sec {
  padding-top: clamp(72px, 10vw, 136px);
}

.sec__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 24px 48px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.sec__head p {
  max-width: 30em;
  justify-self: end;
}

/* Каталог: три плитки різної ваги */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
}

.tile__icon {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile h3 {
  margin-top: 20px;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tile p {
  max-width: 26em;
  margin-top: 10px;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 32px 0 0;
}

.tags li {
  padding: 9px 18px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.tile--bath {
  grid-column: span 7;
  grid-row: span 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--rule), 0 24px 60px rgba(140, 82, 254, 0.1);
}

/* у великій плитці замість піктограми — змішувач із краплею */
.tile__art {
  position: absolute;
  top: clamp(20px, 3vw, 36px);
  right: clamp(16px, 3vw, 40px);
  width: clamp(120px, 17vw, 230px);
  height: auto;
  fill: none;
  stroke: var(--violet-deep);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile__art .drop {
  fill: var(--orange);
  stroke: none;
}

.tile--bath h3 {
  margin-top: 0;
  max-width: 9em;
}

.tile--bath p {
  max-width: 16em;
}

.tile--bath .tags {
  padding-top: clamp(72px, 9vw, 120px);
}

.tile--bath .tags {
  gap: 10px;
}

.tile--bath .tags li {
  padding: 12px 22px;
  border-color: var(--rule);
  background: var(--mist);
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tile--heat {
  grid-column: span 5;
  color: #fff;
  background: var(--night);
}

.tile--heat::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(252, 144, 79, 0.75), transparent 70%),
    radial-gradient(60% 80% at 0% 100%, rgba(140, 82, 254, 0.5), transparent 70%);
}

.tile--heat .tags li {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.tile--more {
  grid-column: span 5;
  color: #fff;
  background: var(--violet-deep);
}

.tile--more .tags li {
  border-color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 980px) {
  .tile--bath,
  .tile--heat,
  .tile--more {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* Як замовити: послідовність, тому з номерами і лінією */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 36px;
  counter-increment: step;
}

.steps li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: -40px;
  height: 3px;
  border-radius: 3px;
  background: var(--rule);
}

.steps li:last-child::before {
  right: 0;
}

.steps li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--c, var(--violet));
  box-shadow: 0 0 0 5px var(--mist);
}

.steps li:nth-child(1) {
  --c: #8c52fe;
}

.steps li:nth-child(2) {
  --c: #c06fb0;
}

.steps li:nth-child(3) {
  --c: #fc904f;
}

.steps__num::before {
  content: counter(step);
  display: block;
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--c);
}

.steps h3 {
  margin-top: 16px;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.steps p {
  margin-top: 8px;
  max-width: 24em;
}

@media (max-width: 760px) {
  .sec__head {
    grid-template-columns: 1fr;
  }

  .sec__head p {
    justify-self: start;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    padding: 0 0 32px 36px;
  }

  .steps li:last-child {
    padding-bottom: 0;
  }

  .steps li::before {
    top: 6px;
    bottom: -6px;
    left: 6px;
    right: auto;
    width: 3px;
    height: auto;
  }

  .steps li:last-child::before {
    display: none;
  }

  .steps__num::before {
    font-size: 3.5rem;
  }

  .steps h3 {
    margin-top: 8px;
  }
}

/* Контакти */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(32px, 6vw, 88px);
  border-radius: clamp(28px, 4vw, 56px);
  color: #fff;
  background: var(--night);
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 90% at 100% 100%, rgba(252, 144, 79, 0.85), transparent 70%),
    radial-gradient(60% 90% at 0% 0%, rgba(140, 82, 254, 0.8), transparent 70%);
}

.contact h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -0.03em;
}

.bigphone {
  display: inline-block;
  margin-top: 16px;
  font-size: clamp(2rem, 8.4vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.bigphone:hover {
  color: var(--orange);
}

.contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(32px, 5vw, 64px);
}

.contact address {
  font-style: normal;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}

.contact address a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.contact address a:hover {
  text-decoration-color: var(--orange);
}

.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}

.socials a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.socials a:hover {
  border-color: #fff;
  background: #fff;
  color: var(--night);
}

.contact .actions {
  margin-top: 0;
}

/* Футер */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 32px 40px;
  font-size: 0.9375rem;
  color: #6b6f76;
}

/* ───── Мобільний ───── */

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-block: 124px 56px;
  }

  .dial {
    width: min(300px, 72vw);
  }

  .hero::before {
    background:
      radial-gradient(90% 50% at 0% 0%, rgba(140, 82, 254, 0.55), transparent 70%),
      radial-gradient(80% 45% at 50% 82%, color-mix(in oklab, var(--temp), transparent 30%), transparent 72%);
  }

  .hero::after {
    -webkit-mask-image: radial-gradient(90% 45% at 50% 80%, #000 10%, transparent 75%);
    mask-image: radial-gradient(90% 45% at 50% 80%, #000 10%, transparent 75%);
  }
}

@media (max-width: 480px) {
  /* дзвінок на всю ширину, месенджери поруч під ним */
  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .actions .btn {
    padding-inline: 12px;
  }

  .actions .btn--hot {
    grid-column: 1 / -1;
  }

  .tags li,
  .tile--bath .tags li {
    font-size: 0.9375rem;
    padding: 8px 14px;
  }
}

/* ───── 404 ───── */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--pad);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(60% 60% at 15% 0%, rgba(140, 82, 254, 0.6), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(252, 144, 79, 0.55), transparent 70%),
    var(--night);
}

.lost h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
}

.lost p {
  margin: 20px 0 32px;
  color: rgba(255, 255, 255, 0.82);
}
