/* ECDECO performance and accessibility layer — loaded after the archived visual system. */
:root {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Use the visitor's native Traditional Chinese typeface instead of downloading broad CJK ranges. */
@font-face {
  font-family: "Noto Sans TC";
  src: local("PingFang HK"), local("PingFang TC"), local("Microsoft JhengHei UI"), local("Microsoft JhengHei"), local("Noto Sans CJK TC");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif TC";
  src: local("Songti HK"), local("Songti TC"), local("Noto Serif CJK TC");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100001;
  transform: translateY(-180%);
  border: 1px solid #3a241e;
  border-radius: 2px;
  background: #faf7f2;
  color: #3a241e;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(58, 36, 30, 0.18);
  font: 700 14px/1.2 Manrope, "Noto Sans TC", sans-serif;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* A route-specific visual shell removes the blank first paint while the recovered app starts. */
#recovery-critical {
  position: fixed;
  z-index: 99999;
  inset: 0;
  overflow: hidden;
  background: #faf7f2;
  color: #3a241e;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

#root:has(> :not(noscript)) ~ #recovery-critical {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.recovery-critical__header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 76px);
  border-bottom: 1px solid rgba(58, 36, 30, 0.16);
  background: rgba(250, 247, 242, 0.98);
}

.recovery-critical__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.11em;
  color: #3a241e;
  font: 700 11px/1 Manrope, "Noto Sans TC", sans-serif;
}

.recovery-critical__brand img {
  display: block;
  width: auto;
  height: 38px;
}

.recovery-critical__nav {
  color: #7a655e;
  font: 600 12px/1 Manrope, "Noto Sans TC", sans-serif;
  letter-spacing: 0.08em;
}

.recovery-critical__main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  min-height: calc(100vh - 72px);
}

.recovery-critical__image {
  min-height: 560px;
  overflow: hidden;
  background: #3a241e;
}

.recovery-critical__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

/* Responsive <img> preserves the former centered cover background and frame overlay. */
.hero__responsive-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.recovery-critical__copy {
  align-self: center;
  max-width: 620px;
  padding: clamp(48px, 8vw, 128px);
}

.recovery-critical__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 21px;
  color: #9b6c42;
  font: 800 10px/1.4 Manrope, "Noto Sans TC", sans-serif;
  letter-spacing: 0.17em;
}

.recovery-critical__kicker::before {
  width: 24px;
  height: 1px;
  background: #bd8f62;
  content: "";
}

.recovery-critical__title {
  max-width: 670px;
  margin: 0;
  font-family: "Cormorant Garamond", "Noto Serif TC", serif;
  font-size: clamp(3rem, 5.9vw, 6.2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.recovery-critical__copy p:last-child {
  max-width: 490px;
  margin: 25px 0 0;
  color: #6f5d57;
  font: 400 clamp(16px, 1.2vw, 18px)/1.75 Manrope, "Noto Sans TC", sans-serif;
}

/* Native focus semantics remain visible after the recovered app renders. */
#main-content:focus {
  outline: none;
}

.inquiry-form input[type="tel"] {
  font-variant-numeric: tabular-nums;
}

.inquiry-form .ecdeco-safe-form-notice {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #9b6c42;
  background: rgba(155, 108, 66, 0.09);
  color: #3a241e;
  font: 500 14px/1.7 Manrope, "Noto Sans TC", sans-serif;
}

.inquiry-form .ecdeco-safe-form-notice:focus {
  outline: 2px solid #9b6c42;
  outline-offset: 3px;
}

.inquiry-form .ecdeco-safe-form-notice a {
  color: #7e352d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inquiry-form .ecdeco-safe-form-notice[data-state="success"] {
  border-left-color: #537153;
  background: rgba(83, 113, 83, 0.1);
}

.inquiry-form .ecdeco-safe-form-notice[data-state="error"] {
  border-left-color: #d23732;
  background: rgba(210, 55, 50, 0.1);
}

.inquiry-form button[type="submit"][disabled] {
  cursor: wait;
  opacity: 0.72;
}

.inquiry-form .ecdeco-retention-note {
  display: block;
  margin: 8px 0 0;
  color: #725e56;
  font: 400 12px/1.55 Manrope, "Noto Sans TC", sans-serif;
}

/* Government Address Lookup Service estate finder for the project consultation form. */
.inquiry-form .ecdeco-estate-field {
  position: relative;
}

.inquiry-form .ecdeco-estate-field__title,
.inquiry-form .ecdeco-estate-field__control {
  display: block;
}

.inquiry-form .ecdeco-estate-field__hint,
.inquiry-form .ecdeco-estate-field__status {
  display: block;
  color: #725e56;
  font: 400 12px/1.55 Manrope, "Noto Sans TC", sans-serif;
}

.inquiry-form .ecdeco-estate-field__hint {
  margin-top: 6px;
}

.inquiry-form .ecdeco-estate-field__status {
  min-height: 1.55em;
  margin-top: 6px;
}

.inquiry-form .ecdeco-estate-field__control {
  position: relative;
}

.inquiry-form .ecdeco-estate-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 248px;
  margin: 0;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid rgba(58, 36, 30, 0.28);
  background: #faf7f2;
  box-shadow: 0 12px 28px rgba(58, 36, 30, 0.16);
  list-style: none;
}

