/**
 * Home gateway and compact home-only footer.
 *
 * These rules are deliberately scoped so the shared header and every subpage
 * continue to use the base theme without side effects.
 */

.home-gateway,
.home-compact-footer {
  position: relative;
  z-index: 9;
  width: 100%;
  margin: 0;
  font-family: var(--sans);
  word-break: keep-all;
}

.home-gateway {
  --gateway-backdrop: url("../clinic/actual-2026/clinic-corridor-sign-bright.webp");
  min-height: clamp(480px, calc(100svh - 240px), 720px);
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: #102234;
}

.home-gateway::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 16, 28, .38) 0%, rgba(3, 16, 28, .08) 36%, rgba(3, 16, 28, .13) 100%),
    linear-gradient(90deg, rgba(3, 16, 28, .1), transparent 42%, rgba(3, 16, 28, .05));
}

.home-gateway__backdrop {
  position: absolute;
  z-index: 0;
  inset: -12px;
  pointer-events: none;
  background-image: var(--gateway-backdrop);
  background-position: center 52%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(.98) brightness(1.07);
  transform: scale(1.01);
  transition: filter .5s ease, transform .7s cubic-bezier(.2, .72, .25, 1);
}

.home-gateway__intro {
  position: absolute;
  z-index: 4;
  top: clamp(20px, 3.2vw, 42px);
  left: clamp(40px, 5vw, 86px);
  width: min(520px, calc(100% - 80px));
  pointer-events: none;
  text-align: left;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .42);
}

.home-gateway__intro .home-gateway__eyebrow {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .8);
}

.home-gateway__eyebrow {
  display: block;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .72);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.home-gateway__title {
  max-width: 520px;
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -.055em;
}

.home-gateway__panels {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-gateway__panel {
  --gateway-accent: var(--accent, #e04e78);
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, .31);
  background: rgba(2, 15, 28, .08);
  transition: background-color .35s ease;
}

.home-gateway__panel:first-child {
  border-left: 0;
}

.home-gateway__panel:nth-child(1) {
  --accent: #df4d78;
}

.home-gateway__panel:nth-child(2) {
  --accent: #00a98f;
}

.home-gateway__panel:nth-child(3) {
  --accent: #378fdc;
}

.home-gateway__panel:nth-child(4) {
  --accent: #b8a07a;
}

.home-gateway__panel:nth-child(5) {
  --accent: #765ad8;
}

.home-gateway__panel-link {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: clamp(230px, 33vh, 330px) clamp(16px, 2.25vw, 38px) clamp(34px, 5.2vh, 56px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  outline: 0;
}

.home-gateway__panel-link::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 14, 26, .03) 24%, rgba(2, 14, 26, .34) 67%, rgba(2, 14, 26, .58) 100%);
  transition: background-color .35s ease, opacity .35s ease;
}

.home-gateway__panel-media {
  position: absolute;
  z-index: 0;
  inset: -8px;
  display: block;
  pointer-events: none;
  background-image: var(--gateway-panel-image, var(--gateway-backdrop));
  background-position: var(--gateway-panel-position, center);
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  filter: saturate(.98) brightness(.98);
  transform: scale(1.015);
  transition: opacity .48s ease, filter .55s ease, transform .7s cubic-bezier(.2, .72, .25, 1);
}

.home-gateway__panel-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.home-gateway__panel-content h2 {
  margin: 0 0 18px;
  color: #fff;
  font-family: var(--sans);
  font-size: clamp(25px, 2.15vw, 35px);
  font-weight: 780;
  line-height: 1.16;
  letter-spacing: -.055em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .42);
}

.home-gateway__panel-content .home-gateway__eyebrow {
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .38);
}

