/* ============================================================
   P&O Strategy Day · 2026 — Deck Styles
   Built on xavier-design-system v2
   ============================================================ */

:root {
  /* Core palette */
  --orange: #E8571A;
  --orange-medium: #ED7035;
  --orange-light: #F59460;
  --orange-tint-1: #FFCDA8;
  --orange-tint-2: #FFE8D4;
  --orange-tint-3: #FFF5ED;

  --brown: #3D1F0D;
  --text: #1C1C1C;
  --grey: #A1A8B3;
  --grey-medium: #B5BCC4;
  --grey-light: #CBD1D6;
  --grey-tint-1: #DFE3E6;
  --grey-tint-2: #EEEFF1;
  --grey-tint-3: #F5F7F8;

  --white: #FFFFFF;
  --warm-white: #FAFAF8;
  --bg: #F7F5F2;

  /* Group accent colors — harmonized with brand orange */
  --apple-red:    #C62828;
  --orange-fruit: #E8571A;
  --grape-purple: #6A3D8E;
  --strawberry-pink: #D63A6B;

  /* Type scale @ 1920×1080 */
  --type-hero:     128px;
  --type-mega:     240px;
  --type-title:    72px;
  --type-section:  56px;
  --type-subtitle: 44px;
  --type-lead:     36px;
  --type-body:     28px;
  --type-small:    24px;
  --type-label:    16px;

  /* Spacing */
  --pad-x: 120px;
  --pad-y: 100px;
  --pad-bottom: 90px;
  --gap-title: 56px;
  --gap-item: 32px;

  /* Fonts */
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans:  Arial, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-cn:    "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

/* ============================================================
   Slide reset
   ============================================================ */
deck-stage > section {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  overflow: hidden;
  position: relative;
}

/* Disable text selection on slide content for press feel */
deck-stage > section * {
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   Reusable type
   ============================================================ */
.kicker {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--type-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
.kicker-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--type-body);
  color: var(--grey);
  font-weight: 400;
}
.title-cn {
  font-family: var(--font-cn);
  font-weight: 700;
  color: var(--brown);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.title-en {
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  color: var(--brown);
}

/* Vertical orange rule */
.rule-orange {
  width: 4px;
  background: var(--orange);
  flex-shrink: 0;
}

/* ============================================================
   Footer (every slide)
   ============================================================ */
.deck-footer {
  position: absolute;
  bottom: 32px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--grey-medium);
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.deck-footer .right { color: var(--orange-tint-1); font-style: italic; font-family: var(--font-serif); text-transform: none; letter-spacing: 0; }

/* Slide-number badge in top-right of most slides */
.slide-tag {
  position: absolute;
  top: 60px;
  right: var(--pad-x);
  font-family: var(--font-serif);
  font-size: 24px;
  font-style: italic;
  color: var(--grey-medium);
}

/* ============================================================
   Section bar (浅橙标题条 + 4px 竖线)
   ============================================================ */
.section-bar {
  display: flex;
  align-items: stretch;
  margin-bottom: var(--gap-title);
}
.section-bar .bar-body {
  flex: 1;
  background: var(--orange-tint-2);
  padding: 22px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.section-bar .bar-cn {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 38px;
  color: var(--brown);
}
.section-bar .bar-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  color: var(--brown);
  opacity: 0.7;
}

/* ============================================================
   Entry animations — driven by data-deck-active
   The deck-stage component sets data-deck-active on the current
   slide; we use it to (re)play subtle in-animations.
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes wipeRight {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes drawWidth {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* All entry animations only fire while slide is active */
deck-stage > section [class*="anim-"] { opacity: 0; }
deck-stage > section[data-deck-active] [class*="anim-"] {
  animation-fill-mode: both;
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}
deck-stage > section[data-deck-active] .anim-fade { animation-name: fadeIn; }
deck-stage > section[data-deck-active] .anim-up   { animation-name: fadeUp; }
deck-stage > section[data-deck-active] .anim-scale { animation-name: scaleIn; }
deck-stage > section[data-deck-active] .anim-wipe { animation-name: wipeRight; animation-duration: 0.9s; }
deck-stage > section[data-deck-active] .anim-draw {
  animation-name: drawWidth;
  animation-duration: 1.1s;
  transform-origin: left center;
}
deck-stage > section[data-deck-active] .anim-left { animation-name: slideInLeft; }

/* Stagger helpers */
.d-1  { animation-delay: 0.10s; }
.d-2  { animation-delay: 0.20s; }
.d-3  { animation-delay: 0.30s; }
.d-4  { animation-delay: 0.40s; }
.d-5  { animation-delay: 0.55s; }
.d-6  { animation-delay: 0.70s; }
.d-7  { animation-delay: 0.85s; }
.d-8  { animation-delay: 1.00s; }
.d-9  { animation-delay: 1.15s; }
.d-10 { animation-delay: 1.30s; }
.d-11 { animation-delay: 1.45s; }
.d-12 { animation-delay: 1.60s; }

/* ============================================================
   Fruit geometric icons
   Minimal geometry only: circles, segments, triangles, dots
   ============================================================ */
.fruit-icon {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.fruit-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Apple = filled circle + stem rect + leaf triangle */
/* Orange = circle with 6 radial wedge lines */
/* Grape = triangular cluster of 6 small circles */
/* Strawberry = rounded teardrop + small seeds */

/* ============================================================
   Countdown timer
   ============================================================ */
.count-down-box {
  font-family: var(--font-serif);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 200px;
  color: var(--brown);
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  position: relative;
}
.count-down-box .cd-hint {
  position: absolute;
  bottom: -38px;
  left: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  color: var(--grey);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.count-down-box.is-running .cd-hint { opacity: 0.4; }
.count-down-box.is-done {
  color: var(--orange);
  animation: pulse 1s ease-in-out infinite;
}
.count-down-box.is-warn {
  color: var(--apple-red);
}

/* ============================================================
   Generic helpers
   ============================================================ */
.flex { display: flex; }
.col { flex-direction: column; }
.row { flex-direction: row; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.gap-s { gap: 16px; }
.gap-m { gap: 32px; }
.gap-l { gap: 56px; }
.full { width: 100%; height: 100%; }
.abs { position: absolute; }

/* Placeholder text style */
.placeholder-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--grey);
}
.placeholder-block {
  border: 1.5px dashed var(--grey-tint-1);
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 16px,
    rgba(232, 87, 26, 0.04) 16px,
    rgba(232, 87, 26, 0.04) 32px
  );
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
}

/* ============================================================
   Shuffle stage
   ============================================================ */
.shuf-stage {
  position: absolute;
  inset: 0;
  font-family: var(--font-cn);
}
.shuf-col {
  position: absolute;
  top: 196px;
  height: 760px;
  display: flex;
  flex-direction: column;
}
.shuf-col-head {
  height: 110px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px 18px 4px;
  border-bottom: 1.5px solid var(--grey-tint-1);
}
.shuf-fruit {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.shuf-fruit svg { display: block; width: 100%; height: 100%; }
.shuf-col-cn {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 26px;
  color: var(--brown);
  line-height: 1;
}
.shuf-col-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--grey);
  margin-top: 6px;
}
.shuf-col-spine {
  display: none;
}
.shuf-col[data-group="apple"]      .shuf-fruit,
.shuf-col[data-group="orange"]     .shuf-fruit,
.shuf-col[data-group="grape"]      .shuf-fruit,
.shuf-col[data-group="strawberry"] .shuf-fruit { background: transparent; border-radius: 0; }

.shuf-chip {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--from-tint);
  border-left: 3px solid var(--from-color);
  color: var(--brown);
  font-family: var(--font-cn);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    transform 1.4s cubic-bezier(0.65, 0, 0.35, 1),
    background 0.6s ease,
    border-color 0.6s ease,
    box-shadow 0.4s ease;
  will-change: transform;
  box-shadow: 0 0 0 0 transparent;
}
.shuf-chip[data-stayed="0"] {
  /* moving chips get z bumped */
  z-index: 5;
}