.inquiry-form .ecdeco-estate-results button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #3a241e;
  cursor: pointer;
  font: 500 14px/1.45 Manrope, "Noto Sans TC", sans-serif;
  text-align: left;
}

.inquiry-form .ecdeco-estate-results button:hover,
.inquiry-form .ecdeco-estate-results button:focus-visible {
  background: #eee3d4;
  outline: none;
}

/* Route-specific editorial copy keeps the visible app aligned with its crawlable page content. */
.ecdeco-page-editorial {
  max-width: 1120px;
  margin: clamp(56px, 10vw, 156px) auto 0;
  padding: clamp(42px, 7vw, 88px) clamp(24px, 6vw, 80px);
  border-top: 1px solid rgba(58, 36, 30, 0.18);
  background: #faf7f2;
  color: #3a241e;
}

.ecdeco-page-editorial > section {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 0.66fr);
  column-gap: clamp(28px, 6vw, 86px);
  padding: clamp(28px, 5vw, 54px) 0;
  border-top: 1px solid rgba(58, 36, 30, 0.14);
}

.ecdeco-page-editorial > section:first-of-type {
  border-top: 0;
}

.ecdeco-page-editorial h2 {
  margin: 0;
  color: #3a241e;
  font: 500 clamp(2rem, 3.2vw, 3.35rem)/1.08 "Cormorant Garamond", "Noto Serif TC", serif;
  letter-spacing: -0.03em;
}

.ecdeco-page-editorial p {
  grid-column: 2;
  max-width: 690px;
  margin: 0 0 1.1em;
  color: #5e4b45;
  font: 400 clamp(16px, 1.2vw, 18px)/1.85 Manrope, "Noto Sans TC", sans-serif;
}

.ecdeco-page-editorial p:last-child {
  margin-bottom: 0;
}

.ecdeco-page-editorial__lead {
  max-width: 820px !important;
  margin: 0 0 clamp(34px, 5vw, 64px) !important;
  color: #3a241e !important;
  font: 500 clamp(20px, 2vw, 27px)/1.55 "Noto Serif TC", "Cormorant Garamond", serif !important;
}

.ecdeco-page-editorial nav {
  padding-top: clamp(28px, 5vw, 48px);
  border-top: 1px solid rgba(58, 36, 30, 0.18);
}

.ecdeco-page-editorial nav h2 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 2.4vw, 2.45rem);
}

