@font-face {
  font-family: "Onest";
  src: url("assets/onest-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --navy: #071f3f;
  --deep: #04162d;
  --aqua: #66d4d2;
  --aqua-dark: #147586;
  --mist: #edf4f7;
  --white: #ffffff;
  --ink: #102943;
  --muted: #52687a;
  --line: rgba(7, 31, 63, 0.18);
  --line-dark: rgba(255, 255, 255, 0.24);
  --shell: min(100% - 48px, 1240px);
  --font: "Onest", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--deep);
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--white);
  font: 400 16px/1.6 var(--font);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--deep);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
  min-height: 88px;
  padding-inline: max(24px, calc((100vw - 1360px) / 2));
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 150px;
  height: auto;
}

.brand span {
  max-width: 90px;
  padding-left: 18px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.site-nav a {
  padding-block: 12px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--aqua-dark);
  border-color: currentColor;
}

.header-call {
  display: flex;
  flex-direction: column;
  padding: 11px 16px;
  color: var(--white);
  background: var(--navy);
  text-decoration: none;
}

.header-call small {
  color: var(--aqua);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-call strong {
  font-size: 0.9rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(460px, 0.98fr);
  min-height: calc(100svh - 88px);
  color: var(--white);
  background: var(--navy);
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-inline-size: 0;
  padding: clamp(70px, 9vw, 132px) clamp(28px, 7vw, 112px);
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 30px;
  font-size: clamp(3.6rem, 6.8vw, 6rem);
  font-weight: 690;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.hero h1 span {
  color: var(--aqua);
}

.hero__lead {
  max-width: 48ch;
  margin-bottom: 0;
  color: #c6dbe6;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-weight: 720;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button--primary {
  color: var(--navy);
  background: var(--aqua);
}

.button--primary:hover {
  background: var(--white);
}

.button--secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.54);
}

.button--secondary:hover {
  color: var(--navy);
  background: var(--white);
}

.button--light {
  margin-top: 16px;
  color: var(--navy);
  background: var(--aqua);
}

.button--light:hover {
  background: var(--white);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 46px;
  padding-top: 20px;
  color: #c6dbe6;
  border-top: 1px solid var(--line-dark);
  font-size: 0.78rem;
}

.hero__facts span + span::before {
  margin-right: 24px;
  color: var(--aqua);
  content: "/";
}

.hero__portrait {
  position: relative;
  min-inline-size: 0;
  min-height: 720px;
  overflow: hidden;
  margin: 0;
  background: var(--deep);
}

.hero__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__image::before,
.hero__image::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.hero__image::before {
  background: linear-gradient(90deg, rgba(4, 22, 45, 0.36), transparent 32%, transparent 72%, rgba(4, 22, 45, 0.18));
}

.hero__image::after {
  background: linear-gradient(180deg, rgba(4, 22, 45, 0.55), transparent 36%, rgba(4, 22, 45, 0.1) 70%, rgba(4, 22, 45, 0.5));
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(1.24);
  transform-origin: 50% 32%;
}

.hero__trace {
  position: absolute;
  z-index: 2;
  right: -2%;
  bottom: 9%;
  left: -2%;
  width: 104%;
  color: var(--aqua);
}

.hero__trace path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

.motion-ready .hero__trace path {
  animation: draw-trace 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) 280ms forwards;
}

@keyframes draw-trace {
  to {
    stroke-dashoffset: 0;
  }
}

.hero__portrait figcaption {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 4vw, 54px);
  bottom: clamp(24px, 5vw, 64px);
  left: clamp(20px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  max-width: 520px;
  padding: 22px 24px;
  color: var(--navy);
  background: var(--aqua);
}

.hero__portrait figcaption span {
  margin-bottom: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__portrait figcaption strong {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.hero__portrait figcaption small {
  margin-top: 5px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.team-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: clamp(24px, 5vw, 74px);
  align-items: end;
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(88px, 11vw, 160px) clamp(56px, 7vw, 92px);
}

.team-intro h2,
.services h2,
.method h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 5.2vw, 5.6rem);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.team-intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.doctor-story {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: stretch;
  width: var(--shell);
  margin-inline: auto;
  padding-bottom: clamp(64px, 9vw, 128px);
}

.doctor-story--ivashchuk {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
}

.doctor-story__media {
  position: relative;
  min-inline-size: 0;
  min-height: 620px;
  overflow: hidden;
  margin: 0;
  background: var(--mist);
}

.doctor-story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-story--pasichnyk .doctor-story__media img {
  object-position: 50% 18%;
  transform: scale(1.05);
  transform-origin: 50% 18%;
}

.doctor-story--ivashchuk .doctor-story__media img {
  object-position: 50% 20%;
}

.doctor-story__media figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 10px 13px;
  color: var(--navy);
  background: var(--aqua);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doctor-story__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-inline-size: 0;
  padding: clamp(40px, 6vw, 88px);
  color: var(--white);
  background: var(--navy);
}

