:root {
  --bg: #1a1a1a;
  --surface: #242424;
  --surface-muted: #2d2d2d;
  --border: #4a4a4a;
  --border-strong: #5c5c5c;
  --text: #e8e8e8;
  --text-secondary: #9a9a9a;
  --text-muted: #6b6b6b;
  --accent: #2d8ceb;
  --accent-hover: #4a9ef0;
  --accent-soft: rgba(45, 140, 235, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --radius-lg: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --topbar-h: 3.5rem;
  --footbar-h: 2.25rem;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 140, 235, 0.08), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(45, 140, 235, 0.04), transparent 40%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr var(--footbar-h);
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* Top bar */

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.25rem;
  background: rgba(30, 30, 30, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.topbar__logo {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.3rem;
}

.topbar__name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.module-tabs {
  display: flex;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}

.module-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}

.module-tab:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.module-tab:active {
  transform: scale(0.98);
}

.module-tab.is-active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.module-tab__label {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.module-tab__hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.module-tab.is-active .module-tab__hint {
  color: var(--text-secondary);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.link-quiet {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.link-quiet:hover {
  color: var(--accent);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(45, 140, 235, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(45, 140, 235, 0.4);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.btn--lg {
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
}

/* Stage */

.stage {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.25rem 0.75rem;
  min-height: 0;
  overflow: hidden;
}

.pitch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-right: 0.5rem;
}

.pitch__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.pitch__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  transition: opacity 0.25s ease;
}

.pitch__body {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  transition: opacity 0.25s ease;
}

.pitch__features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: opacity 0.25s ease;
}

.pitch__features li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pitch__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.pitch.is-fading .pitch__title,
.pitch.is-fading .pitch__body,
.pitch.is-fading .pitch__features {
  opacity: 0;
}

.pitch__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pitch__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Preview */

.preview {
  position: relative;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  align-self: stretch;
}

.preview__screen {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview__screen.is-active {
  opacity: 1;
  pointer-events: auto;
}

.preview__screen img {
  width: 65%;
  height: auto;
  max-width: 100%;
  max-height: calc((100dvh - var(--topbar-h) - var(--footbar-h) - 2.5rem) * 0.85 * 1.3);
  object-fit: contain;
}

/* Footer */

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(30, 30, 30, 0.92);
}

.footbar__links {
  display: flex;
  gap: 1rem;
}

.footbar a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footbar a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    grid-template-rows: auto 1fr auto;
  }

  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.65rem 1rem;
    gap: 0.65rem;
  }

  .module-tabs {
    order: 3;
    width: 100%;
    justify-content: stretch;
  }

  .module-tab {
    flex: 1;
    align-items: center;
  }

  .module-tab__hint {
    display: none;
  }

  .stage {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .pitch {
    order: 2;
  }

  .preview {
    order: 1;
    min-height: 50vw;
    max-height: 58.5vh;
  }

  .preview__screen img {
    width: min(100%, calc(85% * 1.3));
    max-height: 58.5vh;
  }
}

@media (max-width: 520px) {
  .topbar__actions .link-quiet {
    display: none;
  }

  .module-tab__label {
    font-size: 0.75rem;
  }
}
