@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/commissioner-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --field: light-dark(#fbfbfd, #111419);
  --ink: light-dark(#252b34, #e6e9ef);
  --muted: light-dark(#5a6470, #9aa3b2);
  --mint: light-dark(#7fd8bd, #8ee6cb);
  --rose: light-dark(#f39bbd, #f7a9c8);
  --violet: light-dark(#9b84f0, #ac98ff);
  --violet-ink: light-dark(#5b3fd0, #c5b8ff);
  --violet-tint: light-dark(#e4ddff, #3a3163);
  --sky-s: url("/assets/img/sky-day-1200.webp");
  --sky-l: url("/assets/img/sky-day-2400.webp");
  --edge: var(--mint), var(--rose) 45%, var(--violet) 75%;
  --band: var(--violet-ink) 60%, var(--mint);

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: "Commissioner", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  background: var(--field);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-color: var(--muted) var(--field);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --sky-s: url("/assets/img/sky-dusk-1200.webp");
  --sky-l: url("/assets/img/sky-dusk-2400.webp");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-s: url("/assets/img/sky-dusk-1200.webp");
    --sky-l: url("/assets/img/sky-dusk-2400.webp");
  }
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--violet-tint);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sky {
  position: relative;
  height: 30svh;
  min-height: 11rem;
  background: var(--sky-s) 55% 40% / cover no-repeat;
}

.sky::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background-image: linear-gradient(90deg, var(--edge));
}

main {
  flex: 1;
  padding: 1.75rem var(--gutter) 1.75rem;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(3.25rem, 2rem + 6vw, 6rem);
  font-weight: 140;
  line-height: 1;
  letter-spacing: -0.01em;
}

.tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.75rem -0.75rem -0.75rem 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.45s var(--ease-out);
}

.theme[hidden] {
  display: none;
}

.theme svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.45s var(--ease-out);
}

.theme:hover {
  color: var(--violet-ink);
}

.theme[aria-pressed="true"] svg {
  transform: rotate(180deg);
}

.theme:focus-visible {
  outline-offset: 0;
}

.lang {
  display: flex;
  gap: 0.5em;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang a {
  padding: 0.25rem 0.125rem;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

.lang a:hover {
  color: var(--ink);
  text-decoration-line: underline;
}

.lang [aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
}

.lede {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  color: var(--muted);
  max-width: 36ch;
}

.places {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  background: no-repeat 0 0 / 100% 1px;
  background-image: linear-gradient(90deg, var(--edge));
}

.places a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name arrow"
    "addr arrow"
    "desc arrow";
  align-items: center;
  column-gap: 1rem;
  position: relative;
  padding: 1rem 0 1.0625rem;
}

.places a::before,
.places a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  pointer-events: none;
}

.places a::after {
  height: 1px;
  background-image: linear-gradient(90deg, var(--edge));
}

.places a::before {
  z-index: 1;
  height: 3px;
  background-image: linear-gradient(90deg, var(--band));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.name {
  grid-area: name;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  font-weight: 220;
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: color 0.45s var(--ease-out);
}

.addr {
  grid-area: addr;
  margin-top: 0.125rem;
  font-size: 0.9375rem;
  font-weight: 400;
}

.desc {
  grid-area: desc;
  font-size: 0.9375rem;
  color: var(--muted);
  text-wrap: pretty;
}

.arrow {
  grid-area: arrow;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--muted);
  transition:
    transform 0.45s var(--ease-out),
    color 0.45s var(--ease-out);
}

.places a:hover::before,
.places a:focus-visible::before {
  transform: scaleX(1);
}

.places a:hover .name,
.places a:focus-visible .name,
.places a:hover .arrow,
.places a:focus-visible .arrow {
  color: var(--violet-ink);
}

.places a:hover .arrow,
.places a:focus-visible .arrow {
  transform: translate(3px, -3px);
}

.places a:focus-visible {
  outline: none;
}

footer {
  padding: 0 var(--gutter) 1.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

footer p {
  margin: 0;
  max-width: 70ch;
}

footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

footer a:hover {
  color: var(--ink);
}

@media (min-width: 48rem) {
  .sky {
    height: 40svh;
    background-image: var(--sky-l);
  }

  main {
    padding-top: 2.5rem;
  }

  .places {
    margin-top: 2.5rem;
  }

  .places a {
    grid-template-columns: minmax(9rem, 2fr) minmax(11rem, 2fr) 5fr auto;
    grid-template-areas: "name addr desc arrow";
    column-gap: 2rem;
    padding: 1.125rem 0 1.1875rem;
  }

  .addr {
    margin-top: 0;
  }
}

/* sRGB between mint and rose passes through grey; oklch runs the real band order. */
@supports (background-image: linear-gradient(in oklch, red, blue)) {
  .sky::after,
  .places,
  .places a::after {
    background-image: linear-gradient(90deg in oklch decreasing hue, var(--edge));
  }

  .places a::before {
    background-image: linear-gradient(90deg in oklch decreasing hue, var(--band));
  }
}

@media (prefers-reduced-motion: reduce) {
  .places a::before,
  .name,
  .arrow,
  .theme,
  .theme svg {
    transition: none;
  }
}
