/* =========================================================
   ALLOY — 신소재공학부 게임동아리
   레이아웃 참고: 대형 전자 브랜드 커머스 홈 (흑백 베이스 + 필 버튼 + 풀폭 히어로)
   ========================================================= */
:root {
  --black: #000;
  --ink: #1d1d1f;
  --gray-1: #f4f4f4;
  --gray-2: #e5e5e5;
  --gray-3: #8f8f8f;
  --white: #fff;
  --accent: #2189ff;          /* 포인트 컬러 (클럽 컬러로 교체 가능) */
  --radius: 20px;
  --gnb-h: 64px;
  --max: 1440px;
  --pad: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--gnb-h) + 16px); }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 26px; border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn-sm { height: 36px; padding: 0 18px; font-size: 14px; }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #444; }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: var(--gray-2); }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--black); }
.link { display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; border-radius: 50%; }
.icon-btn:hover { background: var(--gray-1); }

/* ---------- Promo bar ---------- */
.promo-bar {
  position: relative; background: var(--black); color: var(--white);
  font-size: 13px; text-align: center; padding: 10px 48px;
}
.promo-bar a { text-decoration: underline; margin-left: 8px; font-weight: 700; }
.promo-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; }
.promo-bar.hidden { display: none; }

/* ---------- GNB ---------- */
.gnb { position: sticky; top: 0; z-index: 100; background: var(--white); transition: box-shadow .2s; }
.gnb.scrolled { box-shadow: 0 1px 0 var(--gray-2); }
.gnb-inner {
  max-width: var(--max); margin: 0 auto; height: var(--gnb-h);
  padding: 0 var(--pad); display: flex; align-items: center; gap: 40px;
}
.logo { font-weight: 900; font-size: 24px; letter-spacing: .14em; display: flex; flex-direction: column; line-height: 1; }
.logo span { font-size: 8px; letter-spacing: .3em; font-weight: 600; margin-top: 4px; color: var(--gray-3); }
.gnb-menu { flex: 1; height: 100%; }
.gnb-menu > ul { display: flex; gap: 28px; list-style: none; height: 100%; }
.gnb-menu > ul > li { display: flex; align-items: center; }
.gnb-menu > ul > li > a { font-size: 15px; font-weight: 600; position: relative; padding: 6px 0; }
.gnb-menu > ul > li > a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--black); transition: width .2s;
}
.gnb-menu > ul > li:hover > a::after { width: 100%; }
.gnb-util { display: flex; align-items: center; gap: 4px; }
.gnb-cta { margin-left: 8px; }
.menu-toggle { display: none; }

/* Mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: var(--gnb-h);
  background: var(--white); border-top: 1px solid var(--gray-2); box-shadow: 0 20px 30px rgba(0,0,0,.06);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 40px; display: flex; gap: 64px; }
.mega-col { display: flex; flex-direction: column; gap: 12px; min-width: 160px; }
.mega-col h4 { font-size: 13px; color: var(--gray-3); font-weight: 600; margin-bottom: 4px; }
.mega-col a { font-size: 16px; font-weight: 600; }
.mega-col a:hover { text-decoration: underline; }
.mega-feature { margin-left: auto; width: 320px; border-radius: 14px; overflow: hidden; position: relative; }
.mega-feature img { width: 100%; height: 180px; object-fit: cover; }
.mega-feature span { position: absolute; left: 16px; bottom: 14px; color: var(--white); font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* Search */
.search-panel { display: none; max-width: 760px; margin: 0 auto; padding: 8px var(--pad) 28px; }
.search-panel.open { display: block; }
.search-panel form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--black); padding: 10px 0; font-size: 22px; }
.search-panel input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 20px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; font-size: 14px; }
.search-tags span { color: var(--gray-3); margin-right: 4px; }
.search-tags a { background: var(--gray-1); padding: 6px 14px; border-radius: 999px; }

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 0; z-index: 200; background: var(--white);
  padding: 0 var(--pad) 32px; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s;
}
.mobile-nav.open { transform: none; }
.mobile-nav-head { height: var(--gnb-h); display: flex; align-items: center; justify-content: space-between; }
.mobile-nav > a:not(.btn) { font-size: 22px; font-weight: 700; padding: 16px 0; border-bottom: 1px solid var(--gray-2); }
.mobile-nav .btn { margin-top: 24px; }

