/* KecoTech PHP — 원본(Next) 대비 보조·동작 전용 (타이포/여백은 kecotech-main.css) */

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.contact-form__message--error { color: #ff6568; }
.contact-form__message--success { color: #8cd14f; }
.contact-form__message--hidden { display: none; }

.mobile-menu.hidden { display: none !important; }
.mobile-menu:not(.hidden) { display: flex !important; }

/* ——— Header (원본: 스크롤 시 py-5만, 배경 없음) ——— */
.site-header.is-scrolled {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.site-header__logo {
  transition: filter 0.5s ease, transform 0.5s ease;
}
.site-header.is-light .site-header__logo {
  filter: brightness(0);
  transform: scale(0.9);
}
.site-header.is-light nav[aria-label="Main navigation"] {
  border-color: rgba(15, 23, 43, 0.1);
  background-color: rgba(15, 23, 43, 0.05);
}
.site-header.is-light .site-header__link,
.site-header.is-light .site-header__menu-btn {
  color: #0f172b;
}
.site-header.is-light .site-header__link:hover {
  background-color: rgba(15, 23, 43, 0.05);
}

/* ——— Trust (#trust) ——— */
#trust.trust-section {
  background-color: #f8f9fa;
  padding-top: 6rem;
  padding-bottom: 3rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}
#trust .trust-section__header {
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  #trust.trust-section {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  #trust .trust-section__header {
    margin-bottom: 5rem;
  }
}
#trust .trust-section__rows > * + * {
  margin-top: 2rem;
}
#trust .trust-marquee {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
#trust .trust-marquee__card {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 11rem;
  height: 6rem;
  padding: 1.5rem;
  background-color: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
  #trust .trust-marquee__card {
    width: 16rem;
    height: 8rem;
  }
}
#trust .trust-marquee__card > .relative {
  position: relative;
  width: 100%;
  height: 100%;
}
#trust .trust-marquee__card .relative.w-full.h-full > img.object-contain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (prefers-reduced-motion: no-preference) {
  #trust .trust-section__title.animate-on-scroll,
  #trust .trust-section__desc.animate-on-scroll {
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
  #trust .trust-section__desc.animate-on-scroll {
    transition-delay: 0.1s;
  }
}
#trust .trust-marquee__track {
  gap: 1.5rem;
}
@media (min-width: 768px) {
  #trust .trust-marquee__track {
    gap: 2.5rem;
  }
}
#cert-section div.w-\[80\%\].relative > img.object-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ——— Scroll reveal (Framer whileInView) ——— */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
      opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }
  .animate-on-scroll.animate-fade { transform: none; }
  .animate-on-scroll.animate-up-sm { transform: translate3d(0, 15px, 0); }
  .animate-on-scroll.animate-up-lg { transform: translate3d(0, 32px, 0); }
  .animate-on-scroll.animate-scale { transform: scale(0.95); }
  .animate-on-scroll.animate-card { transform: translate3d(0, 30px, 0); }
  .animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
  }

  .animate-stagger > * {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition:
      opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .animate-stagger.is-visible > * {
    opacity: 1;
    transform: none;
  }
  .animate-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
  .animate-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
  .animate-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
  .animate-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
  .animate-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
  .animate-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }

  #home .hero-animate {
    opacity: 0;
    transform: translate3d(0, 15px, 0);
    transition:
      opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #home .hero-animate.is-visible {
    opacity: 1;
    transform: none;
  }
  #home .hero-animate-delay-1 { transition-delay: 0.15s; }
  #home .hero-animate-delay-2 { transition-delay: 0.35s; }

  .solutions-bg__img {
    opacity: 0.4;
    transform: scale(1.08);
    transition:
      opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
      transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .solutions-bg.is-visible .solutions-bg__img {
    opacity: 0.4;
    transform: scale(1);
  }
  .solutions-bg__img.solutions-bg--fading {
    opacity: 0.15;
  }

  /* Technology 필름 스택 — 원본 React FilmStack 동작 */
  .film-layer__label {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .film-layer.is-active .film-layer__label {
    transform: translateX(0) translateY(-20px);
  }
  @media (min-width: 768px) {
    .film-layer__label {
      opacity: 0;
      transform: translateX(1rem);
    }
    .film-layer.is-active .film-layer__label {
      opacity: 1;
      transform: translateX(0) translateY(-40px);
    }
  }
  .film-layer.is-active .film-layer__badge {
    background-color: rgba(0, 35, 104, 0.8);
    border-color: rgba(255, 251, 182, 0.5);
  }
  .film-layer.is-active .film-layer__text {
    color: var(--brand-gold-on-dark, #fffbb6);
  }
  .film-layer.is-active .film-layer__line {
    border-color: rgba(255, 251, 182, 0.7);
  }

  .faq-item__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .faq-item__panel > .faq-item__panel-inner {
    overflow: hidden;
  }
  .faq-item.is-open .faq-item__panel {
    grid-template-rows: 1fr;
  }
  .faq-item__panel.hidden {
    display: grid;
  }

  .floating-cta {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 0.6s ease 0.8s,
      transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
  }
  .floating-cta.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-stagger > *,
  #home .hero-animate,
  .floating-cta {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.solution-tab.is-active { color: #0f172b; }

.faq-tab.is-active {
  background: #c4a24a !important;
  color: #fff !important;
  border-color: #c4a24a !important;
}

/* FAQ 아코디언 — 원본 k-eco.vercel.app */
.faq-item.is-open {
  border-color: rgba(196, 162, 74, 0.4);
  box-shadow: 0 20px 50px -20px rgba(196, 162, 74, 0.15);
}
.faq-item__icon--close {
  display: none;
}
.faq-item.is-open .faq-item__icon-wrap {
  background: #c4a24a;
  border-color: #c4a24a;
  color: #fff;
  transform: rotate(180deg);
}
.faq-item.is-open .faq-item__icon--plus {
  display: none;
}
.faq-item.is-open .faq-item__icon--close {
  display: block;
}
.faq-item__highlight {
  background-color: rgba(196, 162, 74, 0.1);
  border-left: 4px solid #c4a24a;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem;
  margin: 0.5rem 0;
}
.faq-item__highlight p {
  color: #a3853b;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
}
@media (min-width: 768px) {
  .faq-item__highlight p {
    font-size: 15px;
  }
}
.faq-item__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: #f1f5f9;
  color: #64748b;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
}
.faq-item__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}
.faq-item__content > p {
  color: #475569;
  font-size: 14px;
  line-height: 1.625;
  font-weight: 500;
}
@media (min-width: 768px) {
  .faq-item__content > p {
    font-size: 15px;
  }
}

#comparison-section [data-word] {
  transition: color 0.35s ease, font-weight 0.35s ease;
}
#comparison-section [data-word].is-lit {
  color: #002368 !important;
  font-weight: 700;
}

#evolution-stage {
  margin: 0 auto;
  max-width: 100%;
}
.evolution-card {
  left: 0;
  top: 0;
}

