@import "tokens.css";

@font-face {
  font-family: Anton;
  src: url("../fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Spectral;
  src: url("../fonts/spectral-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Spectral;
  src: url("../fonts/spectral-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Spectral;
  src: url("../fonts/spectral-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.45;
  font-weight: 400;
  overflow-wrap: break-word;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--ember);
  color: var(--paper);
}

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

.skip {
  position: absolute;
  left: var(--margin);
  top: -220px;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  text-decoration: none;
}

.skip:focus {
  top: var(--margin);
}

.mast,
h1,
h2,
h3,
.btn,
.menu-toggle {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.9;
  text-transform: uppercase;
}

.front {
  container-type: inline-size;
  padding: 18px var(--margin) 0;
}

.mast {
  margin: 0;
  font-size: calc(100cqi / 8.82);
  line-height: 0.82;
  white-space: nowrap;
}

.mast .line {
  display: inline;
}

.mast .line + .line::before {
  content: " ";
}

h1 .line {
  display: block;
}

.ember-rule {
  height: 6px;
  margin: 10px 0;
  background: var(--ember);
}

.dateline {
  margin: 12px 0 8px;
  max-width: 78ch;
  font-size: var(--step-small);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 4px 0 12px;
}

.menu-toggle {
  display: none;
  min-height: 48px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  font-size: var(--step-small);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

nav a {
  font-family: var(--font-display);
  font-size: var(--step-small);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.lede,
.sheet,
.site-foot {
  padding-left: var(--margin);
  padding-right: var(--margin);
}

.lede {
  padding-top: 0;
  padding-bottom: 18px;
}

.sheet {
  margin-top: 46px;
  padding-top: 14px;
  padding-bottom: 8px;
  border-top: var(--col-rule) solid var(--ink);
}

h1 {
  margin: 0 0 10px;
  font-size: var(--step-display);
}

h1 .line,
.pull .line {
  display: block;
}

.cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}

.lede .cols {
  align-items: stretch;
}

.quad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

.rule {
  border-left: var(--col-rule) solid var(--ink);
  padding-left: 16px;
}

.piece,
.field,
.verb,
.deck-col,
.span-3 {
  min-width: 0;
  padding-right: 16px;
}

.span-2:nth-child(3n),
.field:last-child,
.verb:last-child {
  padding-right: 0;
}

.sheet h2,
.cta h2 {
  margin: 0 0 10px;
  font-size: var(--step-head);
}

h3 {
  margin: 0 0 6px;
  font-size: var(--step-title);
}

.deck {
  margin: 0 0 8px;
  max-width: 36ch;
  font-size: var(--step-lead);
  font-style: italic;
  line-height: 1.3;
}

.deck-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.deck-col .deck,
.deck-col p {
  max-width: none;
}

.spoken {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.3;
}

.piece p,
.field p,
.verb p,
.deck-col p,
.answer,
.cta p {
  margin: 0 0 8px;
  max-width: 60ch;
}

.photo,
.mug,
.still {
  margin: 0;
}

.photo {
  padding-right: 16px;
}

.deck-col,
.span-3.rule {
  padding-right: 0;
}

.frame,
.shot {
  --fx: 0.5;
  --fy: 0.22;
  --zoom: 2.5;
  position: relative;
  container-type: size;
  overflow: hidden;
  background: var(--paper);
}

/* Smaller photos stay inside the 1440 render. The front-page frame
   fills its column and uses the whole width of that same render. */
.shot {
  width: min(100%, 480px);
  height: auto;
  aspect-ratio: 2 / 1;
}

.frame {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
}

.frame[data-crop="juggernaut"],
.shot[data-crop="juggernaut"] { --fx: 0.4549; --fy: 0.2274; --zoom: 2.8515; }
.frame[data-crop="axe"],
.shot[data-crop="axe"] { --fx: 0.5139; --fy: 0.2292; --zoom: 2.4828; }

.frame[data-crop="juggernaut"] { --fx: 0.5; --fy: 0.2917; --zoom: 2; }
.frame[data-crop="axe"] { --fx: 0.5; --fy: 0.2778; --zoom: 2; }

.frame img,
.shot img {
  --side: max(var(--zoom) * 100cqh, 100cqw);
  position: absolute;
  width: var(--side);
  height: var(--side);
  max-width: none;
  left: calc(50cqw - var(--fx) * var(--side));
  top: calc(50cqh - var(--fy) * var(--side));
  object-fit: fill;
  background: transparent;
}

/* Per-pixel plate: ink on the paper. No SVG filter, so the edges stay sharp. */
.inked,
.inked-mask {
  filter: grayscale(1) contrast(1.08) brightness(1.12);
  mix-blend-mode: multiply;
}

.frame::after,
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'><rect width='2' height='2' fill='%231a120c'/></svg>");
  background-size: 4px 4px;
  image-rendering: pixelated;
  mix-blend-mode: multiply;
}

@supports not (mix-blend-mode: multiply) {
  .inked,
  .inked-mask {
    filter: grayscale(1) contrast(1.35);
    mix-blend-mode: normal;
  }

  .frame,
  .shot {
    background: var(--ink);
  }

  .frame::after,
  .shot::after {
    content: none;
  }
}

.mug {
  margin: 0 0 8px;
  padding: 5px;
  border: var(--col-rule) solid var(--ink);
}

.mug .shot {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 2 / 1;
  border: var(--col-rule) solid var(--ink);
}

.mug .shot img {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  object-fit: cover;
  object-position: center 28%;
}

figcaption,
.photo figcaption {
  margin-top: 6px;
  max-width: 58ch;
  font-size: var(--step-small);
  font-style: italic;
}

.pull {
  margin: 18px 0;
  padding: 18px 0 16px;
  border-top: var(--col-rule) solid var(--ink);
  border-bottom: var(--col-rule) solid var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 10px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: var(--step-title);
  border: 0;
}

.invite-block .aviso {
  margin: 8px 0 0;
  max-width: 36ch;
  font-size: var(--step-small);
  font-style: italic;
}

.num {
  display: block;
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5vw, 4.75rem);
  line-height: 0.78;
}

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

.aviso {
  margin: 0;
  font-size: var(--step-small);
  font-style: italic;
}

.aviso:empty {
  display: none;
}

.faq-row {
  padding: 0 0 10px;
  margin: 0 0 10px;
  border-bottom: var(--col-rule) solid var(--ink);
}

.faq-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
}

.closer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 32px;
  align-items: stretch;
  padding: 4px 0 10px;
}

