:root{
  --brand-turquoise: #2AB7C1;
  --brand-graphite: #1D1D1D;
  --brand-milk: #EEEEEE;
  --brand-white: #FAFAFA;
  --brand-azure: #7BBFC2;

  --text: rgba(29,29,29,.96);
  --muted: rgba(29,29,29,.62);
  --stroke: rgba(42,183,193,.22);
  --stroke-strong: rgba(42,183,193,.34);
  --surface: rgba(255,255,255,.46);
  --surface-strong: rgba(255,255,255,.68);
  --error-bg: rgba(255,255,255,.78);
  --error-border: rgba(42,183,193,.18);

  --radius-card: 24px;
  --radius-control: 22px;
  --shadow-card: 0 20px 60px rgba(42,183,193,.14), 0 10px 28px rgba(29,29,29,.07);

  --stage-pad-x: clamp(14px, 2.2vw, 32px);
  --stage-pad-y: clamp(18px, 2.6vh, 32px);

  --card-pad-x: clamp(18px, 3.2vw, 48px);
  --card-pad-y: clamp(22px, 3.2vw, 44px);

  --card-max-width: 1080px;
  --stack-gap: clamp(18px, 2vw, 26px);

  --px: 0px;
  --py: 0px;
  --ax: 0px;
  --ay: 0px;
}

*{ box-sizing:border-box; }
html,body{
  height:100%;
  margin:0;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #dff7fa;
  color: var(--text);
  overflow: hidden;
}
body{
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.stage{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--stage-pad-y) var(--stage-pad-x);
  overflow: hidden;
  isolation: isolate;
}

.bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  transform: translate3d(0,0,0);
}

.bg__base{
  position:absolute;
  inset:-12%;
  background:
    radial-gradient(900px 740px at calc(10% + var(--px)*0.35) calc(12% + var(--py)*0.35), rgba(42,183,193,.92), transparent 45%),
    radial-gradient(700px 620px at calc(88% + var(--px)*0.35) calc(14% + var(--py)*0.35), rgba(62,183,232,.78), transparent 42%),
    radial-gradient(860px 760px at calc(18% + var(--px)*0.28) calc(88% + var(--py)*0.28), rgba(42,183,193,.70), transparent 42%),
    radial-gradient(700px 620px at calc(80% + var(--px)*0.26) calc(82% + var(--py)*0.26), rgba(255,255,255,.92), transparent 44%),
    radial-gradient(980px 800px at calc(52% + var(--px)*0.18) calc(52% + var(--py)*0.18), rgba(205,243,247,.88), transparent 58%),
    linear-gradient(180deg, #dff7fa 0%, #eefcfd 100%);
  filter: saturate(1.06) brightness(1.03) contrast(1.02);
}

.bg__blobs{
  position:absolute;
  inset:-10%;
  transform: translate3d(calc(var(--px)*0.85 + var(--ax)), calc(var(--py)*0.85 + var(--ay)), 0);
  will-change: transform;
}

.blob{
  position:absolute;
  border-radius:999px;
  filter: blur(12px);
  opacity:.82;
  mix-blend-mode: screen;
}
.b1{ width:32vw; height:32vw; left:-8vw; top:-8vw; background: rgba(42,183,193,.36); }
.b2{ width:24vw; height:24vw; right:-4vw; top:0vw; background: rgba(123,191,194,.42); }
.b3{ width:20vw; height:20vw; left:12vw; top:18vh; background: rgba(255,255,255,.40); }
.b4{ width:22vw; height:22vw; right:24vw; bottom:16vh; background: rgba(42,183,193,.20); }
.b5{ width:26vw; height:26vw; left:-6vw; bottom:-8vw; background: rgba(42,183,193,.30); }
.b6{ width:24vw; height:24vw; right:4vw; bottom:-6vw; background: rgba(255,255,255,.44); }

.bg__caustics{
  position:absolute;
  inset:-18%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.22), transparent 20%),
    radial-gradient(circle at 72% 22%, rgba(255,255,255,.18), transparent 18%),
    radial-gradient(circle at 58% 70%, rgba(255,255,255,.14), transparent 14%),
    radial-gradient(circle at 28% 82%, rgba(255,255,255,.16), transparent 16%);
  filter: blur(24px) saturate(1.1);
  opacity:.88;
}

