/* Ordinary Grapplers: one page, one mat. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --mat: #2340d4;
  --ink: #0a0c1a;
  --paper: #f1f2f6;
  --muted: #454a63;
  --line: rgba(10, 12, 26, 0.2);
  --on-mat: #ffffff;
  --on-mat-soft: #d3dbff;
  --line-mat: rgba(255, 255, 255, 0.32);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 78rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--mat) var(--paper);
}

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

::selection {
  background: var(--ink);
  color: #fff;
}

.mat ::selection,
.mat::selection {
  background: #fff;
  color: var(--mat);
}

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

.mat :focus-visible {
  outline-color: #fff;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* Type */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.3rem + 5.2vw, 5.5rem);
}

h2 {
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.25rem);
}

.display {
  font-size: clamp(3rem, 1rem + 8vw, 6rem);
}

.nowrap {
  white-space: nowrap;
}

.lead {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  max-width: 34em;
}

.muted {
  color: var(--muted);
}

/* The mat: tiles with interlocking tabs */

.mat {
  color: var(--on-mat);
  background-color: var(--mat);
  background-image: url("assets/mat.svg");
  background-size: 720px 360px;
  background-position: 0 0;
}

@media (max-width: 640px) {
  .mat {
    background-size: 420px 210px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.4rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 2px solid #fff;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn svg {
  flex: none;
  transition: transform 0.35s var(--ease);
}

.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--ink {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.btn--ink:hover {
  background: var(--mat);
  border-color: var(--mat);
}

.btn--small {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: #fff;
  background: transparent;
  border-color: var(--line-mat);
}

.btn--small:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.textlink {
  font-weight: 600;
  font-stretch: 108%;
}

/* Hero */

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  padding-block: 1.25rem;
  color: #fff;
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-size: 0.95rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
}

.bar nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  font-weight: 600;
  font-stretch: 108%;
  font-size: 0.95rem;
}

.bar nav a {
  text-decoration: none;
}

.bar nav a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .bar nav {
    display: none;
  }
}

.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 7.5rem 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  animation: rise 0.9s var(--ease) both;
}

.hero-copy .lead {
  margin-top: 1.75rem;
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.facts {
  max-width: 34em;
  margin: 3rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-mat);
  font-weight: 600;
  font-stretch: 112%;
  font-size: 1rem;
  line-height: 1.5;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-mark {
  position: relative;
  justify-self: center;
  width: min(100%, 28rem);
}

/* The contest circle painted on the mat; the roundel rolls inside it */
.hero-mark::before,
.hero-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  translate: -50% -50%;
  pointer-events: none;
}

.hero-mark::before {
  width: 142%;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.6);
}

.hero-mark::after {
  width: 178%;
  aspect-ratio: 1;
  border: 34px solid rgba(255, 255, 255, 0.07);
}

.hero-mark img {
  position: relative;
  z-index: 1;
}

.hero-mark img {
  width: 100%;
  aspect-ratio: 1;
}

@media (max-width: 900px) {
  .hero {
    align-items: flex-start;
    padding-block: 6.5rem 3.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 1.75rem;
  }

  .hero-mark {
    order: -1;
    width: 6.5rem;
    justify-self: start;
  }

  .hero-mark::before,
  .hero-mark::after {
    display: none;
  }
}

/* One authored moment: the roundel rolls as you scroll */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes roll {
  to {
    rotate: 110deg;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-mark img {
      animation: roll linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy {
    animation: none;
  }
}

/* Sections */

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section + .section:not(.mat) {
  border-top: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.5rem;
}

.grid > h2 {
  grid-column: 1 / span 4;
}

.grid > .body {
  grid-column: 5 / -1;
}

.grid > .display {
  grid-column: 1 / -1;
}

.grid > .body--offset {
  grid-column: 5 / -1;
}

@media (max-width: 860px) {
  .grid > h2,
  .grid > .body,
  .grid > .body--offset {
    grid-column: 1 / -1;
  }
}

/* Sessions */

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

.timetable li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.timetable li:last-child {
  border-bottom: 1px solid var(--line);
}

.day {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.time {
  font-size: clamp(2.25rem, 1rem + 4.5vw, 4rem);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timetable .note {
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--muted);
  white-space: normal;
  max-width: 22em;
  text-align: right;
}

@media (max-width: 600px) {
  .timetable li {
    grid-template-columns: minmax(0, 1fr);
  }

  .timetable .note {
    text-align: left;
  }
}

.where {
  margin-top: 2rem;
  max-width: 34em;
}

.where--next {
  margin-top: 0;
}

/* Format statement */

.statement {
  margin: 0;
  max-width: 24em;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.statement + .statement {
  margin-top: 1.5rem;
  color: var(--muted);
}

.format h2 {
  margin-bottom: 2rem;
}

/* Free section */

.free .display {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.split {
  margin: 0;
}

.split > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.5rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line-mat);
}

.split > div:last-child {
  border-bottom: 1px solid var(--line-mat);
}

.split dt {
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.2;
}

.split dd {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .split > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

.free .after {
  margin-top: 2rem;
  max-width: 34em;
}

.free .after a {
  font-weight: 600;
}

/* Visitors */

.visitors .body p {
  max-width: 34em;
}

.visitors .btn {
  margin-top: 0.75rem;
}

/* FAQ */

.faq-list {
  margin: 0;
  padding: 0;
}

.faq-list details {
  border-top: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 1.25rem 3rem 1.25rem 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 16px;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  transition: transform 0.35s var(--ease);
}

.faq-list summary::after {
  transform: rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.faq-list summary:hover {
  color: var(--mat);
}

.faq-list summary:hover::before,
.faq-list summary:hover::after {
  background: var(--mat);
}

.faq-list .answer {
  padding: 0 3rem 1.5rem 0;
  max-width: 38em;
  color: var(--muted);
}

.faq-list .answer p {
  margin: 0;
}

.faq-list .answer a {
  color: var(--ink);
}

/* Close + footer */

.close .display {
  margin-bottom: 1.75rem;
}

.close .lead {
  margin-bottom: 0;
}

.site-footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-mat);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  font-size: 0.95rem;
  color: var(--on-mat-soft);
}

.site-footer p {
  margin: 0;
}

.site-footer .links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-footer a {
  color: #fff;
}

@media (max-width: 700px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }
}