.ecdeco-page-editorial ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ecdeco-page-editorial a {
  color: #7e352d;
  font: 700 14px/1.5 Manrope, "Noto Sans TC", sans-serif;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ecdeco-page-editorial a:hover {
  color: #d23732;
}

@media (max-width: 900px) {
  .recovery-critical__nav {
    font-size: 11px;
  }

  .recovery-critical__main {
    grid-template-columns: 1fr;
  }

  .recovery-critical__image,
  .recovery-critical__image img {
    min-height: min(48vh, 430px);
  }

  .recovery-critical__copy {
    min-height: 42vh;
    padding: 52px 7vw 60px;
  }

  .recovery-critical__title {
    font-size: clamp(3rem, 11vw, 4.3rem);
  }

  .hero__copy {
    padding-top: 58px;
    padding-bottom: 62px;
  }

  .hero__copy > p {
    margin-top: 22px;
    margin-bottom: 24px;
  }

  .hero__actions {
    gap: 14px 18px;
  }

  .project-hero__visual {
    min-height: clamp(340px, 92vw, 390px);
  }

  .project-hero__copy {
    padding-top: 48px;
    padding-bottom: 54px;
  }

  .ecdeco-page-editorial > section {
    display: block;
  }

  .ecdeco-page-editorial h2 {
    margin-bottom: 20px;
  }
}

@media (max-width: 520px) {
  .recovery-critical__header {
    height: 66px;
    padding: 0 20px;
  }

  .recovery-critical__brand img {
    height: 34px;
  }

  .recovery-critical__nav {
    font-size: 10px;
  }

  .recovery-critical__image,
  .recovery-critical__image img {
    min-height: min(45vh, 390px);
  }

  .recovery-critical__copy {
    min-height: auto;
    padding: 42px 7vw 46px;
  }

  .recovery-critical__title {
    font-size: clamp(2.85rem, 13.5vw, 4rem);
  }

  .hero__copy {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .hero h1 {
    font-size: clamp(2.95rem, 13.5vw, 4.1rem);
    line-height: 1.07;
  }

  .hero__actions .button,
  .hero__actions .text-link {
    min-height: 44px;
  }

  .project-hero__visual {
    min-height: 350px;
  }

  .project-hero__copy {
    padding-top: 40px;
    padding-bottom: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Consent-first analytics preferences. */
.ecdeco-consent-banner {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 100100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.ecdeco-consent-banner__card {
  width: min(455px, 100%);
  padding: 16px 18px;
  border: 1px solid rgba(58, 36, 30, 0.22);
  background: rgba(250, 247, 242, 0.985);
  box-shadow: 0 18px 52px rgba(58, 36, 30, 0.22);
  color: #3a241e;
  pointer-events: auto;
}

.ecdeco-consent-banner__eyebrow {
  margin: 0 0 7px;
  color: #9b6c42;
  font: 800 10px/1 Manrope, "Noto Sans TC", sans-serif;
  letter-spacing: 0.15em;
}

.ecdeco-consent-banner h2 {
  margin: 0;
  font: 500 clamp(1.45rem, 2.7vw, 1.9rem)/1.05 "Cormorant Garamond", "Noto Serif TC", serif;
  letter-spacing: -0.03em;
}

.ecdeco-consent-banner h2 + p {
  max-width: 420px;
  margin: 10px 0 0;
  color: #725e56;
  font: 400 13px/1.6 Manrope, "Noto Sans TC", sans-serif;
}

.ecdeco-consent-banner a {
  color: #7e352d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.ecdeco-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ecdeco-consent-banner__actions button,
.ecdeco-consent-trigger {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #3a241e;
  border-radius: 0;
  cursor: pointer;
  font: 700 12px/1.1 Manrope, "Noto Sans TC", sans-serif;
  letter-spacing: 0.035em;
}

.ecdeco-consent-banner__primary {
  background: #3a241e;
  color: #faf7f2;
}

.ecdeco-consent-banner__secondary {
  background: transparent;
  color: #3a241e;
}

.ecdeco-consent-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100090;
  background: #3a241e;
  color: #faf7f2;
  box-shadow: 0 6px 18px rgba(58, 36, 30, 0.2);
}

.ecdeco-consent-banner__actions button:hover,
.ecdeco-consent-trigger:hover {
  background: #d23732;
  border-color: #d23732;
  color: #fff;
}

@media (max-width: 620px) {
  .ecdeco-consent-banner { inset: auto 12px 12px; }
  .ecdeco-consent-banner__card { padding: 16px; }
  .ecdeco-consent-banner__actions { display: grid; grid-template-columns: 1fr; }
  .ecdeco-consent-banner__actions button { width: 100%; }
  .ecdeco-consent-trigger { right: 12px; bottom: 12px; }
}

/* Keep the mobile menu CTA unobstructed; preference controls remain available on larger screens. */
@media (max-width: 900px) {
  .ecdeco-consent-trigger {
    display: none;
  }
}

/* Keep the Chinese studio name visible only in the phone navigation bar. */
.mobile-brand-name { display: none; }

@media (max-width: 600px) {
  .site-header { gap: 6px; }
  .mobile-brand-name {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: #3a241e;
    text-align: center;
    white-space: nowrap;
    font: 800 11px/1.1 Manrope, "Noto Sans TC", sans-serif;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-decoration-color: rgba(58, 36, 30, 0.62);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
  }
  .header-actions { flex: 0 0 auto; }
}
