@font-face {
  font-family: "HK Headline";
  src: url("assets/title.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("assets/latin.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

/* Inspiration v2's navigation, hero, feature row and branch panel,
   adapted to EC Legend's blue and yellow shopfront. */
:root {
  --paper: #fffcf5;
  --ink: #17294e;
  --muted: #515d70;
  --brand: #183f9e;
  --brand-deep: #102f80;
  --amber: #ffd146;
  --line: #dcded9;
  --r-md: 20px;
  --r-lg: 29px;
  --r-pill: 999px;
  --shadow-md: 0 12px 28px rgba(51, 44, 26, .09);
  --body: "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", system-ui, sans-serif;
  --display: "HK Headline", var(--body);
  --latin: Nunito, "Avenir Next", system-ui, sans-serif;
  --container: min(100% - 72px, 1160px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--paper); }
body { margin: 0; font-family: var(--body); font-weight: 500; color: var(--ink); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { color: inherit; font: inherit; cursor: pointer; }
button[hidden] { display: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #df651d; outline-offset: 4px; }
.container, .nav-shell { width: var(--container); margin-inline: auto; }
.icon-library { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon {
  width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.skip-link { position: fixed; top: 10px; left: 12px; z-index: 100; padding: 8px 16px; background: #fff; border-radius: 12px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 10; background: #fffdf7f7; border-bottom: 1px solid #dad7c9; }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-logo { flex: none; }
.brand-copy { display: grid; gap: 4px; line-height: 1.1; }
.brand-copy strong { font-size: 19px; font-weight: 850; letter-spacing: .04em; }
.brand-copy small { font: 800 10px/1.2 var(--latin); letter-spacing: .075em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-size: 15px; font-weight: 750; padding: 8px 3px; }
.nav-links a:not(.nav-cta):hover, .back-top:hover { color: var(--brand); text-decoration: underline; text-underline-offset: .35em; }
.nav-links .en { display: none; }
.nav-links .nav-cta {
  display: inline-flex; gap: 7px; align-items: center; padding: 9px 20px; border-radius: var(--r-pill);
  background: var(--amber); color: var(--ink); border: 1px solid #edbc37;
}
.nav-cta:hover, .btn-yellow:hover { background: #ffde70; }
.nav-toggle { background: transparent; border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 42px; padding: 9px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 4px; }

.hero {
  position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(482px, 39vw, 660px);
  padding: 30px 0 64px; text-align: center;
  background: #fff2cc url("assets/paper-desk.webp") center / cover no-repeat;
}
.hero-copy { max-width: 650px; margin-inline: auto; }
.location-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; margin: 0 0 19px;
  color: var(--brand-deep); background: #fffcf0; border: 1px solid #c5c6bb; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 750; letter-spacing: .07em;
}
.location-tag .icon { width: 15px; height: 15px; }
.location-tag i { background: #ad811f; border-radius: 50%; width: 4px; height: 4px; }
.hero h1 {
  font: 900 clamp(64px, 5.9vw, 96px)/1.11 var(--display); letter-spacing: .038em;
  margin: 0; color: var(--brand-deep);
}
.hero h1 span { display: block; }
.hero h1 .brand-line {
  color: #ffd146; -webkit-text-stroke: clamp(2.5px, .23vw, 4px) var(--brand);
  paint-order: stroke fill; text-shadow: 0 4px 0 var(--brand); margin-bottom: 3px;
}
.hero-sub { font: 800 clamp(13px, 1.1vw, 16px)/1.4 var(--latin); letter-spacing: .085em; margin: 13px 0 23px; text-transform: uppercase; }
.hero-actions, .branch-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.hero-actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 23px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 750; font-size: 15px; transition: transform .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--brand); box-shadow: 0 3px 0 var(--brand-deep); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { border-color: #a5a99d; color: var(--ink); background: #fffdf5; }
.btn-ghost:hover { border-color: var(--ink); }
.features { position: relative; z-index: 1; margin-top: -34px; }
.feature-row {
  width: min(100% - 72px, 1000px); margin-block: 0; border: 1px solid #d8d7ce; background: #fffefd;
  border-radius: var(--r-md); box-shadow: var(--shadow-md); display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 25px 12px;
}
.feature { position: relative; padding: 0 15px 0 90px; border-left: 1px dashed #cfd0c8; }
.feature:first-child { border-left: 0; }
.feature dt { font-weight: 650; font-size: 13px; color: var(--muted); }
.feature dd { margin: 0; font-weight: 800; font-size: clamp(17px, 1.55vw, 22px); line-height: 1.4; letter-spacing: .015em; }
.f-ic { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; position: absolute; left: 28px; top: 50%; transform: translateY(-50%); }
.f-ic .icon { width: 24px; height: 24px; }
.blue { background: #e4edfd; color: var(--brand); }
.yellow { background: #fff0ba; color: #715319; }
.peach { background: #ffe6ce; color: #9d4c20; }

.section { padding: 92px 0; }
.gallery-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(40px, 7vw, 108px); align-items: center; max-width: 1032px; }
.kicker { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font: 800 12px/1.5 var(--latin); text-transform: uppercase; letter-spacing: .15em; color: var(--brand); }
.kicker::before { content: ""; width: 24px; height: 4px; border-radius: 4px; background: #f5a126; }
.section h2 { margin: 0; font: 900 clamp(32px, 3.3vw, 48px)/1.25 var(--display); letter-spacing: -.015em; }
.section-text { color: var(--muted); max-width: 24em; font-size: 16px; margin: 17px 0 24px; line-height: 1.85; }
.photo-switch { display: grid; gap: 8px; max-width: 325px; }
.photo-option {
  display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); background: #fffefd;
  border-radius: 12px; padding: 6px 14px 6px 7px; font-weight: 700; font-size: 15px;
}
.photo-option img { width: 52px; height: 39px; object-fit: cover; border-radius: 7px; }
.photo-option .icon { margin-left: auto; }
.photo-option[aria-current="true"] { background: #eaf0ff; color: var(--brand-deep); border-color: #9aafe0; }
.photo-option:hover { border-color: var(--brand); }
.gallery-figure { position: relative; margin: 0; }
.photo-frame {
  display: block; position: relative; overflow: hidden; border-radius: var(--r-md); border: 7px solid white;
  box-shadow: 0 0 0 1px #d4d4ca, 7px 8px 0 #ffcf44; background: #f7e5c3;
}
.photo-frame > img { width: 100%; aspect-ratio: 1.56; object-fit: cover; object-position: center 16%; }
.enlarge { position: absolute; bottom: 12px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fffdf4; color: var(--brand-deep); box-shadow: 0 2px 12px #0002; }
.photo-frame:hover .enlarge { background: var(--amber); }

.visit { background: #eef2f8; border-block: 1px solid #dde3ed; padding: 65px 0; }
.branch-panel {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: stretch; border-radius: var(--r-lg);
  padding: clamp(25px, 4vw, 54px); background: var(--brand-deep); color: white; max-width: 1070px;
  box-shadow: var(--shadow-md);
}
.branch-info { align-self: center; }
.branch-info .kicker { color: #ffdf7d; }
.address { margin: 18px 0 23px; font-size: clamp(17px, 1.7vw, 22px); font-weight: 650; line-height: 1.75; }
.btn-yellow { color: var(--ink); background: var(--amber); }
.copy-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: white; font-size: 14px; padding: 10px 4px; }
.copy-button:hover, .record-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-status { margin: 0; font-size: 13px; }
.copy-status:not(:empty) { margin-top: 8px; }
.inquiry-card { background: #fff9e9; color: var(--ink); border-radius: var(--r-md); padding: clamp(22px, 2.8vw, 37px); }
.inquiry-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #ffe9a0; color: var(--ink); margin-bottom: 10px; }
.inquiry-card h2 { font-size: 27px; }
.inquiry-card p { margin: 10px 0 15px; line-height: 1.8; }
.record-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-deep); font-size: 14px; font-weight: 750; }
.inquiry-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.site-footer { padding: 28px 0; }
.footer-base { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-base .brand-copy strong { font-size: 16px; }
.footer-base .brand-copy small { font-size: 8px; }
.back-top { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.back-top span { color: var(--brand); }
dialog { border: 0; padding: 12px; border-radius: 18px; background: var(--paper); color: var(--ink); max-width: min(92vw, 720px); }
dialog::backdrop { background: #09172bd6; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 8px; }
.dialog-head strong { margin-left: 5px; }
.dialog-head button { display: grid; place-items: center; border: 0; background: #e5eaf3; border-radius: 50%; width: 40px; height: 40px; }
#dialog-photo { width: min(82vw, 640px); max-height: 72dvh; object-fit: contain; }

@media (max-width: 900px) {
  :root { --container: min(100% - 48px, 1160px); }
  .feature-row { width: var(--container); padding: 20px 5px; }
  .feature { padding-left: 65px; }
  .f-ic { left: 12px; width: 41px; height: 41px; }
  .gallery-grid { gap: 38px; }
  .branch-panel { gap: 25px; }
}
@media (max-width: 700px) {
  :root { --container: calc(100% - 36px); }
  html { scroll-padding-top: 80px; }
  .nav-shell { min-height: 66px; flex-wrap: wrap; gap: 0; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 8px; }
  .nav-links { width: 100%; gap: 14px; justify-content: space-around; }
  .nav-toggle:not([hidden]) + .nav-links {
    display: none; position: absolute; top: calc(100% + 4px); left: 12px; right: 12px; width: auto;
    padding: 12px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); background: #fffdf7;
  }
  .nav-toggle:not([hidden]) + .nav-links.is-open { display: grid; gap: 3px; }
  .nav-links a { padding: 9px 13px; display: flex; justify-content: space-between; align-items: center; }
  .nav-links .en { display: inline; font: 800 11px var(--latin); color: var(--muted); }
  .nav-links .nav-cta { justify-content: center; }
  .hero { min-height: clamp(493px, 108vw, 590px); background-image: url("assets/paper-desk-mobile.webp"); background-size: 100% 100%; padding: 45px 0 83px; }
  .hero h1 { font-size: clamp(55px, 12vw, 72px); }
  .location-tag { font-size: 12px; margin-bottom: 14px; }
  .hero-sub { margin: 10px 0 19px; font-size: 12px; letter-spacing: .065em; }
  .btn { min-height: 44px; padding: 9px 19px; font-size: 14px; }
  .features { margin-top: -17px; }
  .feature-row { padding: 14px 2px; border-radius: 15px; }
  .feature { text-align: center; padding: 0 3px; }
  .feature dt { font-size: 11px; }
  .feature dd { font-size: clamp(12px, 3vw, 17px); }
  .f-ic { position: static; margin: 0 auto 5px; transform: none; width: 30px; height: 30px; border-radius: 9px; }
  .f-ic .icon { width: 17px; height: 17px; }
  .section { padding: 48px 0; }
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .gallery-copy { display: contents; }
  .gallery-copy .kicker { margin: 0 0 -15px; }
  .section-text { margin: -10px 0 0; max-width: none; }
  .gallery-figure { grid-row: 4; margin-right: 6px; }
  .photo-switch { display: flex; max-width: none; }
  .photo-option { flex: 1; justify-content: center; padding: 7px; gap: 8px; font-size: 13px; }
  .photo-option img { width: 38px; height: 31px; }
  .photo-option .icon { display: none; }
  .visit { padding: 32px 0; }
  .branch-panel { grid-template-columns: 1fr; padding: 25px 20px 20px; gap: 25px; }
  .address { margin: 14px 0 17px; }
  .site-footer { padding: 22px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
