/* Colors are taken from the printed paper: the blue of the masthead, the red of the motto,
   the yellow of the information strip under the title. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

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

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

:root {
  --paper: #ffffff;
  --ink: #141a33;
  --ink-soft: #4a5070;
  --blue: #23378f;
  --blue-deep: #172566;
  --blue-wash: #edf0fa;
  --red: #d4151d;
  --red-deep: #a80f15;
  --yellow: #fff2a8;
  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --text: "Lexend", "Helvetica Neue", Arial, sans-serif;
  --page: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--blue); text-underline-offset: 0.18em; }

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

/* The masthead: the valley photo from the printed masthead, tinted with the paper's blue. */
.masthead {
  position: relative;
  background:
    linear-gradient(180deg, rgb(23 37 102 / 0.5) 0%, rgb(35 55 143 / 0.75) 45%, var(--blue) 92%),
    url("/valle.jpg") center 40% / cover no-repeat,
    var(--blue);
  color: #fff;
}

.masthead-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 72px) 16px clamp(28px, 5vw, 44px);
}

.masthead h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 11.5vw, 8.25rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 18px rgb(10 18 60 / 0.35);
}

.masthead-inner { position: relative; }

.masthead-ads {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 999px;
  color: #fff;
  font-size: 0.95rem;
  text-decoration: none;
}

.masthead-ads:hover, .masthead-ads:focus-visible { background: rgb(255 255 255 / 0.14); }

@media (min-width: 800px) {
  .masthead-ads { position: absolute; top: 24px; right: 16px; margin: 0; }
}

.masthead-line {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgb(255 255 255 / 0.92);
}

main { display: block; }

/* Latest issue */
.latest {
  display: grid;
  gap: 28px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.front-page {
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 560px;
}

.front-page img {
  width: 100%;
  background: #fff;
  border: 1px solid #d9dce8;
  box-shadow: 0 1px 2px rgb(20 26 51 / 0.12), 0 18px 40px -12px rgb(20 26 51 / 0.35);
}

.latest-text h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  color: var(--blue);
}

.volume {
  margin: 10px 0 28px;
  color: var(--ink-soft);
}

.download {
  display: inline-block;
  padding: 16px 24px 14px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  text-decoration: none;
  border-radius: 6px;
}

.download span {
  display: block;
  font-weight: 400;
  font-size: 0.95rem;
  color: rgb(255 255 255 / 0.88);
}

.download:hover, .download:focus-visible { background: var(--red-deep); }

.free-note {
  margin: 28px 0 0;
  padding: 14px 18px;
  max-width: 34em;
  background: var(--yellow);
  border-left: 4px solid var(--blue);
  font-size: 1rem;
}

.zoom-hint {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

@media (min-width: 1000px) {
  .latest {
    grid-template-columns: 560px 1fr;
    gap: 56px;
    align-items: start;
    padding-top: 0;
  }

  /* The front page rises out of the blue band, like a copy pulled from the stack.
     The band gets the same extra height, so the page never covers its text. */
  .masthead-inner { padding-bottom: 170px; }
  .front-page { margin-top: -130px; justify-self: start; position: relative; }

  .latest-text { position: sticky; top: 24px; padding-top: 40px; }
}

/* Archive */
.archive { background: var(--blue-wash); }

.archive-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.archive-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--blue);
}

.archive-head p {
  margin: 10px 0 0;
  max-width: 36em;
  color: var(--ink-soft);
}

.year {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}

.year h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--blue-deep);
}

@media (min-width: 800px) {
  .year { grid-template-columns: 140px 1fr; gap: 24px; }
  .year h3 { position: sticky; top: 20px; align-self: start; font-size: 3rem; }
}

.covers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
}

@media (min-width: 560px) { .covers { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .covers { grid-template-columns: repeat(5, 1fr); } }

.cover {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.cover img {
  width: 100%;
  background: #fff;
  border: 1px solid #d3d8ea;
  box-shadow: 0 1px 3px rgb(20 26 51 / 0.12);
}

.cover:hover img, .cover:focus-visible img { border-color: var(--blue); }

.cover-month {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
}

.cover-file {
  display: block;
  font-size: 0.9rem;
  color: var(--blue);
}

/* Advertising: the red of the printed motto */
.ads { background: var(--red); color: #fff; }

.ads-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 48px 16px 52px;
}

.ads h2 {
  margin: 0;
  max-width: 14em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

.ads p { margin: 14px 0 0; max-width: 36em; }

.ads-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.ads-actions a {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ads-call { background: #fff; color: var(--red-deep); font-size: 1.2rem; }
.ads-call:hover, .ads-call:focus-visible { background: var(--yellow); }

.ads-mail { border: 2px solid #fff; color: #fff; }
.ads-mail:hover, .ads-mail:focus-visible { background: rgb(255 255 255 / 0.14); }

.ads a:focus-visible { outline-color: var(--yellow); }

.ads-office { font-size: 0.95rem; color: rgb(255 255 255 / 0.88); }
.ads-office a { color: #fff; }

/* Footer */
footer {
  background: var(--ink);
  color: rgb(255 255 255 / 0.82);
  font-size: 1rem;
}

footer p {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 16px 8px;
}

.footer-name {
  padding-top: 36px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.8rem;
  color: #fff;
}

footer .privacy { padding-bottom: 40px; font-size: 0.92rem; color: rgb(255 255 255 / 0.65); }

.not-found { padding: 56px 16px; }
.not-found h2 { font-family: var(--display); font-size: 2.4rem; color: var(--blue); margin: 0 0 12px; }

@media (prefers-reduced-motion: no-preference) {
  .cover img { transition: border-color 0.15s ease; }
}
