@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;700;800&display=swap");

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

:root {
  color-scheme: dark;
  --bg: #171717;
  --text: #f4efe6;
  --muted: #b7aa96;
  --accent: #e8a84a;
  --accent-strong: #f2c66f;
  --flag-blue: #007db8;
  --flag-blue-strong: #0050d8;
  --line: rgba(255, 255, 255, 0.13);
  --panel: rgba(255, 255, 255, 0.045);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  --whatsapp: #25d366;
  --whatsapp-dark: #128c4a;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% -8%, rgba(232, 168, 74, 0.16), transparent 24rem),
    linear-gradient(180deg, #161616 0%, #1b1b1b 46%, #121212 100%);
  color: var(--text);
  font-family: "Heebo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.mobile-pdf-link {
  display: none;
}

.page-shell {
  min-height: 100vh;
  padding: calc(clamp(1rem, 2.6vw, 2rem) + 4rem) clamp(0.85rem, 2.6vw, 2rem) 3rem;
}

.story-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

.floating-brand,
.nav-toggle,
.nav-links {
  pointer-events: auto;
}

.floating-brand {
  position: fixed;
  top: 0.75rem;
  left: clamp(1rem, 3vw, 2.25rem);
  right: auto;
  z-index: 10001;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.menu-open .slideshow {
  pointer-events: none;
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.story-layout {
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  gap: 0;
  width: 100%;
  max-width: none;
}

.story-layout .page-head {
  display: none;
}

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.download-link,
.submit-btn,
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(232, 168, 74, 0.5);
  border-radius: 8px;
  background: rgba(232, 168, 74, 0.13);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.download-link:hover,
.submit-btn:hover {
  border-color: var(--accent-strong);
  background: rgba(232, 168, 74, 0.22);
  transform: translateY(-1px);
}

.slideshow {
  position: relative;
  z-index: 10;
  display: grid;
  justify-items: center;
  width: 100%;
}

.slide-row {
  display: flex;
  justify-content: center;
  width: 100%;
  direction: ltr;
}

.slide-figure {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 0;
}

.slide-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.slide-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: fit-content;
  max-width: 85vw;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.slide-image {
  display: block;
  width: auto;
  max-width: calc(100vw - 148px);
  max-height: 100vh;
  max-height: 100dvh;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.18s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-image.ready { opacity: 1; }

.last-slide-btn {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65em 1em;
  background: #1565c0;
  color: #fff;
  font-size: clamp(0.8rem, 1.4vw, 1.05rem);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.18s ease;
  z-index: 10;
  white-space: nowrap;
  direction: rtl;
}
.last-slide-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.last-slide-btn:hover {
  background: #1976d2;
}

.slide-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  background: rgba(10, 10, 10, 0.78);
  color: var(--muted);
  font-weight: 700;
}

.slide-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 3px solid rgba(232, 168, 74, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.slide-arrow {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 120px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.slide-arrow i {
  display: block;
  width: 48px;
  height: 48px;
  position: relative;
}

.slide-arrow i::before {
  content: "";
  position: absolute;
  inset: 8px;
  width: 28px;
  height: 28px;
  border-color: currentColor;
  border-style: solid;
  transform-origin: center;
}

.bi-chevron-left::before {
  border-width: 0 0 5px 5px;
  transform: rotate(45deg);
}

.bi-chevron-right::before {
  border-width: 5px 5px 0 0;
  transform: rotate(45deg);
}

.slide-arrow:hover:not(:disabled) {
  opacity: 1;
  transform: scale(1.08);
}

.slide-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.22;
}

.slide-count {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1;
  opacity: 0.5;
  direction: ltr;
}

.slide-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: min(560px, calc(100% - 1rem));
  margin: 1.25rem auto 0;
  padding: 0;
  direction: rtl;
}

.slide-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.slide-dot:hover,
.slide-dot:focus-visible {
  background: rgba(255, 255, 255, 0.5);
  outline: none;
}

.slide-dot.is-active {
  background: var(--whatsapp);
  box-shadow:
    0 0 6px rgba(37, 211, 102, 0.95),
    0 0 14px rgba(37, 211, 102, 0.55),
    0 0 24px rgba(37, 211, 102, 0.3);
  transform: scale(1.25);
}

.story-page-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(0.25rem, 1.6vw, 0.5rem);
  width: min(560px, calc(100% - 1rem));
  margin: 100px auto 0;
}

.story-page-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 0.55rem clamp(0.35rem, 1.8vw, 0.8rem);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: var(--flag-blue);
  color: #fff;
  font-size: clamp(0.78rem, 2.9vw, 0.95rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 56, 184, 0.32);
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.story-page-links a:hover,
.story-page-links a:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  background: var(--flag-blue-strong);
  outline: none;
  transform: translateY(-1px);
}

.rotate-notice {
  display: none;
  color: var(--text);
  text-align: center;
  opacity: 0.86;
}

.rotate-notice svg {
  display: block;
  margin: 0 auto 0.65rem;
  color: var(--accent);
}

.rotate-notice span {
  display: block;
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  font-weight: 800;
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1rem;
}

.media-item,
.change-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.media-body,
.change-panel {
  padding: clamp(1rem, 2.3vw, 1.35rem);
}

video,
.article-image {
  display: block;
  width: 100%;
  background: #0b0b0b;
}

video {
  aspect-ratio: 16 / 9;
  max-height: 560px;
}

.article-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.article-link:hover h2 { color: var(--accent-strong); }

.meta {
  margin-bottom: 0.45rem;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.change-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: start;
}

.change-grid-single {
  grid-template-columns: minmax(240px, 520px);
}

.change-grid-poll {
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
}

.change-grid-poll:has(#poll-root[hidden]),
.change-grid-poll:has(#poll-root:empty) {
  grid-template-columns: minmax(240px, 520px);
}

#poll-root {
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
}

#poll-root[hidden] {
  display: none;
}

