/*
 * UI/UX polish layer
 * Keeps the existing Wuslogic visual identity while improving hierarchy,
 * readability, interaction feedback, and responsive behavior.
 */
:root {
  --c-primary: #5268a6;
  --c-primary-dark: #1f3268;
  --c-text: #2f3d61;
  --c-muted: #5f6c8a;
  --c-line: #d7deef;
  --c-bg: #f7f9fd;
  --c-focus: #234fbd;
  --radius-sm: .875rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --shadow-xs: 0 .25rem .75rem rgba(39, 55, 103, .06);
  --shadow-sm: 0 .75rem 2rem rgba(39, 55, 103, .10);
  --shadow: 0 1.5rem 4rem rgba(39, 55, 103, .14);
  --font-sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --ease-ui: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-padding-top: 6.5rem; }
body {
  color: var(--c-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
p { max-width: 68ch; }

.skip-link {
  position: fixed;
  z-index: 2000;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  border-radius: .65rem;
  background: var(--c-primary-dark);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform .18s var(--ease-ui);
}
.skip-link:focus { color: #fff; transform: translateY(0); }

.site-header {
  border-bottom-color: rgba(191, 201, 226, .72);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 .5rem 1.75rem rgba(31, 50, 104, .07);
}
.site-nav { max-width: 96rem; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; min-height: 3rem; }
.nav-link {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .055em;
}
.nav-link::before {
  position: absolute;
  right: 50%;
  bottom: -.45rem;
  left: 50%;
  height: .125rem;
  border-radius: 999rem;
  background: var(--c-primary);
  content: "";
  transition: right .2s var(--ease-ui), left .2s var(--ease-ui);
}
.nav-link:hover::before,
.nav-link:focus-visible::before { right: 0; left: 0; }
.nav-link.active::before { display: none; }

.btn-soft,
.btn-main,
.btn-line,
.section-head-inline a,
.treat-body span {
  min-height: 3rem;
  padding-inline: 1.65rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .055em;
  box-shadow: 0 .65rem 1.4rem rgba(65, 86, 157, .2);
  transition: color .2s var(--ease-ui), background-color .2s var(--ease-ui),
    border-color .2s var(--ease-ui), box-shadow .2s var(--ease-ui),
    transform .2s var(--ease-ui);
}
.btn-soft:hover,
.btn-main:hover,
.btn-line:hover,
.section-head-inline a:hover {
  box-shadow: 0 .9rem 1.8rem rgba(65, 86, 157, .26);
  transform: translateY(-.125rem);
}
.btn-soft:active,
.btn-main:active,
.btn-line:active,
.section-head-inline a:active {
  box-shadow: 0 .35rem .8rem rgba(65, 86, 157, .18);
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: .1875rem solid var(--c-focus);
  outline-offset: .25rem;
}

.section-pad { padding-block: clamp(4rem, 7vw, 7rem); }
.section-title,
.section-head-inline { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-title h2,
.section-head-inline h2,
.intro-card h2,
.service-detail h2,
.contact-box h2,
.cta-card h2 {
  margin-bottom: .75rem;
  letter-spacing: .06em;
  line-height: 1.3;
}
.section-title p {
  max-width: 42rem;
  margin-inline: auto;
  color: var(--c-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .18em;
}

.intro-card,
.data-card,
.contact-box,
.consult-form,
.calendar-card,
.social-panel,
.treat-card,
.mini-card,
.home-video-card,
.service-detail article,
.info-list,
.faq-item {
  border-color: rgba(205, 214, 235, .9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.treat-card,
.mini-card,
.home-video-card {
  transition: border-color .22s var(--ease-ui), box-shadow .22s var(--ease-ui),
    transform .22s var(--ease-ui);
}
.treat-card:hover,
.mini-card:hover,
.home-video-card:hover {
  border-color: #bac7e5;
  box-shadow: var(--shadow-sm);
  transform: translateY(-.3rem);
}
.treat-card a,
.home-video-card { height: 100%; }
.treat-card img {
  transition: transform .45s var(--ease-ui);
}
.treat-card:hover img { transform: scale(1.025); }
.treat-body { padding: 1.75rem; }
.treat-body h3,
.mini-card h3,
.data-card h3,
.social-panel h3 {
  letter-spacing: .04em;
  line-height: 1.45;
}
.treat-body p,
.intro-card p,
.info-list p,
.service-detail p {
  color: var(--c-muted);
  line-height: 1.8;
}
.page-hero {
  padding-block: clamp(5rem, 9vw, 8rem) clamp(3rem, 6vw, 5.5rem);
}
.page-hero p { margin-inline: auto; }
body:not(.page-index):not(.page-about) .page-hero,
.page-news .news-detail-hero {
  background: #E3E2F3;
}
.beauty-banner {
  border-color: rgba(203, 213, 237, .85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.feature-row div { border-color: #dce3f2; }
.feature-row i {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-inline: auto;
  place-items: center;
  border-radius: 1rem;
  background: var(--c-primary-soft);
  font-size: 1.35rem;
}
.hero-arrow,
.env-arrow,
.nav-toggle,
.nav-submenu-toggle,
.go-top,
.contact-dock a,
.contact-dock button {
  min-width: 2.75rem;
  min-height: 2.75rem;
}
.consult-form input,
.consult-form select,
.consult-form textarea {
  min-height: 3rem;
  border-radius: .75rem;
  background: #fff;
}
.footer-map-strip > * { min-width: 0; }

@media (max-width: 62rem) {
  .site-nav { padding-inline: 1.25rem; }
}
@media (max-width: 48rem) {
  html { scroll-padding-top: 5.5rem; }
  .container { width: min(100% - 2rem, 75rem); }
  .nav-link { font-size: 1rem; letter-spacing: .035em; }
  .nav-link::before { display: none; }
  .main-nav .navbar-nav { padding: .75rem 1rem 1.25rem; }
  .section-pad { padding-block: 4rem; }
  .section-head-inline { align-items: flex-start; flex-direction: column; }
  .section-title p { font-size: 1rem; }
  .treat-body { padding: 1.5rem; }
  .footer-contact-title h2 {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
    letter-spacing: .1em;
  }
}
@media (max-width: 36rem) {
  .container { width: min(100% - 1.5rem, 75rem); }
  .intro-card,
  .contact-box,
  .consult-form { border-radius: var(--radius-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-link::before,
  .treat-card img { transition: none; }
  .treat-card:hover,
  .mini-card:hover,
  .home-video-card:hover,
  .btn-soft:hover,
  .btn-main:hover,
  .btn-line:hover,
  .section-head-inline a:hover { transform: none; }
}

/* Homepage conversion layer */
.page-index .hero-carousel {
  overflow: clip;
  background: #eef3fb;
}

.page-index .hero-slide-certificates .hero-copy {
  max-width: 38rem;
}

.page-index .hero-slide-certificates .hero-copy h1 {
  margin-bottom: 1.15rem;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.22;
  white-space: normal;
}

.page-index .hero-slide-certificates .hero-copy h1 span,
.page-index .hero-slide-certificates .hero-copy h1 strong {
  display: block;
}

.page-index .hero-slide-certificates .hero-copy h1 strong {
  margin-top: .25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1.15rem;
}

.hero-contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  gap: .55rem;
  padding: .6rem .35rem;
  border-bottom: 1px solid rgba(61, 82, 139, .42);
  color: #344b83;
  font-weight: 700;
  letter-spacing: .04em;
  transition: border-color .2s var(--ease-ui), color .2s var(--ease-ui);
}

.hero-contact-link:hover {
  border-color: #24396f;
  color: #1f3268;
}

.hero-assurance {
  display: flex;
  align-items: center;
  max-width: none;
  margin: .9rem 0 0;
  gap: .55rem;
  color: #526181;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .035em;
}

.hero-assurance i {
  color: #6679b5;
}

.home-trust-bar {
  position: relative;
  z-index: 4;
  border-bottom: 1px solid rgba(203, 213, 235, .9);
  background: rgba(255, 255, 255, .96);
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-trust-grid > div {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 6.75rem;
  gap: .9rem;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid #e0e6f3;
}

.home-trust-grid > div:last-child {
  border-right: 0;
}

.home-trust-grid > div > i {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  place-items: center;
  border-radius: 50%;
  background: #eef2fb;
  color: #5369a8;
  font-size: 1rem;
}

.home-trust-grid span {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.home-trust-grid strong {
  color: #26396f;
  font-size: .95rem;
  letter-spacing: .025em;
}

.home-trust-grid small {
  color: #68738f;
  font-size: .78rem;
  line-height: 1.5;
}

.page-index .beauty-tech {
  padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(1rem, 2vw, 1.5rem);
}

.page-index .beauty-banner {
  min-height: clamp(33rem, 46vw, 39rem);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(113, 135, 194, .16), transparent 27%),
    linear-gradient(115deg, #f9faff 0%, #f5f7fc 46%, #e9edf7 100%);
  box-shadow: none;
  isolation: isolate;
}

.page-index .beauty-banner::before {
  position: absolute;
  z-index: 2;
  top: 10%;
  bottom: 10%;
  left: 0;
  width: .2rem;
  border-radius: 99rem;
  background: #7285bd;
  content: "";
}

.page-index .banner-copy {
  width: 36%;
  padding-left: clamp(2rem, 4vw, 3.5rem);
  padding-right: clamp(1.5rem, 2.5vw, 2.5rem);
}

.page-index .beauty-banner-images {
  z-index: 1;
  top: 1.5rem;
  right: clamp(1.25rem, 3vw, 2.75rem);
  display: grid;
  width: min(60%, 49rem);
  height: calc(100% - 3rem);
  align-items: center;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 2.4rem minmax(0, 1fr);
  gap: clamp(.55rem, 1vw, 1rem);
  background: transparent;
}

.page-index .beauty-case {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.page-index .beauty-case-image {
  position: relative;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: .9rem;
  background: #a7a8aa;
  box-shadow: 0 1.25rem 3rem rgba(40, 54, 94, .17);
}

.page-index .beauty-case-image::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(51, 71, 126, .08);
  content: "";
  pointer-events: none;
}

.page-index .beauty-case img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transition: transform .8s var(--ease-ui);
}

.page-index .beauty-case:hover img {
  transform: none;
}

.page-index .beauty-case-label {
  position: absolute;
  top: 1.2rem;
  left: 50%;
  padding: .5rem 1rem;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 99rem;
  background: rgba(36, 53, 100, .75);
  box-shadow: 0 .4rem 1rem rgba(23, 35, 72, .15);
  color: #fff;
  font-family: "Noto Sans TC", sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  line-height: 1;
  backdrop-filter: blur(.5rem);
}

.page-index .beauty-case figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem;
  padding: 1rem .2rem 0;
  color: #26396f;
}

.page-index .beauty-case figcaption strong {
  font-family: "Noto Serif JP", serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
}

.page-index .beauty-case figcaption span {
  color: #7a849e;
  font-size: .72rem;
  letter-spacing: .08em;
}

.page-index .beauty-comparison-axis {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100% - 3.8rem);
}

.page-index .beauty-comparison-axis::before {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(71, 94, 157, .34), transparent);
  content: "";
}

.page-index .beauty-comparison-axis span {
  z-index: 1;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: #5068aa;
  box-shadow: 0 .55rem 1.35rem rgba(44, 61, 111, .24);
  color: #fff;
  font-size: .72rem;
}

.page-index .beauty-case-note {
  position: absolute;
  right: 0;
  bottom: .1rem;
  left: 0;
  margin: 0;
  color: #737e99;
  font-size: .68rem;
  letter-spacing: .04em;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .page-index .beauty-comparison.is-ready.is-visible .beauty-case-before {
    animation: beauty-case-before-reveal .8s var(--ease-ui) both;
  }

  .page-index .beauty-comparison.is-ready.is-visible .beauty-case-after {
    animation: beauty-case-after-reveal .8s .12s var(--ease-ui) both;
  }
}

@keyframes beauty-case-before-reveal {
  from { opacity: .55; transform: translateX(1.4rem); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes beauty-case-after-reveal {
  from { opacity: .55; transform: translateX(-1.4rem); }
  to { opacity: 1; transform: translateX(0); }
}

.page-index .doctor-intro {
  padding-top: clamp(2.25rem, 4vw, 3.75rem);
  background: linear-gradient(180deg, #f5f7fc 0%, #fbfcff 100%);
}

.page-index .intro-card {
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 1.5rem 4.5rem rgba(37, 52, 101, .1);
}

.page-index .doctor-photo {
  border-radius: 1.15rem;
}

.page-index .home-video-section,
.page-index .info-grid {
  border-block: 1px solid rgba(215, 222, 239, .78);
}

.page-index .cta-card {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.5rem 4rem rgba(40, 55, 105, .15);
  backdrop-filter: blur(.65rem);
}

@media (max-width: 62rem) {
  .home-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-trust-grid > div:nth-child(2) {
    border-right: 0;
  }

  .home-trust-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e0e6f3;
  }
}

@media (max-width: 48rem) {
  .page-index .hero-carousel {
    height: 44.5rem;
    min-height: 44.5rem;
  }

  .page-index .hero-slide-certificates .hero-slide-inner {
    padding-bottom: 2.85rem;
  }

  .page-index .hero-slide-certificates .hero-visual {
    grid-template-rows: 18.5rem 6.5rem;
  }

  .page-index .hero-slide-certificates .hero-doctor {
    height: 18.5rem;
  }

  .page-index .hero-slide-certificates .certificate-row {
    height: 6.5rem;
    padding: .45rem .7rem;
  }

  .page-index .hero-slide-certificates .certificate-row figure {
    display: grid;
    align-items: center;
  }

  .page-index .hero-slide-certificates .certificate-row img {
    max-height: 5.55rem;
  }

  .page-index .hero-slide-certificates .certificate-row figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .page-index .hero-slide-certificates .hero-copy {
    margin: .5rem .75rem 0;
    padding: .9rem 1rem;
    border-color: rgba(210, 218, 239, .82);
    background: #fff;
    box-shadow: 0 .85rem 2rem rgba(48, 65, 119, .12);
  }

  .page-index .hero-slide-certificates .hero-copy h1 {
    margin-bottom: .65rem;
    font-size: clamp(1.45rem, 6.4vw, 1.85rem);
    line-height: 1.25;
  }

  .page-index .hero-slide-certificates .hero-copy .hero-actions {
    flex-wrap: nowrap;
    gap: .8rem;
  }

  .page-index .hero-slide-certificates .hero-copy .btn-main {
    min-height: 2.75rem;
    padding: .58rem 1rem;
    font-size: .84rem;
    white-space: nowrap;
  }

  .page-index .hero-slide-certificates .hero-contact-link {
    min-height: 2.75rem;
    padding: .45rem 0;
    font-size: .82rem;
    white-space: nowrap;
  }

  .page-index .hero-slide-certificates .hero-assurance {
    margin-top: .55rem;
    font-size: .75rem;
  }

  .page-index .hero-carousel .hero-arrow {
    top: 9.5rem;
  }

  .home-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-trust-grid > div {
    min-height: 6.25rem;
    gap: .65rem;
    padding: .9rem .7rem;
  }

  .home-trust-grid > div > i {
    width: 2.35rem;
    height: 2.35rem;
    flex-basis: 2.35rem;
    font-size: .85rem;
  }

  .home-trust-grid strong {
    font-size: .82rem;
  }

  .home-trust-grid small {
    font-size: .7rem;
  }

  .page-index .beauty-tech {
    padding: 3rem 0 1.25rem;
  }

  .page-index .beauty-banner::before {
    top: 1.5rem;
    bottom: auto;
    left: 1.25rem;
    width: 3rem;
    height: .18rem;
  }

  .page-index .banner-copy {
    width: 100%;
    padding: 2.75rem 1.5rem 2.25rem;
  }

  .page-index .beauty-banner-images {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    padding: 0 1rem 3rem;
    grid-template-columns: minmax(0, 1fr) 1.65rem minmax(0, 1fr);
    gap: .45rem;
  }

  .page-index .beauty-case {
    aspect-ratio: auto;
  }

  .page-index .beauty-case-image {
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: .75rem;
  }

  .page-index .beauty-case-label {
    top: .8rem;
    padding: .42rem .65rem;
    font-size: .62rem;
  }

  .page-index .beauty-case figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: .12rem;
    padding-top: .7rem;
  }

  .page-index .beauty-case figcaption strong {
    font-size: .88rem;
  }

  .page-index .beauty-case figcaption span {
    font-size: .66rem;
  }

  .page-index .beauty-comparison-axis {
    height: auto;
    aspect-ratio: 1 / 9;
  }

  .page-index .beauty-comparison-axis span {
    width: 1.8rem;
    height: 1.8rem;
    font-size: .58rem;
  }

  .page-index .beauty-case-note {
    right: 1rem;
    bottom: .8rem;
    left: 1rem;
    font-size: .62rem;
  }
}

@media (max-width: 23.5rem) {
  .page-index .hero-slide-certificates .hero-copy .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .page-index .hero-slide.is-active .hero-copy > * {
    animation: hero-content-in .55s var(--ease-ui) both;
  }

  .page-index .hero-slide.is-active .hero-copy > :nth-child(2) {
    animation-delay: .06s;
  }

  .page-index .hero-slide.is-active .hero-copy > :nth-child(3),
  .page-index .hero-slide.is-active .hero-copy > :nth-child(4) {
    animation-delay: .12s;
  }

  .page-index .hero-slide.is-active .hero-copy > :nth-child(n + 5) {
    animation-delay: .18s;
  }
}

@keyframes hero-content-in {
  from {
    opacity: 0;
    transform: translateY(.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
