:root {
  --navy: #0e2034;
  --ink: #17283b;
  --blue: #c5e7f6;
  --red: #d92e39;
  --muted: #607080;
  --line: #dce3e9;
}

/* 基本樣式 */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 16px/1.6 Arial, "Microsoft YaHei", sans-serif;
}

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

button,
select {
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid #4b9de0;
  outline-offset: 4px;
}

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

p {
  margin: 0 0 20px;
}

h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1px;
}

h3 {
  margin: 18px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

[hidden] {
  display: none !important;
}

/* 頁首 */

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 5%;
  background: var(--navy);
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 1.3px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 5%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-placeholder {
  display: grid;
  place-items: center;
  flex: 0 0 68px;
  min-height: 65px;
  padding: 5px;
  border: 1px dashed #9aa9b5;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
}

.logo-placeholder:has(img) {
  padding: 0;
  border: 0;
}

.logo-placeholder img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.brand-english {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand-english strong {
  color: var(--red);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.2;
  letter-spacing: .035em;
}

.brand-english-rest {
  font-size: clamp(14px, 1.6vw, 22px);
  font-weight: 700;
  letter-spacing: -.025em;
}

.brand-lower {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.chinese {
  font-size: clamp(14px, 1.55vw, 20px);
  font-weight: 600;
  white-space: nowrap;
}

.brand-car {
  width: clamp(95px, 12vw, 175px);
  height: 42px;
  object-fit: contain;
  flex: none;
}

.car-enter {
  animation: car-arrive 1.7s cubic-bezier(.15, .86, .23, 1) both;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

select {
  padding: 9px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
}

.desktop-call {
  font-weight: 700;
  white-space: nowrap;
}

#menu {
  display: none;
}

/* 立體導航按鈕 */

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 5%;
  border-top: 1px solid var(--line);
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid #cfdee9;
  border-radius: 8px;
  background: #f0f6fa;
  box-shadow: 0 2px 0 #b4c9d8;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform .2s,
    box-shadow .2s,
    background-color .2s;
}

nav a:hover,
nav a:focus-visible {
  background: #e2f0f8;
  transform: translateY(-3px);
  box-shadow:
    0 9px 18px #0e20342b,
    0 2px 0 #87b5d1;
}

nav a:active {
  transform: translateY(2px) scale(.98);
  box-shadow: 0 1px 3px #0e203433;
}

/* 首頁標題與輪播 */

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 530px;
  background: var(--navy);
  color: #fff;
}

.hero-copy {
  padding: 62px 10%;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero .eyebrow,
.visit-section .eyebrow {
  color: var(--blue);
}

#headline {
  display: grid;
  margin: 0 0 25px;
  font-size: clamp(2.3rem, 3.35vw, 3.6rem);
  line-height: 1.16;
  letter-spacing: -.035em;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

#headline > span {
  grid-area: 1 / 1;
  min-width: 0;
}

.headline-sizer,
.visit-sizer {
  visibility: hidden;
  pointer-events: none;
}

.headline-typing {
  align-self: start;
}

.is-typing::after {
  content: "|";
  color: var(--blue);
  animation: blink .7s steps(1) infinite;
}

.intro {
  max-width: 430px;
  color: #c5cfda;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 13px 23px;
  font-size: 14px;
  font-weight: 700;
}

.red {
  background: var(--red);
  color: #fff;
}

.red:hover {
  background: #b7202b;
}

.whatsapp-button {
  background: #17834d;
  color: #fff;
  border: 1px solid #17834d;
}

.whatsapp-button:hover {
  background: #0f6b3e;
  border-color: #0f6b3e;
}

.wa-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
  border-top: 1px solid #304156;
  color: #b6c4d2;
  font-size: 12px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background: #233a50;
}

#slides,
.slide {
  position: absolute;
  inset: 0;
}

