:root {
  --accent: #d71920;
  --accent-soft: rgba(215, 25, 32, 0.32);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --panel: rgba(8, 10, 16, 0.17);
  --panel-solid: #11131b;
  --border: rgba(255, 255, 255, 0.11);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #07080d;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.presentation-app {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  min-height: 0;
  aspect-ratio: 16 / 9;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(215, 25, 32, 0.14), transparent 34%), #07080d;
}

.slide-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.10);
  transition: opacity 4.8s ease-in-out, transform 24s ease-in-out;
  will-change: transform, opacity;
  z-index: 0;
}

.slide-layer.active {
  opacity: 1;
}

.slide-layer.motion-zoom-in { transform: scale(1.26); }
.slide-layer.motion-zoom-in.active { transform: scale(1.00); }

.slide-layer.motion-zoom-out { transform: scale(1.00); }
.slide-layer.motion-zoom-out.active { transform: scale(1.22); }

.slide-layer.motion-pan-left { transform: scale(1.18) translate3d(3.2%, 0, 0); }
.slide-layer.motion-pan-left.active { transform: scale(1.02) translate3d(-1.6%, 0, 0); }

.slide-layer.motion-pan-right { transform: scale(1.18) translate3d(-3.2%, 0, 0); }
.slide-layer.motion-pan-right.active { transform: scale(1.02) translate3d(1.6%, 0, 0); }

.slide-layer.motion-pan-up { transform: scale(1.18) translate3d(0, 2.8%, 0); }
.slide-layer.motion-pan-up.active { transform: scale(1.02) translate3d(0, -1.6%, 0); }

.slide-layer.motion-pan-down { transform: scale(1.18) translate3d(0, -2.8%, 0); }
.slide-layer.motion-pan-down.active { transform: scale(1.02) translate3d(0, 1.6%, 0); }

.gradient-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 8, 0.60) 0%, rgba(4, 5, 8, 0.28) 36%, rgba(4, 5, 8, 0.06) 72%, rgba(4, 5, 8, 0.01) 100%),
    linear-gradient(0deg, rgba(4, 5, 8, 0.30) 0%, rgba(4, 5, 8, 0.02) 54%, rgba(4, 5, 8, 0.18) 100%);
}

.top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 54px);
}

.brand-block,
.status-block,
.slide-caption,
.feature-cards .card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-block {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(860px, 58vw);
  min-width: min(860px, 58vw);
  padding: 12px 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 24px 62px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}

.brand-block::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -35%;
  width: 28%;
  transform: rotate(16deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.45), rgba(255,255,255,0));
  animation: shineSweep 8.5s ease-in-out infinite;
  pointer-events: none;
}

.brand-logo {
  display: block;
  width: min(820px, 54vw);
  height: auto;
  max-height: 158px;
  object-fit: contain;
  filter: none;
}

.company-name {
  display: none !important;
}

.company-tagline {
  display: none !important;
}

.status-block {
  min-width: 220px;
  max-width: 250px;
  padding: 12px 14px;
  border-radius: 20px;
  text-align: right;
}

.clock {
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.date {
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(12px, 1vw, 16px);
  text-transform: capitalize;
}

.weather-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 7px 10px;
  min-height: 34px;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: clamp(11px, .9vw, 14px);
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, 78vw);
  margin-left: clamp(28px, 4vw, 58px);
  margin-top: clamp(26px, 5vh, 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fff;
  font-size: clamp(11px, 0.8vw, 14px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px #fff;
}

h1 {
  margin: 18px 0 0;
  max-width: 1000px;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: .92;
  letter-spacing: -0.07em;
  text-wrap: balance;
  text-shadow: 0 24px 70px rgba(0,0,0,.55);
}

#heroSubtitle {
  margin: 18px 0 0;
  max-width: 900px;
  color: var(--muted);
  font-size: clamp(19px, 1.9vw, 30px);
  line-height: 1.2;
  font-weight: 500;
  text-shadow: 0 12px 44px rgba(0,0,0,.5);
}

.slide-caption {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
  padding: 12px 14px;
  max-width: 720px;
  border-radius: 22px;
  background: rgba(8, 10, 16, 0.18);
}

.slide-caption strong {
  font-size: clamp(18px, 1.6vw, 28px);
}

.slide-caption span {
  color: var(--muted);
  font-size: clamp(14px, 1.15vw, 18px);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  width: min(1860px, 98vw);
  margin-top: 20px;
}

.feature-cards .card {
  position: relative;
  min-height: 162px;
  padding: 22px 18px 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(12, 14, 22, .22), rgba(12, 14, 22, .13));
  overflow: hidden;
  animation: cardReveal .8s ease both;
  animation-delay: var(--card-delay, 0s);
}