/* ---------- Hero ---------- */
.hero-swiper { height: min(78vh, 760px); min-height: 520px; }
.hero-slide {
  background: linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 60%), var(--img) center/cover no-repeat;
  color: var(--white); display: flex; align-items: flex-end;
}
.hero-copy { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 110px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; opacity: .85; }
.hero-copy h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.hero-copy p { font-size: clamp(16px, 1.5vw, 19px); margin: 18px 0 28px; opacity: .9; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-controls {
  position: absolute; z-index: 10; left: 50%; bottom: 40px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
}
.hero .swiper-pagination { position: static; width: auto !important; display: flex; align-items: center; }
.hero .swiper-pagination-bullet { background: var(--white); opacity: .5; width: 8px; height: 8px; transition: width .3s; }
.hero .swiper-pagination-bullet-active { opacity: 1; width: 28px; border-radius: 4px; }
.hero-pause { color: var(--white); font-size: 20px; display: grid; place-items: center; }
.hero .swiper-button-prev, .hero .swiper-button-next {
  color: var(--white); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
}
.hero .swiper-button-prev::after, .hero .swiper-button-next::after { font-size: 18px; font-weight: 700; }

/* ---------- Quick categories ---------- */
.quick-cats {
  max-width: 1000px; margin: 0 auto; padding: 48px var(--pad) 16px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; text-align: center;
}
.cat { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.cat span {
  width: 84px; height: 84px; border-radius: 50%; background: var(--gray-1);
  display: grid; place-items: center; font-size: 34px; transition: transform .2s, background .2s;
}
.cat:hover span { transform: translateY(-4px); background: var(--gray-2); }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 72px var(--pad); }
.section-title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; letter-spacing: -.03em; text-align: center; margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head .section-title { margin: 0; text-align: left; }

/* Tabs */
.tabs { display: flex; justify-content: center; gap: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--gray-2); overflow-x: auto; }
.tab { padding: 12px 2px; font-size: 17px; font-weight: 600; color: var(--gray-3); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--black); border-color: var(--black); }
.tab-panel { display: none; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 20px; height: 640px; }
.tab-panel.active { display: grid; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--gray-1); isolation: isolate; min-height: 0;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--img) center/cover no-repeat; transition: transform .6s ease;
}
.tile:hover::before { transform: scale(1.04); }
.tile-lg { grid-row: span 2; }
.tile-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; }
.tile-copy.light { color: var(--white); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.tile-copy:not(.light) { background: linear-gradient(transparent, rgba(255,255,255,.85) 40%); }
.tile-copy h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.tile-lg .tile-copy h3 { font-size: 36px; }
.tile-copy p { margin: 6px 0 16px; font-size: 15px; opacity: .9; }

/* Banner */
.banner {
  min-height: 560px; display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--white); padding: 80px var(--pad);
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), var(--img) center/cover fixed;
}
.banner h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.2; font-weight: 800; letter-spacing: -.03em; margin-bottom: 20px; }
.banner p { font-size: 17px; line-height: 1.7; opacity: .9; margin-bottom: 32px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 20px; }
.stat strong { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--gray-3); font-weight: 600; }

