:root {
  --blue: #003399;
  --ink: #1a1a1f;
  --muted: #5c5c66;
  --line: #e4e4ea;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  /* was overflow: hidden - the page must scroll now that the shared footer
     sits below the player; x stays clipped for the dot field */
  overflow-x: hidden;
  background: #fff;
  color: var(--ink);
  font-family: "Hanken Grotesk", sans-serif;
}

button,
input {
  font: inherit;
}

.dots {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.nav {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  padding: 0 48px;
}

.nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav a:focus-visible,
.lead-form input:focus-visible,
.lead-form button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.nav .brand {
  color: var(--blue);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav .nav-cta {
  border-radius: 9px;
  padding: 8px 18px;
  background: var(--blue);
  color: #fff;
}

.mobile-nav-toggle,
.mobile-nav-menu {
  display: none;
}

.mobile-nav-menu a:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}

.stage-area {
  position: relative;
  z-index: 2;
  display: flex;
  height: calc(100svh - 64px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 64px;
  padding: 24px;
}

.stage {
  position: relative;
  width: min(1000px, 92%);
  height: 46svh;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0b12;
  box-shadow:
    0 24px 60px rgba(10, 10, 30, 0.12),
    0 4px 12px rgba(10, 10, 30, 0.06);
  transition:
    width 900ms cubic-bezier(0.65, 0, 0.35, 1),
    height 900ms cubic-bezier(0.65, 0, 0.35, 1);
}

.stage[data-size="full"] {
  width: min(1320px, 96%);
  height: calc(100svh - 112px);
}

.surface {
  position: absolute;
  display: grid;
  place-items: center;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, #16233f 0%, #0b0b12 70%);
}

.surface[hidden] {
  display: none;
}

.demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0b12;
}

.surface p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* --- Custom video controls (shadcn ghost button + slider look) ---------- */

.big-play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0;
  background: rgba(10, 10, 20, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    opacity 250ms ease,
    transform 250ms ease,
    background 150ms ease;
}

.big-play svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.big-play:hover {
  background: rgba(10, 10, 20, 0.75);
  transform: translate(-50%, -50%) scale(1.05);
}

.stage[data-state="playing"] .big-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.video-controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 16px 12px;
  background: linear-gradient(to top, rgba(5, 5, 12, 0.78), rgba(5, 5, 12, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

/* Only surface the bar when the pointer is over the stage, a control has
   keyboard focus, or the video is paused. */
.stage:hover .video-controls,
.stage:focus-within .video-controls,
.stage[data-state="paused"] .video-controls {
  opacity: 1;
  pointer-events: auto;
}

.control-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 150ms ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.control-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.control-btn svg {
  width: 18px;
  height: 18px;
}

.stage[data-state="playing"] .control-btn .icon-play,
.stage[data-state="paused"] .control-btn .icon-pause {
  display: none;
}

.seek {
  --progress: 0%;
  flex: 1 1 auto;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #fff var(--progress),
    rgba(255, 255, 255, 0.28) var(--progress)
  );
}

.seek::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  appearance: none;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 150ms ease;
}

.seek:hover::-webkit-slider-thumb,
.seek:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
}

.seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.seek::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #fff;
}

.seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.seek:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 999px;
}

.time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.skip-video {
  margin-top: 14px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--ink-soft, #6e6e78);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: opacity 400ms ease;
}

.skip-video:hover {
  color: var(--ink, #0b0b12);
}

.skip-video[data-hidden="true"] {
  pointer-events: none;
  opacity: 0;
}

.form-wrap {
  width: min(560px, 100%);
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  opacity: 0;
  transform: translateY(56px);
  transition:
    max-height 900ms cubic-bezier(0.65, 0, 0.35, 1),
    margin-top 900ms cubic-bezier(0.65, 0, 0.35, 1),
    transform 900ms cubic-bezier(0.65, 0, 0.35, 1),
    opacity 600ms ease;
}

.form-wrap[data-visible="true"] {
  max-height: 600px;
  margin-top: 18px;
  opacity: 1;
  transform: none;
}

.lead-form {
  display: grid;
  width: 100%;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.field label span {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.lead-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 30, 0.04);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  text-align: center;
  transition:
    border-color 150ms,
    box-shadow 150ms;
}

.lead-form input::placeholder {
  color: #9a9aa4;
}

.lead-form input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.16);
  outline: none;
}

.lead-form button {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.lead-form button:hover {
  background: #002a80;
}

@media (max-width: 640px) {
  .site-header {
    height: 74px;
    padding: 8px;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .nav {
    position: relative;
    display: flex;
    width: 100%;
    height: 58px;
    align-items: center;
    gap: 8px;
    padding: 0 7px 0 18px;
    border: 1px solid rgba(26, 26, 31, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px -12px rgba(10, 10, 30, 0.24);
    backdrop-filter: blur(12px);
  }

  .nav > .nav-secondary {
    display: none;
  }

  .nav .brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    font-size: 21px;
  }

  .nav .nav-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-nav-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    cursor: pointer;
  }

  .mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: currentcolor;
    transition:
      transform 0.2s,
      opacity 0.2s;
  }

  .mobile-nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(5.5px) rotate(45deg);
  }

  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
  }

  body.menu-open {
    overflow: hidden;
  }

  .mobile-nav-menu {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 92px 24px 40px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.25s ease,
      visibility 0s linear 0.25s;
  }

  .mobile-nav-menu[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mobile-nav-menu a {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-size: 46px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
    text-decoration: none;
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.22s ease,
      transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-menu[data-open] a {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-nav-menu[data-open] a:nth-child(2) {
    transition-delay: 0.035s;
  }

  .mobile-nav-menu[data-open] a:nth-child(3) {
    transition-delay: 0.07s;
  }

  .stage-area {
    height: calc(100svh - 74px);
    margin-top: 74px;
    padding: 16px;
  }

  .stage,
  .stage[data-size="full"] {
    width: 100%;
  }

  .stage {
    height: 42svh;
  }

  .stage[data-size="full"] {
    height: calc(100svh - 96px);
  }
}

@media (max-height: 760px) {
  .stage {
    height: 38svh;
  }

  .lead-form {
    gap: 10px;
  }

  .form-wrap[data-visible="true"] {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage,
  .form-wrap,
  .mobile-nav-toggle span,
  .mobile-nav-menu,
  .mobile-nav-menu a {
    transition-duration: 1ms;
  }

  .skip-video {
    transition: none;
  }
}
