/* Tesserarum: shared site styles */

:root {
  --paper: #F4F3EF;
  --ink: #16181C;
  --quiet: #8E929A;
  --faint: #DDDAD3;
  --red: #D0021B;
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --move: 0ms linear;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* The red full stop used in every wordmark */
.stop {
  color: var(--red);
}

.wrap {
  max-width: 1440px;
  margin: auto;
  padding: 0 clamp(18px, 3vw, 44px);
}

/* ---------- Header ---------- */

header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.nav a:hover {
  color: var(--red);
}

.nav .explore {
  background: var(--red);
  color: white;
  padding: 11px 15px;
}

/* ---------- Hero ---------- */

.hero {
  min-height: calc(100vh - 78px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-bottom: 2px solid var(--ink);
}

.hero-copy {
  position: relative;
  z-index: 5;
  padding: clamp(60px, 9vw, 130px) 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-left: 4px solid var(--red);
  padding-left: 12px;
}

h1 {
  position: relative;
  z-index: 10;
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(76px, 13vw, 190px);
  line-height: .78;
  letter-spacing: -.085em;
  margin: 45px 0 35px;
  font-weight: 800;
  background: var(--paper);
  padding: 0;
  text-transform: uppercase;
}

.hero-text {
  position: relative;
  z-index: 5;
  max-width: 540px;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.tessellation {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 47%;
  overflow: hidden;
  background: #E9E6DF;
}

.tessellation img {
  position: absolute;
  display: block;
  width: 145%;
  height: 145%;
  left: -20%;
  top: -20%;
  transform: rotate(45deg);
  transform-origin: center;
}

/* ---------- Features ---------- */

.section-rule {
  border-bottom: 2px solid var(--ink);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.feature {
  min-height: 360px;
  padding: 34px 34px 45px 0;
  border-right: 1px solid var(--ink);
}

.feature:not(:first-child) {
  padding-left: 34px;
}

.feature:last-child {
  border-right: 0;
}

.num {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 80px;
}

.feature h2 {
  font-size: clamp(30px, 3vw, 48px);
  line-height: .95;
  letter-spacing: -.05em;
  margin: 0 0 24px;
}

.feature p {
  max-width: 350px;
  color: #4f5359;
  margin: 0;
  font-size: 16px;
}

/* ---------- Explore band ---------- */

.explore-band {
  padding: 38px 0;
}

.big-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: white;
  padding: 27px 30px;
  font-size: clamp(24px, 4vw, 54px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.055em;
  border: 0;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.big-button::after {
  content: "→";
  color: var(--red);
  font-size: 1.15em;
}

.big-button:hover {
  background: var(--red);
}

.big-button:hover::after {
  color: white;
}

/* ---------- Footer ---------- */

footer {
  border-top: 2px solid var(--ink);
  padding: 34px 0 55px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.footer-copy {
  max-width: 330px;
  color: var(--quiet);
  font-size: 13px;
  margin-top: 10px;
}

footer h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}

footer a {
  display: block;
  font-size: 13px;
  margin: 5px 0;
}

footer a:hover {
  color: var(--red);
}

.legal {
  grid-column: 1/-1;
  border-top: 1px solid var(--faint);
  padding-top: 14px;
  margin-top: 20px;
  color: var(--quiet);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

/* ---------- Inner pages ---------- */

.nav a[aria-current="page"] {
  color: var(--red);
}

/* Page head: echoes the hero, title over a brick panel */
.page-head {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 440px;
  border-bottom: 2px solid var(--ink);
}

.head-copy {
  position: relative;
  z-index: 5;
  padding: clamp(48px, 6vw, 90px) 0 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.page-head h1 {
  font-size: clamp(64px, 10vw, 150px);
  margin: 36px 0 0;
}

.lede {
  max-width: 520px;
  margin: 0;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.page-head .tessellation {
  inset: 0 0 0 60%;
}

/* Document grid: sticky aside + ruled blocks */
.doc {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
}

.doc-aside {
  border-right: 1px solid var(--ink);
  padding: 34px 34px 60px 0;
}

.sticky {
  position: sticky;
  top: 24px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}

.toc {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  border-top: 1px solid var(--ink);
}

.toc a {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--faint);
  font-size: 14px;
  font-weight: 600;
}

.toc a span {
  color: var(--red);
  min-width: 1.6em;
}

.toc a:hover {
  color: var(--red);
}

.facts {
  margin: 0;
}

.facts dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--quiet);
}

.facts dd {
  margin: 4px 0 20px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.aside-copy {
  font-size: 14px;
  color: #4f5359;
  margin: 0 0 24px;
  max-width: 34ch;
}

.aside-copy a,
.block a {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.aside-copy a:hover,
.block a:hover {
  color: var(--red);
}

.doc-body {
  padding: 0 0 70px 34px;
  min-width: 0;
}

.block {
  padding: 34px 0 40px;
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 24px;
}

.block:last-child {
  border-bottom: 0;
}

.block .num {
  margin-bottom: 22px;
  text-transform: uppercase;
}

.block h2 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: .95;
  letter-spacing: -.05em;
  margin: 0 0 20px;
  max-width: 20ch;
}

.block p,
.block li {
  max-width: 64ch;
  font-size: 17px;
  line-height: 1.55;
  color: #34373c;
}

.block p {
  margin: 0 0 1em;
}

.block ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
}

.block li::marker {
  color: var(--red);
}

.updated {
  font-size: 13px;
  color: var(--quiet);
  margin: 0;
}

/* Placeholder text still to be filled in */
.todo {
  background: #FBE3E6;
  padding: 0 .25em;
}

/* ---------- Roadmap ---------- */

.stages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stage {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--ink);
}

.stage:last-child {
  border-bottom: 0;
}

.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 9px;
  border: 2px solid var(--ink);
  line-height: 1;
}

.status.done {
  background: var(--ink);
  color: white;
}

.status.now {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.stage h2 {
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: .95;
  letter-spacing: -.05em;
  margin: 0 0 14px;
}

.stage p {
  margin: 0;
  max-width: 62ch;
  font-size: 17px;
  color: #34373c;
}

.legend {
  display: grid;
  gap: 10px;
  margin: 0 0 32px;
}

/* ---------- Contact form ---------- */

.form {
  display: grid;
  gap: 26px;
  max-width: 680px;
  padding: 34px 0 20px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.field .optional {
  color: var(--quiet);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: white;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 12px 14px;
}

.field textarea {
  min-height: 220px;
  resize: vertical;
}

.hint {
  font-size: 13px;
  color: var(--quiet);
  margin: 6px 0 0;
}

/* Honeypot: hidden from people, visible to naive bots */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form .big-button {
  font-size: clamp(22px, 2.6vw, 34px);
  padding: 20px 24px;
}

/* ---------- Small screens ---------- */

@media (max-width: 800px) {
  header {
    height: 64px;
  }

  .nav a:not(.explore) {
    display: none;
  }

  .hero {
    display: block;
    min-height: 760px;
  }

  .hero-copy {
    padding: 55px 0 45px;
    min-height: 760px;
  }

  h1 {
    font-size: clamp(70px, 19vw, 120px);
    margin: 38px 0 28px;
  }

  .tessellation {
    inset: 52% -15% -5% 0;
    opacity: .75;
  }

  .tessellation img {
    width: 180%;
    height: 180%;
    left: -40%;
    top: -35%;
  }

  .hero-text {
    max-width: 90%;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature:not(:first-child) {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 28px 0 38px;
    min-height: 0;
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .num {
    margin-bottom: 42px;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-main {
    grid-column: 1/-1;
  }

  .legal {
    flex-direction: column;
    gap: 8px;
  }

  .page-head {
    display: block;
    min-height: 0;
  }

  .head-copy {
    padding: 44px 0 36px;
    gap: 24px;
  }

  .page-head .tessellation {
    position: relative;
    inset: auto;
    height: 120px;
    opacity: 1;
  }

  .page-head .tessellation img {
    width: 140%;
    height: 400%;
    left: -20%;
    top: -150%;
  }

  .doc {
    grid-template-columns: 1fr;
  }

  .doc-aside {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 28px 0 8px;
  }

  .sticky {
    position: static;
  }

  .doc-body {
    padding: 0 0 50px;
  }

  .stage {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }
}

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