:root {
  --bg: #0a0a0a;
  --surface: #181818;
  --surface-translucent: rgba(24, 24, 24, 0.75);
  --red: #e50914;
  --red-hover: #f6121d;
  --text: #ffffff;
  --text-dim: #b3b3b3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 3rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 10%, transparent);
  position: relative;
  z-index: 2;
}

.brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--red);
  text-transform: uppercase;
}

.brand span {
  color: var(--text);
  font-weight: 400;
}

main {
  max-width: 1400px;
  margin: -3.2rem auto 0;
  padding: 0 1.5rem 2.5rem;
  position: relative;
  z-index: 1;
}

.hero-wrap {
  position: relative;
}

.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hero-frame img,
.hero-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-frame img.visible,
.hero-frame video.visible {
  display: block;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.75) 20%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 30%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 3rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 2;
}

.hero-tag {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.title-card {
  margin: 0.2rem 0 0.4rem;
}

.title-main {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.8);
}

.title-tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text-dim);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.title-byline {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.command-bar {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  max-width: 640px;
}

.btn-primary,
.icon-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.btn-primary {
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  background: var(--red);
  color: var(--text);
  font-size: 1rem;
  transition: background 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--red-hover);
}

.icon-btn {
  flex: 0 0 auto;
  width: 3.1rem;
  font-size: 1.3rem;
  border-radius: 4px;
  background: rgba(109, 109, 110, 0.7);
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon-btn.listening {
  background: var(--red);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#commandInput {
  flex: 1;
  padding: 0 1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--surface-translucent);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

#commandInput::placeholder {
  color: var(--text-dim);
}

.btn-primary:disabled,
.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint {
  text-align: left;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 1rem 0 0 0.3rem;
}

.watch-all-btn {
  flex: 0 0 auto;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.watch-all-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.watch-all-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.watch-all-btn[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .topbar {
    padding: 0.9rem 1.1rem;
  }

  body {
    padding-bottom: 4.6rem; /* room for the fixed command bar */
  }

  main {
    margin-top: 0;
    padding: 0 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 4.6rem);
  }

  /* On mobile the screen sits centered with its caption flowing
     normally below it, instead of text layered on top of the image. */
  .hero-wrap {
    display: flex;
    flex-direction: column;
  }

  .hero-frame {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .hero-gradient {
    display: none;
  }

  .hero-info {
    position: static;
    padding: 1.1rem 0.2rem 0;
    gap: 0.6rem;
  }

  .title-main {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    text-shadow: none;
  }

  .title-tagline,
  .hero-tag,
  .title-byline {
    text-shadow: none;
  }

  .title-tagline {
    font-size: 1rem;
  }

  .hint {
    margin: 0.8rem 0 0;
  }

  .watch-all-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  /* The prompt bar is pinned to the bottom of the screen like a
     chat input, regardless of where the hero sits in the page. */
  .command-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    margin: 0;
    padding: 0.7rem 0.8rem calc(0.7rem + env(safe-area-inset-bottom));
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
  }
}
