/* MUSIXQUARE history page. */

.editorial-history .hero > .history-hero-stats {
  width: min(560px, 42vw);
  min-height: auto;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  place-items: stretch;
  gap: 1px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  transform: none;
}

.editorial-history .hero > .history-hero-stats::before {
  display: none;
}

.history-stat-card {
  position: relative;
  min-height: clamp(140px, 13vw, 178px);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(18, 18, 18, 0.86);
}

.history-stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), transparent 58%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.history-stat-card:hover::after {
  opacity: 1;
}

.history-stat-value {
  position: relative;
  z-index: 1;
  color: var(--text-main);
  font-size: clamp(34px, 4.1vw, 56px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-stat-value span {
  color: var(--primary);
  font-size: 0.42em;
  font-weight: 800;
  vertical-align: 0.45em;
}

.history-stat-label {
  position: relative;
  z-index: 1;
  max-width: 14em;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.editorial-history .hero[data-animate] > .history-hero-stats {
  transform: translateY(16px);
}

.editorial-history .hero[data-animate].is-visible > .history-hero-stats {
  transform: translateY(0);
}

.phase-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.phase-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phase-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.phase-tag.prototype,
.phase-tag.build,
.phase-tag.wall {
  background: var(--surface-2);
}

.phase-tag.prototype,
.phase-tag.wall {
  color: var(--text-muted);
}

.phase-tag.build {
  color: var(--text-sub);
}

.phase-tag.prototype .dot,
.phase-tag.wall .dot {
  background: var(--text-muted);
}

.phase-tag.build .dot {
  background: var(--text-sub);
}

.phase-tag.ship {
  background: rgba(var(--primary-rgb), 0.18);
  color: var(--primary);
}

.phase-tag.now {
  background: rgba(var(--primary-rgb), 0.10);
  color: var(--primary);
}

.phase-tag.ship .dot {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.phase-tag.now .dot {
  background: var(--primary);
}

.phase-sub {
  max-width: 680px;
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}

.prose {
  padding: 28px 32px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-sub);
}

.prose p { margin: 0; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--text-main); font-weight: 700; }
.prose em { color: var(--primary); font-style: normal; font-weight: 700; }

.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-sans, Pretendard, sans-serif);
  font-weight: 600;
}

.log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.log li {
  padding: 18px 24px;
  display: grid;
  gap: 5px;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.log li:hover,
.infra-card:hover,
.ahead-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1d1d1d;
  transform: translateY(-2px);
}

.log .lead {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.log .body {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.log .body code {
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--font-sans, Pretendard, sans-serif);
  font-weight: 600;
}

.log .body strong {
  color: var(--text-main);
  font-weight: 700;
}

.milestone {
  padding: 28px 32px;
  display: grid;
  gap: 8px;
}

.milestone .m-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.milestone .m-title {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.milestone .m-body {
  max-width: 680px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}

.milestone .m-body strong {
  color: var(--text-main);
  font-weight: 700;
}

.infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.infra-card {
  padding: 24px 28px;
  display: grid;
  gap: 6px;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.infra-card .i-vendor {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.infra-card .i-role {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.infra-card .i-detail {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.infra-card .i-detail code {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--font-sans, Pretendard, sans-serif);
  font-weight: 600;
}

.ahead-list,
.wall-list {
  display: grid;
  gap: 10px;
}

.ahead-item,
.wall-item {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.ahead-item {
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.wall-item {
  opacity: 0.65;
}

.ahead-item .a-title,
.wall-item .w-title {
  font-size: 14px;
  font-weight: 700;
}

.ahead-item .a-title {
  color: var(--text-main);
}

.wall-item .w-title {
  color: var(--text-sub);
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.ahead-item .a-body,
.wall-item .w-body {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.ahead-item .a-body {
  color: var(--text-sub);
}

.wall-item .w-body {
  color: var(--text-muted);
}

.ahead-item .a-tag,
.wall-item .w-tag {
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .editorial-history .hero > .history-hero-stats {
    width: min(100%, 640px);
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .infra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .editorial-history .hero > .history-hero-stats {
    min-height: auto;
  }

  .history-stat-card {
    min-height: 132px;
    padding: 22px;
  }

  .ahead-item,
  .wall-item {
    grid-template-columns: 1fr;
  }

  .ahead-item .a-tag,
  .wall-item .w-tag {
    justify-self: start;
  }
}
