:root {
  --ink: #160f0d;
  --espresso: #28130f;
  --wine: #642431;
  --terracotta: #9d573e;
  --teal: #2b6f69;
  --teal-dark: #071716;
  --paper: #fffaf2;
  --ivory: #f4eadc;
  --muted: rgba(244, 234, 220, .66);
  --line: rgba(244, 234, 220, .14);
  --line-strong: rgba(244, 234, 220, .24);
  --gold: #d6b55f;
  --gold-soft: #f2dc98;
  --gold-pale: #fff1bd;
  --gold-deep: #9d7835;
  --surface: rgba(18, 14, 12, .72);
  --body-font: "Manrope", Arial, sans-serif;
  --display-font: "neulis-sans", "Manrope", Arial, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #080d0c;
  color-scheme: dark;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #3a1c14 0, #291511 27rem, #171211 61rem, #0d1514 94rem, #08100f 100%);
  color: var(--ivory);
  font-family: var(--body-font);
  letter-spacing: 0;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.bio-shell {
  --page-pad: 1rem;
  position: relative;
  isolation: isolate;
  width: min(100%, 512px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(1.8rem, env(safe-area-inset-top))
    var(--page-pad)
    max(2.6rem, env(safe-area-inset-bottom));
}

.bio-shell::before {
  display: none;
}

.profile {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: .35rem;
  text-align: center;
}

.profile__photo-frame {
  position: relative;
  width: 116px;
  height: 116px;
  margin-bottom: .9rem;
  padding: 2px;
  border: 1px solid rgba(242, 220, 152, .72);
  border-radius: 50%;
  background: #18100d;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
  animation: profile-enter .72s var(--ease-out) both;
}

.profile__photo {
  width: 100%;
  height: 100%;
  border: 2px solid #21100d;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 19%;
}

.profile__identity {
  width: 100%;
  animation: profile-enter .72s .07s var(--ease-out) both;
}

.profile h1 {
  width: 100%;
  margin: 0;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.04;
  text-wrap: nowrap;
  text-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

.profile__role {
  margin: .3rem 0 0;
  color: var(--gold-soft);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.profile__role span {
  margin-inline: .18rem;
  color: rgba(242, 220, 152, .54);
}

.profile__statement {
  display: grid;
  width: min(100%, 24rem);
  margin-top: 2.8rem;
  gap: .38rem;
  justify-items: center;
  animation: profile-enter .72s .14s var(--ease-out) both;
}

.profile__statement strong {
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1;
  text-wrap: balance;
  text-shadow: 0 14px 34px rgba(0, 0, 0, .32);
}

.profile__statement span {
  position: relative;
  color: rgba(244, 234, 220, .72);
  font-size: .94rem;
  font-weight: 300;
  line-height: 1.4;
  text-wrap: balance;
}

.panel {
  margin-top: 2.7rem;
}

.panel--results {
  margin-top: 1.75rem;
}

.section-heading {
  display: flex;
  min-height: 1.35rem;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  margin-bottom: .68rem;
}

.section-heading::after {
  content: "";
  width: 2.8rem;
  height: 1px;
  background: rgba(242, 220, 152, .28);
}

.section-heading h2 {
  margin: 0;
  color: var(--gold-soft);
  font-family: var(--display-font);
  font-size: .77rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.section-heading__detail {
  color: rgba(244, 234, 220, .58);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.result-rail,
.clinic-rail {
  display: grid;
  grid-auto-flow: column;
  gap: .82rem;
  margin-inline: calc(var(--page-pad) * -1);
  padding: .15rem var(--page-pad) .45rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: var(--page-pad);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.result-rail {
  grid-auto-columns: min(80%, 19rem);
}

.clinic-rail {
  grid-auto-columns: min(88%, 24rem);
}

.result-rail::-webkit-scrollbar,
.clinic-rail::-webkit-scrollbar {
  display: none;
}

.result-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: .72;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  text-align: left;
  transform: scale(.985);
  transform-origin: center left;
  transition: opacity .4s ease, transform .5s var(--ease-out);
}

.result-card.is-active {
  opacity: 1;
  transform: scale(1);
}

.result-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 220, .09);
  border-radius: 8px;
  background: #0d0c0b;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .26);
}

.result-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 250, 242, .08);
}

.result-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter .45s ease, transform .55s var(--ease-out);
}

.result-card__meta {
  position: absolute;
  left: 50%;
  bottom: .55rem;
  z-index: 2;
  display: flex;
  width: calc(100% - 1.1rem);
  min-width: 0;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  padding: .58rem .7rem;
  border: 1px solid rgba(242, 220, 152, .38);
  border-radius: 6px;
  background: rgba(13, 10, 9, .84);
  color: var(--paper);
  font-family: var(--display-font);
  font-size: .71rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .22s ease, transform .32s var(--ease-out);
}

.result-card.is-active .result-card__meta {
  opacity: 1;
  transform: translate(-50%, 0);
}

.result-card__meta > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.actions {
  display: grid;
  gap: .72rem;
  margin-top: 1.2rem;
}

.link-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 4.05rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151210;
  color: var(--paper);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.link-button::after {
  display: none;
}

.link-button > span,
.link-button > svg {
  position: relative;
  z-index: 1;
}

.link-button:active {
  transform: scale(.992);
}

.link-button--gold {
  border-color: rgba(255, 241, 189, .38);
  background: #e1c36f;
  color: #21110e;
  box-shadow: 0 14px 34px rgba(214, 181, 95, .2);
}

.link-button--gold::after {
  background: rgba(100, 36, 49, .84);
}

.link-button--address {
  background: rgba(17, 15, 14, .7);
}

.link-button svg {
  width: 1.22rem;
  height: 1.22rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-button svg.whatsapp-icon {
  width: 1.38rem;
  height: 1.38rem;
  fill: currentColor;
  stroke: none;
}

.panel--clinic {
  margin-top: 2.55rem;
}

.clinic-rail figure {
  display: grid;
  min-width: 0;
  margin: 0;
  opacity: .72;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transform: scale(.988);
  transform-origin: center left;
  transition: opacity .4s ease, transform .5s var(--ease-out);
}

.clinic-rail figure.is-active {
  opacity: 1;
  transform: scale(1);
}

.clinic-rail img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #0d0c0b;
  box-shadow: 0 15px 36px rgba(0, 0, 0, .25);
  object-fit: contain;
}

.clinic-rail figcaption {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  padding: .66rem .05rem .18rem;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .22s ease, transform .32s var(--ease-out);
}

.clinic-rail figure.is-active figcaption {
  opacity: 1;
  transform: translateY(0);
}

.result-rail.is-scrolling .result-card__meta,
.clinic-rail.is-scrolling figcaption {
  opacity: 0;
}

.rail-clone {
  pointer-events: auto;
}

.footer {
  display: grid;
  justify-items: center;
  gap: .72rem;
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 234, 220, .1);
  color: rgba(244, 234, 220, .48);
  text-align: center;
}

