html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.heading {
  font-family: var(--font-heading);
  letter-spacing: -.035em;
}

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

::selection {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* Blueprint grid used behind the hero and dark sections */
.blueprint {
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

.blueprint-dark {
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Crop-mark corners for framed images */
.frame {
  position: relative;
}

.frame::before,
.frame::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 3;
  pointer-events: none;
}

.frame::before {
  top: -6px;
  left: -6px;
  border-top: 2px solid var(--color-primary);
  border-left: 2px solid var(--color-primary);
}

.frame::after {
  bottom: -6px;
  right: -6px;
  border-bottom: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
}

.frame img {
  filter: grayscale(.85) contrast(1.05);
  transition: filter .4s ease;
}

.frame:hover img {
  filter: grayscale(0) contrast(1);
}

/* Docking diagram animation */
.dock-left {
  animation: dock-l 4s ease-in-out infinite alternate;
}

.dock-right {
  animation: dock-r 4s ease-in-out infinite alternate;
}

@keyframes dock-l {
  from {
    transform: translateX(-10px);
  }

  to {
    transform: translateX(6px);
  }
}

@keyframes dock-r {
  from {
    transform: translateX(10px);
  }

  to {
    transform: translateX(-6px);
  }
}

.pulse-dot {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: .25;
  }
}

/* Cards */
.cell {
  transition: background-color .2s ease, color .2s ease;
}

.cell:hover {
  background: var(--color-dark);
  color: #fff;
}

.cell:hover p {
  color: rgba(255, 255, 255, .7);
}

.cell:hover .cell-num {
  color: var(--color-primary);
}

.step {
  transition: transform .2s ease, border-color .2s ease;
}

.step:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

/* FAQ */
.faq-item summary {
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-icon {
  transition: transform .2s ease, background-color .2s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Dialog */
.dialog-backdrop {
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(6px);
}

.dialog-backdrop[hidden],
[hidden] {
  display: none !important;
}

.choice {
  transition: border-color .2s ease, background-color .2s ease;
}

.choice:hover,
.choice:has(input:checked) {
  border-color: var(--color-primary);
  background: #fff1ec;
}

.choice input {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .dialog-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .dialog-backdrop [role='dialog'] {
    margin: 0;
    max-height: 90vh;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