.slide {
  display: grid;
  place-items: center;
  opacity: 0;
  overflow: hidden;
  background: linear-gradient(140deg, #3f5c70, #1d3248);
  transition: opacity 1.7s ease;
}

.slide.active {
  opacity: 1;
  animation: zoom 8s ease-out forwards;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback {
  padding: 20px;
  text-align: center;
  font-size: 14px;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, #0e2034b3);
  pointer-events: none;
}

.media-top {
  position: absolute;
  z-index: 1;
  top: 25px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d4e5ef;
  font-size: 12px;
  letter-spacing: 1px;
}

.slide-bottom {
  position: absolute;
  z-index: 1;
  bottom: 28px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.slide-bottom h2 {
  font-size: 25px;
}

.slide-bottom .eyebrow {
  margin-bottom: 8px;
}

.slide-controls {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 8px;
  font-size: 12px;
}

.slide-controls button {
  padding: 6px 10px;
  border: 1px solid #6c8195;
  background: #142a40;
  color: #fff;
  font-size: 12px;
}

/* 服務與相冊 */

.wrap {
  max-width: 1280px;
  margin: auto;
  padding: 70px 5%;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 32px;
}

.section-heading > p {
  max-width: 365px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-grid article {
  padding: 25px 30px 10px 0;
  border-top: 2px solid var(--navy);
}

.service-grid article + article {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.number {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.service-grid p {
  min-height: 75px;
  color: var(--muted);
  font-size: 15px;
}

.service-grid a {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--red);
  font-size: 14px;
  font-weight: 700;
}

.gallery-section {
  background: #f1f5f8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery-card {
  margin: 0;
}

.gallery-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e1e8ee;
  color: #536878;
}

.gallery-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card figcaption {
  margin-top: 12px;
  font-size: 14px;
}

/* 公告 */

.updates {
  min-height: 370px;
  padding-bottom: clamp(95px, 11vw, 150px);
}

.announcement-list {
  margin-top: 30px;
}

.announcement {
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.announcement + .announcement {
  border-top: 0;
}

.notice-label {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.announcement div {
  flex: 1;
}

.announcement h3 {
  margin: 0 0 8px;
}

.announcement p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.notice-attention {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  background: #fff4f4;
  color: var(--red);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  animation: notice-breathe 2.8s ease-in-out infinite;
}

/* 地圖與進場效果 */

.visit-section {
  background: var(--navy);
  color: #fff;
}

.visit-heading {
  min-width: 0;
  max-width: 100%;
}

.visit-type-line {
  display: grid;
  min-width: 0;
}

.visit-type-line > span {
  grid-area: 1 / 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.visit-typed {
  align-self: start;
  white-space: pre-wrap;
}

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 45px;
}

.visit-info h3 {
  margin-top: 0;
}

.visit-info > p {
  color: #bacbd8;
}

.visit-info address {
  color: #c5cfda;
  font-style: normal;
}

.phone {
  display: block;
  margin: 20px 0 32px;
  font-size: 25px;
  font-weight: 700;
}

.hour-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #334456;
  font-size: 14px;
}

.muted {
  margin: 18px 0 0;
  color: #a5bbca;
  font-size: 13px;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 390px;
  border: 0;
  background: #dce3e9;
}

.motion-enabled .reveal {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity .55s ease,
    transform .7s cubic-bezier(.18, .72, .2, 1);
}

.motion-enabled .reveal.is-visible,
.motion-enabled .reveal:focus-within {
  opacity: 1;
  transform: translateY(0);
}

.visit-reveal.is-visible {
  transition-delay: .18s;
}

.visit-info.is-visible {
  transition-delay: .32s;
}

#map.is-visible {
  transition-delay: .48s;
}

/* 頁尾 */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 35px 5%;
  font-size: 12px;
}

.footer-brand .brand-english strong {
  font-size: clamp(20px, 2.1vw, 29px);
}

.footer-brand .brand-english-rest {
  font-size: clamp(14px, 1.35vw, 19px);
}

.footer-brand .chinese {
  font-size: clamp(14px, 1.3vw, 18px);
}

.footer-brand .brand-car {
  width: clamp(85px, 10vw, 140px);
  height: 38px;
}

.back-top-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 10px 18px;
  border: 1px solid #e9b6c2;
  border-radius: 9px;
  background: #ffe9ee;
  color: #81243b;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow:
    0 3px 0 #d8a1af,
    0 5px 10px #7022381c;
  transition:
    background-color .2s,
    transform .2s,
    box-shadow .2s;
}

.back-top-button:hover,
.back-top-button:focus-visible {
  background: #ffdae4;
  transform: translateY(-3px);
  box-shadow:
    0 6px 0 #d8a1af,
    0 12px 20px #7022382e;
}

.back-top-button:active {
  transform: translateY(2px) scale(.98);
  box-shadow:
    0 1px 0 #d8a1af,
    0 2px 5px #70223829;
}

.mobile-contact {
  display: none;
}

/* 動畫 */

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes zoom {
  to {
    transform: scale(1.055);
  }
}

@keyframes notice-breathe {
  50% {
    box-shadow: 0 0 0 7px #d92e391a;
    transform: scale(1.06);
  }
}

@keyframes car-arrive {
  0% {
    opacity: 0;
    transform: translateX(-235px) scale(.75);
  }

  12% {
    opacity: 1;
  }

  65% {
    transform: translateX(-24px) scale(1.025);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* 平板 */

@media (max-width: 1000px) {
  #headline {
    font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  }
}

@media (max-width: 900px) {
  header {
    flex-wrap: wrap;
    gap: 12px;
  }

  header .brand {
    width: 100%;
  }

  .header-right {
    margin-left: auto;
  }
}

/* 手機 */

@media (max-width: 760px) {
  .topbar {
    font-size: 10px;
    padding: 8px 5%;
  }

  .topbar span + span {
    display: none;
  }

  header {
    padding: 18px 5%;
  }

  .brand {
    gap: 10px;
  }

  .logo-placeholder {
    flex-basis: 48px;
    min-height: 50px;
  }

  .brand-english {
    gap: 6px;
  }

  .brand-english strong,
  .footer-brand .brand-english strong {
    font-size: clamp(18px, 4.8vw, 26px);
  }

  .brand-english-rest,
  .footer-brand .brand-english-rest {
    font-size: clamp(11px, 3vw, 17px);
  }

  .brand-lower {
    gap: 8px;
    margin-top: 5px;
  }

  .chinese,
  .footer-brand .chinese {
    font-size: clamp(13px, 3.5vw, 17px);
  }

  .brand-car,
  .footer-brand .brand-car {
    width: clamp(82px, 23vw, 125px);
    height: 32px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  select {
    padding: 6px;
    min-width: 128px;
    font-size: 12px;
  }

  .desktop-call {
    display: none;
  }

  #menu {
    display: block;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
  }

  nav {
    display: none;
    gap: 8px;
    padding: 10px 5%;
  }

  nav.open {
    display: flex;
  }

  nav a {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 13px;
  }

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

  .hero-copy {
    padding: 42px 6% 30px;
  }

  #headline {
    font-size: clamp(2rem, 8vw, 2.65rem);
  }

  .hero-media {
    min-height: 310px;
  }

  .media-top {
    left: 22px;
    right: 22px;
    top: 20px;
  }

  .slide-bottom {
    left: 22px;
    right: 22px;
    bottom: 18px;
  }

  .slide-bottom h2 {
    font-size: 23px;
  }

  .wrap {
    padding: 46px 6%;
  }

  h2 {
    font-size: 29px;
  }

  .section-heading {
    display: block;
    margin-bottom: 25px;
  }

  .section-heading > p {
    margin-top: 18px;
  }

  .section-heading > .button {
    margin-top: 15px;
  }

  .service-grid,
  .gallery-grid,
  .visit-grid {
    grid-template-columns: 1fr;
  }

  .service-grid article,
  .service-grid article + article {
    padding: 24px 0;
    border-left: 0;
    border-top: 1px solid #bdc8d1;
  }

  .service-grid p {
    min-height: 0;
  }

  .gallery-grid {
    gap: 24px;
  }

  .gallery-photo {
    aspect-ratio: 16 / 10;
  }

  .updates {
    min-height: 330px;
    padding-bottom: 80px;
  }

  .announcement {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 15px;
  }

  .notice-label {
    flex: 1 1 calc(100% - 55px);
  }

  .announcement div {
    order: 2;
    flex: 1 1 100%;
  }

  .notice-attention {
    order: 1;
    width: 35px;
    height: 35px;
  }

  .visit-grid {
    gap: 28px;
  }

  #map {
    height: 340px;
    min-height: 310px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 5% 110px;
    gap: 24px;
  }

  .footer-brand {
    width: 100%;
  }

  .mobile-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .mobile-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    font-size: 14px;
    font-weight: 700;
  }
}

/* 較窄的手機 */

@media (max-width: 350px) {
  .logo-placeholder {
    flex-basis: 40px;
  }

  .brand {
    gap: 7px;
  }

  .brand-english strong,
  .footer-brand .brand-english strong {
    font-size: 17px;
  }

  .brand-english-rest,
  .footer-brand .brand-english-rest {
    font-size: 11px;
  }
}

/* 尊重系統的減少動畫設定 */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .motion-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}