/* ==========================================================================
   Al Manasir showcase page — theme
   Source: ../../Speak Up/Speak Up Proposal - Sep 2026.pptx (13 slides, 2026-09-16)
   Read out of the deck XML 2026-09-18. Spec: ../../theme/THEME.md — that file
   wins on any disagreement. This is the ONE implementation of it; there is no
   second copy anywhere, on purpose.

   The deck is dark only. There is no light variant, so this file does not define one.
   If a light variant is ever needed, it is a design decision for Hamza, not a media query.
   ========================================================================== */

/* Both fonts come from Google Fonts. Without them the deck and the page render wrong. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Montserrat:wght@700&display=swap');

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

:root {
  /* ---- Colour ---- */
  --am-ink:      #0F1C36;  /* background base; text on light chips  */
  --am-paper:    #F8FAFC;  /* headings and strong text              */
  --am-muted:    #CBD5E1;  /* body text — the normal reading colour */
  --am-dim:      #94A3B8;  /* footers, numbers, small print         */
  --am-gold:     #FBBF24;  /* the accent: rule, big numbers, borders */
  --am-sky:      #38BDF8;  /* kickers and small labels — nothing else */
  --am-crimson:  #A32020;  /* panel fill, always at 30% alpha        */
  --am-rose:     #F87171;  /* warnings only. Keep it rare.           */

  --am-panel-fill:   rgba(163, 32, 32, 0.30);
  --am-panel-border: rgba(251, 191, 36, 0.55);

  /* ---- Type ---- */
  --am-font-head: 'Montserrat', 'Segoe UI', system-ui, sans-serif;  /* Bold only */
  --am-font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* The deck's scale, in px. Fluid clamp for seamless mobile and desktop scaling. */
  --am-size-hero:    clamp(38px, 6vw, 76px);
  --am-size-figure:  clamp(36px, 5vw, 60px);
  --am-size-h2:      clamp(24px, 3.5vw, 32px);
  --am-size-h3:      clamp(18px, 2.2vw, 20px);
  --am-size-lead:    clamp(16px, 2vw, 21px);
  --am-size-body:    clamp(15px, 1.6vw, 17px);
  --am-size-small:   14px;
  --am-size-kicker:  12px;
  --am-size-footer:  11px;

  --am-lh-tight:  1.05;  /* hero only            */
  --am-lh-snug:   1.15;  /* large sub-headings   */
  --am-lh-normal: 1.25;  /* everything else      */

  /* ---- Devices ---- */
  --am-rule-w:      clamp(72px, 8vw, 104px);  /* the gold bar under a heading */
  --am-rule-h:      7px;
  --am-panel-radius: 12px;
  --am-panel-border-w: 1.5px;
  --am-kicker-track: 0.167em;  /* the deck's 2pt at 12pt */
}

/* --------------------------------------------------------------------------
   The background: navy base, a red glow top-right, a blue glow bottom-left,
   a faint diagonal sheen, and a 4px colour bar across the very top.
   This redraws deck-background.png, so a web page does not need the PNG.
   -------------------------------------------------------------------------- */
body.am-page {
  margin: 0;
  background-color: var(--am-ink);
  background-image:
    linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.022) 38%, rgba(255,255,255,0.022) 52%, transparent 52%),
    radial-gradient(ellipse 70% 55% at 88% 8%,  rgba(163, 32, 32, 0.45), transparent 70%),
    radial-gradient(ellipse 75% 60% at 6% 96%,  rgba(29, 78, 216, 0.32), transparent 70%),
    linear-gradient(180deg, #0B1428 0%, #0F1C36 45%, #12224A 100%);
  background-attachment: fixed;
  color: var(--am-muted);
  font-family: var(--am-font-body);
  font-size: var(--am-size-body);
  line-height: var(--am-lh-normal);
  -webkit-font-smoothing: antialiased;
}

/* The top bar: red - purple - blue - grey - gold, left to right, smoothly looping. */
body.am-page::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #D9342B, #8B4A9C, #1D6FE8, #8E9AA8, #F0A81E, #D9342B);
  background-size: 200% 100%;
  animation: am-bar-flow 14s linear infinite;
  z-index: 100;
}

@keyframes am-bar-flow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.am-hero {
  font-family: var(--am-font-head);
  font-weight: 700;
  font-size: var(--am-size-hero);
  line-height: var(--am-lh-tight);
  color: var(--am-paper);
  margin: 0;
}

.am-h2 {
  font-family: var(--am-font-head);
  font-weight: 700;
  font-size: var(--am-size-h2);
  line-height: var(--am-lh-normal);
  color: var(--am-paper);
  margin: 0;
}

.am-h3 {
  font-family: var(--am-font-head);
  font-weight: 700;
  font-size: var(--am-size-h3);
  line-height: var(--am-lh-snug);
  color: var(--am-paper);
  margin: 0;
}

.am-lead {
  font-size: var(--am-size-lead);
  color: var(--am-muted);
  margin: 0;
}

/* The big gold number. One per block — two golds in one block means one is wrong. */
.am-figure {
  font-family: var(--am-font-head);
  font-weight: 700;
  font-size: var(--am-size-figure);
  line-height: var(--am-lh-tight);
  color: var(--am-gold);
}

.am-footnote {
  font-size: var(--am-size-footer);
  color: var(--am-dim);
}

/* --------------------------------------------------------------------------
   The four devices that make the deck recognisable. Copy all four.
   -------------------------------------------------------------------------- */

/* 1. The kicker — a short uppercase sky line above every heading. */
.am-kicker {
  display: block;
  font-family: var(--am-font-body);
  font-weight: 700;
  font-size: var(--am-size-kicker);
  letter-spacing: var(--am-kicker-track);
  text-transform: uppercase;
  color: var(--am-sky);
  margin: 0 0 10px;
}

