/* ============================================================
   PolyBall. — SEO Optimized Homepage
   Brand: 직관은 승부예측으로
   ============================================================ */

:root {
  --polyball-blue: #1F30E9;
  --polyball-navy: #00143F;
  --polyball-mint: #09FFEE;
  --polyball-white: #FFFFFF;
  --polyball-ink: #0B0F1F;
  --polyball-gray: #E6E8F2;
  --polyball-muted: #6C7393;

  --radius-card: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 14px rgba(0, 20, 63, 0.08);
  --shadow-md: 0 18px 40px rgba(0, 20, 63, 0.18);
  --shadow-mint: 0 10px 30px rgba(9, 255, 238, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-ko: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-en: 'Inter', 'Montserrat', 'Pretendard', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-ko);
  color: var(--polyball-ink);
  background: var(--polyball-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
}

.section-title {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--polyball-muted);
  margin-bottom: 56px;
}

.brand-word {
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  background-color: transparent;
}

.site-header.is-scrolled {
  background-color: rgba(0, 20, 63, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 6px 24px rgba(0, 20, 63, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--polyball-white);
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-logo .brand-word {
  font-size: 22px;
  color: var(--polyball-white);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--polyball-mint);
  color: var(--polyball-navy);
  font-weight: 700;
  font-size: 15px;
  min-height: 44px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.header-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--shadow-mint);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  background:
    radial-gradient(1100px 600px at 85% 15%, rgba(9, 255, 238, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(9, 255, 238, 0.12), transparent 60%),
    linear-gradient(160deg, var(--polyball-blue) 0%, #1827C8 60%, var(--polyball-navy) 100%);
  color: var(--polyball-white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-baseball.svg');
  background-repeat: no-repeat;
  background-position: right -60px center;
  background-size: auto 90%;
  opacity: 0.22;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(9, 255, 238, 0.14);
  color: var(--polyball-mint);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-slogan {
  font-size: 40px;
  font-weight: 500;
  color: var(--polyball-white);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(72px, 13vw, 180px);
  line-height: 0.95;
  margin-bottom: 32px;
  color: var(--polyball-white);
}

.hero-desc {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 40px;
  max-width: 620px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 32px;
  border-radius: var(--radius-pill);
  background: var(--polyball-mint);
  color: var(--polyball-navy);
  font-weight: 800;
  font-size: 17px;
  min-height: 56px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-mint);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 28px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--polyball-white);
  font-weight: 600;
  font-size: 16px;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background-color 0.2s var(--ease);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- About ---------- */
.about {
  background: var(--polyball-white);
  color: var(--polyball-ink);
  text-align: center;
}

.about .section-title {
  color: var(--polyball-navy);
}

.about-copy {
  max-width: 760px;
  margin: 0 auto;
  font-size: 19px;
  color: #333;
}

.about-highlight {
  color: var(--polyball-blue);
  font-weight: 700;
}

.about-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.about-meta-item {
  padding: 28px 24px;
  border-radius: var(--radius-card);
  background: #F4F6FF;
  text-align: left;
}

.about-meta-item strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--polyball-blue);
  margin-bottom: 6px;
}

.about-meta-item span {
  color: var(--polyball-muted);
  font-size: 15px;
}

/* ---------- How it works ---------- */
.how {
  background: linear-gradient(180deg, var(--polyball-navy) 0%, #06246B 60%, var(--polyball-blue) 100%);
  color: var(--polyball-white);
  text-align: center;
}

.how .section-title {
  color: var(--polyball-white);
}

.how .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.step-card {
  background: var(--polyball-white);
  color: var(--polyball-ink);
  border-radius: var(--radius-card);
  padding: 40px 28px;
  text-align: left;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}

.step-card:hover {
  transform: translateY(-6px);
}

.step-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(9, 255, 238, 0.18);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--polyball-blue);
  color: var(--polyball-mint);
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--polyball-navy);
}

.step-card p {
  color: #3D4055;
  font-size: 15px;
}

/* ---------- Teams ---------- */
.teams {
  background:
    radial-gradient(1200px 500px at 50% 100%, rgba(9, 255, 238, 0.18), transparent 60%),
    var(--polyball-blue);
  color: var(--polyball-white);
  text-align: center;
}

.teams .section-title {
  color: var(--polyball-white);
}

.teams .section-subtitle {
  color: var(--polyball-mint);
  font-weight: 600;
  font-size: 20px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.team-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
  text-align: left;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
}

