
@font-face { font-family: "Spectral"; src: url("assets/fonts/Spectral-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("assets/fonts/Spectral-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("assets/fonts/HankenGrotesk-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

@font-face { font-family: "Spectral respaldo"; src: local("Georgia"); font-weight: 300; font-style: normal; size-adjust: 97%; ascent-override: 109.2%; descent-override: 47.7%; line-gap-override: 0%; }
@font-face { font-family: "Spectral respaldo"; src: local("Georgia Italic"), local("Georgia-Italic"); font-weight: 300; font-style: italic; size-adjust: 88%; ascent-override: 120.3%; descent-override: 52.6%; line-gap-override: 0%; }
@font-face { font-family: "Hanken respaldo"; src: local("Arial"), local("ArialMT"); size-adjust: 100%; ascent-override: 100%; descent-override: 30.3%; line-gap-override: 0%; }

:root {
  --azul: #01203F;
  --papel: #F7F4EE;
  --tinta-2: #4E5A68;
  --papel-2: #B8C0CC;

  --serif: "Spectral", "Spectral respaldo", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Hanken respaldo", "Helvetica Neue", Arial, sans-serif;

  --m: 24px;
  --gutter: max(var(--m), calc((100vw - 1600px) / 2 + var(--m)));

  --F: clamp(1.5rem, calc((100vw - 2 * var(--m)) / 10.6), 2.375rem);
  --L: calc(1.1 * var(--F));
  --hf: 48px;
  --ft: 1.25rem;
  --k1: 2.25;
  --k2: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--azul);
  color: var(--azul);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.4;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
p, h1, h2 { margin: 0; font-weight: inherit; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 1px; }
::selection { background: var(--azul); color: var(--papel); }
.reverso ::selection, .colofon ::selection { background: var(--papel); color: var(--azul); }

.oculto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.r-ancho { display: none; }

.anverso {
  position: relative;
  background: var(--papel);
  padding: 32px var(--gutter) 72px;
}
.anverso::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 100vh;
  background: var(--papel);
}

.firma { width: auto; height: var(--hf); margin-left: calc(-0.02383 * var(--hf)); }

.oficio {
  font-style: italic;
  font-size: var(--ft); line-height: 1.3;
  margin: calc(0.4245 * var(--hf) - 0.288 * var(--ft)) 0 0 -0.05em;
}

.frase {
  font-size: var(--F); line-height: var(--L);
  letter-spacing: -0.01em;
  margin-top: calc((var(--k1) - 0.5) * var(--L) - 0.298 * var(--F) - 0.352 * var(--ft));
}
.frase span { display: block; }
.frase span:nth-child(1) { margin-left: -0.08em; }
.frase span:nth-child(3) { margin-left: -0.047em; }

.correo {
  font-size: var(--ft); line-height: 1.3;
  margin-top: calc((var(--k2) - 0.5) * var(--L) + 0.298 * var(--F) - 0.948 * var(--ft));
}
.correo a {
  display: inline-block;
  margin: -12px 0 -12px -0.05em; padding: 12px 0;
  text-decoration: underline;
  text-decoration-color: var(--tinta-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.2s ease;
}
.correo a:hover { text-decoration-color: currentColor; }

.reverso {
  --wb: calc(4.5 * var(--m));
  --u: calc(var(--wb) / 108);
  --r: clamp(1.125rem, calc((100vw - 2 * var(--m)) / 17), 1.375rem);
  --lh: 1.42;
  background: var(--azul);
  color: var(--papel);
  font-size: var(--r);
  line-height: var(--lh);
  padding: 64px var(--gutter) 72px;
}

.llave {
  width: calc(112.8 * var(--u)); max-width: none;
  margin-left: calc(-2.4 * var(--u));
}

.historia {
  margin-top: calc(34.56 * var(--u) - 2.384 * var(--u) - (var(--lh) / 2 + 0.298 - 0.66) * 1em);
  text-wrap: pretty;
}
.historia p + p { margin-top: calc(var(--lh) * 0.5em); }
.historia span { display: block; }

.colofon {
  background: var(--azul);
  color: var(--papel-2);
  padding: 0 var(--gutter) 40px;
  font-family: var(--sans); font-weight: 400;
  font-size: 0.9375rem; line-height: 1.6;
}
.colofon address, .colofon address > * { display: block; }
.colofon a {
  justify-self: start;
  text-decoration: underline;
  text-decoration-color: rgba(184, 192, 204, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  display: inline-block; padding: 10px 0; margin: -10px 0;
}
.colofon a:hover { color: var(--papel); text-decoration-color: currentColor; }

@media (max-width: 22.499em) {
  .historia span { display: inline; }
}

@media (min-width: 37.5em) {
  .r-ancho { display: inline; }
  .historia { text-wrap: wrap; }

  :root {
    --m: clamp(40px, 6.25vw, 64px);
    --F: min(calc((100vw - 2 * var(--m)) / 10.6), 4.5rem);
    --L: calc(1.08 * var(--F));
    --hf: 56px;
    --ft: 1.375rem;
    --k1: 2.25;
    --k2: 1.25;
  }
  .anverso { padding: 56px var(--gutter) 96px; }

  .reverso {
    --r: min(1.75rem, calc((100vw - 2 * var(--m)) / 20.2));
    --lh: 1.38;
    padding: 96px var(--gutter) 104px;
  }
  .colofon {
    display: flex; flex-wrap: wrap; column-gap: 2.5em;
    padding-bottom: 48px;
  }
  .colofon address { display: flex; flex-wrap: wrap; column-gap: 2.5em; }
}

@media (min-width: 62.5em) {
  :root {
    --m: clamp(72px, calc(10vw - 32px), 112px);
    --F: clamp(3.5rem, min(7.2vw, 11.6svh), 8rem);
    --hf: clamp(48px, calc(0.58 * var(--F)), 64px);
    --ft: clamp(1.25rem, calc(0.24 * var(--F)), 1.75rem);
    --k1: 2;
    --k2: 1;
    --rd: min(2.25rem, calc((min(100vw, 1600px) - 2 * var(--m)) / 36.8));
    --lh-r: 1.36;
    --H: calc((7.5 * var(--lh-r) + 0.66) * var(--rd));
    --wb-d: calc(var(--H) * 108 / 96);
    --gb: calc(0.42 * var(--H));
  }
  .anverso { padding: 96px var(--gutter); }

  .reverso {
    --r: var(--rd);
    --lh: var(--lh-r);
    --u: calc(var(--H) / 96);
    display: grid;
    grid-template-columns: var(--wb-d) minmax(0, max-content);
    column-gap: var(--gb);
    align-items: start;
    padding: var(--gb) var(--gutter);
  }
  .llave { margin-top: calc((var(--lh) / 2 + 0.298 - 0.66) * 1em - 2.384 * var(--u)); }
  .historia { margin: 0 0 0 -0.055em; }

  .colofon {
    display: grid;
    grid-template-columns: var(--wb-d) minmax(0, 1fr) auto;
    column-gap: var(--gb);
    font-size: 1.0625rem;
    padding-bottom: 56px;
  }
  .colofon address { display: contents; }
}

@media (min-width: 62.5em) and (min-aspect-ratio: 5/4) {
  .anverso {
    min-height: 100svh;
    display: grid; align-content: center;
    padding-block: max(40px, calc(0.5 * var(--L)));
  }
  .reverso {
    min-height: calc(100svh - 1.7rem - 56px);
    align-content: center;
  }
}

@media (forced-colors: active) {
  .firma { forced-color-adjust: none; background: #F7F4EE; }
  .llave { forced-color-adjust: none; background: #01203F; }
}

@media print {
  .anverso, .reverso { min-height: 0; }
  .reverso, .colofon { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  .correo a { text-decoration: none; }
}
