*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sky: #4FC3F7;
  --deep: #0D47A1;
  --sun: #FFD600;
  --coral: #FF6B35;
  --mint: #00C897;
  --lavender: #B39DDB;
  --white: #FFFFFF;
  --cloud: #F0F8FF;
}

html, body { height: 100%; overflow: hidden; font-family: 'Nunito', sans-serif; background: #0D47A1; }

/* ── SLIDE ENGINE ── */
.deck { width: 100vw; height: 100vh; position: relative; }
.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
  transform: translateY(30px);
  overflow: hidden;
}
.slide.active { opacity: 1; pointer-events: all; transform: translateY(0); }

/* ── NAV ── */
.nav {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; z-index: 999;
  background: rgba(255,255,255,.15); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.3); border-radius: 50px;
  padding: 10px;

  button {
    background: rgba(255,255,255,.9); border: none; border-radius: 50%;
    width: 44px; height: 44px; font-size: 20px; cursor: pointer;
    transition: transform .15s, background .15s; color: var(--deep);
    display: flex; align-items: center; justify-content: center;

    &:hover { transform: scale(1.15); background: white; }
    &:disabled { opacity: .35; cursor: default; transform: none; }
  }

}

.dots { display: flex; gap: 8px; }

.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.4); cursor: pointer;
  transition: background .3s, transform .3s;
}

.dot.on { background: white; transform: scale(1.3); }

/* ── SLIDE 1: TITLE ── */
#s1 {
  background: linear-gradient(160deg, #0D47A1 0%, #1565C0 40%, #1976D2 70%, #42A5F5 100%);

  .clouds { position: absolute; inset: 0; overflow: hidden; }
}

.cloud-shape {
  position: absolute; background: rgba(255,255,255,.08);
  border-radius: 50%; animation: drift linear infinite;
}
@keyframes drift { from { transform: translateX(-200px); } to { transform: translateX(110vw); } }

#s1 .kite-hero {
  position: absolute; right: 6vw; top: 8vh;
  width: min(38vw, 340px); animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-18px) rotate(3deg); } }

#s1 .content {
  position: relative; z-index: 2;
  padding: 8vh 8vw; flex: 1; display: flex; flex-direction: column; justify-content: center;
}
#s1 .label {
  font-size: clamp(13px, 1.8vw, 18px); color: rgba(255,255,255,.7);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px;
}
#s1 h1 {
  font-family: 'Pacifico', cursive;
  font-size: clamp(42px, 7vw, 88px);
  color: white; line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0,0,0,.25);
  margin-bottom: 42px;
}
#s1 .sub { font-size: clamp(16px, 2.2vw, 22px); color: rgba(255,255,255,.75); margin-bottom: 40px; }
#s1 .chips { display: flex; flex-wrap: wrap; gap: 12px; max-width: 520px; }
.chip {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px); border-radius: 100px;
  padding: 8px 20px; color: white; font-size: clamp(13px, 1.6vw, 16px); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}

/* ── SLIDE 2: HISTORY ── */
#s2 { background: #FFFDE7; }
#s2 .header { background: linear-gradient(90deg, #F57F17, #FF8F00); padding: 16px 6vw; }
#s2 .header h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px, 3.5vw, 38px); color: white; }
#s2 .body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }

.hist-card {
  padding: 32px 5vw 24px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.hist-card.china {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%); border-right: 3px solid #90CAF9;

    img {
      width: 100%; height: 350px; object-fit: cover; border-radius: 8px;
      box-shadow: 0 6px 20px rgba(0,0,0,.1);
    }
}
.hist-card.franklin { background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%); }

