:root {
  --stage-bg: #111827;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(255, 255, 255, 0.7);
  --text: #172033;
  --accent: #e86f2e;
  --accent-strong: #2fa4d7;
  --shadow: 0 16px 45px rgba(14, 22, 35, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--stage-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.presentation {
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  padding: clamp(10px, 2vw, 24px);
}

.slide-stage {
  position: relative;
  width: min(100%, calc(100vh * 16 / 9));
  max-width: 1920px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070d;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.slide-video,
.slide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05070d;
  transform-origin: center;
}

.slide-video.is-slide-entering,
.slide-image.is-slide-entering,
.video-placeholder.is-slide-entering {
  animation: slide-media-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 10, 22, 0.2), transparent 24%, transparent 76%, rgba(4, 10, 22, 0.2)),
    linear-gradient(180deg, rgba(4, 10, 22, 0.16), transparent 30%, rgba(4, 10, 22, 0.16));
}

.slide-shade.is-slide-entering {
  animation: slide-shade-in 560ms ease both;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  gap: 10px;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 30% 26%, rgba(47, 164, 215, 0.34), transparent 28%),
    radial-gradient(circle at 72% 68%, rgba(232, 113, 48, 0.34), transparent 30%),
    linear-gradient(135deg, #071827 0%, #132333 48%, #2b1a14 100%);
  color: #fff;
  font-family: "Hind", Arial, sans-serif;
  pointer-events: none;
}

.video-placeholder-title {
  font-size: clamp(24px, 3.2vw, 58px);
  font-weight: 800;
  letter-spacing: 0;
}

.video-placeholder-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(14px, 1.4vw, 24px);
  font-weight: 700;
}