.feature-cards .card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(215,25,32,0), rgba(215,25,32,.95), rgba(255,255,255,.22), rgba(215,25,32,0));
  box-shadow: 0 0 22px rgba(215,25,32,.38);
}

.feature-cards .card::after {
  content: "";
  position: absolute;
  inset: auto -30% -42% auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(215,25,32,.20), transparent 60%);
  pointer-events: none;
}

.feature-cards .card .shine { display:none; }

.feature-cards .card:before {
  animation: lineGlow 6s ease-in-out infinite;
}

.feature-cards .card > .card-head::after {
  content: "";
  position: absolute;
  inset: -10% auto -10% -42%;
  width: 30%;
  transform: rotate(16deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.12), rgba(255,255,255,0));
  animation: shineSweep 8.5s ease-in-out infinite;
  pointer-events: none;
}

.feature-cards .card > .card-head { position: relative; overflow: hidden; border-radius: 16px; }

.feature-cards .card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-cards .card-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(215,25,32,.22), rgba(255,255,255,.05));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 22px rgba(0,0,0,.18);
}

.feature-cards .card-icon svg {
  width: 28px;
  height: 28px;
}

.feature-cards .card-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.feature-cards .card-title {
  display: block;
  font-size: clamp(18px, 1.1vw, 22px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.03em;
}

.feature-cards .card-text {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.82);
  font-size: clamp(12.5px, 0.9vw, 14px);
  line-height: 1.48;
}


.ticker {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  z-index: 4;
  height: 92px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.15);
  background: linear-gradient(180deg, rgba(8, 10, 16, .58), rgba(8, 10, 16, .34));
  box-shadow: 0 28px 72px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08), inset 0 -16px 30px rgba(0,0,0,.14);
  backdrop-filter: blur(14px);
}

.ticker::before {
  content: "";
}

.ticker::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,10,16,.95) 0%, rgba(8,10,16,0) 4%, rgba(8,10,16,0) 96%, rgba(8,10,16,.95) 100%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 20%);
}

.ticker-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-line {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding-left: 100%;
  will-change: transform;
  animation: tickerTvMove linear infinite;
  animation-duration: inherit;
}

.ticker-line span {
  display: inline-flex;
  align-items: center;
  padding-right: 58px;
  color: rgba(255,255,255,.98);
  font-size: clamp(20px, 1.62vw, 28px);
  font-weight: 860;
  letter-spacing: .01em;
  text-shadow: 0 2px 12px rgba(0,0,0,.50);
}

.ticker-line span::after {
  content: "•";
  margin-left: 30px;
  color: var(--accent);
  font-size: 1.1em;
  filter: drop-shadow(0 0 8px rgba(215,25,32,.55));
}

@keyframes tickerTvMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.signature {
  position: absolute;
  right: 22px;
  bottom: 76px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.32);
  color: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}


.config-button {
  position: absolute;
  right: 18px;
  top: 50%;
  z-index: 8;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s ease, transform .2s ease;
}

.config-button:hover { opacity: 1; transform: scale(1.05); }

.config-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 20;
  width: min(720px, 96vw);
  padding: 22px;
  background: #11131b;
  color: #fff;
  box-shadow: -28px 0 80px rgba(0,0,0,.55);
  transform: translateX(105%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-panel.open { transform: translateX(0); }

.config-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.config-panel h2 {
  margin: 0;
  font-size: 28px;
}

.config-panel p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.72);
  line-height: 1.45;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

#configTextarea {
  flex: 1;
  min-height: 360px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  outline: none;
  resize: none;
  background: #07080d;
  color: #f7f7f7;
  font: 14px/1.48 Consolas, "SFMono-Regular", Menlo, monospace;
}

.config-message {
  min-height: 22px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}

.config-message.error { color: #ffb4b4; }
.config-message.ok { color: #b8ffc8; }

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.config-actions button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.config-actions button.secondary {
  background: rgba(255,255,255,.12);
}


@media (max-width: 1680px) {
  .feature-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1180px, 94vw); }
}

@media (max-width: 1180px) {
  .feature-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(820px, 94vw); gap: 16px; }
}