.home-gateway__cta {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: var(--gateway-accent);
  background: color-mix(in srgb, var(--gateway-accent) 55%, #102235);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
  transition: box-shadow .3s ease, filter .3s ease, transform .3s ease;
}

.home-gateway__cta > span:last-child {
  font-size: 18px;
  line-height: 1;
  transition: transform .3s ease;
}

.home-gateway__panel:hover,
.home-gateway__panel:focus-within {
  background: rgba(255, 255, 255, .1);
}

.home-gateway__panel:hover .home-gateway__panel-link::before,
.home-gateway__panel:focus-within .home-gateway__panel-link::before {
  opacity: .73;
}

.home-gateway__panel:hover .home-gateway__panel-media,
.home-gateway__panel:focus-within .home-gateway__panel-media {
  opacity: 1;
  filter: saturate(1.05) brightness(1.035);
  transform: scale(1.015);
}

.home-gateway__panel:hover .home-gateway__cta,
.home-gateway__panel:focus-within .home-gateway__cta {
  filter: saturate(1.08) brightness(1.06);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
  transform: translateY(-3px);
}

.home-gateway__panel:hover .home-gateway__cta > span:last-child,
.home-gateway__panel:focus-within .home-gateway__cta > span:last-child {
  transform: translate(2px, -2px);
}

.home-gateway__panel-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.home-gateway:has(.home-gateway__panel:hover) .home-gateway__backdrop,
.home-gateway:has(.home-gateway__panel:focus-within) .home-gateway__backdrop {
  filter: saturate(.88) brightness(.82);
  transform: scale(1.018);
}

@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
  .home-gateway__panel-media {
    opacity: 0;
    transform: scale(1.06);
  }
}

/* Compact home-only footer */
.home-compact-footer {
  color: #fff;
  background: #071d31;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.home-compact-footer__inner {
  width: min(var(--content), calc(100% - 56px));
  min-width: 0;
  min-height: 142px;
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(510px, .94fr);
  align-items: center;
  gap: clamp(28px, 3vw, 46px);
}

.home-compact-footer__business,
.home-compact-footer__actions {
  min-width: 0;
}

.home-compact-footer__business {
  display: grid;
  grid-template-columns: minmax(170px, .6fr) minmax(300px, 1.4fr);
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
}

.home-compact-footer__business-heading {
  min-width: 0;
  padding-right: clamp(18px, 2.2vw, 32px);
  display: grid;
  gap: 3px;
  border-right: 1px solid rgba(255, 255, 255, .18);
}

.home-compact-footer__business-heading h2,
.home-compact-footer__business-heading span,
.home-compact-footer__business-details,
.home-compact-footer__business-details dd {
  margin: 0;
}

.home-compact-footer__business-heading h2 {
  color: #fff;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.04em;
}

.home-compact-footer__business-eyebrow,
.home-compact-footer__business-name-en {
  color: rgba(255, 255, 255, .69);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .11em;
}

.home-compact-footer__business-eyebrow {
  color: #78c9f2;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .15em;
}

.home-compact-footer__business-details {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.home-compact-footer__business-detail {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.home-compact-footer__business-detail dt {
  color: #78c9f2;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.55;
  letter-spacing: -.015em;
}

.home-compact-footer__business-detail dd,
.home-compact-footer__business-detail address,
.home-compact-footer__business-detail a {
  min-width: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.55;
  letter-spacing: -.018em;
}

.home-compact-footer__business-detail address {
  margin: 0;
  font-style: normal;
}

.home-compact-footer__business-detail a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .02em;
}

.home-compact-footer__business-detail a:hover {
  color: #8dd5f8;
}

.home-compact-footer__business-detail a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.home-compact-footer__actions {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, .96fr);
  gap: 8px;
}

.home-compact-footer__action {
  min-width: 0;
  min-height: 58px;
  padding: 9px clamp(10px, 1.15vw, 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -.025em;
  transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease, transform .25s ease;
}

.home-compact-footer__action--booking {
  color: #fff;
  background: #0874de;
}

.home-compact-footer__action--phone {
  color: #0a2944;
  background: #fff;
  border-color: #d4dce3;
}

.home-compact-footer__action--kakao {
  color: #2f2600;
  background: #fee500;
  border-color: #ffe838;
}

.home-compact-footer__action strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .015em;
  white-space: nowrap;
}

.home-compact-footer__action img,
.home-compact-footer__action-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  object-fit: contain;
}

.home-compact-footer__action:hover {
  filter: brightness(1.045) saturate(1.04);
  box-shadow: 0 9px 22px rgba(0, 0, 0, .2);
  transform: translateY(-2px);
}

.home-compact-footer__action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .home-compact-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .home-compact-footer__actions {
    grid-column: auto;
  }
}

