/* ==========================================================
   pages/home.css — 홈 (/)
   1. 히어로 (제목 · 검색 · 빠른 선택 · 내 학교 · 1위 성적표 미리보기)
   2. TOP 3 더보기 줄
   3. 오늘 급식 TOP 10 부가 줄
   4. 급상승 카드
   5. 지역 바로가기 · 배너
   6. 점수 기준 배너 (100점 막대는 components/stack.css)
   시상대·순위 줄 모양은 components/podium.css · rank-row.css
   ========================================================== */

/* ---------- 1. 히어로 ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(720px 360px at 88% -10%, var(--glow-brand) 0%, transparent 64%),
    radial-gradient(560px 300px at 0% 0%, var(--glow-gold) 0%, transparent 62%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 72%, #fff 100%);
  border-bottom: 1px solid var(--line-2);
}
/* .wrap 과 같은 요소라 padding 단축 속성을 쓰면 좌우 여백이 사라진다 */
.hero-grid { position: relative; padding-top: 26px; padding-bottom: 34px; }
.hero-main { position: relative; z-index: 2; width: 100%; max-width: 760px; min-width: 0; margin: 0 auto; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 11px;
  border-radius: 999px; background: #fff; border: 1px solid var(--brand-line);
  font-size: 13px; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-1);
}
.hero-badge b { color: var(--brand-deep); font-weight: 800; }
.hero-badge .live { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 1.8s infinite; }

.hero-title { margin-top: 16px; font-size: 34px; font-weight: 900; line-height: 1.18; letter-spacing: -.055em; color: var(--ink); }
.hero-title em { font-style: normal; color: var(--brand); }
.hero-sub { margin-top: 10px; font-size: 15px; color: var(--ink-2); }

.hero-search { margin: 20px auto 0; z-index: 5; text-align: left; }
.hero-ex { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* 첫 화면은 짧게만 등장하고, 검색창은 포커스될 때 살짝 떠오른다. */
.hero-badge, .hero-title, .hero-sub, .hero-search, .hero-ex, .quick {
  opacity: 0;
  animation: hero-enter .46s var(--ease) forwards;
}
.hero-badge { animation-delay: .02s; }
.hero-title { animation-delay: .08s; }
.hero-sub { animation-delay: .14s; }
.hero-search { animation-delay: .2s; }
.hero-ex { animation-delay: .26s; }
.quick { animation-delay: .32s; }
.hero-search .sfield { transition: box-shadow .2s, transform .2s var(--ease); }
.hero-search .sfield:focus-within { transform: translateY(-2px); }

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.quick { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; text-align: left; }
.quick-label { flex: none; font-size: 12.5px; font-weight: 800; color: var(--ink-4); }
.quick .chips { flex: 1; min-width: 0; }
.quick .chip { height: 36px; background: rgba(255, 255, 255, .9); }
.quick .chip[aria-pressed="true"] { background: var(--navy); }

/* 내 학교 카드 (저장했을 때만) */
.my-card {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px;
  border-radius: 16px; background: #fff; border: 1px solid var(--brand-line); box-shadow: var(--shadow-1);
  transition: box-shadow .2s, transform .15s; text-align: left;
}
.my-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.my-card-star { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.my-card-star .ico { fill: currentColor; stroke-width: 1.5; }
.my-card-main { min-width: 0; flex: 1; }
.my-card-label { font-size: 12px; font-weight: 800; color: var(--brand-deep); }
.my-card-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 800; letter-spacing: -.03em; }
.my-card-rank { flex: none; text-align: right; line-height: 1.3; }
.my-card-rank b { display: block; font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.my-card-rank .delta { font-size: 12px; }

@media (min-width: 768px) {
  .hero-grid { padding-top: 40px; padding-bottom: 48px; }
  .hero-title { font-size: 48px; }
  .hero-sub { font-size: 17px; }
  .hero-search { margin-top: 26px; }
  .quick { margin-top: 16px; }
}
@media (min-width: 1024px) {
  .hero-grid { padding-top: 48px; padding-bottom: 58px; }
  .hero-title { font-size: 54px; }
}

/* ---------- 2. 더보기 줄 ---------- */
.more-row { margin-top: 14px; }
@media (min-width: 768px) {
  .more-row { display: flex; justify-content: center; }
  .more-btn { width: auto; min-width: 280px; }
}

/* ---------- 3. 오늘 급식 TOP 10 ---------- */
.today-list .rrow-extra b { font-weight: 800; color: var(--ink); }
.today-list .rrow-side .pts { color: var(--brand-deep); }
.today-note { margin-top: 12px; }
@media (min-width: 1024px) {
  /* 1~5위 / 6~10위 두 줄로 */
  .today-list { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .today-list > li + li { border-top: 0; }
  .today-list > li { border-bottom: 1px solid var(--line-2); }
  .today-list > li:nth-child(5n) { border-bottom: 0; }
  .today-list .rrow { grid-template-columns: 44px minmax(0, 1fr) 92px; }
  .today-list .rrow-bar { display: none; }
}

/* ---------- 4. 급상승 ---------- */
.rise-grid { display: grid; gap: 10px; }
.rise {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-1); transition: box-shadow .2s, transform .15s;
}
.rise:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.rise-up {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px;
  background: var(--up-soft); color: var(--up); line-height: 1;
}
.rise-up .ico { width: 12px; height: 12px; margin-bottom: 3px; }
.rise-up b { font-size: 20px; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rise-up span { margin-top: 2px; font-size: 10.5px; font-weight: 800; }
.rise-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 800; letter-spacing: -.03em; }
.rise-path { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rise-path .ico { width: 14px; height: 14px; color: var(--ink-4); }
.rise-path b { color: var(--navy); font-weight: 800; }
.rise .pts { font-size: 18px; }
.rise.is-sk { min-height: 88px; box-shadow: none; }
@media (min-width: 640px) { .rise-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 1024px) { .rise-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 5. 지역 바로가기 · 배너 ---------- */
.region-links { grid-template-columns: repeat(4, 1fr); }
.region-links a[aria-current="true"] { background: var(--brand-soft); color: var(--brand-deep); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
@media (min-width: 640px) { .region-links { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1024px) { .region-links { grid-template-columns: repeat(9, 1fr); } }

.banner-grid { display: grid; gap: 12px; margin-top: 20px; }
.banner {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: box-shadow .2s, transform .15s;
}
.banner:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.banner-ico { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; }
.banner-ico .ico { width: 25px; height: 25px; }
.banner.is-blue .banner-ico { background: var(--blue-soft); color: var(--blue); }
.banner.is-navy .banner-ico { background: var(--navy-soft); color: var(--navy-2); }
.banner-txt { min-width: 0; flex: 1; }
.banner-txt b { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.03em; }
.banner-txt span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.banner-go { color: var(--ink-4); }
@media (min-width: 768px) { .banner-grid { grid-template-columns: 1fr 1fr; gap: 16px; } .banner { padding: 22px; } }

/* ---------- 6. 점수 기준 배너 ---------- */
.score-banner { display: grid; gap: 18px; }
.score-banner h2 { font-size: 21px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; }
.score-banner p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.score-banner .btn { justify-self: start; }

@media (min-width: 1024px) {
  .score-banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; column-gap: 40px; }
  .score-banner .btn { grid-column: 1; }
  .score-banner .stack { grid-column: 2; grid-row: 1 / span 2; height: 72px; }
  .score-banner h2 { font-size: 26px; }
}

.home-foot { margin-top: 20px; }