/* Trust marquee — 원본 Framer: direction ±1, duration 30s, items×3, x ±33.33% */
@media (prefers-reduced-motion: no-preference) {
  #trust .trust-marquee__track {
    display: flex;
    flex-shrink: 0;
    width: max-content;
    will-change: transform;
  }
  #trust .trust-marquee[data-marquee-direction="-1"] .trust-marquee__track {
    animation: kecotech-trust-marquee-left 30s linear infinite;
  }
  #trust .trust-marquee[data-marquee-direction="1"] .trust-marquee__track {
    animation: kecotech-trust-marquee-right 30s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  #trust .trust-marquee__track {
    animation: none !important;
  }
}
@keyframes kecotech-trust-marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333333%); }
}
@keyframes kecotech-trust-marquee-right {
  0% { transform: translateX(-33.333333%); }
  100% { transform: translateX(0); }
}

.contact-overlap {
  transform: translateY(-20%);
}

/* ——— Contact (원본 k-eco.vercel.app — kecotech-main.css에 없는 arbitrary 유틸 보완) ——— */
#contact-section.contact-section {
  background-image: linear-gradient(to bottom, var(--bg-deep), var(--color-slate-500));
}
#contact-section .contact-section__title {
  line-height: 1.25;
}
@media (min-width: 1024px) {
  #contact-section .contact-section__title {
    font-size: 54px;
  }
  #contact-section .contact-section__intro {
    width: 41.666667%;
    flex-shrink: 0;
  }
  #contact-section .contact-section__form-col {
    width: 58.333333%;
    flex-shrink: 0;
  }
}
#contact-section .contact-section__form > * + * {
  margin-top: 3rem;
}
#contact-section .contact-section__form label {
  color: rgba(255, 255, 255, 0.9);
}
#contact-section .contact-section__form input,
#contact-section .contact-section__form textarea {
  width: 100%;
  padding: 0.625rem 0.25rem;
  background: transparent;
  color: #fff;
  font-weight: 500;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
