/* ==========================================================================
   Клиника косметологических технологий
   Система зафиксирована в DESIGN.md. Якоря: фарма-графика Geigy + клиническая
   упаковка ухода. Доминирующий чернильно-синий, коралловый только на действие.
   ========================================================================== */

:root {
  --ink:        #101A33;
  --ink-deep:   #0A1124;
  --bone:       #EFEBE3;
  --bone-dim:   rgba(239, 235, 227, .62);
  --bone-line:  rgba(239, 235, 227, .16);
  --coral:      #FF5A3C;
  --steel:      #8FA0C4;

  --f-head: 'Oswald', 'Arial Narrow', sans-serif;
  --f-body: 'Golos Text', system-ui, sans-serif;

  --gut: clamp(18px, 4.4vw, 68px);
  --ease: cubic-bezier(.16, .84, .28, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.58;
  overflow-x: hidden;
}

h1, h2, h3, .num {
  font-family: var(--f-head);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.015em;
  text-transform: uppercase;
}

a { color: inherit; }
.wrap { padding-inline: var(--gut); }
.tag {
  font-family: var(--f-head); font-weight: 500; font-size: 13px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--steel);
}

/* --- Шапка --------------------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px var(--gut);
  background: var(--ink-deep);
  border-bottom: 1px solid var(--bone-line);
}
.bar__mark { font-family: var(--f-head); font-weight: 600; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; }
.bar__mark i { color: var(--coral); font-style: normal; }
.bar__nav { display: flex; gap: 26px; }
.bar__nav a { text-decoration: none; }
.bar__nav a:hover { color: var(--coral); }
@media (max-width: 900px) { .bar__nav { display: none; } }
.bar__tel { text-decoration: none; white-space: nowrap; }

/* --- Герой --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(44px, 7vw, 96px) clamp(36px, 5vw, 72px); }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: repeating-linear-gradient(-58deg, transparent 0 26px, rgba(143,160,196,.09) 26px 27px);
}
.hero__in { position: relative; display: grid; gap: 34px; }
@media (min-width: 980px) {
  .hero__in { grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: clamp(30px, 4vw, 70px); align-items: end; }
}
.hero h1 { font-size: clamp(52px, 11.2vw, 168px); }
.hero h1 i { font-style: normal; color: var(--coral); }
.hero__sub { margin-top: 24px; max-width: 44ch; color: var(--bone-dim); font-size: clamp(16px, 1.5vw, 19px); }

.facts { display: grid; gap: 22px; align-content: end; }
.facts div { border-top: 1px solid var(--bone-line); padding-top: 12px; }
.facts b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 40px; line-height: .95; }
.facts span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--steel); }

/* --- Направления --------------------------------------------------------- */
.dirs { background: var(--bone); color: var(--ink); padding-inline: var(--gut); }
.dirs__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-block: clamp(44px, 6vw, 84px) 26px; }
.dirs__head h2 { font-size: clamp(30px, 4.6vw, 62px); }
.dirs__head .tag { color: #5D6B8C; }

.row {
  display: grid; gap: 14px 30px; padding-block: clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(16,26,51,.16);
  transition: background .3s var(--ease), color .3s var(--ease), padding-inline .3s var(--ease);
}
@media (min-width: 980px) {
  .row { grid-template-columns: 132px minmax(0, 6fr) minmax(0, 4fr); align-items: start; }
}
.row:last-of-type { border-bottom: 1px solid rgba(16,26,51,.16); }
.row:hover { background: var(--ink); color: var(--bone); padding-inline: 18px; }
.row:hover .row__num { color: var(--coral); }
.row:hover .row__spec, .row:hover .row__spec div { border-color: var(--bone-line); }
.row:hover .row__spec dt { color: var(--steel); }

.row__num { font-family: var(--f-head); font-weight: 600; font-size: clamp(46px, 6vw, 82px); line-height: .8; color: rgba(16,26,51,.24); transition: color .3s var(--ease); }
.row__name { font-size: clamp(24px, 3vw, 40px); }
.row__txt { margin-top: 10px; max-width: 50ch; opacity: .78; font-size: 16px; }
.row__spec { display: grid; align-self: start; border-top: 1px solid rgba(16,26,51,.16); }
.row__spec div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; }
.row__spec dt { font-size: 13px; color: #5D6B8C; }
.row__spec dd { font-family: var(--f-head); font-weight: 500; font-size: 15px; letter-spacing: .04em; text-align: right; }

/* --- Протокол ------------------------------------------------------------ */
.proto { padding-block: clamp(52px, 7vw, 100px); }
.proto__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 34px; }
.proto__head h2 { font-size: clamp(30px, 4.6vw, 62px); }
.steps { display: grid; gap: 0; }
.step { display: grid; gap: 10px 28px; padding-block: 24px; border-top: 1px solid var(--bone-line); }
@media (min-width: 820px) { .step { grid-template-columns: 96px 1fr 190px; align-items: baseline; } }
.step:last-child { border-bottom: 1px solid var(--bone-line); }
.step__n { font-family: var(--f-head); font-weight: 600; font-size: 34px; color: var(--coral); line-height: .9; }
.step h3 { font-size: 21px; }
.step p { color: var(--bone-dim); max-width: 54ch; margin-top: 6px; font-size: 16px; }
.step__t { font-size: 14px; color: var(--steel); }

