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

.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;
}

.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;
}

@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;
  }
}

@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;
  }
}
