/* =========================================================
   TheSpaceLaunches · Home page visual draft theme
   Deep-space navy + cyan neon + 1440px container
   ========================================================= */

.text-blue { color: var(--accent-blue); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head .view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.home-hero__bg {
  position: absolute;
  inset: 0;
  background: url('https://img.thespacelaunches.cn/thespacelaunches/home/home-hero.png') center center / cover no-repeat;
  filter: brightness(0.55);
}
.home-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 15, 0.92) 0%, rgba(4, 7, 15, 0.65) 50%, rgba(4, 7, 15, 0.45) 100%),
    radial-gradient(ellipse at 80% 80%, rgba(76, 201, 255, 0.12), transparent 55%);
}
.home-hero__container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 380px;
  gap: 28px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}
.home-hero__content {
  max-width: 720px;
}
.home-hero__eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 10px;
}
.home-hero__title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-0);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  margin-bottom: 12px;
}
.home-hero__sub {
  font-size: 15px;
  color: var(--text-1);
  margin-bottom: 18px;
  max-width: 540px;
}
.home-hero__stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}
.home-hero__stat {
  display: flex;
  flex-direction: column;
}
.home-hero__stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1;
  text-shadow: 0 0 16px rgba(76, 201, 255, 0.35);
}
.home-hero__stat-label {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.home-hero__cta {
  display: inline-flex;
}

/* ---------- Next launch panel ---------- */
.home-next-launch {
  background: rgba(8, 16, 42, 0.72);
  border: var(--border-glow);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.home-next-launch__loading {
  padding: 28px;
  color: var(--text-2);
  text-align: center;
}
.home-next-launch__cover {
  height: 110px;
  background: rgba(4, 7, 15, 0.6);
  overflow: hidden;
}
.home-next-launch__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-next-launch__cover-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(76, 201, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #050a18, #0a1226 60%, #16244a);
}
.home-next-launch__body {
  padding: 16px;
}
.home-next-launch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.home-next-launch__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-orange);
}
.home-next-launch__view-all {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
}
.home-next-launch__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-0);
  margin-bottom: 6px;
}
.home-next-launch__meta {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 14px;
}
.home-next-launch__countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.home-next-launch__cell {
  text-align: center;
  padding: 6px 0;
  background: rgba(4, 7, 15, 0.6);
  border: 1px solid rgba(76, 201, 255, 0.12);
  border-radius: var(--radius-sm);
}
.home-next-launch__cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
  line-height: 1;
}
.home-next-launch__cell span {
  display: block;
  font-size: 9px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.home-next-launch__upcoming {
  border-top: 1px solid rgba(76, 201, 255, 0.12);
  padding-top: 16px;
}
.home-next-launch__upcoming-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 10px;
}
.home-next-launch__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.home-next-launch__item-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(4, 7, 15, 0.6);
  flex-shrink: 0;
  overflow: hidden;
}
.home-next-launch__item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-next-launch__item-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 4px;
}
.home-next-launch__item-info p {
  font-size: 11px;
  color: var(--text-3);
  margin: 0;
}

/* ---------- Explore Space ---------- */
.home-explore-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.home-explore-tile {
  display: block;
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-explore-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 201, 255, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(76, 201, 255, 0.15);
}
.home-explore-tile__thumb {
  height: 140px;
  background: rgba(4, 7, 15, 0.6) center / cover no-repeat;
}
.home-explore-tile__body {
  padding: 18px;
}
.home-explore-tile__body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 6px;
}
.home-explore-tile__body p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Global Launch Map ---------- */
.home-map-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
}
.home-map-wrap {
  position: relative;
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.home-map-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(4, 7, 15, 0.7);
  border: var(--border-glow);
  border-radius: 999px;
}
.home-map-legend__item {
  font-size: 11px;
  color: var(--text-1);
  padding-left: 16px;
  position: relative;
}
.home-map-legend__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.home-map-legend__item--upcoming::before { background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.home-map-legend__item--launched::before { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.home-map-legend__item--failed::before { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.home-map-canvas {
  width: 100%;
  height: 420px;
}
.home-country-rank {
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px;
}
.home-country-rank h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 16px;
}
.home-country-rank__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(76, 201, 255, 0.08);
}
.home-country-rank__row:last-child { border-bottom: none; }
.home-country-rank__name {
  font-size: 13px;
  color: var(--text-1);
}
.home-country-rank__value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  text-align: right;
}
.home-country-rank__share {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 8px;
}