/* A rarer variant: the same label in gold, for a marked-out block. */
.am-kicker--gold { color: var(--am-gold); letter-spacing: 0.125em; }
.am-kicker--dim  { color: var(--am-dim); }

/* 2. The gold rule under a heading. Square corners, never rounded. */
.am-rule {
  display: block;
  width: var(--am-rule-w);
  height: var(--am-rule-h);
  background: var(--am-gold);
  margin: 20px 0 18px;
}

/* 3. The crimson panel — the deck's only card style. */
.am-panel {
  background: var(--am-panel-fill);
  border: var(--am-panel-border-w) solid var(--am-panel-border);
  border-radius: var(--am-panel-radius);
  padding: 24px 28px;
}

/* A chip: gold ground, ink text. For a short label, not a paragraph. */
.am-chip {
  display: inline-block;
  background: var(--am-gold);
  color: var(--am-ink);
  font-weight: 700;
  font-size: var(--am-size-small);
  border-radius: 6px;
  padding: 4px 12px;
}

.am-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--am-muted);
  font-size: 15px;
  line-height: 1.6;
}

.am-list li {
  margin-bottom: 6px;
}

/* 4. The footer bar. On the page this is one slim bar, not a per-section repeat.
      The mark here is Al Manasir's own — NOT the deck's "SPEAK UP!" footer. */
.am-footer {
  font-size: var(--am-size-footer);
  color: var(--am-dim);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

/* --------------------------------------------------------------------------
   Layout helper. The deck is 13.33 in wide with a 0.75 in gutter; this keeps
   the same proportion and stays readable on a phone.
   -------------------------------------------------------------------------- */
.am-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

.am-section { padding: clamp(48px, 7vw, 80px) 0; }

@media (max-width: 720px) {
  .am-wrap    { padding: 0 20px; }
  .am-section { padding: 40px 0; }
  .am-panel   { padding: 20px 18px; }
  .am-kicker  { font-size: 11px; letter-spacing: 0.1em; line-height: 1.4; }
  .am-rule    { margin: 16px 0 14px; }
  .am-footer  { flex-direction: column; gap: 8px; text-align: left; }
}

/* A link on this background. The deck has no links, so this is the one
   addition to the deck's vocabulary — kept to the existing palette. */
.am-page a { color: var(--am-sky); text-decoration-color: rgba(56, 189, 248, 0.4); }
.am-page a:hover { color: var(--am-gold); text-decoration-color: var(--am-gold); }

/* --------------------------------------------------------------------------
   Media & Looping Animations (Stitch-resistant dynamic components)
   -------------------------------------------------------------------------- */

/* Image container within panels with ambient float */
.am-panel-media {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: calc(var(--am-panel-radius) - 3px);
  margin-bottom: 20px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: var(--am-ink);
}

.am-panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.6s ease;
  animation: am-ambient-zoom 16s ease-in-out infinite alternate;
}

.am-panel:hover .am-panel-media img {
  transform: scale(1.05);
}

@keyframes am-ambient-zoom {
  0%   { transform: scale(1); }
  100% { transform: scale(1.06); }
}

/* 1. Spoken Audio Waveform Loop */
.am-waveform {
  display: inline-flex;
  align-items: flex-end;
  gap: 3.5px;
  height: 26px;
  padding: 0 4px;
  vertical-align: middle;
}

.am-waveform-bar {
  width: 3.5px;
  background: var(--am-gold);
  border-radius: 2px;
  height: 6px;
  animation: am-wave-pulse 1.3s ease-in-out infinite alternate;
}

.am-waveform-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.am-waveform-bar:nth-child(2) { height: 22px; animation-delay: 0.35s; background: var(--am-sky); }
.am-waveform-bar:nth-child(3) { height: 14px; animation-delay: 0.2s; }
.am-waveform-bar:nth-child(4) { height: 26px; animation-delay: 0.5s; background: var(--am-sky); }
.am-waveform-bar:nth-child(5) { height: 18px; animation-delay: 0.25s; }
.am-waveform-bar:nth-child(6) { height: 8px;  animation-delay: 0.4s; }

@keyframes am-wave-pulse {
  0%   { height: 6px; opacity: 0.45; }
  100% { height: 24px; opacity: 1; }
}

/* 2. Seamless Infinite Partner Marquee */
.am-ticker-wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 28px;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.am-ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 28px;
  animation: am-marquee-scroll 22s linear infinite;
}

.am-ticker-wrap:hover .am-ticker-track {
  animation-play-state: paused;
}

.am-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  color: var(--am-paper);
  font-size: var(--am-size-body);
  white-space: nowrap;
}

.am-ticker-dot {
  color: var(--am-gold);
  font-weight: 700;
}

@keyframes am-marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 3. Speaking Drill Sequential Pulse for 4 Steps */
.am-steps > div {
  position: relative;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.4s ease;
}

.am-steps > div:nth-child(1) { animation: am-step-glow 8s ease-in-out infinite 0s; }
.am-steps > div:nth-child(2) { animation: am-step-glow 8s ease-in-out infinite 2s; }
.am-steps > div:nth-child(3) { animation: am-step-glow 8s ease-in-out infinite 4s; }
.am-steps > div:nth-child(4) { animation: am-step-glow 8s ease-in-out infinite 6s; }

@keyframes am-step-glow {
  0%, 25% {
    background: rgba(163, 32, 32, 0.18);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 16px -4px rgba(251, 191, 36, 0.25);
  }
  30%, 100% {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
}