.change-grid-poll .poll-panel {
  margin-top: 0;
  max-width: none;
}

.change-section .page-head {
  margin-top: 20px;
  margin-bottom: 20px;
}

.change-section h1 {
  margin-bottom: 20px;
}

.change-intro {
  max-width: 980px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
}

.foreign-page {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

.foreign-block {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
  align-items: start;
}

.foreign-figure {
  margin: 0;
}

.foreign-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0b;
  box-shadow: var(--shadow);
}

.foreign-figure figcaption {
  margin-top: 0.45rem;
  color: rgba(244, 239, 230, 0.58);
  font-size: 0.86rem;
  line-height: 1.4;
}

.foreign-copy {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.2rem;
}

.foreign-copy h2 {
  color: var(--accent-strong);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

.foreign-copy p {
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.85;
}

.whatsapp-link {
  width: 100%;
  margin-top: 1rem;
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--whatsapp);
  color: #062312;
}

.whatsapp-link:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: #2ee874;
  transform: translateY(-1px);
}

.feedback-form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.23);
  color: var(--text);
  font: inherit;
  padding: 0.8rem 0.9rem;
  outline: none;
}

textarea {
  min-height: 136px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(232, 168, 74, 0.7);
  box-shadow: 0 0 0 3px rgba(232, 168, 74, 0.13);
}