.closer-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding-left: 16px;
  border-left: var(--col-rule) solid var(--ink);
}

.closer-note p {
  margin: 0;
  max-width: 18em;
  font-family: var(--font-display);
  font-size: var(--step-title);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.site-foot {
  padding-top: 8px;
  padding-bottom: 36px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.foot-links a {
  font-family: var(--font-display);
  text-transform: uppercase;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.foot-meta p,
.credits {
  max-width: 78ch;
  font-size: var(--step-small);
}

.colophon {
  margin-top: 8px;
  padding-top: 12px;
  border-top: var(--col-rule) solid var(--ink);
}

.colophon-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
}

.colophon-mark {
  display: block;
  height: 36px;
  width: auto;
}

.colophon .credits,
.colophon #soporte-nota {
  margin: 8px 0 0;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .menu-toggle:hover {
    background: var(--ember);
    color: var(--paper);
  }

  nav a:hover,
  .foot-links a:hover {
    color: var(--ember);
  }
}

.btn.is-disabled,
.btn.is-disabled:hover {
  background: var(--ink);
  color: var(--paper);
  opacity: 0.45;
  cursor: not-allowed;
}

.legal {
  padding: 28px var(--margin) 64px;
  max-width: 78ch;
}

.legal h1 {
  font-size: var(--step-head);
  margin: 18px 0;
}

.home-link {
  font-family: var(--font-display);
  font-size: var(--step-title);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
}

.banner {
  font-style: italic;
}

.nameplate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px 22px;
  margin: 4px 0 8px;
}

.nameplate .stamp {
  height: 88px;
  width: auto;
  flex: none;
}

.wordmark {
  height: 88px;
  width: auto;
  max-width: 100%;
}

.diamond-rule {
  display: flex;
  align-items: center;
  margin: 4px 0 12px;
}

.diamond-rule .diamond {
  width: 10px;
  height: 10px;
  background: var(--ember);
  transform: rotate(45deg);
  flex: none;
}

.diamond-rule .rule-line {
  flex: 1;
  height: 4px;
  background: var(--ember);
  margin: 0 -3px;
}

.beta {
  margin: 8px 0 0;
  font-style: italic;
}

.legal h2 {
  margin: 1.4em 0 0.4em;
  font-size: var(--step-title);
}

.ads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
  align-items: start;
  margin-top: 8px;
  margin-bottom: 22px;
}

.ads > div + div {
  border-left: var(--col-rule) solid var(--ink);
  padding-left: 18px;
}

.ads article {
  break-inside: avoid;
  margin: 0 0 8px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--ink);
}

.ads h2 {
  margin: 0 0 8px;
  font-size: var(--step-title);
}

.ads p,
.ads ol {
  margin: 0;
}

.ads ol {
  margin: 0 0 8px;
  padding-left: 1.25em;
}

.ads li + li {
  margin-top: 4px;
}

.ads code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  .quad {
    grid-template-columns: 1fr 1fr;
  }

  .field:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .field:nth-child(n + 3) {
    border-top: var(--col-rule) solid var(--ink);
    padding-top: 12px;
  }
}

@media (max-width: 800px) {
  html.js .menu-toggle {
    display: inline-flex;
  }

  html.js #nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 8px;
  }

  html.js #nav.is-open {
    display: flex;
  }

  .cols,
  .quad {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4,
  .span-6 {
    grid-column: auto;
  }

  .rule,
  .field,
  .verb,
  .piece,
  .span-3 {
    border-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .piece + .piece,
  .field + .field,
  .verb + .verb,
  .field:nth-child(3),
  .field:nth-child(4),
  .deck-col {
    border-top: 0;
    margin-top: 18px;
    padding-top: 0;
  }

  .closer,
  .colophon {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .closer-note {
    border-left: 0;
    padding-left: 0;
    margin-top: 8px;
  }

  .frame,
  .shot {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 2 / 1;
  }

  .pull {
    font-size: 1.65rem;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .nameplate {
    flex-direction: column;
    gap: 10px;
  }

  .nameplate .stamp {
    height: 56px;
  }

  .wordmark {
    height: auto;
    width: min(100%, 340px);
  }

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

  .ads > div + div {
    border-left: 0;
    padding-left: 0;
  }

  .mast {
    font-size: clamp(2.8rem, 19.5vw, 4.6rem);
    line-height: 0.84;
    white-space: normal;
  }

  .mast .line {
    display: block;
  }

  .mast .line + .line::before {
    content: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .frame {
    transform-origin: center 20%;
    animation: settle 1400ms var(--ease) both;
  }

  .js .frame:has(img.is-swap) {
    animation: settle 700ms var(--ease) both;
  }

  .js [data-reveal].is-in {
    animation: rise 700ms var(--ease) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

@keyframes rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: none;
  }
}