.shuf-stage.is-shuffled .shuf-chip {
  transform: translate(var(--dx), var(--dy));
  background: var(--to-tint);
  border-left-color: var(--to-color);
  transition-delay: var(--shuf-delay, 0s);
}
.shuf-stage.is-shuffled .shuf-chip[data-stayed="0"] {
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.18);
}

/* Stagger by group + index */
.shuf-chip { transition-delay: 0s; }

.shuf-status {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.shuf-status-cn {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 32px;
  color: var(--brown);
}
.shuf-status-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--grey);
  margin-top: 8px;
}

/* ============================================================
   QR placeholder (for live voting slides)
   ============================================================ */
.qr-placeholder {
  width: 360px;
  height: 360px;
  background: var(--warm-white);
  border: 1.5px solid var(--grey-tint-1);
  position: relative;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  gap: 2px;
  padding: 16px;
}
.qr-placeholder::before,
.qr-placeholder::after,
.qr-placeholder .qr-corner-3 {
  content: '';
  position: absolute;
  width: 72px;
  height: 72px;
  border: 14px solid var(--brown);
}
.qr-placeholder::before { top: 16px; left: 16px; }
.qr-placeholder::after  { top: 16px; right: 16px; }
.qr-placeholder .qr-corner-3 { bottom: 16px; left: 16px; }
.qr-placeholder .qr-dot {
  background: var(--brown);
}
