:root {
  --brand: #20808d;
  --accent: #1b7480;
  --accent-hover: #176f7a;
  --accent-wash: rgb(32 128 141 / 7%);
  --ink: #091717;
  --ink-2: #414d4b;
  --ink-3: #657070;
  --paper: #fbfaf4;
  --surface: #ffffff;
  --media: #e7e8e3;
  --line-soft: rgb(9 23 23 / 7%);
  --success: #2f7a55;
  --danger: #a13d32;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 1rem;
  --text-display: clamp(2.5rem, 7vw, 4.5rem);
  --text-hero: clamp(3.1rem, 11vw, 6rem);
  --fw-display: 300;
  --fw-medium: 500;
  --fw-semibold: 600;
  --tracking-display: -0.045em;
  --tracking-label: 0.09em;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px rgb(9 23 23 / 4%), 0 2px 8px rgb(9 23 23 / 3%);
  --shadow-md: 0 1px 2px rgb(9 23 23 / 4%), 0 8px 24px rgb(9 23 23 / 6%);
  --sheen: linear-gradient(180deg, rgb(255 255 255 / 16%), rgb(255 255 255 / 0%) 55%);
  --glow-accent: inset 0 1px 0 rgb(255 255 255 / 18%), 0 0.25rem 0.75rem rgb(32 128 141 / 14%);
  --atmosphere:
    radial-gradient(circle at 85% -10%, rgb(32 128 141 / 8%), transparent 30rem),
    radial-gradient(circle at -15% 45%, rgb(32 128 141 / 5%), transparent 34rem),
    var(--paper);
  --page: min(100% - 2rem, 72rem);
  --measure: 34rem;
}

@media (min-width: 48rem) {
  :root { --page: min(100% - 4rem, 72rem); }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--atmosphere);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding-left: 1.15rem; }
a { color: var(--accent); text-underline-offset: 0.16em; }
a:hover { color: var(--accent-hover); }

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 80;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  transform: translateY(-180%);
}

.skip:focus,
.skip:focus-visible { transform: none; }

.wordmark {
  display: inline-block;
  margin-bottom: 2.25rem;
}

.wordmark img { width: 9.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: var(--radius-md);
  background: var(--sheen), var(--accent);
  color: var(--paper);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  box-shadow: var(--glow-accent);
}

.btn:hover { background: var(--sheen), var(--accent-hover); }

.btn-quiet {
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: var(--radius-md);
  color: var(--ink-2);
}

.btn-quiet:hover { background: rgb(9 23 23 / 4%); color: var(--ink); }

main {
  width: var(--page);
  margin: 0 auto;
  padding: 2.75rem 0 6rem;
}

.title { padding-bottom: 4.5rem; }

h1, h2 {
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
}

h1 { font-size: var(--text-hero); max-width: 10ch; }

.lede { margin-top: 1.5rem; }

h2 { font-size: var(--text-display); margin-bottom: 1.15rem; }
h3 {
  margin: 2.5rem 0 1.1rem;
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

.kicker {
  margin-bottom: 0.65rem;
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.measure { max-width: var(--measure); color: var(--ink-2); }
.measure + .measure { margin-top: 1rem; }

section { padding: 4.5rem 0; border-top: 1px solid var(--line-soft); }

.feature {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.feature figure {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 18rem;
  padding: 1.75rem 1.5rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.feature img {
  align-self: center;
  justify-self: center;
  width: min(100%, 20rem);
  height: 10.5rem;
  object-fit: contain;
}

.feature.icons img { width: 7rem; }

.feature figcaption {
  display: flex;
  align-items: center;
  height: 1.25rem;
  margin-top: 1.25rem;
  overflow: hidden;
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.feature figure.on-dark {
  background: var(--ink);
  border-color: transparent;
}

.feature figure.on-dark figcaption {
  color: rgb(251 250 244 / 62%);
}

.download-row { margin-top: 3rem; }

.btn-download {
  min-height: 3.75rem;
  padding: 0 1.85rem;
  border-radius: var(--radius-lg);
  font-size: 1.0625rem;
}

.rules {
  display: grid;
  gap: 1rem;
}

.names { margin-top: 2.25rem; }

.rule {
  display: grid;
  grid-template-rows: 11.5rem auto;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.frame {
  display: grid;
  place-items: center;
  height: 11.5rem;
  padding: 1.5rem;
  overflow: hidden;
  background: var(--media);
}

.frame img {
  width: 11.5rem;
  height: 3.4rem;
  object-fit: contain;
}

.rules.icons .frame img {
  width: 4.75rem;
  height: 4.75rem;
}

.rule .tiny {
  width: 2.4rem;
  height: 2.4rem;
}

.rule > p {
  min-height: 4.25rem;
  padding: 1rem 1.15rem;
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.rule[data-kind="dont"] strong { color: var(--danger); }
.rule[data-kind="do"] strong { color: var(--success); }

.wrong {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.03em;
  text-decoration: line-through;
  text-decoration-color: var(--danger);
}

.stretch { transform: scaleX(1.4); }
.recolor { filter: hue-rotate(118deg) saturate(1.45); }
.fx {
  filter: drop-shadow(0 12px 16px rgb(9 23 23 / 22%));
  transform: rotate(-6deg);
}

.crop {
  width: 7.5rem;
  height: 2.4rem;
  overflow: hidden;
}

.crop img {
  width: 14rem;
  height: 3.4rem;
  max-width: none;
  margin-left: -1.4rem;
}

.pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.pair img:first-child {
  width: 8.5rem;
  height: 2.5rem;
}

.air { background: var(--accent-wash); }

.extra { position: relative; }
.extra::after {
  content: "+";
  position: absolute;
  top: -0.4rem;
  right: -0.75rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--paper);
  font-size: 0.95rem;
  line-height: 1.3rem;
  text-align: center;
}

.busy {
  background:
    repeating-linear-gradient(
      -18deg,
      #2a4a4e 0 12px,
      #1a3336 12px 24px
    );
}

.busy img { opacity: 0.7; }

.type-card {
  margin-top: 2.25rem;
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.type-hero {
  max-width: 18ch;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
}

.weights {
  display: grid;
  gap: 0.55rem 1.5rem;
  margin-top: 1.75rem;
}

.weights p { color: var(--ink-2); }

.w300 { font-weight: 300; }
.w400 { font-weight: 400; }
.w500 { font-weight: 500; }
.w600 { font-weight: 600; }

.lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.75rem;
  padding: 2.75rem 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.lockup img {
  display: block;
  width: 12.5rem;
  height: 3.125rem;
  object-fit: contain;
}

.lockup span {
  display: flex;
  align-items: center;
  height: 3.125rem;
  color: var(--ink-2);
  font-size: 2.75rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.04em;
  line-height: 1;
  transform: translateY(-0.2rem);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  width: var(--page);
  margin: 0 auto;
  padding: 1.6rem 0 2.75rem;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: var(--text-sm);
}

dialog {
  width: min(calc(100% - 2rem), 32rem);
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop { background: rgb(9 23 23 / 42%); }

.dialog-inner {
  padding: 1.75rem 1.6rem 1.4rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.dialog-inner h2 { margin-bottom: 0.85rem; font-size: 2rem; }
.dialog-inner p { color: var(--ink-2); font-size: 0.95rem; }

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (min-width: 48rem) {
  .feature,
  .rules,
  .weights { grid-template-columns: 1fr 1fr; }
  .names { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 64rem) {
  .rules { grid-template-columns: repeat(3, 1fr); }
}

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