.bg__grain{
  position:absolute;
  inset:0;
  opacity:.035;
  background:
    repeating-linear-gradient(0deg, rgba(29,29,29,.08) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(29,29,29,.06) 0 1px, transparent 1px 4px);
  pointer-events:none;
}

.card{
  width: min(var(--card-max-width), calc(100vw - (var(--stage-pad-x) * 2)));
  max-height: calc(100dvh - (var(--stage-pad-y) * 2));
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,.22));
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-inner{
  max-height: calc(100dvh - (var(--stage-pad-y) * 2) - 2px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--card-pad-y) var(--card-pad-x);
  display: grid;
  gap: var(--stack-gap);
  scrollbar-gutter: stable;
}

.brand .title{
  display:grid;
  gap: 14px;
}
.brand h1{
  margin:0;
  max-width: none;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: .2px;
  font-size: clamp(26px, 3.2vw, 44px);
}
.brand p{
  margin:0;
  max-width: 860px;
  color: var(--muted);
  line-height: 1.45;
  font-size: clamp(16px, 1.7vw, 22px);
}

.card[data-screen="screen-2"] .brand,
.card[data-screen="screen-2-1"] .brand{
  display: none;
}

.card[data-screen="screen-0"]{
  overflow: visible;
}

.card[data-screen="screen-0"] .card-inner{
  max-height: none;
  overflow: visible;
}

.card[data-screen="screen-0"] .branch-picker__dropdown{
  z-index: 80;
}


.screen{
  display:none;
  opacity:0;
  transform: translateY(10px);
  transition: opacity .24s ease, transform .24s ease;
}
.screen.active{
  display:block;
  opacity:1;
  transform: translateY(0);
}

.section-title{
  margin: 0 0 12px 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-size: clamp(18px, 2.2vw, 34px);
}
.section-title--center{ text-align:center; }

.hint{
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: clamp(14px, 1.4vw, 20px);
}
.hint--center{ text-align:center; }
.hint--left{ text-align:left; }
.hint--small{ font-size: clamp(14px, 1.25vw, 18px); }

.intro-block{
  display:grid;
  gap: 12px;
}
.intro-block--center{
  max-width: 720px;
  margin: 0 auto;
}
.intro-block__text{
  max-width: 640px;
  margin-inline: auto;
}