.form-note {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1024px) {
  .story-page .floating-brand {
    z-index: 5;
  }

  .story-page .slideshow {
    z-index: 20;
  }

  .nav-toggle {
    display: inline-flex;
    position: fixed;
    top: 0.75rem;
    right: clamp(1rem, 3vw, 2.25rem);
    left: auto;
    z-index: 10001;
    background: rgba(23, 23, 23, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nav-links {
    position: fixed;
    z-index: 10002;
    top: 64px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 0.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(23, 23, 23, 0.97);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.menu-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 1rem;
    border-radius: 8px;
  }

  .mobile-pdf-link {
    display: block;
  }

  .page-head,
  .media-grid,
  .change-grid,
  .foreign-block {
    grid-template-columns: 1fr;
  }

  .download-link { width: 100%; }
  .story-layout .page-head {
    display: none;
  }
  .slide-row {
    width: 100%;
  }
  .slide-arrow {
    width: 36px;
    height: 64px;
  }
  .slide-arrow i {
    width: 26px;
    height: 26px;
  }
  .slide-arrow i::before {
    inset: 5px;
    width: 16px;
    height: 16px;
  }
  .bi-chevron-left::before {
    border-width: 0 0 3px 3px;
  }
  .bi-chevron-right::before {
    border-width: 3px 3px 0 0;
  }
  .slide-frame {
    gap: 4px;
  }
  .slide-count {
    padding-inline-start: 0.25rem;
  }
  .media-body,
  .change-panel {
    padding: 1rem;
  }

  .change-page-shell {
    padding-inline: 30px;
  }

  .change-section .page-head {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .change-grid {
    gap: 1.25rem;
  }

  video,
  .article-image {
    max-height: none;
  }
}

@media (max-width: 520px) {
  .brand span:last-child { font-size: 0.95rem; }
  .topbar { padding-inline: 0.85rem; }
  .page-shell { padding-inline: 0.65rem; }
  .change-page-shell { padding-inline: 30px; }
  .story-page { padding-inline: 0; }
  .story-page-links {
    width: min(360px, calc(100% - 0.75rem));
  }
  .slide-dots {
    gap: 0.35rem;
    margin-top: 0.85rem;
  }
  .slide-dot {
    width: 6px;
    height: 6px;
  }
  h1 { font-size: 1.55rem; }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .story-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }

  .story-layout {
    align-content: center;
    padding: 0;
    gap: 0;
  }

  .story-layout .page-head {
    display: none;
  }

  .rotate-notice {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.2rem;
    min-height: 0;
    padding-top: 1.25rem;
    margin-bottom: 80px;
  }

  .rotate-notice svg {
    margin-bottom: 0.15rem;
  }

  .slide-row {
    display: flex;
    width: 100%;
  }

  .slide-image {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 310px);
    max-height: calc(100dvh - 310px);
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  .story-page {
    padding: 0;
  }

  .story-layout {
    padding: 0;
  }

  .slide-image {
    max-width: calc(100vw - 88px);
    max-height: 100vh;
    max-height: 100dvh;
  }

  .slide-count {
    padding-inline-start: 0.5rem;
  }
}

/* ── Poll ────────────────────────────────────────────────────────────────── */

.poll-panel {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 520px;
}

.poll-heading {
  color: var(--accent-strong);
  margin-bottom: 0.35rem;
}

.poll-question {
  margin-bottom: 1rem;
  font-size: clamp(0.97rem, 1.6vw, 1.12rem);
}

.poll-choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.poll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.poll-btn:hover,
.poll-btn:focus-visible {
  border-color: var(--accent);
  background: rgba(232, 168, 74, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.poll-btn-num {
  opacity: 0.55;
  font-size: 0.9em;
  min-width: 1.4em;
}

.poll-btn--selected {
  border-color: var(--accent-strong);
  background: rgba(232, 168, 74, 0.22);
  color: var(--accent-strong);
}

.poll-loading {
  display: grid;
  place-items: center;
  min-height: 142px;
}

.poll-root--loading {
  opacity: 0.72;
  pointer-events: none;
}

/* results bars */

.poll-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.poll-bar-row {
  display: grid;
  grid-template-columns: 6rem 1fr 5rem;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.poll-bar-label {
  font-weight: 700;
  white-space: nowrap;
}

.poll-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.poll-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.45s ease;
}

.poll-bar-row--selected .poll-bar-fill {
  background: var(--accent-strong);
  box-shadow: 0 0 8px rgba(242, 198, 111, 0.5);
}

.poll-bar-row--selected .poll-bar-label {
  color: var(--accent-strong);
}

.poll-bar-meta {
  color: var(--muted);
  font-size: 0.83rem;
  text-align: start;
  white-space: nowrap;
}

.poll-thanks {
  margin-top: 0.9rem;
  font-size: 0.86rem;
}

.poll-thanks-panel {
  display: grid;
  gap: 0.65rem;
}

.poll-thanks-done {
  margin: 0;
  color: var(--accent-strong);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 800;
  line-height: 1.45;
}

.poll-thanks-follow {
  margin: 0;
  font-size: clamp(0.97rem, 1.5vw, 1.08rem);
  line-height: 1.6;
}

@media (max-width: 520px) {
  .poll-bar-row {
    grid-template-columns: 5rem 1fr 4.2rem;
    gap: 0.45rem;
  }
}

@media (min-width: 1025px) {
  .nav-links {
    position: fixed;
    z-index: 10001;
    top: 0.75rem;
    right: clamp(1rem, 3vw, 2.25rem);
    left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.2rem;
    padding: 0.25rem 0.45rem;
    border: 0;
    border-radius: 999px;
    background: rgba(23, 23, 23, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
  }

  .mobile-pdf-link {
    display: none;
  }

  .story-page .slide-stage {
    height: 80vh;
    max-width: calc(100vw - 148px);
  }

  .story-page .slide-image {
    max-height: 80vh;
    height: 80vh;
    width: auto;
    object-fit: contain;
  }

  .story-layout {
    min-height: calc(80vh + 5rem);
    padding-top: 4.5rem;
  }
}
