/* 홈·앱 목록 페이지 스타일 (색상 토큰은 style.css의 :root 사용) */
:root { --tile: #eceef0; }
@media (prefers-color-scheme: dark) { :root { --tile: #23282c; } }

.home main { max-width: 1040px; padding-top: 20px; }

/* 언어 전환: <html data-lang="ko|en"> 에 맞는 쪽만 표시 */
html[data-lang="ko"] .en,
html[data-lang="en"] .ko { display: none !important; }

/* 상단 */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem;
  padding: 6px 10px; border-radius: 8px;
}
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--soft); }
.lang-toggle {
  font: inherit; font-size: .85rem; cursor: pointer;
  color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-left: 4px;
}
.lang-toggle:hover { background: var(--soft); }

/* 메인 히어로 */
.hero {
  min-height: calc(100svh - 160px);
  display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 48px;
  padding: 32px 0;
}
.hero .hello { color: var(--accent); font-weight: 600; margin: 0 0 12px; }
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.18; letter-spacing: -.025em;
  margin: 0 0 20px; font-weight: 800;
}
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 30em; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-block; text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); color: var(--text);
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: var(--soft); transform: translateY(-1px); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--text); opacity: .9; }
.btn.small { font-size: .88rem; padding: 7px 14px; border-radius: 10px; }

/* 모션: 앱 아이콘 같은 타일이 대각선으로 퍼지며 나타난 뒤, L자가 차례로 켜짐 */
.tiles {
  --gap: clamp(8px, 1.4vw, 14px);
  width: min(100%, 380px); justify-self: center;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap);
}
.tiles i {
  aspect-ratio: 1; border-radius: 26%;
  background: var(--tile);
  animation: tile-in .7s cubic-bezier(.34, 1.56, .64, 1) both;
  animation-delay: calc(var(--d) * 70ms);
}
.tiles i.on {
  animation: tile-in .7s cubic-bezier(.34, 1.56, .64, 1) both,
             tile-on .45s ease forwards;
  animation-delay: calc(var(--d) * 70ms), calc(1000ms + var(--o) * 90ms);
}
@keyframes tile-in {
  from { opacity: 0; transform: scale(.2) rotate(-25deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes tile-on {
  0%   { background: var(--tile); }
  40%  { transform: scale(1.12); }
  100% { background: var(--accent); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tiles i, .tiles i.on { animation: none; }
  .tiles i.on { background: var(--accent); }
}

/* 앱 목록 페이지 */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 28px; }
.app-card {
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: 18px; padding: 20px;
}
.app-head { display: flex; align-items: center; gap: 14px; }
.app-head img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.app-head h2 { margin: 0; padding: 0; font-size: 1.05rem; line-height: 1.35; }
.app-head .platform { color: var(--muted); font-size: .85rem; }
.app-card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.app-links { display: flex; flex-wrap: wrap; gap: 8px; }
.app-card.soon {
  border-style: dashed; justify-content: center; align-items: center;
  text-align: center; min-height: 120px;
}
.app-card.soon p { flex: none; }

/* 하단 */
.home footer {
  border-top: 1px solid var(--line); padding-top: 20px; margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.home footer a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-top: 24px; }
  .tiles { order: -1; width: min(62%, 240px); justify-self: start; }
}