.instagram-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem .88rem;
  color: rgba(255, 250, 242, .82);
  font-size: .72rem;
  font-weight: 700;
  transition: color .2s ease, transform .2s ease;
}

.instagram-link svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
}

.instagram-link__dot {
  fill: currentColor;
  stroke: none;
}

.footer small {
  max-width: 19rem;
  font-size: .64rem;
  line-height: 1.5;
}

@keyframes profile-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .result-card:hover img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.012);
  }

  .link-button:hover {
    border-color: rgba(242, 220, 152, .4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    transform: translateY(-1px);
  }

  .instagram-link:hover {
    color: var(--gold-soft);
    transform: translateY(-1px);
  }
}

@media (max-width: 360px) {
  .bio-shell {
    --page-pad: .86rem;
  }

  .profile__photo-frame {
    width: 112px;
    height: 112px;
  }

  .profile h1 {
    font-size: 1.34rem;
  }

  .profile__role {
    font-size: .64rem;
  }

  .profile__statement {
    margin-top: 2.55rem;
  }

  .profile__statement strong {
    font-size: 1.78rem;
  }

  .profile__statement span {
    font-size: .84rem;
  }

  .result-card__meta {
    font-size: .68rem;
  }

  .link-button {
    min-height: 3.8rem;
    padding-inline: 1rem;
    font-size: .9rem;
  }
}

@media (max-width: 319px) {
  .bio-shell {
    --page-pad: .72rem;
  }

  .profile h1 {
    font-size: 1.16rem;
  }

  .profile__role {
    font-size: .58rem;
  }

  .profile__statement strong {
    font-size: 1.56rem;
  }

  .profile__statement span {
    font-size: .78rem;
  }

}

@media (min-width: 520px) {
  .bio-shell {
    --page-pad: 1.25rem;
    padding-top: max(2.25rem, env(safe-area-inset-top));
  }

  .profile__photo-frame {
    width: 128px;
    height: 128px;
  }

  .profile h1 {
    font-size: 1.72rem;
  }

  .profile__statement strong {
    font-size: 2.2rem;
  }

  .result-rail {
    grid-auto-columns: 19rem;
  }

  .clinic-rail {
    grid-auto-columns: 24rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
