/* ============================================================
   Kwatt Homepage
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* brand */
  --purple-900: #4A1FD6;
  --purple-700: #5B2BE8;
  --purple-500: #6C3CF5;
  --purple-300: #9B7BF0;

  /* hero gradient */
  --hero-from: #5B2BE8;
  --hero-via:  #7B4BEE;
  --hero-to:   #B08AD0;

  /* neutrals */
  --black:     #111111;
  --gray-900:  #232323;
  --gray-800:  #333333;
  --gray-600:  #6B7280;
  --gray-500:  #8A8F98;
  --gray-300:  #D5D8DE;
  --gray-200:  #E5E7EB;
  --gray-100:  #F1F2F4;
  --gray-50:   #F7F8FA;
  --white:     #FFFFFF;

  /* layout */
  --container: 1120px;
  --gutter: 24px;
  --header-h: 84px;

  /* radius */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, figure, address, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

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

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--black);
  color: var(--white);
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.pc-only { display: inline; }
.mo-only { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn__icon { flex: none; }

.btn--dark {
  background: var(--black);
  color: var(--white);
}
.btn--dark:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.btn--dark:active { transform: translateY(0); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease),
              box-shadow 0.3s var(--ease), height 0.3s var(--ease);
}

.header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img {
  width: 96px;
  height: auto;
  /* 흰색 → 검정 부드럽게 (헤더 배경 전환과 같은 0.3s) */
  filter: invert(0);
  transition: filter 0.3s var(--ease);
}

/* 스크롤 시 흰 배경 전환 */
.header.is-scrolled {
  height: 68px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.header.is-scrolled .header__logo img { filter: invert(1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: var(--header-h);
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--hero-from) 0%, var(--hero-via) 55%, var(--hero-to) 100%);
  overflow: hidden;
}

/* 하단 물결 도트 패턴 (배경 이미지가 있으면 아래 url 교체) */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 100%, #000 25%, transparent 72%);
  mask-image: radial-gradient(120% 100% at 50% 100%, #000 25%, transparent 72%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin-inline: auto;
  padding: 72px var(--gutter) 0;
  text-align: center;
  color: var(--white);
}

.hero__title {
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgba(40, 10, 110, 0.25);
}

.hero__desc {
  margin-top: 22px;
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero__cta { display: none; margin-top: 28px; }

.hero__visual {
  margin-top: 40px;
}
.hero__visual img {
  width: min(52%, 460px);
  margin-inline: auto;
  filter: drop-shadow(0 30px 50px rgba(45, 12, 110, 0.28));
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: clamp(80px, 9vw, 140px) 0;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
}
.feature + .feature { margin-top: clamp(72px, 8vw, 120px); }

/* 홀수/짝수 순서 반전 */
.feature--reverse .feature__text  { order: 2; }
.feature--reverse .feature__visual { order: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  background: var(--white);
}

.feature__title {
  margin-top: 20px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.03em;
  color: #141414;
}

.feature__desc {
  margin-top: 18px;
  max-width: 460px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: #14141499;
}
.feature--reverse .feature__desc { max-width: 470px; }

.feature__visual {
  background: var(--gray-50);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 7 / 5;
  overflow: hidden;
}
.feature__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================================
   SPONSORS
   ============================================================ */
.sponsors {
  background: var(--gray-50);
  padding: clamp(64px, 7vw, 100px) 0;
}

.sponsors__title {
  text-align: center;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #000000;
}

.sponsors__grid {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(20px, 3vw, 44px) clamp(16px, 2vw, 32px);
  align-items: center;
  justify-items: center;
}

.sponsors__grid img {
  width: 100%;
  max-width: 150px;
  height: auto;
  opacity: 0.92;
  transition: opacity 0.2s var(--ease);
}
.sponsors__grid li:hover img { opacity: 1; }

/* ============================================================
   DOWNLOAD CTA
   ============================================================ */
.download {
  /* 안내문·배지 주석 처리 상태 기준 패딩 (복원 시 clamp(80px, 9vw, 128px)) */
  padding: clamp(64px, 7vw, 96px) 0;
  text-align: center;
}

.download__title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: #141414;
}

.download__desc {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 400;
  color: #14141499;
}

.download__badges {
  margin-top: clamp(28px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.download__badge img {
  height: 54px;
  width: auto;
  transition: transform 0.2s var(--ease);
}
.download__badge:hover img { transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.55);
  padding: clamp(48px, 5vw, 64px) 0;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer__logo { width: 104px; height: auto; }

.footer__links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 400;
  color: var(--white);
}
.footer__links a { transition: color 0.2s var(--ease); }
.footer__links a:hover { color: var(--white); }

.footer__divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.footer__info {
  margin-top: 26px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--white);
}

.footer__copy {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 400;
  color: var(--white);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* JS 미실행 대비 */
.no-js .reveal { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE — Tablet (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root { --gutter: 28px; }

  .feature { gap: 40px; }
  .feature__desc { max-width: none; }

  .sponsors__grid { grid-template-columns: repeat(5, 1fr); }

  .hero__visual img { width: min(62%, 420px); }
}

/* ============================================================
   RESPONSIVE — Mobile (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --header-h: 60px;
  }

  .pc-only { display: none; }
  .mo-only { display: inline; }

  /* Header — 모바일은 로고만 (CTA는 히어로 안으로) */
  .header {
    background: transparent;
    justify-content: center;
  }
  .header__inner { justify-content: center; }
  .header__logo img { width: 78px; }
  .header__cta { display: none; }

  .header.is-scrolled { height: 54px; }

  /* Hero */
  .hero__inner { padding-top: 36px; }
  .hero__title {
    font-size: 26px;
    line-height: 1.4;
  }
  .hero__desc {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.7;
  }
  /* 모바일에서는 줄바꿈 강제 해제 */
  .hero__desc br { display: none; }

  .hero__cta {
    display: inline-flex;
    height: 42px;
    font-size: 13px;
  }

  .hero__visual { margin-top: 48px; } /* CTA 주석 처리로 빠진 간격 보정 (복원 시 28px) */
  .hero__visual img { width: min(78%, 320px); }

  /* Features */
  .features { padding: 64px 0; }

  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feature + .feature { margin-top: 64px; }

  /* 모바일은 항상 텍스트 → 이미지 순서 */
  .feature--reverse .feature__text  { order: 0; }
  .feature--reverse .feature__visual { order: 0; }

  .chip { height: 28px; padding: 0 12px; font-size: 12px; }

  .feature__title {
    margin-top: 14px;
    font-size: 21px;
    line-height: 1.42;
  }
  .feature__desc {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
  }
  .feature__desc br { display: none; }

  .feature__visual {
    padding: 20px;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
  }

  /* Sponsors */
  .sponsors { padding: 56px 0; }
  .sponsors__title { font-size: 19px; }
  .sponsors__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 18px;
  }

  /* Download */
  .download { padding: 64px 0; }
  .download__title { font-size: 21px; }
  .download__desc { font-size: 13px; }
  .download__badges { gap: 10px; }
  .download__badge img { height: 44px; }

  /* Footer */
  .footer { padding: 40px 0; }
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer__logo { width: 88px; }
  .footer__links { font-size: 12px; }
  .footer__info { margin-top: 20px; font-size: 12px; }
  .footer__copy { margin-top: 18px; font-size: 12px; }

}

/* ============================================================
   RESPONSIVE — Small mobile (≤380px)
   ============================================================ */
@media (max-width: 380px) {
  .hero__title { font-size: 23px; }
  .feature__title { font-size: 19px; }
  .sponsors__grid { gap: 22px 14px; }
  .download__badge img { height: 40px; }
}