.doctor-story--ivashchuk .doctor-story__copy {
  color: var(--ink);
  background: var(--mist);
}

.doctor-story__copy h2 {
  max-width: 13ch;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4.1vw, 4.6rem);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.doctor-story__role {
  margin-bottom: 26px;
  color: var(--aqua);
  font-size: 1.05rem;
  font-weight: 620;
}

.doctor-story--ivashchuk .doctor-story__role {
  color: var(--aqua-dark);
}

.doctor-story__copy > p:last-of-type {
  max-width: 47ch;
  color: #c6dbe6;
}

.doctor-story--ivashchuk .doctor-story__copy > p:last-of-type {
  color: var(--muted);
}

.text-link {
  align-self: flex-start;
  margin-top: 18px;
  padding-bottom: 5px;
  color: var(--aqua);
  font-weight: 720;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.doctor-story--ivashchuk .text-link {
  color: var(--aqua-dark);
}

.text-link:hover {
  color: var(--white);
}

.doctor-story--ivashchuk .text-link:hover {
  color: var(--navy);
}

.services {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 8vw, 120px);
  padding: clamp(82px, 10vw, 144px) max(24px, calc((100vw - 1240px) / 2));
  background: var(--mist);
}

.services__heading {
  position: sticky;
  top: 130px;
  align-self: start;
}

.services h2 {
  max-width: 11ch;
  font-size: clamp(2.7rem, 4.7vw, 5.1rem);
}

.services__heading p {
  max-width: 39ch;
  margin-top: 28px;
  color: var(--muted);
}

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: services;
  border-top: 2px solid var(--navy);
}

.service-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-inline-size: 0;
  min-height: 82px;
  counter-increment: services;
  border-bottom: 1px solid var(--line);
}

.service-list span {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-inline-size: 0;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 620;
}

.service-list span::before {
  color: var(--aqua-dark);
  content: counter(services, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 760;
}

.service-list a {
  min-height: 44px;
  padding: 10px 13px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 720;
  text-decoration: none;
  border: 1px solid var(--line);
}

.service-list a:hover {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.method {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  min-height: 760px;
  color: var(--white);
  background: var(--deep);
}

.method__visual {
  position: relative;
  min-inline-size: 0;
  overflow: hidden;
  margin: 0;
}

.method__visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 72%, rgba(4, 22, 45, 0.16));
  pointer-events: none;
}

.method__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.method__visual figcaption {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 12px 14px;
  color: #c6dbe6;
  background: rgba(4, 22, 45, 0.9);
  border: 1px solid var(--line-dark);
  font-size: 0.76rem;
}

.method__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-inline-size: 0;
  padding: clamp(52px, 7vw, 104px);
}

.method h2 {
  max-width: 10ch;
}

.method__lead {
  max-width: 34ch;
  margin-top: 34px;
  color: var(--aqua);
  font-size: clamp(1.12rem, 1.8vw, 1.4rem);
  font-weight: 580;
}

.method__copy > p:last-of-type {
  max-width: 48ch;
  color: #c6dbe6;
}

.method .button {
  align-self: flex-start;
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px clamp(40px, 8vw, 120px);
  align-items: end;
  padding: clamp(70px, 8vw, 118px) max(24px, calc((100vw - 1240px) / 2));
  color: var(--navy);
  background: var(--aqua);
}

.contact h2 {
  max-width: 9ch;
}

.contact address {
  margin-top: 22px;
  font-style: normal;
  font-weight: 620;
}

.contact__primary {
  display: flex;
  flex-direction: column;
  min-width: min(100%, 360px);
  padding: 20px 24px;
  color: var(--white);
  background: var(--navy);
  text-decoration: none;
}