@media (max-width: 1100px) {
  .home-gateway {
    min-height: 0;
    overflow: visible;
    background: #0a2034;
  }

  .home-gateway::after,
  .home-gateway__backdrop {
    display: none;
  }

  .home-gateway__intro {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    padding: 30px 28px 26px;
    background: #0a2034;
    text-align: left;
    text-shadow: none;
    transform: none;
  }

  .home-gateway__intro .home-gateway__eyebrow {
    color: #7dc9ef;
  }

  .home-gateway__title {
    max-width: 700px;
    margin: 0;
    font-size: clamp(23px, 3.2vw, 31px);
  }

  .home-gateway__panels {
    position: relative;
    inset: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-gateway__panel {
    min-height: clamp(270px, 34vw, 360px);
    border-left: 1px solid rgba(255, 255, 255, .26);
    border-top: 1px solid rgba(255, 255, 255, .26);
  }

  .home-gateway__panel:nth-child(odd) {
    border-left: 0;
  }

  .home-gateway__panel:last-child {
    grid-column: 1 / -1;
    min-height: clamp(245px, 29vw, 320px);
    border-left: 0;
  }

  .home-gateway__panel-link {
    min-height: inherit;
    padding: 112px clamp(22px, 4vw, 42px) 30px;
    justify-content: flex-start;
    text-align: left;
  }

  .home-gateway__panel-media {
    inset: -6px;
    opacity: 1;
    transform: scale(1.01);
  }

  .home-gateway__panel-link::before {
    z-index: 1;
    background: linear-gradient(180deg, rgba(2, 14, 26, .05) 10%, rgba(2, 14, 26, .32) 53%, rgba(2, 14, 26, .8) 100%);
  }

  .home-gateway__panel:hover .home-gateway__panel-media,
  .home-gateway__panel:focus-within .home-gateway__panel-media {
    filter: saturate(1.05) brightness(1.05);
    transform: scale(1.045);
  }

  .home-gateway__panel-content {
    max-width: 390px;
    align-items: flex-start;
  }

  .home-gateway__panel-content h2 {
    margin-bottom: 14px;
    font-size: clamp(26px, 4vw, 34px);
  }

  .home-gateway__cta {
    width: min(230px, 100%);
  }
}

@media (max-width: 700px) {
  .home-gateway__intro {
    padding: 25px 20px 22px;
  }

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

  .home-gateway__panel,
  .home-gateway__panel:last-child {
    grid-column: auto;
    min-height: clamp(230px, 72vw, 310px);
    border-left: 0;
  }

  .home-gateway__panel-link {
    min-height: inherit;
    padding: 90px 20px 24px;
  }

  .home-gateway__panel-content {
    max-width: 330px;
  }

  .home-gateway__panel-content h2 {
    font-size: clamp(25px, 8.2vw, 32px);
  }

  .home-gateway__cta {
    min-height: 50px;
    padding: 11px 14px;
  }

  .home-compact-footer__inner {
    width: min(640px, calc(100% - 32px));
    padding: 26px 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .home-compact-footer__business {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .home-compact-footer__business-heading {
    padding: 0 0 13px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
  }

  .home-compact-footer__business-detail {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .home-compact-footer__actions {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .home-compact-footer__action {
    min-height: 52px;
    padding-inline: 16px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .home-gateway__intro {
    padding-inline: 16px;
  }

  .home-gateway__title {
    font-size: 22px;
  }

  .home-gateway__panel-link {
    padding-inline: 16px;
  }

  .home-compact-footer__inner {
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-gateway__backdrop,
  .home-gateway__panel,
  .home-gateway__panel-media,
  .home-gateway__cta,
  .home-gateway__cta > span:last-child,
  .home-compact-footer__action {
    transition: none;
  }

  .home-gateway:has(.home-gateway__panel:hover) .home-gateway__backdrop,
  .home-gateway:has(.home-gateway__panel:focus-within) .home-gateway__backdrop,
  .home-gateway__panel:hover .home-gateway__panel-media,
  .home-gateway__panel:focus-within .home-gateway__panel-media,
  .home-gateway__panel:hover .home-gateway__cta,
  .home-gateway__panel:focus-within .home-gateway__cta,
  .home-compact-footer__action:hover {
    transform: none;
  }
}