/* Events */
.event-swiper { padding-bottom: 32px; }
.event-card { width: 300px; background: var(--gray-1); border-radius: var(--radius); padding: 28px; height: auto; transition: background .2s; }
.event-card:hover { background: var(--gray-2); }
.event-card .date { display: flex; align-items: baseline; gap: 10px; margin-bottom: 28px; }
.event-card .date b { font-size: 48px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.event-card .date span { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--gray-3); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--white); }
.badge-accent { background: var(--accent); color: var(--white); }
.event-card h3 { font-size: 20px; margin: 14px 0 8px; letter-spacing: -.02em; }
.event-card p { font-size: 14px; color: #555; display: flex; gap: 4px; align-items: center; }
.event-swiper .swiper-scrollbar { height: 3px; background: var(--gray-2); }
.event-swiper .swiper-scrollbar-drag { background: var(--black); }

/* Game library */
.filter { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.chip { padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--gray-2); font-weight: 600; font-size: 14px; }
.chip.active { background: var(--black); color: var(--white); border-color: var(--black); }
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.game { transition: opacity .3s; }
.game.hide { display: none; }
.game img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 16px; background: var(--gray-1); transition: transform .3s; }
.game:hover img { transform: translateY(-4px); }
.game h4 { margin-top: 14px; font-size: 17px; }
.game span { font-size: 14px; color: var(--gray-3); }

/* Crew */
.crew-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: center; }
.crew img { width: 120px; height: 120px; margin: 0 auto 16px; border-radius: 50%; background: var(--gray-1); padding: 14px; image-rendering: pixelated; }
.crew h4 { font-size: 17px; }
.crew span { font-size: 14px; color: var(--gray-3); }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--gray-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 4px; font-size: 18px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\ea4e"; font-family: remixicon; font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding: 0 4px 22px; color: #444; line-height: 1.7; }

/* Join */
.join { background: var(--black); color: var(--white); padding: 96px var(--pad); text-align: center; }
.join h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -.03em; }
.join-inner > p { margin: 12px 0 36px; opacity: .8; }
.join-form { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 860px; margin: 0 auto; }
.join-form input, .join-form select {
  height: 48px; border-radius: 999px; border: 1.5px solid #444; background: #111; color: var(--white);
  padding: 0 22px; font: inherit; font-size: 15px; min-width: 0; flex: 1 1 160px; outline: none;
}
.join-form input:focus, .join-form select:focus { border-color: var(--white); }
.join-form .btn { height: 48px; flex: 0 0 auto; }
.form-note { font-size: 13px; opacity: .55; margin-top: 18px; }
.form-note.ok { opacity: 1; color: #7cd992; }

/* Footer */
.footer { background: var(--gray-1); padding: 64px var(--pad) 32px; font-size: 14px; }
.footer-cols { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer h5 { font-size: 15px; margin-bottom: 16px; }
.footer-cols a, .footer-cols p { display: block; color: #555; margin-bottom: 10px; }
.footer-cols a:hover { color: var(--black); text-decoration: underline; }
.social { display: flex; gap: 8px; margin-top: 8px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--white); font-size: 18px; color: var(--black); }
.footer-bottom {
  max-width: var(--max); margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--gray-2);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--gray-3); font-size: 13px;
}
.footer-bottom a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gnb-menu, .gnb-cta { display: none; }
  .menu-toggle { display: grid; }
  .gnb-util { margin-left: auto; }
  .tab-panel { grid-template-columns: 1fr 1fr; grid-template-rows: 420px 280px; height: auto; }
  .tile-lg { grid-column: span 2; grid-row: auto; }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .crew-grid { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .banner { background-attachment: scroll; }
}
@media (max-width: 640px) {
  .promo-bar { font-size: 12px; text-align: left; padding-left: 16px; }
  .hero-swiper { min-height: 560px; }
  .hero-copy { padding-bottom: 96px; }
  .hero .swiper-button-prev, .hero .swiper-button-next { display: none; }
  .quick-cats { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .cat span { width: 68px; height: 68px; font-size: 28px; }
  .section { padding: 56px var(--pad); }
  .tabs { justify-content: flex-start; gap: 20px; }
  .tab-panel { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 320px; }
  .tile-lg { grid-column: auto; }
  .tile-copy { padding: 24px; }
  .tile-lg .tile-copy h3 { font-size: 28px; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .crew-grid { grid-template-columns: 1fr 1fr; }
  .crew img { width: 96px; height: 96px; }
  .event-card { width: 260px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { transition: none !important; animation: none !important; }
}