.contact__primary span {
  color: var(--aqua);
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__primary strong {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.contact__other {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(7, 31, 63, 0.28);
}

.contact__other a {
  font-weight: 650;
  text-decoration: none;
}

.contact__other a:hover {
  text-decoration: underline;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px max(24px, calc((100vw - 1240px) / 2));
  color: #c6dbe6;
  background: var(--deep);
  font-size: 0.78rem;
}

.site-footer img {
  width: 120px;
  height: auto;
  padding: 8px;
  background: var(--white);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a:hover {
  color: var(--aqua);
}

.mobile-call {
  display: none;
}

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 650ms ease,
    transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1040px) {
  .site-nav {
    gap: 16px;
  }

  .brand span {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
  }

  .hero__copy {
    padding-inline: 36px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 6.4vw, 5rem);
  }

  .team-intro {
    grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.6fr);
  }
}

@media (max-width: 820px) {
  :root {
    --shell: min(100% - 36px, 720px);
  }

  .site-header {
    min-height: 78px;
    padding-inline: 18px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__copy {
    min-height: 650px;
    padding: 74px 24px 48px;
  }

  .hero__portrait {
    min-height: 720px;
  }

  .team-intro {
    grid-template-columns: 1fr;
  }

  .team-intro > p:last-child {
    max-width: 46ch;
  }

  .doctor-story,
  .doctor-story--ivashchuk {
    grid-template-columns: 1fr;
  }

  .doctor-story--ivashchuk .doctor-story__copy {
    order: 2;
  }

  .doctor-story__media {
    min-height: 620px;
  }

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

  .services__heading {
    position: static;
  }

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

  .method__visual {
    min-height: 520px;
  }

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

  .contact__primary,
  .contact__other {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  :root {
    --shell: calc(100% - 32px);
  }

  body {
    padding-bottom: 64px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 126px;
  }

  .header-call {
    width: min(104px, 32vw);
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 9px 12px;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .header-call small {
    display: none;
  }

  .header-call strong {
    font-size: 0;
  }

  .header-call strong::after {
    content: "Подзвонити";
    font-size: 0.8rem;
  }

  .hero__copy {
    min-height: calc(100svh - 78px);
    padding: 46px 16px 280px;
  }

  .hero h1 {
    max-width: 10.5ch;
    margin-bottom: 16px;
    font-size: clamp(2.4rem, 11.6vw, 3.35rem);
  }

  .hero__lead {
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero__actions {
    display: grid;
    gap: 8px;
    margin-top: 20px;
  }

  .hero__actions .button {
    min-height: 44px;
    padding-block: 10px;
  }

  .hero__facts {
    display: none;
  }

  .hero__portrait {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    height: 260px;
  }

  .hero__image img {
    object-position: 50% 28%;
    transform: scale(1.28);
    transform-origin: 50% 28%;
  }

  .hero__portrait figcaption {
    right: auto;
    bottom: 68px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 10px 12px;
  }

  .hero__portrait figcaption strong {
    font-size: 0.96rem;
  }

  .hero__portrait figcaption small {
    display: none;
  }

  .hero__trace {
    display: none;
  }

  .team-intro {
    padding-block: 72px 40px;
  }

  .team-intro h2,
  .services h2,
  .method h2,
  .contact h2 {
    font-size: clamp(2.4rem, 11.5vw, 3.5rem);
  }

  .doctor-story {
    padding-bottom: 70px;
  }

  .doctor-story__media {
    min-height: 500px;
  }

  .doctor-story__copy {
    padding: 34px 24px;
  }

  .doctor-story__copy h2 {
    font-size: clamp(2.15rem, 10.5vw, 3.2rem);
  }

  .services {
    padding: 70px 16px;
  }

  .service-list li {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding-block: 18px;
  }

  .service-list span,
  .service-list a,
  .contact__primary,
  .contact__other a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .service-list a {
    justify-self: start;
  }

  .method__visual {
    min-height: 350px;
  }

  .method__copy {
    padding: 54px 16px 70px;
  }

  .contact {
    padding: 64px 16px;
  }

  .contact__primary {
    min-width: 0;
  }

  .contact__other {
    display: grid;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 16px;
  }

  .mobile-call {
    position: fixed;
    z-index: 60;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    background: var(--aqua);
    font-weight: 760;
    text-decoration: none;
    border: 1px solid var(--navy);
  }
}

@media (max-width: 560px) and (max-height: 650px) {
  body {
    padding-bottom: 0;
  }

  .mobile-call {
    display: none;
  }
}

@media (max-width: 340px) {
  .brand img {
    width: 110px;
  }

  .hero h1 {
    font-size: 2.28rem;
  }

  .hero__copy {
    padding-bottom: 248px;
  }

  .hero__portrait {
    height: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
