:root {
  --color-primary: #073bab;
  --color-secondary: #3b80f0;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-background: #ffffff;
  --color-background-secondary: #f2f2f2;

  --container-width: 1400px;
  --container-padding: clamp(24px, 3vw, 36px);

  --font-base:
    "Pretendard", "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  /* 폰트 크기 토큰: 모바일부터 데스크톱까지 자연스럽게 커지도록 clamp로 관리합니다. */
  --font-size-18: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-24: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-28: clamp(1.5rem, 1.25rem + 1vw, 1.75rem);
  --font-size-32: clamp(1.625rem, 1.4rem + 1vw, 2rem);
  --font-size-40: clamp(2rem, 1.7rem + 1.4vw, 2.5rem);
  --font-size-48: clamp(2.25rem, 1.85rem + 2vw, 3rem);
  --font-size-72: clamp(3rem, 2.2rem + 4vw, 4.5rem);
  --font-size-96: clamp(4rem, 2.5rem + 6vw, 6rem);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-base);
  font-weight: 400;
  line-height: 1.2;
}

/* 공통 컨테이너: 전체 페이지의 좌우 여백과 최대 폭을 일관되게 관리합니다. */
.container {
  width: min(100% - (var(--container-padding) * 2), var(--container-width));
  margin-inline: auto;
}
section .container {
  padding-block: 72px;
}

/* 기본 랜드마크 레이아웃: 실제 콘텐츠 추가 전에도 페이지 골격을 유지합니다. */
.site-header,
.site-footer {
  min-height: 72px;
}

.site-header {
  border-bottom: 1px solid var(--color-border);

  /* 헤더를 main 위에 떠 있는 고정 레이어로 배치합니다. */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  backdrop-filter: blur(2px);
}

.site-main {
  min-height: calc(100vh - 144px);
}

.site-footer {
  border-top: 1px solid var(--color-border);

  background-color: var(--color-primary);
  color: #fff;
  padding-block: 80px;
}

/* 공통 */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  width: auto;
  border: 0;
  cursor: pointer;
  font-family: inherit;

  color: #fff;
  z-index: 1;
  position: relative;
}

.btn-primary {
  background: var(--color-primary);
}
.btn-dark {
  background: #000;
}
.btn-lg {
  padding: 16px 28px;

  font-size: var(--font-size-24);
}
.btn-sm {
  padding: 8px 18px;

  font-size: var(--font-size-18);
}

.btn:after {
  position: absolute;
  content: "";
  width: 0;
  height: 100%;
  top: 0;
  left: 0;
  direction: rtl;
  z-index: -1;
  background: #e0e5ec;
  transition: all 0.3s ease;
}
.btn:hover {
  color: #000;
}
.btn:hover:after {
  left: auto;
  right: 0;
  width: 100%;
}
.btn:active {
  top: 2px;
}
.btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.section-tagline {
  font-size: var(--font-size-18);
  color: var(--color-primary);
  font-weight: 700;
}
.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.section-description {
  font-size: var(--font-size-32);
  font-weight: 500;
}

.section-article {
  display: flex;
  gap: 24px;
}
.section-article > * {
  flex: 1;
}

/* 헤더 */
.site-header {
  transition: all 0.3s ease;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-content > * {
  flex: 1;
  display: flex;
}
.header-content .logo-wrapper {
  justify-content: center;
}
.header-content .contact-wrapper {
  justify-content: flex-end;
}
.gnb {
  display: flex;
  gap: 24px;
}
.gnb a {
  display: inline-block;
  padding: 16px 0;
  color: var(--color-text);
  font-size: var(--font-size-18);
  font-weight: 500;
}
.gnb a:hover {
  color: var(--color-primary);
  font-weight: 700;
}

.site-header.is-light .gnb a {
  color: #fff;
}
.site-header.is-light .gnb a:hover {
  color: var(--color-primary);
}

.logo {
  display: inline-block;
}
.header-logo {
  height: 56px;
}

/* main - hero */
.hero {
  min-height: 720px;
  height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  color: #fff;

  background:
    linear-gradient(
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.4) 20%,
      rgba(0, 0, 0, 0.8) 100%
    ),
    center / cover no-repeat url("../images/hero_bg.webp");
}

.hero-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
}

.hero-title {
  font-size: var(--font-size-72);
  font-weight: 700;
}

.hero-title__accent {
  display: inline-block;
  font-weight: 900;
}

.hero-title__accent .split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.25em);
  animation: heroCharFade 1.2s ease forwards;
  animation-delay: calc(0.18s + var(--char-index) * 0.2s);
}

.hero-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}
.hero-banner .hero-track {
  display: flex;
  width: max-content;
  animation: rolling 20s linear infinite;
}
.hero-banner .rolling-text {
  font-size: var(--font-size-96);
  font-weight: 700;
  opacity: 0.2;
  white-space: nowrap;
}

/* main - about */
.about {
  min-height: 720px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  color: #fff;
  text-align: center;

  background:
    linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),
    center / cover no-repeat url("../images/about_bg.webp");
}

.about-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
}

.about-logo {
  width: 400px;
}
.about-title {
  font-size: var(--font-size-48);
  font-weight: 700;
}
.about-title span {
  color: var(--color-secondary);
}
.about-description {
  font-size: var(--font-size-32);
  font-weight: 500;
  line-height: 1.4;
}

/* main - technology */

.tech {
  min-height: 720px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.tech::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  left: 0;
  bottom: -50%;
  border-radius: 100%;
  background: linear-gradient(
    162deg,
    rgba(255, 180, 74, 0.2) 15%,
    rgba(89, 131, 245, 0.5) 40%,
    rgba(26, 43, 221, 0.5) 60%
  );
  filter: blur(61px);
}

.tech-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 72px;
}

