/* =========================================================
   LoL AI Briefing — Landing Page
   디자인 토큰은 실제 앱(frontend/ui/theme.py)의 컬러와 통일.
   ========================================================= */

:root {
  --bg:          #0A0A12;
  --surface:     #101018;
  --card:        #16162A;
  --card-hi:     #1B1B33;
  --border:      #222236;
  --border-hi:   #333352;
  --primary:     #C89B3C;
  --primary-dim: #6B5218;
  --primary-soft: #2A2210;
  --accent:      #4E9EDE;
  --success:     #4AAF5A;
  --error:       #D94040;
  --warning:     #D4821A;
  --text:        #DDD5C5;
  --text-dim:    #9A93A6;
  --text-faint:  #8A8492; /* WCAG AA(4.5:1) 충족: 실제 쓰이는 배경(bg/surface/card) 기준 */

  --font-sans: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1140px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 8px 24px -8px rgba(0,0,0,0.5);
  --shadow-pop:  0 24px 60px -20px rgba(0,0,0,0.65);

  --ease: cubic-bezier(.16,1,.3,1);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg { display: block; }
/* Pretendard 배포본의 strong/b 기본값(900)이 불필요한 폰트 조각을 추가로 부르므로 700으로 고정 */
strong, b { font-weight: 700; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(200,155,60,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(78,158,222,0.06), transparent 60%);
  background-repeat: no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* 고정 헤더가 앵커 이동/scrollIntoView 시 섹션 제목을 가리지 않도록 여백 확보 */
section[id], #top {
  scroll-margin-top: 84px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--primary); color: var(--bg);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; z-index: 200;
}
.skip-link:focus { left: 0; }

::selection { background: var(--primary); color: var(--bg); }

/* ---------- type ---------- */
.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 16px;
}
.text-gold { color: var(--primary); }
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.92em;
  color: var(--primary);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--primary {
  background: linear-gradient(180deg, #DCB35C, var(--primary));
  color: #1A1408;
  box-shadow: 0 8px 20px -6px rgba(200,155,60,0.45);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(200,155,60,0.55); }
.btn--ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-color: var(--border-hi);
}
.btn--ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--primary-dim); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(10,10,18,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand__mark { border-radius: 50%; }
.brand__name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: 14.5px; font-weight: 600; color: var(--text-dim);
  transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 14px; }