@media (max-width: 920px) {
  body { overflow: auto; }
  .presentation-app { min-height: 100svh; overflow: hidden; }
  .top-bar { flex-direction: column; padding: 14px; gap: 12px; }
  .brand-block, .status-block { width: 100%; min-width: 0; }
  .status-block { text-align: left; }
  .hero-content { width: calc(100% - 28px); margin: 28px 14px 118px; }
  .feature-cards { grid-template-columns: 1fr; width: 100%; gap: 14px; margin-top: 16px; }
  .feature-cards .card { min-height: 128px; padding: 18px 16px; }
  .feature-cards .card-title { font-size: 19px; }
  .feature-cards .card-text { font-size: 13px; }
  .feature-cards .card-icon { width: 48px; height: 48px; flex-basis: 48px; }
  .feature-cards .card-icon svg { width: 24px; height: 24px; }
  .signature { display: none; }
  .ticker { left: 10px; right: 10px; bottom: 10px; height: 58px; border-radius: 18px; }
  .ticker-track { left: 0; right: 0; }
  .ticker-line span { font-size: 12px; padding-right: 20px; }
}


.text-refresh {
  animation: textRefresh .65s ease;
}

@keyframes textRefresh {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}


#heroTitle.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.12em;
  background: currentColor;
  vertical-align: -0.08em;
  animation: blinkCursor .85s step-end infinite;
}

.subtitle-reveal {
  animation: subtitleReveal .9s ease both;
}

@keyframes blinkCursor {
  0%, 48% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes subtitleReveal {
  0% { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes cardReveal {
  0% { opacity: 0; transform: translateY(18px) scale(.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}


@keyframes shineSweep {
  0% { transform: translateX(0) rotate(16deg); opacity: 0; }
  8% { opacity: 1; }
  22% { transform: translateX(520%) rotate(16deg); opacity: 0; }
  100% { transform: translateX(520%) rotate(16deg); opacity: 0; }
}

@keyframes lineGlow {
  0%,100% { box-shadow: 0 0 14px rgba(215,25,32,.16); }
  50% { box-shadow: 0 0 28px rgba(215,25,32,.32); }
}

@media (max-width: 560px) {
  .heroTitle, #heroTitle { font-size: clamp(32px, 10vw, 44px); }
  .hero-content { margin-bottom: 108px; }
  .status-block { min-width: 0; padding: 10px 12px; }
}


@media (max-width: 1100px) {
  .brand-block {
    width: min(720px, 70vw);
    min-width: 0;
    padding: 10px 14px;
  }

  .brand-logo {
    width: min(690px, 66vw);
    max-height: 130px;
  }
}

@media (max-width: 920px) {
  .brand-block {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .brand-logo {
    width: 100%;
    max-height: 112px;
  }
}

@media (max-width: 560px) {
  .brand-logo {
    max-height: 86px;
  }
}


/* V24: keep the same desktop composition on mobile by fitting a 16:9 stage */
@media (max-width: 920px) {
  .top-bar {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: clamp(18px, 3vw, 30px) !important;
  }

  .brand-block {
    width: min(860px, 58vw) !important;
    min-width: min(860px, 58vw) !important;
    padding: 12px 18px !important;
  }

  .brand-logo { width: clamp(94px, 7.6vw, 132px) !important; height: clamp(94px, 7.6vw, 132px) !important; }
  .company-name { font-size: clamp(44px, 3.8vw, 66px) !important; }
  .company-tagline { font-size: clamp(17px, 1.32vw, 21px) !important; line-height: 1.35 !important; }

  .hero-content {
    width: min(1320px, 92vw) !important;
    margin: clamp(20px, 3vw, 42px) clamp(18px, 3vw, 42px) 132px !important;
  }

  .feature-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: min(1820px, 98vw) !important;
    gap: 16px !important;
    margin-top: 22px !important;
  }

  .feature-cards .card { min-height: 142px !important; padding: 18px 16px 16px !important; }
  .feature-cards .card-title { font-size: clamp(17px, 1.08vw, 22px) !important; }
  .feature-cards .card-text { font-size: clamp(12px, 0.88vw, 14px) !important; }
  .feature-cards .card-icon { width: 46px !important; height: 46px !important; flex-basis: 46px !important; }
  .feature-cards .card-icon svg { width: 24px !important; height: 24px !important; }

  .ticker { left: 24px !important; right: 24px !important; bottom: 18px !important; height: 92px !important; border-radius: 26px !important; }
  .ticker-track { left: 0 !important; right: 0 !important; }
  .ticker-line span { font-size: clamp(20px, 1.62vw, 28px) !important; padding-right: 58px !important; }

  .slide-layer { background-size: cover !important; background-position: center center !important; background-repeat: no-repeat !important; }
}

@media (orientation: portrait) and (max-width: 920px) {
  .presentation-app {
    width: 100vw;
    height: calc(100vw * 9 / 16);
    max-height: 100vh;
  }
}

@media (orientation: landscape) and (max-width: 920px) {
  .presentation-app {
    width: calc(100vh * 16 / 9);
    height: 100vh;
    max-width: 100vw;
  }
}
