/* PM Media Insider — animated explainer player (16:9 record-ready) */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --cyan: #00d4ee;
  --magenta: #e8328a;
  --purple: #8c50ff;
  --bg: #06060c;
  --text: #f4f4fa;
  --text-soft: rgba(244, 244, 250, 0.72);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Hub ── */
.ie-hub {
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}
.ie-hub-head { text-align: center; margin-bottom: 2rem; }
.ie-hub-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0.35rem 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ie-hub-head p { color: var(--text-soft); max-width: 52ch; margin: 0.75rem auto 0; line-height: 1.55; }
.ie-hub-note {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(244, 244, 250, 0.45);
  margin-top: 2rem;
}
.ie-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.ie-hub-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 18, 0.9);
  transition: border-color 0.25s, transform 0.25s;
}
.ie-hub-card:hover {
  border-color: rgba(0, 212, 238, 0.35);
  transform: translateY(-3px);
}
.ie-hub-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #080810;
  overflow: hidden;
}
.ie-hub-thumb canvas { width: 100%; height: 100%; display: block; }
.ie-hub-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 6, 12, 0.35);
  opacity: 0;
  transition: opacity 0.25s;
  font-size: 2rem;
  color: #fff;
}
.ie-hub-card:hover .ie-hub-play { opacity: 1; }
.ie-hub-body { padding: 1rem 1.1rem 1.15rem; }
.ie-hub-tag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.ie-hub-body h2 { font-size: 0.95rem; margin: 0.35rem 0 0.4rem; font-family: var(--font-display); }
.ie-hub-body p { font-size: 0.8rem; color: var(--text-soft); margin: 0; line-height: 1.45; }
.ie-hub-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text-soft);
}

/* ── Player shell ── */
.ie-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  gap: 1rem;
}
.ie-page.is-record { padding: 0; background: #000; }
.ie-page.is-record .ie-toolbar,
.ie-page.is-record .ie-hub-back { display: none !important; }

.ie-toolbar {
  width: min(100%, 960px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ie-toolbar-group { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ie-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 500 0.78rem/1 var(--font-body);
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ie-btn:hover { border-color: rgba(0, 212, 238, 0.4); background: rgba(0, 212, 238, 0.08); }
.ie-btn.is-primary {
  border-color: rgba(0, 212, 238, 0.45);
  background: rgba(0, 212, 238, 0.12);
  color: var(--cyan);
}
.ie-select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 16, 0.95);
  color: var(--text);
  font: 500 0.78rem/1 var(--font-body);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}
.ie-record-hint {
  font-size: 0.75rem;
  color: rgba(244, 244, 250, 0.45);
  max-width: 28ch;
  line-height: 1.4;
}

/* 16:9 stage */
.ie-stage-wrap {
  width: min(100%, 960px);
}
.ie-page.is-record .ie-stage-wrap { width: 100vw; max-width: none; }
.ie-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(0, 212, 238, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(232, 50, 138, 0.07), transparent 50%),
    #06060c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.ie-page.is-record .ie-stage {
  border-radius: 0;
  border: none;
  box-shadow: none;
  height: 100vh;
  width: 100vw;
  aspect-ratio: auto;
}
.ie-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.ie-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 4vw, 2.5rem);
  pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 6, 12, 0.92) 0%, rgba(6, 6, 12, 0.45) 38%, transparent 68%);
}
.ie-eyebrow {
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.35rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.ie-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  max-width: 18ch;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.08s, transform 0.6s ease 0.08s;
}
.ie-line {
  font-size: clamp(0.82rem, 1.8vw, 1.05rem);
  color: var(--text-soft);
  margin: 0;
  max-width: 42ch;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease 0.15s, transform 0.55s ease 0.15s;
}
.ie-stage.is-visible .ie-eyebrow,
.ie-stage.is-visible .ie-title,
.ie-stage.is-visible .ie-line {
  opacity: 1;
  transform: translateY(0);
}
.ie-brand {
  position: absolute;
  top: clamp(0.75rem, 2.5vw, 1.5rem);
  left: clamp(0.75rem, 2.5vw, 1.5rem);
  z-index: 3;
  font-family: var(--font-display);
  font-size: clamp(0.65rem, 1.2vw, 0.82rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 244, 250, 0.55);
}
.ie-brand strong { color: var(--magenta); font-weight: 700; }
.ie-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.06);
}
.ie-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transition: width 0.12s linear;
}
.ie-timer {
  position: absolute;
  top: clamp(0.75rem, 2.5vw, 1.5rem);
  right: clamp(0.75rem, 2.5vw, 1.5rem);
  z-index: 3;
  font-size: clamp(0.62rem, 1.1vw, 0.75rem);
  letter-spacing: 0.1em;
  color: rgba(244, 244, 250, 0.4);
  font-variant-numeric: tabular-nums;
}
.ie-page.is-record .ie-timer { display: none; }

@media (max-width: 640px) {
  .ie-toolbar { flex-direction: column; align-items: stretch; }
  .ie-record-hint { max-width: none; text-align: center; }
}