.team-card .team-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.team-card .team-home {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.seat-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.seat-badge {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: rgba(9, 255, 238, 0.16);
  color: var(--polyball-mint);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(9, 255, 238, 0.35);
}

/* ---------- Sports expansion ---------- */
.sports {
  background: var(--polyball-navy);
  color: var(--polyball-white);
  text-align: center;
}

.sports .section-title {
  color: var(--polyball-white);
}

.sports .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.sports-image {
  margin: 32px auto 0;
  max-width: 960px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--polyball-white);
  text-align: center;
}

.faq .section-title {
  color: var(--polyball-navy);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  border: 1px solid #E6E8F2;
  border-radius: var(--radius-card);
  background: #FAFBFF;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.faq-item[open] {
  border-color: var(--polyball-blue);
  box-shadow: 0 12px 28px rgba(31, 48, 233, 0.12);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 17px;
  color: var(--polyball-navy);
  min-height: 44px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--polyball-blue);
  color: var(--polyball-white);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

.faq-item .faq-answer {
  padding: 0 28px 22px;
  color: #333;
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--polyball-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  align-items: start;
}

.footer-brand .brand-word {
  font-size: 30px;
  color: var(--polyball-white);
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.footer-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--polyball-mint);
  margin-bottom: 18px;
}

.footer-list li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-list a:hover {
  color: var(--polyball-mint);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--polyball-white);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}

.footer-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-policy a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s var(--ease);
}

.footer-policy a:hover {
  color: var(--polyball-mint);
}

.footer-policy a strong {
  font-weight: 700;
  color: var(--polyball-white);
}

.footer-policy span[aria-hidden] {
  color: rgba(255, 255, 255, 0.25);
}

.footer-company {
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.7;
  padding-bottom: 20px;
}

.footer-company p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 4px;
}

.footer-company .sep {
  color: rgba(255, 255, 255, 0.2);
}

.footer-company a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-company a:hover {
  color: var(--polyball-mint);
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Floating CTA ---------- */
.floating-cta {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  background: var(--polyball-mint);
  color: var(--polyball-navy);
  font-weight: 800;
  font-size: 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-mint);
  min-height: 56px;
  animation: pulse-mint 2s var(--ease) infinite;
  transition: transform 0.2s var(--ease);
}

.floating-cta:hover {
  transform: scale(1.05);
}

@keyframes pulse-mint {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(9, 255, 238, 0.45), 0 0 0 0 rgba(9, 255, 238, 0.6);
  }
  50% {
    box-shadow: 0 10px 30px rgba(9, 255, 238, 0.55), 0 0 0 18px rgba(9, 255, 238, 0);
  }
}

/* ---------- Coming Soon (sub.html) ---------- */
.coming-soon {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(900px 500px at 70% 20%, rgba(9, 255, 238, 0.2), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(9, 255, 238, 0.14), transparent 60%),
    linear-gradient(160deg, var(--polyball-blue), var(--polyball-navy));
  color: var(--polyball-white);
  padding: 140px 24px 100px;
}

.coming-soon h1 {
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(72px, 18vw, 220px);
  letter-spacing: -0.04em;
  color: var(--polyball-white);
  margin-bottom: 24px;
}

.coming-soon p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--polyball-mint);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive: Tablet (<= 1024px) ---------- */
@media (max-width: 1024px) {
  section { padding: 100px 0; }
  .section-title { font-size: 36px; }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-title { font-size: clamp(64px, 11vw, 140px); }
}

/* ---------- Responsive: Tablet (<= 768px) ---------- */
@media (max-width: 768px) {
  section { padding: 80px 0; }
  .container { padding: 0 20px; }

  .section-title { font-size: 30px; }
  .section-subtitle { font-size: 16px; margin-bottom: 40px; }

  .hero { padding: 120px 0 80px; min-height: auto; }
  .hero-slogan { font-size: 26px; }
  .hero-title { font-size: clamp(56px, 16vw, 110px); }
  .hero-desc { font-size: 17px; }
  .hero::before { opacity: 0.14; background-size: auto 70%; }

  .step-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-meta { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }

  .floating-cta {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: center;
    font-size: 15px;
    padding: 16px 20px;
  }
}

/* ---------- Responsive: Mobile (<= 480px) ---------- */
@media (max-width: 480px) {
  section { padding: 64px 0; }
  .container { padding: 0 16px; }

  .header-inner { height: 60px; }
  .site-logo .brand-word { font-size: 18px; }
  .header-cta { padding: 10px 16px; font-size: 13px; }

  .hero-slogan { font-size: 22px; }
  .hero-desc { font-size: 15px; }

  .btn-primary, .btn-ghost { padding: 14px 22px; font-size: 15px; }

  .team-card { min-height: 120px; padding: 20px 16px; }
  .team-card .team-name { font-size: 17px; }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
