@font-face {
  font-family: 'D-DIN';
  src: url('fonts/D-DIN.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'D-DIN';
  src: url('fonts/D-DIN-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.18);
  --gutter: 16px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 'D-DIN', 'Arial Narrow', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3,
.wordmark,
.btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  line-height: 1.02;
  margin: 0 0 24px;
}

h2 {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 24px;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

/* Hero: full-bleed photo behind the text on phones, a tall panel beside it on wide screens. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.92) 75%, #000 100%);
}

.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 96px var(--gutter) 48px;
}

/* Top bar over the hero: wordmark on the left, GitHub and Buy Me a Coffee on the right. */
.topbar {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.35em;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.github-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.github-link .icon {
  width: 24px;
  height: 24px;
}

.wide-only {
  display: none;
}

@media (max-width: 599px) {
  .topbar .wordmark,
  .wordmark-link {
    font-size: 0.85rem;
    letter-spacing: 0.25em;
  }

  .project-links {
    gap: 12px;
  }
}

@media (max-width: 359px) {
  .btn-small span {
    display: none;
  }

  .btn-small .icon {
    margin-right: 0;
  }
}

@media (min-width: 600px) {
  .wide-only {
    display: inline;
  }
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .fill {
  fill: currentColor;
  stroke: none;
}

.lede {
  max-width: 34em;
  margin: 0 0 32px;
  color: #e5e5e5;
}

@media (min-width: 900px) {
  .hero {
    align-items: center;
    min-height: 100vh;
  }

  .hero-photo {
    left: auto;
    width: 46%;
    object-position: 50% 45%;
  }

  .hero::after {
    background: linear-gradient(to right, #000 0%, #000 54%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0) 78%),
      linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 20%);
  }

  .hero-text {
    max-width: none;
    width: 54%;
    padding: 96px 48px 96px max(48px, calc((100vw - 1200px) / 2 + 48px));
  }

  .topbar {
    top: 28px;
    left: max(48px, calc((100vw - 1200px) / 2 + 48px));
    right: max(48px, calc((100vw - 1200px) / 2 + 48px));
  }
}

/* Outline buttons that fill on hover and keyboard focus. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.btn-primary {
  border-width: 2px;
}

.btn .icon {
  margin-right: 10px;
}

.btn-small {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.35);
}

.btn-small .icon {
  margin-right: 8px;
}

.card .btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.card .btn-primary:hover,
.card .btn-primary:focus-visible {
  background: transparent;
  color: var(--fg);
}

.btn-quiet {
  border-color: var(--line);
  color: var(--muted);
}

.next {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.next h2 {
  margin-bottom: 12px;
}

.next p {
  margin: 0;
}

.next-title {
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
}

.next-when,
.next-meta {
  color: var(--muted);
}

.next .next-clock {
  margin: 12px 0 8px;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
}

main,
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.calendars,
.faq {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.preview {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.shots {
  display: grid;
  gap: 24px;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shots figcaption,
.shots-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.shots-note {
  margin: 24px 0 0;
  font-size: 0.85rem;
}

@media (min-width: 900px) {
  .shots {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }

  .shot-main {
    grid-row: span 2;
  }
}

.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 700px) {
  main,
  footer {
    padding: 0 48px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--line);
}

.card p {
  margin: 0 0 24px;
  color: var(--muted);
  flex: 1;
}

.actions {
  display: grid;
  gap: 10px;
}

.upcoming {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-intro {
  max-width: 46em;
  margin: 0 0 24px;
  color: var(--muted);
}

/* Launch schedule: date, mission and site stacked on phones, in columns on wide screens. */
.schedule {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.schedule time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.launch-name {
  font-weight: 700;
}

.launch-site {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .schedule li {
    grid-template-columns: 15em 1fr 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

.schedule-more summary {
  margin-top: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  cursor: pointer;
}

.faq dl {
  margin: 0;
  max-width: 46em;
}

.faq dt {
  font-weight: 700;
  margin-top: 24px;
}

.faq dt:first-child {
  margin-top: 0;
}

.faq dd {
  margin: 4px 0 0;
  color: var(--muted);
}

footer {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

footer p {
  margin: 0 0 8px;
}

/* Terms and privacy pages. */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--gutter);
}

.wordmark-link {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  text-decoration: none;
}

.legal {
  padding-top: 32px;
  padding-bottom: 72px;
}

.legal > * {
  max-width: 46em;
}

.legal h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 8px;
}

.legal h2 {
  margin: 40px 0 8px;
}

.legal p,
.legal li {
  color: #d4d4d4;
}

.legal ul {
  padding-left: 1.2em;
}

.legal .updated {
  color: var(--muted);
  margin-top: 0;
}

@media (min-width: 700px) {
  .page-header {
    padding: 40px 48px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