.tech-item {
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-background-secondary);

  display: flex;
  padding: 48px 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
.tech-section-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tech-item .icon {
  font-size: var(--font-size-48);
}
.tech-tagline {
  font-size: var(--font-size-18);
  font-weight: 600;
}
.tech-title {
  font-size: var(--font-size-28);
}
.tech-description {
  font-size: var(--font-size-24);
  line-height: 1.5;
}
.tech-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-badge {
  font-size: var(--font-size-18);
  border: 1px solid var(--color-muted);
  padding: 12px 24px;
  font-weight: 500;
}

.tech-item:hover {
  background-color: rgba(7, 59, 171, 0.8);
  color: #fff;
}
.tech-item:hover .tech-badge {
  border: 1px solid var(--color-background-secondary);
}

/* main - application */
.app {
  min-height: 720px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.app-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 72px;
}

.app-item {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: #fff;
}

.app-item .content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-item .tags {
  display: none;
  font-size: var(--font-size-32);
  font-weight: 700;
}
.app-manu {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%),
    center / cover no-repeat url("../images/app_manufactoring_bg.webp");
}
.app-public {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%),
    center / cover no-repeat url("../images/app_public_bg.webp");
}

.app-title {
  font-size: var(--font-size-28);
}
.app-description {
  font-size: var(--font-size-24);
}

.app-item:hover .content {
  display: none;
}
.app-item:hover .tags {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-item:hover.app-manu {
  background:
    linear-gradient(0deg, rgba(7, 59, 171, 0.8) 0%, rgba(7, 59, 171, 0.8) 100%),
    center / cover no-repeat url("../images/app_manufactoring_bg.webp");
}
.app-item:hover.app-public {
  background:
    linear-gradient(0deg, rgba(7, 59, 171, 0.8) 0%, rgba(7, 59, 171, 0.8) 100%),
    center / cover no-repeat url("../images/app_public_bg.webp");
}

/* footer */

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.contact {
  display: flex;
  justify-content: space-between;
}
.contact > * {
  flex: 1;
}
.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-logo {
  width: 140px;
}
.contact-title {
  font-size: var(--font-size-28);
}

.contact-desc {
  font-size: var(--font-size-18);
}

.contact-infos {
  display: flex;
  justify-content: center;
  align-items: center;
}
.infos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
  min-width: 180px;
}

.infos .icon {
  font-size: var(--font-size-32);
}

.infos .title {
  font-size: var(--font-size-28);
  font-weight: 700;
}
.infos .info {
  font-size: var(--font-size-18);
}

.copyright {
  border-top: 1px solid var(--color-secondary);
  padding-top: 24px;
  text-align: center;
  color: var(--color-secondary);

  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* 문의 모달: 화면 전체를 덮고 내부 패널만 스크롤되도록 구성합니다. */
.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.contact-modal__panel {
  position: relative;
  width: min(100%, 720px);
  max-height: min(820px, calc(100vh - 48px));
  overflow-y: auto;
  background: #fff;
  color: var(--color-text);
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.contact-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.contact-modal__eyebrow {
  color: var(--color-primary);
  font-size: var(--font-size-18);
  font-weight: 700;
}

.contact-modal__title {
  margin-top: 6px;
  font-size: var(--font-size-40);
  font-weight: 700;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--font-size-18);
  font-weight: 600;
}

.contact-form__field em {
  color: var(--color-primary);
  font-style: normal;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  padding: 13px 14px;
  color: var(--color-text);
  font: inherit;
  line-height: 1.4;
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: 2px solid rgba(7, 59, 171, 0.25);
  border-color: var(--color-primary);
}

/* 개인정보 고지는 제출 직전 확인해야 하므로 폼 안에서 시각적으로 분리합니다. */
.privacy-notice {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.privacy-notice strong {
  color: var(--color-text);
}

.privacy-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text);
  font-weight: 600;
}

.privacy-agree input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
}

.contact-form__message {
  min-height: 1.4em;
  color: var(--color-primary);
  font-size: var(--font-size-18);
  font-weight: 600;
}

.contact-form__message.is-error {
  color: #b91c1c;
}

.contact-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

body.is-modal-open {
  overflow: hidden;
}

/* 섹션 진입 애니메이션: JS 초기화 후에만 숨김 상태를 적용해 콘텐츠 유실을 막습니다. */
.has-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.has-reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.has-reveal-ready .tech-item.is-revealed:hover,
.has-reveal-ready .app-item.is-revealed:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

[data-reveal-delay="100"] {
  --reveal-delay: 0.1s;
}

[data-reveal-delay="200"] {
  --reveal-delay: 0.2s;
}

[data-reveal-delay="300"] {
  --reveal-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .has-reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-title__accent .split-char {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 24px;
  }
  .pc-br {
    display: none;
  }
  .gnb {
    display: none;
  }
  .header-content .logo-wrapper {
    justify-content: flex-start;
  }

  .tech,
  .app {
    height: auto;
  }

  .section-article,
  .contact,
  .contact-infos,
  .copyright {
    flex-direction: column;
  }
  .contact-infos {
    align-items: flex-start;
  }
  .infos {
    flex-direction: row;
    gap: 8px;
  }
  .infos .icon,
  .infos .title {
    font-size: var(--font-size-18);
  }
  .contact,
  .contact-infos {
    gap: 24px;
  }

  .footer-container {
    gap: 24px;
  }

  .contact-modal {
    align-items: flex-end;
    padding: 16px;
  }

  .contact-modal__panel {
    max-height: calc(100vh - 32px);
    padding: 24px;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .contact-modal__actions {
    flex-direction: column-reverse;
  }

  .contact-modal__actions .btn {
    width: 100%;
    text-align: center;
  }
}

@keyframes rolling {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes heroCharFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