.presentation-logo {
  --logo-x: 82.4%;
  --logo-y: 4.3%;
  --logo-width: 17.1%;
  --logo-height: 10.2%;
  position: absolute;
  top: var(--logo-y);
  left: var(--logo-x);
  z-index: 3;
  display: block;
  width: var(--logo-width);
  height: var(--logo-height);
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

.title-banner {
  --title-x: 50%;
  --title-y: -30.5%;
  --title-size: 92%;
  position: absolute;
  top: var(--title-y);
  left: var(--title-x);
  z-index: 2;
  display: block;
  width: var(--title-size);
  height: auto;
  aspect-ratio: 16255.98 / 9143.98;
  pointer-events: none;
  shape-rendering: geometricPrecision;
  transform: translateX(-50%);
  user-select: none;
}

.title-banner.is-title-entering {
  animation: title-banner-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title-banner.is-hidden,
.title-tools.is-hidden,
.slide-video.is-hidden,
.slide-image.is-hidden,
.video-placeholder.is-hidden,
.slide-box.is-hidden,
.box-tools.is-hidden {
  display: none;
}

.title-copy-layer {
  pointer-events: none;
}

.title-copy {
  dominant-baseline: middle;
  font-family: "Hind", "Noto Sans Devanagari", "Mangal", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  paint-order: stroke fill;
  pointer-events: none;
  text-anchor: middle;
  text-rendering: geometricPrecision;
}

.title-copy-blue,
.title-copy-orange {
  fill: #ffffff;
  stroke-width: 26px;
}

.gujarati-text {
  font-family: "Hind Vadodara", "Hind", sans-serif;
}

.title-copy-vs {
  pointer-events: none;
}

.vs-letter {
  dominant-baseline: middle;
  fill: url(#vsTextGradient);
  font-family: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1180px;
  font-weight: 400;
  paint-order: stroke fill;
  stroke: none;
  stroke-width: 0;
  text-anchor: middle;
  text-rendering: geometricPrecision;
}

.title-copy.is-text-entering,
.title-copy-vs.is-text-entering {
  animation: title-text-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title-copy.is-language-text-changing,
.title-copy-vs.is-language-text-changing {
  animation: language-text-change 420ms ease both;
}

.slide-box {
  --box-x: 50%;
  --box-y: 50%;
  --box-size: 30%;
  position: absolute;
  top: var(--box-y);
  left: var(--box-x);
  z-index: 2;
  display: block;
  width: var(--box-size);
  height: auto;
  pointer-events: none;
  shape-rendering: geometricPrecision;
  transform: translate(-50%, -50%);
  user-select: none;
}

.slide-box.is-box-entering {
  animation: slide-box-in 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.box-copy {
  dominant-baseline: hanging;
  fill: #1f2937;
  font-family: "Hind", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  pointer-events: none;
  text-rendering: geometricPrecision;
}

.text-word {
  opacity: 1;
}

.box-copy.is-text-entering .text-word,
.box-copy.is-language-text-changing .text-word {
  animation: text-word-reveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--word-index, 0) * 82ms);
}

.slide-stage:not(.is-font-ready) .box-copy {
  opacity: 0;
}

.box-copy-blue {
  fill: #164862;
}

.box-copy-orange {
  fill: #6c2d16;
}

.box-copy-both {
  fill: #273743;
}

html[lang="gu"] .title-copy,
html[lang="gu"] .box-copy,
html[lang="gu"] .language-select {
  font-family: "Hind Vadodara", "Hind", Arial, sans-serif;
}

.title-tools {
  position: absolute;
  left: clamp(62px, 5.8vw, 84px);
  top: clamp(12px, 2vw, 24px);
  z-index: 4;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.box-tools {
  position: absolute;
  left: clamp(62px, 5.8vw, 84px);
  top: clamp(12px, 2vw, 24px);
  z-index: 4;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.language-tools {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  left: clamp(148px, 12.2vw, 184px);
  z-index: 4;
  display: grid;
  height: 38px;
  align-items: center;
}

.language-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.language-select {
  height: 38px;
  min-width: 132px;
  padding: 0 38px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12)),
    rgba(28, 43, 61, 0.62);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 18, 35, 0.2);
  cursor: pointer;
  font-family: "Hind", "Hind Vadodara", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  outline: none;
}

.language-select:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.language-select option {
  background: #18283b;
  color: #fff;
}

.controller-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(8, 18, 35, 0.18);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.controller-toggle:hover,
.controller-toggle:focus-visible,
.title-tools:not(.is-collapsed) .controller-toggle {
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

.controller-toggle:focus-visible {
  outline: 3px solid rgba(232, 111, 46, 0.45);
  outline-offset: 3px;
}

.title-controller {
  display: grid;
  grid-template-columns: auto minmax(180px, 250px) auto;
  gap: 12px;
  align-items: center;
  max-height: min(78vh, 690px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(8, 18, 35, 0.2);
  backdrop-filter: blur(8px);
}

.title-tools.is-collapsed .title-controller {
  display: none;
}

.box-controller {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
  align-items: center;
  width: min(500px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(8, 18, 35, 0.2);
  backdrop-filter: blur(8px);
}

.box-tools.is-collapsed .box-controller {
  display: none;
}

.nudge-pad {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  grid-template-rows: repeat(3, 34px);
  gap: 4px;
}

.control-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.control-button span {
  font-size: 18px;
  line-height: 1;
}

.control-button:hover,
.control-button:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.control-button:focus-visible {
  outline: 3px solid rgba(47, 164, 215, 0.4);
  outline-offset: 2px;
}

.nudge-up {
  grid-column: 2;
  grid-row: 1;
}

.nudge-left {
  grid-column: 1;
  grid-row: 2;
}

.nudge-right {
  grid-column: 3;
  grid-row: 2;
}

.nudge-down {
  grid-column: 2;
  grid-row: 3;
}

.range-controls {
  display: grid;
  gap: 8px;
}

.range-field {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.range-field input {
  width: 100%;
  accent-color: var(--accent-strong);
}

.box-controller .range-field,
.box-controller .select-field {
  grid-template-columns: 52px minmax(0, 1fr);
}

.select-field {
  display: grid;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.select-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 0 8px;
}

.text-edit-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.text-edit-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  resize: vertical;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: 700 13px/1.35 "Hind", Arial, sans-serif;
  padding: 8px 10px;
}

.reset-button {
  align-self: center;
}

.position-code-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.box-reset-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.position-code {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.text-controls {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding-top: 2px;
}

.text-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.text-control-group {
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(110px, 1fr));
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(23, 32, 51, 0.12);
}

.text-control-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.copy-button {
  height: 34px;
  min-width: 62px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.copy-button:focus-visible {
  outline: 3px solid rgba(47, 164, 215, 0.4);
  outline-offset: 2px;
}

.slide-nav {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 42px);
  pointer-events: none;
  transform: translateY(-50%);
}

.nav-button {
  display: grid;
  width: clamp(52px, 5vw, 72px);
  height: clamp(52px, 5vw, 72px);
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 12px 28px rgba(8, 18, 35, 0.24);
  cursor: pointer;
  font-family: "Hind", Arial, sans-serif;
  font-weight: 800;
  pointer-events: auto;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, opacity 160ms ease;
}

#prevBtn {
  background: linear-gradient(180deg, #8cd4f2 0%, #2fa4d7 54%, #1e83b8 100%);
}

#homeBtn {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  left: clamp(12px, 2vw, 24px);
  z-index: 4;
  width: clamp(36px, 3.4vw, 44px);
  height: clamp(36px, 3.4vw, 44px);
  border-width: 1.5px;
  background:
    linear-gradient(90deg, rgba(47, 164, 215, 0.95) 0 50%, rgba(232, 113, 48, 0.95) 50% 100%);
}

#nextBtn {
  background: linear-gradient(180deg, #f8a36b 0%, #e87130 54%, #c7561f 100%);
}

.home-button svg {
  width: clamp(18px, 1.9vw, 23px);
  height: clamp(18px, 1.9vw, 23px);
  fill: currentColor;
}

.nav-button span {
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  transform: translateY(-1px);
}

.nav-button:hover:not(:disabled),
.nav-button:focus-visible:not(:disabled) {
  box-shadow: 0 16px 34px rgba(8, 18, 35, 0.3);
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.06);
}

.nav-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.nav-button:disabled {
  cursor: default;
  opacity: 0.42;
}

@keyframes slide-media-in {
  from {
    filter: brightness(0.88) saturate(0.96);
    opacity: 0.35;
    transform: scale(1.025);
  }

  to {
    filter: brightness(1) saturate(1);
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-shade-in {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

@keyframes title-banner-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-2.5%) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes slide-box-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes title-text-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes text-word-reveal {
  from {
    opacity: 0;
    transform: translateY(0.18em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes language-text-change {
  0% {
    opacity: 0.2;
  }

  55% {
    opacity: 0.72;
  }

  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-video.is-slide-entering,
  .slide-image.is-slide-entering,
  .video-placeholder.is-slide-entering,
  .slide-shade.is-slide-entering,
  .title-banner.is-title-entering,
  .slide-box.is-box-entering,
  .title-copy.is-text-entering,
  .title-copy-vs.is-text-entering,
  .title-copy.is-language-text-changing,
  .title-copy-vs.is-language-text-changing,
  .box-copy.is-text-entering .text-word,
  .box-copy.is-language-text-changing .text-word {
    animation: none;
  }
}

@media (max-aspect-ratio: 16 / 9) {
  .presentation {
    padding: 0;
  }

  .slide-stage {
    width: 100vw;
    border-radius: 0;
  }

  .title-tools,
  .box-tools {
    left: clamp(56px, 10.5vw, 78px);
    right: auto;
  }

  .language-tools {
    left: clamp(138px, 25vw, 172px);
  }

  .title-controller {
    grid-template-columns: auto minmax(140px, 1fr);
    max-height: min(88vh, 620px);
    padding: 10px;
  }

  .reset-button {
    display: none;
  }

  .text-control-group {
    grid-template-columns: 1fr;
  }
}