.nav__toggle {
  display: none;
  width: 36px; height: 36px;
  border: none; background: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span {
  width: 20px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 96px;
  overflow: hidden;
}
.hero__glow {
  position: absolute; inset: -10% -10% auto -10%; height: 600px;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(200,155,60,0.16), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-dim);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 0 rgba(200,155,60,0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,155,60,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(200,155,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,155,60,0); }
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero__desc {
  margin-top: 22px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.7;
}
.hero__cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero__micro { margin-top: 18px; font-size: 13.5px; color: var(--text-faint); }

.hero__art { position: relative; display: flex; justify-content: center; }
.hero__frame {
  width: min(380px, 100%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  /* 3D 틀어보기(perspective/rotateY)는 사각형을 사다리꼴처럼 비틀어
     "이미지 비율이 찌부됐다"는 인상을 줘서, 비율 왜곡 없는 살짝의 2D 회전만 사용한다. */
  transform: rotate(-1.2deg);
}
.hero__framebar {
  height: 30px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.hero__framebar span {
  width: 9px; height: 9px; border-radius: 50%; background: var(--border-hi);
}
.hero__frame img { width: 100%; height: auto; }

.hero__badge {
  position: absolute;
  display: flex; align-items: center; gap: 7px;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-card);
  animation: float 5s ease-in-out infinite;
}
.hero__badge--1 { top: 8%; left: -6%; animation-delay: .3s; }
.hero__badge--2 { bottom: 10%; right: -8%; color: var(--primary); animation-delay: 1s; }
.hero__badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(74,175,90,.6);
  animation: pulse 2s infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- stats ---------- */
.stats { margin-top: -8px; padding-bottom: 64px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.stat {
  text-align: center;
  padding: 28px 12px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat strong {
  display: block;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.stat span { font-size: 13.5px; color: var(--text-dim); }

/* ---------- problem ---------- */
.problem { padding: 88px 0; }
.problem__grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.problem__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: border-color .2s, transform .2s var(--ease);
}
.problem__card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.problem__icon { font-size: 26px; display: block; margin-bottom: 14px; }
.problem__card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.problem__card p { font-size: 14.5px; color: var(--text-dim); line-height: 1.65; }
.problem__resolve {
  text-align: center;
  margin-top: 40px;
  font-size: 18px; font-weight: 700;
  color: var(--primary);
}

/* ---------- features ---------- */
.features { padding: 88px 0; }
.features__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.feature {
  background: linear-gradient(160deg, var(--card-hi), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px 32px;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.feature:hover {
  border-color: var(--primary-dim);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.feature--wide {
  grid-column: 1 / -1;
  border-color: var(--primary-dim);
  background: linear-gradient(160deg, var(--card-hi), var(--primary-soft) 180%);
}
.feature__list--cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 28px;
}
.feature__list--cols li:last-child { grid-column: 1 / -1; }
.feature__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.feature p { font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }
.feature__list { display: flex; flex-direction: column; gap: 9px; }
.feature__list li {
  font-size: 14.5px; color: var(--text-dim); line-height: 1.6;
  padding-left: 18px;
  position: relative;
}
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary-dim);
}
.feature__list li strong { color: var(--text); font-weight: 700; }

/* ---------- how it works ---------- */
.how { padding: 88px 0; }
.steps {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.steps__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: left;
}
.steps__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid var(--primary-dim);
  color: var(--primary);
  font-weight: 800; font-size: 14px;
  margin-bottom: 16px;
}
.steps__item h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.steps__item p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ---------- screenshots ---------- */
.screens { padding: 88px 0; }
.screens__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.screens__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .2s;
}
.screens__item:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.screens__item img { width: 100%; height: auto; }
.screens__item figcaption {
  padding: 14px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.chips {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
}
.chips span {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- download ---------- */
.download {
  padding: 96px 0;
  position: relative;
  background:
    radial-gradient(ellipse 700px 400px at 50% 0%, rgba(200,155,60,0.08), transparent 70%),
    var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.download__panel {
  margin: 48px auto 0;
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.download__cta { text-align: center; }
.download__meta { margin-top: 14px; font-size: 13px; color: var(--text-faint); }
.download__steps {
  margin: 36px 0 0;
  display: flex; flex-direction: column; gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.download__steps li {
  display: flex; gap: 14px;
  font-size: 14.5px; color: var(--text-dim); line-height: 1.6;
  counter-increment: step;
}
.download__steps { counter-reset: step; }
.download__steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--primary);
}
.download__steps li strong { color: var(--text); }

/* ---------- faq ---------- */
.faq { padding: 88px 0 110px; }
.faq__list {
  margin: 44px auto 0;
  max-width: 760px;
  display: flex; flex-direction: column; gap: 10px;
}
.faq__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
}
.faq__item + .faq__item { }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700; font-size: 15.5px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item .chev { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; transition: transform .25s var(--ease); }
.faq__item[open] .chev { transform: rotate(180deg); color: var(--primary); }
.faq__item p { padding: 0 0 20px; color: var(--text-dim); font-size: 14.5px; line-height: 1.7; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding-top: 56px; }
.footer__inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 28px;
  padding-bottom: 40px;
}
.footer__brand p { margin-top: 10px; font-size: 13.5px; color: var(--text-faint); }
.footer__domain { color: var(--primary); }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a { font-size: 14px; color: var(--text-dim); }
.footer__links a:hover { color: var(--text); }
.footer__legal {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  text-align: center;
}
.footer__legal p { font-size: 12px; color: var(--text-faint); line-height: 1.7; max-width: 640px; margin: 0 auto; }
.footer__legal p + p { margin-top: 8px; }

/* ---------- to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border-hi);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, border-color .2s;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--primary-dim); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- reveal animation ----------
   JS가 정상 동작할 때만 숨김 상태로 시작한다 (.js 클래스는 main.js가 즉시 부여).
   JS가 차단되거나 실패해도 콘텐츠는 기본적으로 항상 보인다. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { margin-top: 40px; }
  .hero { padding: 140px 0 64px; text-align: left; }
  .hero__badge { display: none; }
  .features__grid { grid-template-columns: 1fr; }
  .feature__list--cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .problem__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(10,10,18,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px 24px;
    gap: 18px;
  }
  .hero { padding: 104px 0 48px; }
  .hero__frame { width: min(300px, 84%); margin: 0 auto; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .steps { grid-template-columns: 1fr; }
  .screens__grid { grid-template-columns: 1fr; }
  .download__panel { padding: 28px 22px; }
  .hero h1 { font-size: 30px; }
  .footer__inner { flex-direction: column; }
}
