: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.26);
  --panel-solid: #11131b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
}

* { 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;
}

.presentation-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 640px;
  isolation: isolate;
  background: radial-gradient(circle at 20% 20%, rgba(215, 25, 32, 0.18), transparent 32%), #07080d;
}

.slide-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 2.4s ease-in-out, transform 12.5s ease-out;
  z-index: 0;
}

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

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

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

.slide-layer.motion-pan-left { transform: scale(1.05) translate3d(1.2%, 0, 0); }
.slide-layer.motion-pan-left.active { transform: scale(1.01) translate3d(-0.8%, 0, 0); }

.slide-layer.motion-pan-right { transform: scale(1.05) translate3d(-1.2%, 0, 0); }
.slide-layer.motion-pan-right.active { transform: scale(1.01) translate3d(0.8%, 0, 0); }

.slide-layer.motion-pan-up { transform: scale(1.05) translate3d(0, 1.1%, 0); }
.slide-layer.motion-pan-up.active { transform: scale(1.01) translate3d(0, -0.8%, 0); }

.slide-layer.motion-pan-down { transform: scale(1.05) translate3d(0, -1.1%, 0); }
.slide-layer.motion-pan-down.active { transform: scale(1.01) translate3d(0, 0.8%, 0); }

.gradient-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 8, 0.66) 0%, rgba(4, 5, 8, 0.34) 36%, rgba(4, 5, 8, 0.08) 72%, rgba(4, 5, 8, 0.02) 100%),
    linear-gradient(0deg, rgba(4, 5, 8, 0.36) 0%, rgba(4, 5, 8, 0.02) 52%, rgba(4, 5, 8, 0.22) 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 {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 340px;
  padding: 12px 16px;
  border-radius: 22px;
}

.brand-logo {
  width: clamp(52px, 5vw, 74px);
  height: clamp(52px, 5vw, 74px);
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}

.company-name {
  font-size: clamp(24px, 2.1vw, 36px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

.company-tagline {
  margin-top: 5px;
  color: var(--muted);
  font-size: clamp(11px, .85vw, 14px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.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: 10px;
  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;
}

.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(3, minmax(0, 1fr));
  gap: 14px;
  width: min(940px, 80vw);
  margin-top: 20px;
}

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

.feature-cards .card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  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-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

.feature-cards .card-text {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.82);
  font-size: clamp(13px, 1.02vw, 16px);
  line-height: 1.42;
}


.ticker {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  z-index: 4;
  height: 68px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(8, 10, 16, .60), rgba(8, 10, 16, .38));
  box-shadow: 0 20px 55px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
}

.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) 6%, rgba(8,10,16,0) 94%, rgba(8,10,16,.95) 100%);
}

.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: 40px;
  color: rgba(255,255,255,.96);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.ticker-line span::after {
  content: "•";
  margin-left: 20px;
  color: var(--accent);
  font-size: 1.1em;
}

@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: 920px) {
  body { overflow: auto; }
  .presentation-app { min-height: 100svh; overflow: hidden; }
  .top-bar { flex-direction: column; padding: 16px; }
  .brand-block, .status-block { width: 100%; min-width: 0; }
  .status-block { text-align: left; }
  .hero-content { width: calc(100% - 36px); margin: 36px 18px 120px; }
  .feature-cards { grid-template-columns: 1fr; width: 100%; }
  .signature { display: none; }
  .ticker { left: 12px; right: 12px; bottom: 12px; height: 56px; }
  .ticker-line span { font-size: 13px; padding-right: 22px; }
}


.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); }
}