.branch-picker{
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
}
.branch-picker__label{
  display:block;
  margin-bottom: 10px;
}
.branch-picker__control{
  position: relative;
  display:flex;
  align-items:center;
  min-height: 72px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.branch-picker.is-open .branch-picker__control,
.branch-picker.is-focused .branch-picker__control{
  border-color: var(--stroke-strong);
  box-shadow: 0 0 0 4px rgba(42,183,193,.12);
  background: rgba(255,255,255,.76);
}
.branch-picker__search-icon{
  position:absolute;
  left: 20px;
  width: 20px;
  height: 20px;
  color: rgba(29,29,29,.48);
  pointer-events:none;
}
.branch-picker__input{
  width:100%;
  min-width: 0;
  border:0;
  background: transparent;
  color: var(--text);
  padding: 20px 64px 20px 54px;
  font: inherit;
  font-size: 18px;
  line-height: 1.3;
  outline: none;
}
.branch-picker__input::placeholder{
  color: rgba(29,29,29,.40);
}
.branch-picker__toggle{
  position:absolute;
  right: 12px;
  top:50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border:0;
  border-radius: 16px;
  background: rgba(255,255,255,.64);
  color: rgba(29,29,29,.78);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: background .16s ease, transform .16s ease;
}
.branch-picker__toggle svg{
  width: 18px;
  height: 18px;
}
.branch-picker.is-open .branch-picker__toggle{
  transform: translateY(-50%) rotate(180deg);
  background: rgba(232,251,253,.90);
}

.branch-picker__dropdown{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 10px);
  z-index: 30;
  border-radius: 24px;
  border: 1px solid rgba(42,183,193,.24);
  background: rgba(250,250,250,.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 46px rgba(29,29,29,.10), 0 12px 22px rgba(42,183,193,.12);
  overflow: hidden;
}
.branch-picker__meta{
  padding: 14px 18px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(29,29,29,.56);
  border-bottom: 1px solid rgba(42,183,193,.10);
}
.branch-picker__list{
  list-style:none;
  margin:0;
  padding: 8px;
  max-height: min(340px, 42dvh);
  overflow:auto;
}
.branch-option{
  display:grid;
  gap: 4px;
  width:100%;
  text-align:left;
  padding: 14px 14px;
  border:0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  cursor:pointer;
  transition: background .14s ease, transform .14s ease;
}
.branch-option:hover,
.branch-option.is-active{
  background: rgba(232,251,253,.90);
}
.branch-option__title{
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.branch-option__sub{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(29,29,29,.58);
}
.branch-option--empty{
  cursor: default;
}
.branch-option--empty:hover{
  background: transparent;
}

.selected-branch{
  width: min(760px, 100%);
  display:grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.42);
  margin: 0 auto 18px;
}
.selected-branch--compact{
  width: fit-content;
  min-width: min(520px, 100%);
}
.selected-branch--left{
  margin-left: 0;
  margin-right: auto;
}
.selected-branch--center{
  text-align: center;
}
.selected-branch__label{
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(29,29,29,.52);
}
.selected-branch__value{
  font-size: clamp(15px, 1.55vw, 18px);
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}
.selected-branch__action{
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--brand-turquoise);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.selected-branch--left .selected-branch__action{
  justify-self: start;
}

#screen-3 form{ margin-top: 22px; }
#screen-3 .section-title{ margin-bottom: 8px; }
#screen-3 .hint{ margin-bottom: 0; }

.rating{
  display:flex;
  flex-wrap: nowrap;
  align-items:center;
  justify-content:center;
  gap: clamp(8px, 1.6vw, 24px);
  padding: 6px 0 2px;
  overflow: hidden;
}
.rate-item{
  width: clamp(50px, 8vw, 96px);
  height: clamp(50px, 8vw, 96px);
  display:grid;
  place-items:center;
  user-select:none;
  flex: 0 0 auto;
}
.rate-item input{ display:none; }
.rate-item span{
  font-size: clamp(34px, 5.2vw, 68px);
  filter: grayscale(100%);
  opacity:.78;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease, text-shadow .18s ease;
  will-change: transform;
  cursor: pointer;
}
@media (hover:hover) and (pointer:fine){
  .rate-item span:hover{
    transform: translateY(-2px) scale(1.12);
    filter: grayscale(0) saturate(1.15);
    opacity: 1;
  }
}
.rate-item input:checked + span{
  transform: translateY(-2px) scale(1.14);
  filter: grayscale(0) saturate(1.18);
  opacity: 1;
  text-shadow: 0 0 18px rgba(42,183,193,.18);
}

.btns{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  margin-top: 16px;
}
.btn{
  appearance:none;
  border:none;
  cursor:pointer;
  border-radius: 22px;
  padding: 20px 20px;
  font-weight: 700;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text);
  background: rgba(255,255,255,.52);
  border: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-decoration:none;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.72);
  border-color: var(--stroke-strong);
  box-shadow: 0 12px 28px rgba(42,183,193,.10);
}
.btn.primary{ background: rgba(232,251,253,.72); }
.btn.ghost{ background: rgba(255,255,255,.42); }
.btn.small{
  padding: 14px 22px;
  font-size: clamp(16px, 1.35vw, 18px);
}
.btn:disabled{
  cursor: default;
  opacity: .54;
  transform: none;
  box-shadow: none;
}
.btn .icon{
  width: 38px;
  height: 38px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(42,183,193,.18);
  font-size: 16px;
  font-weight: 800;
}
.footer-actions{
  display:flex;
  gap:12px;
  justify-content:flex-end;
  flex-wrap:wrap;
  padding-top: 8px;
}
.footer-actions--center{ justify-content:center; }
.footer-actions--wide .btn{
  min-width: min(280px, 100%);
}

.info-box{
  width: min(560px, 100%);
  margin: 8px auto 0;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.50);
  text-align:center;
}
.info-box__text{
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
}

form{
  display:grid;
  gap: 18px;
}
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.field{ display:grid; gap: 10px; }
.label{
  font-size: 13px;
  color: rgba(29,29,29,.84);
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
}