#contact-section .contact-section__form input::placeholder,
#contact-section .contact-section__form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
#contact-section .contact-section__form input:focus,
#contact-section .contact-section__form textarea:focus {
  outline: none;
  border-bottom-color: var(--brand-primary);
  box-shadow: none;
}
#contact-section .contact-section__form input:-webkit-autofill,
#contact-section .contact-section__form input:-webkit-autofill:hover,
#contact-section .contact-section__form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  transition: background-color 99999s ease-out 0s;
  box-shadow: 0 0 0 1000px transparent inset;
}
#contact-section .contact-section__form textarea {
  resize: none;
  font-size: 15px;
  line-height: 1.625;
}
#contact-section .contact-section__submit {
  border: 1px solid var(--brand-primary);
  border-radius: 9999px;
  color: var(--brand-primary);
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 3rem;
  box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--brand-primary) 10%, transparent);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}
#contact-section .contact-section__submit:hover {
  background-color: var(--brand-primary);
  color: var(--color-slate-900);
}
@media (min-width: 1024px) {
  #contact-section .contact-section__actions {
    justify-content: flex-end;
  }
}

#floating-cta-btn {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
#floating-cta-btn:hover {
  transform: scale(1.05) translateY(-2px);
}
#floating-cta-btn:active {
  transform: scale(0.95);
}

/* Energy calculator — range 슬라이더 (트랙·thumb 수직 중앙 정렬) */
#calc-panel .calc-range {
  --calc-range-fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
#calc-panel .calc-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(
    to right,
    #fffbb6 var(--calc-range-fill),
    rgba(255, 255, 255, 0.1) var(--calc-range-fill)
  );
}
#calc-panel .calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: none;
  border-radius: 50%;
  background: #fffbb6;
  cursor: pointer;
}
#calc-panel .calc-range::-moz-range-track {
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(
    to right,
    #fffbb6 var(--calc-range-fill),
    rgba(255, 255, 255, 0.1) var(--calc-range-fill)
  );
}
#calc-panel .calc-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #fffbb6;
  cursor: pointer;
}

/* ——— 원본 문서 뷰어 (cert-section) ——— */
.cert-doc-viewer[hidden] {
  display: none !important;
}
body.cert-doc-viewer-open {
  overflow: hidden;
}
/* index.php 전용 arbitrary 클래스(h-[85vh] 등)는 kecotech-main.css에 없음 */
.cert-doc-viewer__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 85vh;
  max-height: 90vh;
}
.cert-doc-viewer__body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.cert-doc-viewer__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f1f5f9;
}
@media (prefers-reduced-motion: no-preference) {
  .cert-doc-viewer__panel {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }
  .cert-doc-viewer.is-open .cert-doc-viewer__panel {
    opacity: 1;
    transform: none;
  }
}
