@import url(../index.css);

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ─── Header & Navigation ─── */
#site-header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1.25rem;
  /* 초기 상태: 투명 */
  background-color: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.4s ease,
    backdrop-filter 0.4s ease,
    border-color 0.4s ease,
    padding 0.4s ease;
}

/* 스크롤 시 적용될 스타일 */
#site-header.scrolled {
  background-color: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-color);
  padding: var(--space-sm);
}

#site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-home {
  display: flex;
}

@media (max-width: 1023px) {
  #site-header nav {
    justify-content: space-between;
  }

  /* 모바일 메뉴 버튼 (Hamburger) */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition-smooth);
  }

  /* 메뉴 활성화 시 X 모양 애니메이션 */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* 모바일 네비게이션 오버레이 */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transform: translateX(100%);
    margin-top: 0;
    padding: 1rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
    display: flex; /* hidden 대신 transform으로 제어 */
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
  }
}

/* 데스크탑에서는 버튼 숨김 */
@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* ─── Global Section & Typography ─── */
.section-template {
  padding: var(--section-padding);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

section .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

h2 {
  font-size: var(--font-h2);
  font-weight: 800;
  color: var(--text-color);
}

h3 {
  font-size: var(--font-h3);
  font-weight: 700;
  color: var(--text-color);
}

p {
  color: var(--text-sub);
  line-height: 1.8;
}

/* ─── Hero Section ─── */
#hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 6rem var(--space-md);
  background-color: var(--bg-color);
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #hero {
    padding: var(--space-xl) 1.5rem;
  }
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../../images/medical_image_2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  background: transparent;
}

#hero-heading {
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: var(--font-h1);
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 1rem;
}

#hero-heading svg {
  width: 100%;
  max-width: 480px;
  min-width: 240px;
  height: auto;
}

@media (max-width: 1023px) {
  #hero-heading {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  #hero-heading {
    font-size: var(--font-h2);
  }
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-sub);
  max-width: 800px;
  line-height: 1.8;
  text-wrap: balance;
}

.hero-phrase {
  display: block;
}

@media (max-width: 768px) {
  .hero-phrase {
    display: inline;
  }
}

.hero-description svg {
  vertical-align: middle;
}

.btn-transparent {
  display: inline-block;
  padding: var(--space-sm);
  background: transparent;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.btn-transparent:hover {
  color: var(--primary-color);
  transform: translateY(10px);
}

.hero-headline {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-color);
  letter-spacing: -0.04em;
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 1.25rem;
  }
}

/* Common Card Hover Effects */
.product-item:hover {
  border-color: var(--primary-color);
}

.market-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1023px) {
  .market-size-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.market-card {
  position: relative;
  overflow: hidden;
  padding: 4rem 3rem;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight {
  color: var(--primary-color);
  font-weight: 800;
}

.market-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.market-card:hover::before {
  opacity: 0.16;
}

.img-world::before {
  background-image: url("../../images/globe_from_universe.jpg");
}
.img-korea::before {
  background-image: url("../../images/korea_traditional_building.jpg");
}
.img-medical::before {
  background-image: url("../../images/medical_image_1.jpg");
}

.market-card .value {
  font-size: var(--font-h2);
  font-weight: 800;
  color: var(--primary-color);
}

.market-card .sub-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.section-subheadline {
  font-size: 1.25rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .section-subheadline {
    font-size: 1rem;
  }
}

/* ─── Products ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

@media (max-width: 1023px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.product-item {
  padding: 3.5rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-item header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prod-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-color);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--bg-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  text-transform: uppercase;
  width: fit-content;
}

.product-item p {
  font-size: 1rem;
  line-height: 1.5;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  padding-left: 1.5rem;
  position: relative;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-color);
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 900;
}

/* Technology Value Grid */
.tech-value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.tech-value-item {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tech-value-item:hover {
  border-top-color: var(--primary-color);
}

.value-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

@media (max-width: 1023px) {
  .tech-value-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ─── Roadmap ─── */
.roadmap-timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) 5rem;
}

@media (max-width: 1023px) {
  .roadmap-timeline {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.roadmap-step {
  position: relative;
  padding-left: var(--space-md);
  border-left: 3px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roadmap-step .roadmap-date {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1.25rem;
  display: block;
}

.roadmap-step p {
  font-size: 1rem;
}

/* Trust & Partnership */
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.investment-item {
  gap: 1.25rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
}

.trust-item h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.trust-details {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trust-details li {
  font-size: 1rem;
  color: var(--text-sub);
}

.trust-details strong {
  color: var(--text-color);
}

@media (max-width: 1023px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ─── Footer ─── */
#site-footer {
  padding: var(--space-lg);
  background-color: var(--bg-color);
  color: var(--text-sub);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  align-items: center;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-color);
}

.footer-logo svg {
  min-width: 120px;
  min-height: 16px;
}

.footer-contact address {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-sub);
  font-size: 1rem;
  font-style: normal;
}

.contact-group {
  display: flex;
  gap: 0.5rem;
}

.contact-group .label {
  font-weight: 700;
  color: var(--text-color);
}

.copyright {
  font-size: var(--font-small);
}

/* ─── Page Specific Responsive Tweaks ─── */
@media (max-width: 480px) {
  .section-template {
    min-height: auto;
  }

  /* Hero Section */
  #hero {
    padding: 7rem 1.25rem var(--space-lg);
  }

  .hero-description {
    font-size: 1rem;
  }

  /* Market Size */
  .market-card {
    padding: var(--space-lg) var(--space-sm);
  }

  .market-card .value {
    font-size: 2.25rem;
  }

  /* Products */
  .product-item {
    padding: 2.5rem 1.5rem;
  }

  /* Roadmap */
  .roadmap-timeline {
    gap: var(--space-md);
  }

  .roadmap-step {
    padding-left: 1.5rem;
  }

  /* Footer */
  #site-footer {
    padding: var(--space-md) var(--space-sm);
  }

  #site-footer .footer-contact address {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--font-small);
    text-align: center;
  }

  .contact-group {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* ─── Back to Top Button ─── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  opacity: 0; /* 처음에는 숨김 */
  visibility: hidden;
  transition: all 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-5px);
  background-color: var(--brand-primary-bright);
}

#back-to-top svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
  }
}