/* --- Заявка -------------------------------------------------------------- */
.form-sec { background: var(--coral); color: #22110C; padding-block: clamp(48px, 7vw, 96px); }
.form-sec__in { display: grid; gap: 36px; }
@media (min-width: 980px) { .form-sec__in { grid-template-columns: minmax(0,5fr) minmax(0,4fr); gap: clamp(36px,5vw,86px); } }
.form-sec h2 { font-size: clamp(32px, 5.4vw, 76px); }
.form-sec .tag { color: rgba(34,17,12,.62); }
.form-sec__lead { margin-top: 16px; max-width: 40ch; color: rgba(34,17,12,.8); }

.form { display: grid; gap: 15px; }
.f { display: grid; gap: 6px; }
.f label { font-family: var(--f-head); font-weight: 500; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(34,17,12,.7); }
.f input, .f select {
  background: transparent; border: 0; border-bottom: 2px solid rgba(34,17,12,.3);
  padding: 12px 0; font-size: 17px; border-radius: 0; min-height: 44px;
  transition: border-color .2s var(--ease);
}
.f input:focus-visible, .f select:focus-visible { outline: 0; border-bottom-color: #22110C; }
.f select option { background: var(--bone); color: var(--ink); }
.err { font-size: 13.5px; color: #5E1608; min-height: 1.15em; }

.send {
  margin-top: 6px; background: var(--ink); color: var(--bone); border: 0; cursor: pointer;
  padding: 18px 30px; min-height: 44px;
  font-family: var(--f-head); font-weight: 500; font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  transition: background .2s var(--ease);
}
.send:hover:not(:disabled) { background: var(--ink-deep); }
.send:disabled { opacity: .6; cursor: progress; }
.note { font-size: 13.5px; color: rgba(34,17,12,.66); }
.note a { color: #22110C; }
.done { font-family: var(--f-head); font-weight: 500; font-size: 26px; line-height: 1.15; text-transform: uppercase; }

/* --- Подвал -------------------------------------------------------------- */
.foot { background: var(--ink-deep); padding-block: 30px 40px; display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; }

/* --- Появление ----------------------------------------------------------- */
.rise > * { opacity: 0; transform: translateY(18px); }
.rise.on > * { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rise.on > *:nth-child(2) { transition-delay: .06s; }
.rise.on > *:nth-child(3) { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .rise > * { opacity: 1; transform: none; } }

/* --- Доступность --------------------------------------------------------- */
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.form-sec :where(a, button, input, select):focus-visible { outline-color: #22110C; }
.skip { position: absolute; left: -9999px; background: var(--coral); color: #22110C; padding: 12px 18px; z-index: 100; }
.skip:focus { left: 0; }
:where(#napravleniya, #protokol, #zayavka) { scroll-margin-top: 72px; }

/* Плейсхолдер на коралловом: контраст, а не бледная подсказка */
.f input::placeholder { color: rgba(34,17,12,.5); opacity: 1; }
