@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-standard-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --plate: #14110e;
  --umber: #1f1a16;
  --rule: #3a322b;
  --albumen: #a39a8c;
  --text-2: #c9c2b5;
  --silver: #ece6da;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --step-3: clamp(2.5rem, 1.1rem + 4.8vw, 5.5rem);

  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 14vh, 168px);
}

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

html {
  background: var(--plate);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--plate);
  color: var(--silver);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--silver); color: var(--plate); }

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

h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.3em;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}
a:hover { text-decoration-color: var(--silver); }

:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 4px;
  border-radius: 2px;
}

cite { font-style: normal; }

.wrap {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.5rem 0.75rem;
  background: var(--silver);
  color: var(--plate);
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Barra superior */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 28px;
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  font-size: 0.9375rem;
}
.nav a {
  color: var(--albumen);
  text-decoration: none;
}
.nav a:hover { color: var(--silver); }

/* Portada */

.hero { padding-top: clamp(40px, 9vh, 112px); }

h1 {
  max-width: 10.5em;
  font-size: var(--step-3);
  font-weight: 300;
  line-height: 1.03;
  letter-spacing: -0.028em;
}

.lede {
  margin-top: 1.5rem;
  font-size: var(--step-1);
  color: var(--albumen);
}

.plate { margin-top: clamp(48px, 9vh, 104px); }

.plate__window { overflow: hidden; }

.plate__track { position: relative; }

.plate__track img {
  width: 100%;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 8%, #000 85%, transparent),
    linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 8%, #000 85%, transparent),
    linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-composite: intersect;
}

.plate__time {
  position: relative;
  height: 12px;
  margin-top: 18px;
}
.plate__time::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule) 8%, var(--rule) 88%, transparent);
}
.plate__time span {
  position: absolute;
  top: 0;
  left: var(--x);
  width: 1px;
  height: 12px;
  background: var(--albumen);
}

.plate figcaption {
  margin-top: 14px;
  font-size: var(--step--1);
  color: var(--albumen);
  text-align: right;
}

@media (max-width: 700px) {
  .plate__track {
    width: 300vw;
    margin-left: -100vw;
  }
  .plate figcaption { text-align: left; }
}

/* El único momento de la página: la placa se expone, exposición a exposición. */
@media (prefers-reduced-motion: no-preference) {
  .plate__track img {
    animation: expose 1.6s steps(8, end) 0.35s both;
  }
  .plate__time span {
    animation: tick 1ms linear both;
    animation-delay: calc(0.35s + var(--i) * 0.2s);
  }
}

@keyframes expose {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes tick {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Secciones */

.section { padding-block: var(--section) 0; }

h2 {
  max-width: 22ch;
  margin-bottom: 2.5rem;
  font-size: var(--step-2);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.018em;
}

h3 {
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.intro {
  max-width: 34em;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-2);
}
.intro strong { font-weight: 500; color: var(--silver); }

.note {
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--albumen);
}

/* Cómo se hace una operación */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: start;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 2rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 0.5rem;
}
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.3;
  color: var(--albumen);
  font-variant-numeric: tabular-nums;
}
.steps p {
  margin-top: 0.4rem;
  max-width: 36em;
  color: var(--text-2);
}

.board {
  position: sticky;
  top: 32px;
}

.board__face {
  display: grid;
  width: fit-content;
  max-width: 100%;
  gap: 14px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--umber);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(236, 230, 218, 0.05), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.board__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.board__label {
  font-size: 0.9375rem;
  color: var(--albumen);
}

.flaps {
  display: flex;
  gap: 3px;
  font-size: clamp(1.5rem, 0.8rem + 2.4vw, 3.1rem);
  font-stretch: 72%;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.flap {
  position: relative;
  display: grid;
  place-items: center;
  width: 0.92em;
  height: 1.42em;
  overflow: hidden;
  background: #100d0b;
  color: var(--silver);
  border-radius: 3px;
}
.flap::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2;
}
.flap.is-turning::after {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  background: linear-gradient(#27211c, #171310);
  transform-origin: bottom;
  animation: fold 80ms ease-in forwards;
  z-index: 1;
}
@keyframes fold {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0); }
}

.board figcaption {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--albumen);
}

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .board { position: static; }
}

/* Infraestructura */

.specs {
  margin-top: 3rem;
  max-width: 880px;
}
.specs div {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}
.specs div:last-child { border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--albumen); }
.specs dd { color: var(--silver); }

@media (max-width: 560px) {
  .specs div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
}

/* Historia */

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2.75rem;
}
.timeline li {
  display: grid;
  grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
  column-gap: 2rem;
  align-items: baseline;
}
.year {
  font-size: var(--step-2);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--albumen);
}
.timeline p {
  max-width: 34em;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-2);
}
.timeline li:last-child .year,
.timeline li:last-child p { color: var(--silver); }

.print {
  grid-column: 2;
  margin-top: 1.75rem;
}
.print img {
  width: 100%;
  border-radius: 2px;
  filter: sepia(0.15) brightness(0.92);
}
.print figcaption {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--albumen);
}

@media (max-width: 700px) {
  .timeline li { grid-template-columns: minmax(0, 1fr); row-gap: 0.6rem; }
  .print { grid-column: 1; margin-inline: calc(var(--gutter) * -1); }
  .print picture { display: block; overflow-x: auto; }
  .print img { width: 240%; max-width: none; }
  .print figcaption { padding-inline: var(--gutter); }
}

/* Fundador */

.links {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

/* Cierre */

.foot {
  margin-top: var(--section);
  padding-top: var(--section);
  padding-bottom: 56px;
}

.limit {
  font-size: var(--step-3);
  font-weight: 200;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.limit span { display: block; }

.mail {
  margin-top: 3rem;
  font-size: var(--step-1);
}

.fine {
  max-width: 40em;
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--albumen);
}
.mail + .fine { margin-top: 4rem; }
