/* CalDesign's site. One theme that follows the system (light or dark), one accent (the
   app's cobalt), one shape rule: buttons and tabs are pills, pictures and panels 14px. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #f3f4f6;
  --surface: #fbfbfc;
  --surface-tint: #e4e9f4;
  --text: #15171c;
  --muted: #4f5664;
  --line: #d9dce2;
  --accent: #2b50a8;
  --accent-hover: #3d63c2;
  --accent-text: #fbfbfc;
  --shadow: 0 1px 2px rgb(30 40 70 / 8%), 0 18px 40px -12px rgb(30 40 70 / 28%);
  --radius: 14px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418;
    --surface: #1a1d23;
    --surface-tint: #1c2537;
    --text: #eceef2;
    --muted: #a6adba;
    --line: #2c313a;
    --accent: #8ba7ec;
    --accent-hover: #a7bdf2;
    --accent-text: #121418;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 18px 40px -12px rgb(0 0 0 / 70%);
  }
}
:root[data-theme="dark"] {
  --bg: #121418;
  --surface: #1a1d23;
  --surface-tint: #1c2537;
  --text: #eceef2;
  --muted: #a6adba;
  --line: #2c313a;
  --accent: #8ba7ec;
  --accent-hover: #a7bdf2;
  --accent-text: #121418;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 18px 40px -12px rgb(0 0 0 / 70%);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Manrope",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 999px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}

/* Buttons: pills. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.button:hover {
  background: var(--accent-hover);
}
.button:active {
  transform: scale(0.98);
}
.button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
}
.button--quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.button--quiet:hover {
  background: var(--surface);
}

/* Navigation. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav__row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav nav {
  margin-left: auto;
}
.nav__links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav__links a:hover {
  color: var(--text);
}

/* Hero: the words on the left, a fan of printed pages on the right. */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: min(calc(100dvh - 64px), 820px);
  padding-block: 48px 64px;
}
.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 4.2vw, 4.75rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.lead {
  margin-top: 24px;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero__pages {
  position: relative;
  justify-self: center;
  width: min(100%, 540px);
  aspect-ratio: 1 / 1.12;
}
.page {
  position: absolute;
  width: 72%;
  border-radius: 3px;
  box-shadow: var(--shadow);
  background: #fff;
}
.page--front {
  left: 6%;
  top: 4%;
  rotate: -3deg;
  z-index: 3;
}
.page--middle {
  left: 22%;
  top: 1%;
  rotate: 4deg;
  z-index: 2;
}
.page--back {
  left: 28%;
  top: 6%;
  rotate: 9deg;
  z-index: 1;
  filter: brightness(0.97);
}

/* Import: two sources side by side, then three weeks of May showing what they gave. */
.import {
  padding-block: 72px 112px;
}
.import__lead,
.print__lead {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--muted);
}
.import__sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.source {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.source p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 48ch;
}
.source .source__note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}
.import__weeks {
  margin: 16px 0 0;
  padding: clamp(14px, 2.6vw, 32px);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.import__weeks figcaption {
  margin-top: 18px;
  color: #4f5664;
  font-size: 0.9375rem;
}

/* Styles: May's grid on the left; the looks on it and the grid picker on the right. */
.styles {
  padding-block: 112px;
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.styles__lead {
  margin-top: 16px;
  max-width: 54ch;
  color: var(--muted);
}
.styles__row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
  gap: 56px;
  margin-top: 48px;
}
.styles__page {
  margin: 0;
  padding: clamp(8px, 1.6vw, 20px);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.styles__page img {
  width: 100%;
  transition: opacity 0.22s ease;
}
.styles__page img.is-swapping {
  opacity: 0;
}
.looks {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.looks li {
  display: flex;
  align-items: center;
  gap: 16px;
}
.looks li > span:last-child {
  color: var(--muted);
}
.looks strong {
  color: var(--text);
  font-weight: 800;
}

/* A sample of each marker, as the page draws it. */
.mark {
  --c: var(--text);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--c);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.mark--circle {
  --c: #c8102e;
  border: 2px solid var(--c);
  border-radius: 50%;
}
.mark--dot {
  --c: #2b50a8;
}
.mark--dot::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c);
}
.mark--square {
  --c: #2e7d4f;
  border: 2px solid var(--c);
}
.mark--underline {
  --c: #8a4b9a;
  text-decoration: underline 2px;
  text-underline-offset: 5px;
}
.mark--weekend {
  --c: #4a5f86;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark--circle {
    --c: #ff6b7f;
  }
  :root:not([data-theme="light"]) .mark--dot {
    --c: #8ba7ec;
  }
  :root:not([data-theme="light"]) .mark--square {
    --c: #5fc48a;
  }
  :root:not([data-theme="light"]) .mark--underline {
    --c: #c995d6;
  }
  :root:not([data-theme="light"]) .mark--weekend {
    --c: #9fb3d6;
  }
}
.styles__grids {
  margin-top: 40px;
  font-size: 1rem;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  width: fit-content;
}
.tabs button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.tabs button:hover {
  color: var(--text);
}
.tabs button[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-text);
}
.styles__hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Print: four cells of unequal size. */
.print {
  padding-block: 112px 120px;
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 40px;
}
.cell {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cell p {
  margin-top: 10px;
  color: var(--muted);
}
.cell--pdf {
  grid-row: span 2;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  overflow: hidden;
  background: var(--surface-tint);
  box-shadow: none;
}
.cell--pdf img {
  align-self: end;
  justify-self: center;
  width: 74%;
  margin-bottom: -96px;
  border-radius: 3px;
  box-shadow: var(--shadow);
  rotate: -2deg;
}
.cell--tiff {
  grid-column: span 2;
  background: var(--accent);
  box-shadow: none;
  color: var(--accent-text);
}
.cell--tiff p {
  color: color-mix(in srgb, var(--accent-text) 82%, transparent);
  max-width: 44ch;
}
.cell--pdf h3,
.cell--tiff h3 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
}

