/* ==========================================================================
   Team 3 Landing Page
   HTML / CSS / JS only. No framework.
   ========================================================================== */

:root {
  --bg: #0b0f1a;
  --bg-alt: #101626;
  --surface: #161d30;
  --surface-2: #1d2540;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f8;
  --text-muted: #9aa4bf;
  --accent: #7c5cff;
  --accent-2: #3ee6c1;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --danger: #ff6b8a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1120px;
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-alt: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f2f3fa;
  --border: rgba(15, 23, 42, 0.08);
  --text: #111827;
  --text-muted: #5b6478;
  --accent: #5b3cf0;
  --accent-2: #0fb894;
  --accent-soft: rgba(91, 60, 240, 0.1);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 900; font-size: 1.1rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 900;
}
.nav-list { display: flex; align-items: center; gap: 1.5rem; }
.nav-list a {
  font-weight: 500; color: var(--text-muted);
  padding: 0.25rem 0; position: relative;
  transition: color 0.2s;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--accent-2);
  transition: width 0.25s;
}
.nav-list a:hover, .nav-list a.active { color: var(--text); }
.nav-list a.active::after { width: 100%; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; transition: transform 0.2s;
}
.theme-toggle:hover { transform: rotate(20deg); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: 0.25s; }
.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; overflow: hidden;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}
.blob-1 { width: 520px; height: 520px; background: var(--accent); top: -180px; left: -120px; }
.blob-2 { width: 460px; height: 460px; background: var(--accent-2); bottom: -200px; right: -120px; animation-delay: -7s; }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.06); }
}
.hero-inner { position: relative; max-width: 780px; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; }
.hero-lead { margin-top: 1.5rem; font-size: 1.1rem; color: var(--text-muted); max-width: 620px; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 10px 30px var(--accent-soft);
}
.btn-ghost { border: 1px solid var(--border); background: var(--surface); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin: 3rem 0 0;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.9rem 1rem;
}
.stat dt { font-size: 0.75rem; color: var(--text-muted); }
.stat dd { margin: 0.2rem 0 0; font-size: 1.4rem; font-weight: 900; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; }
.section-lead { margin-top: 0.8rem; color: var(--text-muted); font-size: 1.05rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.card-highlight { grid-column: span 2; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.card-big { font-size: 1.35rem; font-weight: 700; line-height: 1.5; margin-bottom: 0.9rem; }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem;
  background: var(--accent-soft); color: var(--accent);
}
.badge-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); margin-right: 0.4rem;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }

.candidate-list li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--border);
}
.candidate-list li:last-child { border-bottom: 0; }
.candidate-key {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}

.value-list li { display: flex; gap: 0.8rem; padding: 0.55rem 0; }
.value-list p { color: var(--text-muted); font-size: 0.92rem; }
.value-icon { font-size: 1.3rem; line-height: 1.4; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.member {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem 1.6rem; text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.member::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.avatar {
  width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 1rem;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 25px var(--accent-soft);
}
.member h3 { font-size: 1.15rem; }
.member .role { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; margin-top: 0.2rem; }
.member .duty { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.7rem; }
.member .tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 1rem; }
.member .tags span {
  font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.member .gh { display: inline-block; margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.member .gh:hover { color: var(--text); }

/* ---------- Process ---------- */
.process-steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
  counter-reset: step;
}
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
}
.step-num { font-size: 0.8rem; font-weight: 900; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { font-size: 1rem; margin: 0.5rem 0 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.9rem; }
.kanban-mini { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.7rem; }
.kanban-mini span {
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
}
.kanban-mini span:last-child { background: rgba(62, 230, 193, 0.15); color: var(--accent-2); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding: 0 0 2rem 1.2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -2rem; top: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-alt); border: 3px solid var(--border);
}
.tl-item.is-current::before { border-color: var(--accent-2); box-shadow: 0 0 0 6px rgba(62, 230, 193, 0.15); }
.tl-item.is-done::before { background: var(--accent); border-color: var(--accent); }
.tl-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.tl-head h3 { font-size: 1.15rem; }
.tl-date { font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tl-status {
  font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.is-current .tl-status { background: rgba(62, 230, 193, 0.15); color: var(--accent-2); border-color: transparent; }
.is-done .tl-status { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tl-item p { color: var(--text-muted); margin-top: 0.4rem; }
.tl-progress { height: 6px; background: var(--surface-2); border-radius: 999px; margin-top: 0.8rem; overflow: hidden; max-width: 320px; }
.tl-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s ease; }

/* ---------- Links ---------- */
.link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.link-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.link-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.link-icon { font-size: 1.6rem; display: block; margin-bottom: 0.6rem; }
.link-card strong { display: block; font-size: 1rem; }
.link-card p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.3rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.to-top {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); font-weight: 700;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
  .card-highlight { grid-column: span 2; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-list.open { max-height: 420px; }
  .nav-list li { padding: 0 1.25rem; }
  .nav-list a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  .nav-list li:last-child { padding: 0.8rem 1.25rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .project-grid, .team-grid, .process-steps, .link-grid { grid-template-columns: 1fr; }
  .card-highlight { grid-column: auto; }
}
