:root {
  color-scheme: light;
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-2: #fff0df;
  --ink: #211b17;
  --muted: #75675d;
  --line: #ecd8c4;
  --orange: #f97316;
  --red: #ef4444;
  --blue: #2563eb;
  --green: #16a34a;
  --pink: #ec4899;
  --amber: #f59e0b;
  --violet: #7c3aed;
  --header-bg: rgba(255, 247, 237, 0.88);
  --shadow: rgba(94, 58, 20, 0.14);
  --soft-shadow: rgba(94, 58, 20, 0.08);
  --dark-panel: #271b14;
  --dark-panel-muted: #f4dfca;
}

body.dark-mode {
  color-scheme: dark;
  --bg: #11100f;
  --surface: #1d1815;
  --surface-2: #2b211b;
  --ink: #fff7ed;
  --muted: #d7c5b8;
  --line: #40332a;
  --orange: #fb923c;
  --red: #f87171;
  --blue: #60a5fa;
  --green: #4ade80;
  --pink: #f472b6;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --header-bg: rgba(17, 16, 15, 0.88);
  --shadow: rgba(0, 0, 0, 0.36);
  --soft-shadow: rgba(0, 0, 0, 0.22);
  --dark-panel: #211813;
  --dark-panel-muted: #ead6c7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background 0.2s ease, color 0.2s ease;
}

body.is-lightbox-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 58px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px var(--soft-shadow);
}