/* ---------- Learn & Build ---------- */
.home-learn-section {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 48px 40px;
}
.home-learn-section__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(8, 16, 42, 0.92), rgba(4, 7, 15, 0.85)),
    url('https://img.thespacelaunches.cn/thespacelaunches/home/learn-build.png') center / cover no-repeat;
  filter: brightness(0.6);
}
.home-learn-section__head,
.home-learn-grid {
  position: relative;
  z-index: 2;
}
.home-learn-section__head {
  margin-bottom: 28px;
}
.home-learn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.home-learn-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  background: rgba(8, 16, 42, 0.7);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-learn-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 201, 255, 0.5);
  box-shadow: 0 0 24px rgba(76, 201, 255, 0.15);
}
.home-learn-tile__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(76, 201, 255, 0.1);
  border: 1px solid rgba(76, 201, 255, 0.18);
  color: var(--accent-blue);
  margin-bottom: 16px;
}
.home-learn-tile__icon svg {
  width: 22px;
  height: 22px;
}
.home-learn-tile h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 6px;
}
.home-learn-tile p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Latest News ---------- */
.home-news-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.home-news-card {
  display: block;
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(76, 201, 255, 0.45);
  box-shadow: 0 0 22px rgba(76, 201, 255, 0.12);
}
.home-news-card__thumb {
  height: 110px;
  background: rgba(4, 7, 15, 0.6) center / cover no-repeat;
}
.home-news-card__body {
  padding: 14px;
}
.home-news-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-0);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-news-card__date {
  font-size: 11px;
  color: var(--text-3);
}

/* ---------- Glossary ---------- */
.home-glossary-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.home-glossary-card {
  display: block;
  padding: 22px 18px;
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-glossary-card:hover {
  transform: translateY(-3px);
  border-color: rgba(76, 201, 255, 0.45);
  box-shadow: 0 0 20px rgba(76, 201, 255, 0.12);
}
.home-glossary-card__term {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 8px;
}
.home-glossary-card p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Responsive fallback (desktop first) ---------- */
@media (max-width: 1100px) {
  .home-hero__container { grid-template-columns: 1fr; }
  .home-next-launch { max-width: 480px; }
  .home-hero__stats { gap: 24px; }
  .home-explore-grid { grid-template-columns: repeat(2, 1fr); }
  .home-learn-grid { grid-template-columns: repeat(2, 1fr); }
  .home-news-row { grid-template-columns: repeat(3, 1fr); }
  .home-glossary-row { grid-template-columns: repeat(3, 1fr); }
  .home-map-layout { grid-template-columns: 1fr; }
}

/* =========================================================
   Phase 1 (P0) — home page mobile breakpoint additions
   Desktop rules above are byte-for-byte identical to src;
   the rules below only fire at <= 900 / <= 767 / <= 480.
   ========================================================= */

@media (max-width: 900px) {
  .hero { padding: 28px 0 36px; }
  .hero__title { font-size: 30px; }
  .hero__sub { font-size: 15px; }
  .hero__actions { gap: 8px; }
  .map { height: 360px; }
  .row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .hero { padding: 22px 0 28px; }
  .hero__title { font-size: 24px; }
  .hero__sub { font-size: 14px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .map { height: 280px; border-radius: 8px; }
  .row--4, .row--3, .row--2 { grid-template-columns: 1fr; }
  .upcoming__title { font-size: 16px; }
  .upcoming__item { padding: 12px 0; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 22px; }
  .map { height: 240px; }
  .upcoming__date { font-size: 11px; }
}