.control,
select,
textarea{
  width:100%;
  border-radius: var(--radius-control);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.52);
  color: var(--text);
  padding: 16px 18px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.35;
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.control::placeholder,
textarea::placeholder{
  color: rgba(29,29,29,.38);
}
.control:focus,
select:focus,
textarea:focus{
  border-color: var(--stroke-strong);
  box-shadow: 0 0 0 4px rgba(42,183,193,.12);
  background: rgba(255,255,255,.74);
}

textarea{
  min-height: 160px;
  max-height: 260px;
  resize: vertical;
}

select{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding-right: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 18px center;
  background-size:18px 18px;
}

.phone-wrap{
  display:flex;
  align-items:stretch;
  gap: 10px;
}
.prefix{
  display:grid;
  place-items:center;
  min-width: 78px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.52);
  font-weight: 800;
}

.file-input{ display:none; }
.file-box{
  display:flex;
  align-items:center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.52);
  cursor: pointer;
}
.file-box__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(232,251,253,.90);
  border: 1px solid rgba(42,183,193,.16);
  font-weight: 700;
  white-space: nowrap;
}
.file-box__text{
  color: rgba(29,29,29,.72);
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

.error{
  display:none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}
.error.show{ display:block; }

.consent-text{ margin-top: 0; }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  opacity:0;
  pointer-events:none;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(29,29,29,.92);
  color: rgba(255,255,255,.96);
  font-size: 13px;
  font-weight: 700;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1000;
}
.toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px){
  .card{ width: min(var(--card-max-width), calc(100vw - (var(--stage-pad-x) * 2))); }
  .brand h1{ max-width: none; }
  .brand p{ max-width: 760px; }
  .branch-picker__dropdown{
    top: calc(100% + 8px);
  }
}

@media (max-width: 720px){
  :root{
    --stage-pad-x: 10px;
    --stage-pad-y: 10px;
    --card-pad-x: 16px;
    --card-pad-y: 18px;
    --stack-gap: 18px;
  }

  .brand h1{
    max-width: none;
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.08;
  }
  .brand p{
    max-width: none;
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.42;
  }
  .section-title{
    font-size: clamp(24px, 7.4vw, 30px);
  }
  .hint{
    font-size: clamp(15px, 4.9vw, 18px);
  }
  .grid,
  .btns{
    grid-template-columns: 1fr;
  }
  .footer-actions{
    justify-content: stretch;
  }
  .footer-actions .btn{
    width: 100%;
  }
  .phone-wrap{ gap: 8px; }
  .prefix{ min-width: 66px; }
  .control,
  select,
  textarea{
    font-size: 16px;
    padding: 15px 16px;
  }
  .file-box{
    align-items:flex-start;
    flex-direction:column;
  }
  .file-box__button{
    min-height: 44px;
  }
  .rating{
    gap: 8px;
    padding-top: 2px;
  }
  .rate-item{
    width: clamp(42px, 15vw, 60px);
    height: clamp(42px, 15vw, 60px);
  }
  .rate-item span{
    font-size: clamp(30px, 10vw, 44px);
  }

  .branch-picker__control{
    min-height: 66px;
    border-radius: 22px;
  }
  .branch-picker__input{
    font-size: 16px;
    padding: 18px 56px 18px 48px;
  }
  .branch-picker__search-icon{
    left: 18px;
    width: 18px;
    height: 18px;
  }
  .branch-picker__toggle{
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }
  .branch-picker__list{
    max-height: min(280px, 36dvh);
  }
  .branch-option{
    padding: 13px 12px;
  }
  .selected-branch{
    padding: 14px 16px;
    gap: 6px;
  }
  .selected-branch--compact{
    width: 100%;
    min-width: 0;
  }
  .selected-branch__value{
    font-size: 15px;
  }
}

@media (max-height: 740px){
  :root{
    --card-pad-y: clamp(16px, 2.2vw, 30px);
    --stack-gap: 16px;
  }
  .brand .title{ gap: 10px; }
  .brand p{ font-size: clamp(15px, 1.6vw, 20px); }
  .branch-picker__list{
    max-height: min(260px, 32dvh);
  }
}