.brand {
  font-size: 20px;
  font-weight: 950;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.nav a:hover {
  color: var(--orange);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 18px var(--soft-shadow);
}

.theme-toggle:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #120d0a;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 10, 7, 0.78), rgba(14, 10, 7, 0.38) 48%, rgba(14, 10, 7, 0.12)),
    linear-gradient(0deg, rgba(14, 10, 7, 0.44), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(740px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 84px);
  padding: 96px 0 118px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(50px, 10vw, 116px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.hero-title-sub {
  max-width: 690px;
  margin: 20px 0 0;
  font-size: clamp(24px, 4.2vw, 44px);
  line-height: 1.18;
  font-weight: 950;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.hero-copy {
  max-width: 560px;
  margin: 18px 0 0;
  color: #f8dfc8;
  font-size: 18px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-link,
.secondary-link {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 950;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-2px);
}

.primary-link {
  background: var(--orange);
  color: #fff;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.summary-strip {
  width: min(1120px, calc(100% - 36px));
  margin: -54px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 48px var(--shadow);
  overflow: hidden;
}

.summary-strip article {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.summary-strip article:last-child {
  border-right: 0;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.summary-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: 86px;
}

body.motion-ready .section,
body.motion-ready .summary-strip {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.motion-ready .section.is-visible,
body.motion-ready .summary-strip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: 0;
}

.mission-grid,
.crew-grid {
  display: grid;
  gap: 16px;
}

.mission-grid {
  grid-template-columns: repeat(3, 1fr);
}

.mission-card,
.crew-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px var(--soft-shadow);
}

.mission-card {
  min-height: 206px;
  padding: 24px;
}

.mission-number {
  display: block;
  color: var(--orange);
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
}

.mission-card h3,
.crew-card h3 {
  margin: 18px 0 8px;
  font-size: 25px;
}

.mission-card p,
.crew-card p,
.weather-card p,
.plan-panel p {
  margin: 0;
  color: var(--muted);
}

.live-panel {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 16px;
}

.countdown-card,
.weather-card {
  padding: clamp(24px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px var(--soft-shadow);
}

.countdown-card h2,
.weather-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.countdown-grid div {
  min-height: 104px;
  padding: 14px 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.countdown-grid strong {
  color: var(--orange);
  font-size: clamp(30px, 6vw, 50px);
  line-height: 1;
  font-weight: 950;
}

.countdown-grid span,
.countdown-note,
.weather-result span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.countdown-note {
  margin: 16px 0 0;
}

.weather-card p {
  margin-top: 12px;
  font-size: 16px;
}

.weather-form {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.weather-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.weather-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.weather-form input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.weather-form button {
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.weather-result {
  margin-top: 16px;
  padding: 16px;
  display: grid;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weather-result strong {
  color: var(--ink);
  font-size: 18px;
}

.crew-grid {
  grid-template-columns: repeat(3, 1fr);
}

.crew-card {
  min-height: 250px;
  padding: 22px;
  border-top: 6px solid var(--orange);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crew-card:hover,
.mission-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px var(--shadow);
}

.profile-thumb {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  background-image: url("assets/member-avatar-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 28px var(--soft-shadow), inset 0 -8px 18px rgba(0, 0, 0, 0.12);
}

.avatar-beomseok { background-position: 0% 0%; }
.avatar-yunhee { background-position: 50% 0%; }
.avatar-dongkwon { background-position: 100% 0%; }
.avatar-gahee { background-position: 0% 100%; }
.avatar-kangmin { background-position: 50% 100%; }
.avatar-ikjae { background-position: 100% 100%; }

.crew-card span {
  display: inline-flex;
  margin-top: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--orange);
  font-size: 13px;
  font-weight: 950;
}

.crew-card.blue { border-top-color: var(--blue); }
.crew-card.rose { border-top-color: var(--red); }
.crew-card.green { border-top-color: var(--green); }
.crew-card.pink { border-top-color: var(--pink); }
.crew-card.amber { border-top-color: var(--amber); }
.crew-card.violet { border-top-color: var(--violet); }

.shirt-panel {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
  align-items: center;
  padding: clamp(26px, 5vw, 46px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px var(--soft-shadow);
}

.shirt-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.shirt-preview {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 18px;
  align-items: center;
}

.shirt-shape {
  min-height: 260px;
  padding: 34px 22px 26px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), transparent),
    #fffaf2;
  color: #211b17;
  border: 2px solid var(--line);
  border-radius: 42px 42px 12px 12px;
  position: relative;
  text-align: center;
}

.shirt-shape::before,
.shirt-shape::after {
  content: "";
  position: absolute;
  top: 42px;
  width: 54px;
  height: 86px;
  background: #fffaf2;
  border: 2px solid var(--line);
}

.shirt-shape::before {
  left: -42px;
  border-radius: 28px 8px 18px 28px;
  transform: rotate(18deg);
}

.shirt-shape::after {
  right: -42px;
  border-radius: 8px 28px 28px 18px;
  transform: rotate(-18deg);
}

.shirt-badge {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 950;
}

.shirt-shape strong {
  font-size: 22px;
  font-weight: 950;
}

.shirt-shape small {
  color: #9a3412;
  font-weight: 900;
}

.shirt-notes {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.shirt-notes li {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 850;
}

.poster-section {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 34px;
  align-items: center;
}

.poster-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.poster-frame {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 44px var(--shadow);
  transform: rotate(-1.1deg);
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 1492 / 1054;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-slider {
  position: relative;
  padding: clamp(14px, 3vw, 22px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px var(--soft-shadow);
}

.gallery-track {
  position: relative;
  min-height: clamp(320px, 60vw, 620px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.gallery-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-slide figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 13px 15px;
  border-radius: 8px;
  background: rgba(20, 14, 10, 0.72);
  color: #fff7ed;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.gallery-button {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(20, 14, 10, 0.7);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-button:hover {
  background: var(--orange);
}

.gallery-button.prev {
  left: clamp(22px, 4vw, 34px);
}

.gallery-button.next {
  right: clamp(22px, 4vw, 34px);
}

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}

.gallery-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: var(--orange);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(9, 7, 6, 0.88);
  backdrop-filter: blur(14px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox figure {
  width: min(1180px, 100%);
  max-height: 88vh;
  margin: 0;
  display: grid;
  gap: 12px;
}

.lightbox img {
  width: 100%;
  max-height: calc(88vh - 54px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.lightbox figcaption {
  color: #fff7ed;
  text-align: center;
  font-weight: 900;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 34px;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 50px;
  height: 50px;
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--orange);
}

.plan-panel {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 34px;
  padding: clamp(28px, 5vw, 48px);
  background: var(--dark-panel);
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.plan-panel::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.34);
}

.plan-panel h2,
.plan-panel p,
.plan-list {
  position: relative;
  z-index: 1;
}

.plan-panel p {
  margin-top: 16px;
  color: var(--dark-panel-muted);
  font-size: 17px;
}

.plan-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.plan-list div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.plan-list dt {
  color: #fdba74;
  font-size: 13px;
  font-weight: 950;
}

.plan-list dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.comments-panel {
  min-height: 260px;
  padding: clamp(18px, 4vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px var(--soft-shadow);
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 80px auto 0;
  padding: 28px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .nav {
    min-width: 0;
    overflow-x: auto;
  }

  .summary-strip,
  .live-panel,
  .mission-grid,
  .crew-grid,
  .shirt-panel,
  .shirt-preview,
  .poster-section,
  .plan-panel {
    grid-template-columns: 1fr;
  }

  .poster-frame {
    transform: none;
  }

  .shirt-shape {
    width: min(280px, calc(100% - 84px));
    margin: 0 auto;
  }

  .summary-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 540px) {
  .site-header {
    padding: 14px 18px;
  }

  .nav {
    gap: 14px;
    font-size: 13px;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(14, 10, 7, 0.32), rgba(14, 10, 7, 0.86));
  }

  .hero-content {
    width: calc(100% - 36px);
    margin: 0 auto;
    align-self: flex-end;
    padding-bottom: 94px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .section {
    padding-top: 64px;
  }

  .profile-thumb {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .gallery-track {
    min-height: 360px;
  }

  .gallery-button {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .gallery-slide figcaption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: 14px;
  }

  .lightbox {
    padding: 54px 14px 28px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .weather-form div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .section,
  .summary-strip {
    opacity: 1;
    transform: none;
  }
}
