/* Shapesetter: the printed page. Cream paper, flat inks, an offset edge for depth -- never a soft shadow. */

@font-face {
  font-family: "Heros";
  src: url("fonts/texgyreheros-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Heros";
  src: url("fonts/texgyreheros-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F2EDE1;
  --card: #FAF6EC;
  --ink: #17150F;
  --muted: #5E594C;
  --grey: #9A9482;
  --grey-light: #C7C1B0;
  --red: #CE3B2E;
  --blue: #1E5DAA;
  --yellow: #E8B62C;
  --lattice: rgba(23, 21, 15, 0.055);
  --rule: 3px;
  --offset: 6px;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--lattice) 1px, transparent 1px),
    linear-gradient(90deg, var(--lattice) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: "Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* The bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px var(--gutter);
  background: var(--paper);
  border-bottom: var(--rule) solid var(--ink);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark svg { width: 26px; height: 26px; }
.bar nav { display: flex; gap: 22px; margin-left: auto; }
.bar nav a {
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.bar nav a:hover { border-bottom-color: var(--red); }

/* Buttons: ink-edged blocks that press into their offset */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--paper);
  background: var(--red);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--offset) var(--offset) 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.button svg { width: 18px; height: 18px; }
.button:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.button:active { transform: translate(var(--offset), var(--offset)); box-shadow: 0 0 0 var(--ink); }
.button-plain { color: var(--ink); background: var(--card); }
.button-small { padding: 8px 14px; font-size: 0.9rem; --offset: 4px; }

/* The hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 104px) var(--gutter) clamp(32px, 6vw, 72px);
}
.kicker {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
h1 {
  margin: 0;
  font-size: clamp(3.4rem, 10.5vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  font-weight: 700;
}
.tagline {
  margin: 20px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lead { margin: 14px 0 0; max-width: 34em; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; }

.hero-art { position: relative; margin: 0; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 4% -6% -6% 4%;
  background-image: radial-gradient(var(--grey-light) 30%, transparent 32%);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 60% 60%, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle at 60% 60%, #000 30%, transparent 70%);
}
.hero-art svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.construction { fill: none; stroke: var(--grey); stroke-width: 1; stroke-dasharray: 4 5; }
.plate { filter: drop-shadow(5px 5px 0 var(--ink)); }
.plate > * { mix-blend-mode: multiply; }
.arm line { stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.arm circle { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
.registration { fill: none; stroke: var(--ink); stroke-width: 1.5; }

/* Sections */

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) var(--gutter);
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 28px;
  padding-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  border-bottom: var(--rule) solid var(--ink);
}
.section-title span { font-size: 0.5em; color: var(--red); letter-spacing: 0; }
.note { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }

/* The trailer: a poster that loads YouTube only when played */

.trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--offset) var(--offset) 0 var(--ink);
  overflow: hidden;
}
.trailer-poster, .trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.trailer-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(72px, 12vw, 112px);
  height: clamp(72px, 12vw, 112px);
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(5px 5px 0 var(--ink));
  transition: transform 80ms ease-out;
}
.trailer-play:hover { transform: scale(1.06); }
.trailer-play svg { width: 100%; height: 100%; }
.trailer-soon {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  padding: 14px 22px;
  transform: translate(-50%, -50%);
  font-weight: 700;
  white-space: nowrap;
  background: var(--card);
  border: var(--rule) solid var(--ink);
}
.trailer.is-soon .trailer-play { display: none; }
.trailer.is-soon .trailer-soon { display: block; }
.trailer.is-playing .trailer-play, .trailer.is-playing .trailer-poster { display: none; }

/* About: prose beside a Mondrian of features */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-text p { margin: 0 0 1em; }
.about-text p:first-child { font-size: 1.15em; font-weight: 700; letter-spacing: -0.01em; }
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ink);
  box-shadow: var(--offset) var(--offset) 0 var(--grey-light);
}
.features li {
  padding: 18px 18px 22px;
  min-height: 132px;
  font-size: 0.98rem;
  line-height: 1.4;
  font-weight: 700;
  background: var(--card);
}
.features .f-wide { grid-column: span 2; }
.features .f-red { background: var(--red); color: var(--paper); }
.features .f-blue { background: var(--blue); color: var(--paper); }
.features .f-yellow { background: var(--yellow); }

/* Screenshots */

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.shots a {
  display: block;
  border: var(--rule) solid var(--ink);
  box-shadow: var(--offset) var(--offset) 0 var(--ink);
  background: var(--ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.shots a:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* The wishlist card */

.wishlist-card {
  position: relative;
  padding: clamp(28px, 5vw, 56px);
  color: var(--paper);
  background: var(--blue);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--offset) var(--offset) 0 var(--ink);
  overflow: hidden;
}
.wishlist-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background-image: radial-gradient(var(--yellow) 32%, transparent 34%);
  background-size: 12px 12px;
}
.wishlist-card h2 {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1;
}
.wishlist-card p { position: relative; margin: 0 0 26px; max-width: 32em; }
.wishlist-card .button { position: relative; }

/* Press */

.press p { margin: 0; max-width: 40em; }

/* The press page: the fact sheet, rendered from PressKit/presskit.md */

.presskit { max-width: 860px; }
.presskit h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1; margin: 0 0 24px; }
.presskit h2 {
  margin: 44px 0 16px;
  padding-bottom: 8px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  border-bottom: var(--rule) solid var(--ink);
}
.presskit table { width: 100%; border-collapse: collapse; background: var(--card); border: var(--rule) solid var(--ink); }
.presskit td, .presskit th { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--grey-light); }
.presskit td:first-child { width: 34%; }
.presskit td a { word-break: break-all; }
.presskit code { font-size: 0.9em; padding: 1px 5px; background: var(--card); border: 1px solid var(--grey-light); }
.presskit .download { margin: 0 0 40px; }

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: clamp(32px, 6vw, 64px);
  padding: 28px var(--gutter);
  color: var(--paper);
  background: var(--ink);
}
.wordmark-text { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { text-decoration: none; font-weight: 700; }
.footer nav a:hover { text-decoration: underline; }
.fine { margin-left: auto; font-size: 0.85rem; color: var(--grey); }

/* Narrow screens */

@media (max-width: 860px) {
  .hero, .about { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .bar { gap: 12px; }
  .bar nav { display: none; }
  .bar .button-small { margin-left: auto; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .features .f-wide { grid-column: auto; }
  .features li { min-height: 0; }
  .shots { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .trailer-soon { white-space: normal; text-align: center; width: 80%; }
  .fine { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .shots a, .trailer-play { transition: none; }
}