.hist-card .badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: white; border-radius: 50px; padding: 8px 18px;
  font-weight: 800; font-size: clamp(14px, 1.8vw, 18px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1); width: fit-content;
}
.hist-card .badge.china-b { color: #1565C0; }
.hist-card .badge.frank-b { color: #E65100; }
.hist-card .year {
  font-size: clamp(28px, 5vw, 60px); font-weight: 900;
  line-height: 1; opacity: .12; position: absolute; right: 24px; top: 20px;
}
.hist-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hist-card ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: clamp(13px, 1.6vw, 16px); line-height: 1.45; color: #1A237E;
}
.hist-card ul li .ico { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.hist-card p { font-size: clamp(13px, 1.6vw, 16px); color: #37474F; line-height: 1.5; }
.hist-card .highlight {
  background: rgba(255,111,0,.12); border-left: 4px solid #FF6F00;
  border-radius: 0 12px 12px 0; padding: 12px 16px;
  font-size: clamp(13px, 1.5vw, 15px); color: #BF360C; font-weight: 700; line-height: 1.4;
}

/* ── SLIDE 3: HOW IT FLIES ── */
#s3 { background: linear-gradient(180deg, #E3F2FD 0%, #B3E5FC 100%); }
#s3 .header { background: linear-gradient(90deg, #0288D1, #039BE5); padding: 16px 6vw; }
#s3 .header h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px, 3.5vw, 38px); color: white; }
#s3 .body { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 20px 4vw; gap: 20px; }

.fly-box {
  background: white; border-radius: 24px; padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(2,119,189,.15);
  display: flex; flex-direction: column; gap: 10px;
}
.fly-box .fly-title { font-size: clamp(14px, 1.8vw, 18px); font-weight: 800; color: var(--deep); display: flex; align-items: center; gap: 8px; }
.fly-box p { font-size: clamp(12px, 1.5vw, 15px); color: #37474F; line-height: 1.5; }

.kite-diagram { position: relative; width: min(28vw, 240px); height: min(28vw, 240px); flex-shrink: 0; }
.kite-diagram svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 24px rgba(0,0,0,.2)); }
.kite-diagram .wind-arrow {
  position: absolute; left: -60px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 4px;
  animation: windPulse 1.5s ease-in-out infinite;
}
@keyframes windPulse { 0%,100%{opacity:.5; transform:translateY(-50%) translateX(0)} 50%{opacity:1; transform:translateY(-50%) translateX(8px)} }
.wind-arrow .line { height: 3px; background: linear-gradient(90deg,transparent,#0288D1); border-radius: 2px; }

#s3 .facts { display: flex; flex-direction: column; gap: 12px; }
.fact-pill {
  background: white; border-radius: 100px; padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 16px rgba(2,119,189,.12); font-size: clamp(12px, 1.5vw, 15px); color: #01579B; font-weight: 700;
}
.fact-pill .big { font-size: 22px; }

/* ── SLIDE 4: MATERIALS ── */
#s4 { background: #F1F8E9; }
#s4 .header { background: linear-gradient(90deg, #2E7D32, #43A047); padding: 16px 6vw; }
#s4 .header h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px, 3.5vw, 38px); color: white; }
#s4 .body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; padding: 28px 4vw; gap: 24px; }

.mat-section { display: flex; flex-direction: column; gap: 14px; }
.mat-section h3 { font-size: clamp(16px, 2vw, 22px); font-weight: 900; color: #1B5E20; display: flex; align-items: center; gap: 10px; }
.mat-item {
  background: white; border-radius: 16px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 4px 16px rgba(46,125,50,.1);
  transition: transform .2s, box-shadow .2s;
}
.mat-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(46,125,50,.18); }
.mat-item .mat-icon { font-size: 28px; flex-shrink: 0; }
.mat-item .mat-info { display: flex; flex-direction: column; gap: 2px; }
.mat-item .mat-name { font-size: clamp(13px, 1.6vw, 16px); font-weight: 800; color: #1B5E20; }
.mat-item .mat-desc { font-size: clamp(11px, 1.3vw, 13px); color: #558B2F; }
.mat-item .mat-best {
  margin-left: auto; background: #E8F5E9; color: #2E7D32;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 50px; white-space: nowrap;
}

/* ── SLIDE 5: TODAY ── */
#s5 { background: #EDE7F6; }
#s5 .header { background: linear-gradient(90deg, #6A1B9A, #8E24AA); padding: 16px 6vw; }
#s5 .header h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px, 3.5vw, 38px); color: white; }
#s5 .body { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; padding: 20px 4vw; gap: 16px; }

.use-card {
  background: white;
  border-radius: 20px;
  padding: 18px 20px;
  display: grid;
  grid-template-rows: repeat(2, auto) 210px;
  height: auto;
  box-shadow: 0 6px 20px rgba(106,27,154,.1);
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;

  &:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 32px rgba(106,27,154,.18); }

  header {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
  }

  .use-stripe { position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 20px 20px 0 0; }
  .use-emoji { font-size: clamp(18px, 4vw, 28px); }
  .use-title { font-size: clamp(14px, 1.7vw, 18px); font-weight: 900; color: #4A148C; }
  .use-text { font-size: clamp(12px, 1.4vw, 16px); color: #6A1B9A; line-height: 1.4; margin: 8px 0; }
}
.stripe-1 { background: linear-gradient(90deg,#FF6B35,#FF8A65); }
.stripe-2 { background: linear-gradient(90deg,#0288D1,#29B6F6); }
.stripe-3 { background: linear-gradient(90deg,#2E7D32,#66BB6A); }
.stripe-4 { background: linear-gradient(90deg,#F57F17,#FFCA28); }
.stripe-5 { background: linear-gradient(90deg,#6A1B9A,#AB47BC); }
.stripe-6 { background: linear-gradient(90deg,#C62828,#EF5350); }

/* ── SLIDE 6: CONCLUSION ── */
#s6 {
  background: linear-gradient(160deg, #1A237E 0%, #283593 40%, #303F9F 70%, #3949AB 100%);
}
#s6 .stars { position: absolute; inset: 0; overflow: hidden; }
.star {
  position: absolute; background: white; border-radius: 50%;
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle { 0%,100%{opacity:.2} 50%{opacity:.9} }

#s6 .content {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6vh 6vw; text-align: center;
}
#s6 .kite-final { font-size: clamp(60px, 10vw, 100px); animation: float 3s ease-in-out infinite; margin-bottom: 12px; }
#s6 h2 {
  font-family: 'Pacifico', cursive;
  font-size: clamp(28px, 5vw, 56px);
  color: var(--sun); margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(255,214,0,.4);
}
#s6 .tagline { font-size: clamp(15px, 2.2vw, 22px); color: rgba(255,255,255,.85); max-width: 700px; margin-bottom: 32px; line-height: 1.6; }
#s6 .formula {
  background: rgba(255,255,255,.12); backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,.25); border-radius: 24px;
  padding: 18px 36px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: clamp(14px, 2vw, 20px); color: white; font-weight: 800; margin-bottom: 28px;
}
.formula span { color: var(--sun); font-size: 1.4em; }
#s6 .summary-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 24px; }
.s-pill {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  border-radius: 100px; padding: 8px 18px; color: white;
  font-size: clamp(12px, 1.5vw, 15px); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
#s6 .thanks {
  font-family: 'Pacifico', cursive;
  font-size: clamp(22px, 3.5vw, 40px); color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,.3);
}

/* ── PROGRESS BAR ── */
.progress { position: fixed; top: 0; left: 0; height: 4px; background: var(--sun); transition: width .4s ease; z-index: 1000; border-radius: 0 2px 2px 0; }

/* ── ANIMATIONS on entry ── */
.slide.active .anim-up { animation: slideUp .6s both; }
.slide.active .anim-up:nth-child(1) { animation-delay: .05s; }
.slide.active .anim-up:nth-child(2) { animation-delay: .15s; }
.slide.active .anim-up:nth-child(3) { animation-delay: .25s; }
.slide.active .anim-up:nth-child(4) { animation-delay: .35s; }
@keyframes slideUp { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }

.slide.active .anim-left { animation: slideLeft .6s both; }
@keyframes slideLeft { from { opacity:0; transform:translateX(-28px); } to { opacity:1; transform:translateX(0); } }
.slide.active .anim-right { animation: slideRight .6s both; }
@keyframes slideRight { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