/* Get it. */
.get {
  padding-block: 112px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.get__inner {
  display: grid;
  justify-items: start;
}
.get__inner > p:first-of-type {
  margin-top: 20px;
  color: var(--muted);
  max-width: 54ch;
}
.store {
  margin-top: 32px;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}
.get__note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Footer. */
.footer {
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer__grid {
  display: grid;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer a {
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Article pages: guides, holiday tables, the policy. One readable column; tables, the
   gallery and wide pictures may run wider. */
.article {
  max-width: 72ch;
  padding-block: 56px 96px;
}
.article--wide {
  max-width: var(--wrap);
}
.article h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
}
.article .lead {
  max-width: 60ch;
}
.article h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}
.article p,
.article ul,
.article ol,
.article dl {
  margin-top: 16px;
  max-width: 68ch;
}
.article li + li {
  margin-top: 8px;
}
.article dt {
  margin-top: 16px;
  font-weight: 800;
}
.article dd {
  margin: 4px 0 0;
}
.article__date {
  color: var(--muted);
  font-size: 0.9375rem;
}
.article__figure {
  margin: 40px 0 0;
  width: min(100%, 360px);
}
.article__figure img,
.gallery img {
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.article figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.article__wide {
  margin: 40px 0 0;
}
.article__wide img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.article .article__next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
}
/* Positioned, so the hidden words in its cells scroll with it rather than widen the page. */
.table {
  position: relative;
  margin-top: 32px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.table th,
.table td {
  padding: 10px 16px;
  text-align: left;
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-weight: 600;
}
.table tbody tr {
  border-top: 1px solid var(--line);
}
.table td:first-child {
  white-space: nowrap;
}
.table .yes {
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.countries {
  columns: 3 14rem;
  column-gap: 32px;
  padding: 0;
  list-style: none;
}
.article .countries li {
  margin: 0 0 8px;
  break-inside: avoid;
}
.countries span {
  color: var(--muted);
  font-size: 0.9375rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 48px 32px;
  padding: 0;
  list-style: none;
}
.article .gallery {
  margin-top: 48px;
  max-width: none;
}
.article .gallery li + li {
  margin-top: 0;
}
.gallery figure {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Motion: the pages settle in, sections rise into view. Nothing moves when the system asks
   for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .page {
    animation: settle 0.9s var(--ease) both;
  }
  .page--middle {
    animation-delay: 0.08s;
  }
  .page--front {
    animation-delay: 0.16s;
  }
  .js .reveal {
    opacity: 0;
    translate: 0 24px;
    transition:
      opacity 0.7s var(--ease),
      translate 0.7s var(--ease);
  }
  .js .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .styles__page img {
    transition: none;
  }
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* Narrow screens: one column. */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 40px 56px;
    gap: 40px;
  }
  .hero__pages {
    width: min(88%, 380px);
  }
  .import {
    padding-block: 56px 80px;
  }
  .import__sources {
    grid-template-columns: 1fr;
  }
  .styles {
    padding-block: 80px;
  }
  .styles__row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .cell--pdf,
  .cell--tiff {
    grid-row: auto;
    grid-column: auto;
  }
  .cell--pdf img {
    width: 62%;
    margin-bottom: -72px;
  }
  .print {
    padding-block: 80px;
  }
  .get {
    padding-block: 80px;
  }
}
@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
  .cell,
  .source {
    padding: 24px;
  }
}
