/* Luxury.me, direction "Register": paper and ink, an engraved seal, a serif that tells and a grotesk that administers. */

@font-face {
  font-family: "Caslon Display";
  src: url("/fonts/caslon-display.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caslon Text";
  src: url("/fonts/caslon-text.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caslon Text";
  src: url("/fonts/caslon-text-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("/fonts/schibsted.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f0ea;
  --ink: #1b1a17;
  --graphite: #5c5953;
  --rule: rgba(27, 26, 23, 0.18);
  --rule-soft: rgba(27, 26, 23, 0.1);
  --green: #1f3a2d;
  --brass: #9a8456;
  --brass-soft: rgba(154, 132, 86, 0.35);
  --serif: "Caslon Text", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --display: "Caslon Display", "Libre Caslon Display", Georgia, serif;
  --grotesk: "Schibsted", "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --gutter: clamp(16px, 5vw, 56px);
  --step--1: 0.9375rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: 2.1875rem;
  --step-4: clamp(2.5rem, 5.5vw, 3.4375rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311;
    --ink: #e9e5dd;
    --graphite: #a39f95;
    --rule: rgba(233, 229, 221, 0.2);
    --rule-soft: rgba(233, 229, 221, 0.1);
    --green: #8fb8a2;
    --brass: #b9a26e;
    --brass-soft: rgba(185, 162, 110, 0.35);
  }
}
:root[data-theme="dark"] {
  --paper: #141311;
  --ink: #e9e5dd;
  --graphite: #a39f95;
  --rule: rgba(233, 229, 221, 0.2);
  --rule-soft: rgba(233, 229, 221, 0.1);
  --green: #8fb8a2;
  --brass: #b9a26e;
  --brass-soft: rgba(185, 162, 110, 0.35);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: var(--brass-soft);
  transition: text-decoration-color 160ms ease;
}
a:hover {
  text-decoration-color: var(--brass);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.005em;
}
h1 {
  font-size: var(--step-4);
  text-wrap: balance;
}
h2 {
  font-size: var(--step-2);
  margin-top: 0.5em;
}
h3 {
  font-size: var(--step-1);
}
p {
  margin: 0 0 1em;
  max-width: var(--measure);
}
.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 58ch;
}
.muted {
  color: var(--graphite);
}

.skip {
  position: absolute;
  left: -200vw;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  font-family: var(--grotesk);
  text-decoration: none;
}
.skip:focus {
  left: var(--gutter);
  z-index: 10;
}

/* Header and footer ---------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  padding: 1.6rem var(--gutter) 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark,
.footer-wordmark {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin: 0;
}
.wordmark-dot {
  color: var(--brass);
}
.site-nav,
.lang-nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--grotesk);
  font-size: var(--step--1);
}
.site-nav a,
.lang-nav a,
.site-footer nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.site-nav a:hover,
.lang-nav a:hover,
.site-footer nav a:hover {
  border-bottom-color: var(--brass);
}
.lang-nav {
  margin-left: auto;
  color: var(--graphite);
}
.lang-nav a {
  color: var(--graphite);
}

.site-main {
  flex: 1;
  padding: 2.5rem var(--gutter) 5rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.2rem var(--gutter) 3rem;
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
}
.site-footer p {
  margin: 0 0 0.4rem;
  max-width: 64ch;
}
.footer-wordmark {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}
.site-footer nav {
  display: flex;
  gap: 1.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Breadcrumbs ------------------------------------------------------------------ */

.crumbs {
  font-family: var(--grotesk);
  font-size: 0.875rem;
  color: var(--graphite);
  margin-bottom: 2rem;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.crumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--rule);
}
.crumbs a {
  color: var(--graphite);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}

/* Home ------------------------------------------------------------------------- */

.hero {
  padding: 1.5rem 0 3rem;
  max-width: 30ch;
}
.hero h1 {
  margin-bottom: 1.2rem;
}
.hero .lede {
  max-width: 54ch;
}
.page-home .hero {
  max-width: none;
}
.page-home .hero h1 {
  max-width: 22ch;
}

/* Table of contents rows with leaders, as in the front of a register. */
.toc-section h2,
.definitions h2,
.prose-section h2 {
  margin-bottom: 1.2rem;
}
.toc {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  max-width: 760px;
}
.toc-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: baseline;
  gap: 0 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.toc-leader {
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-0.3em);
  min-width: 1.5rem;
}
.toc-name {
  font-family: var(--display);
  font-size: var(--step-2);
  color: var(--ink);
  text-decoration: none;
}
.toc-name:hover {
  color: var(--green);
}
.toc-detail {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
}
.toc-edition {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--graphite);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .toc-row {
    grid-template-columns: 1fr auto;
  }
  .toc-detail {
    grid-column: 1 / -1;
  }
  .toc-leader {
    display: none;
  }
}

.definitions {
  margin-bottom: 3rem;
}
.definition {
  max-width: var(--measure);
  margin-bottom: 1.6rem;
}
.definition h3 a {
  color: var(--ink);
  text-decoration: none;
}
.definition h3 a:hover {
  color: var(--green);
}
.definition p {
  margin-top: 0.4rem;
}
.prose-section {
  max-width: var(--measure);
  margin-bottom: 2.6rem;
}

/* City and category pages ------------------------------------------------------ */

.page-header {
  margin-bottom: 2.5rem;
}
.city-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title drawing" "edition drawing" "lede drawing";
  column-gap: 2rem;
  align-items: start;
}
.city-header h1 {
  grid-area: title;
}
.city-header .edition {
  grid-area: edition;
}
.city-header .lede {
  grid-area: lede;
}
.drawing {
  grid-area: drawing;
  width: 240px;
  max-width: 40vw;
  color: var(--graphite);
  opacity: 0.85;
}
.drawing svg {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 640px) {
  .city-header {
    grid-template-columns: 1fr;
    grid-template-areas: "drawing" "title" "edition" "lede";
  }
  .drawing {
    width: 180px;
    max-width: none;
    margin-bottom: 0.5rem;
  }
}
.edition,
.section-count {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
  margin: 0.6rem 0 1rem;
  font-variant-numeric: tabular-nums;
}
.category-section {
  margin-bottom: 3.5rem;
}
.category-section h2 a {
  color: var(--ink);
  text-decoration: none;
}
.category-section h2 a:hover {
  color: var(--green);
}

/* The register rows ------------------------------------------------------------ */

.register {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.register-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.register-row .seal {
  margin-top: 0.15rem;
}
.register-name {
  font-size: var(--step-1);
  margin-bottom: 0.3rem;
}
.register-name a {
  color: var(--ink);
  text-decoration: none;
}
.register-name a:hover {
  color: var(--green);
}
.register-summary {
  margin-bottom: 0.35rem;
}
.register-meta {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .register-row {
    grid-template-columns: 44px 1fr;
    gap: 0 1rem;
  }
  .register-row .seal {
    width: 44px;
    height: 44px;
  }
}

/* Attribute index, "who places which roles" ------------------------------------ */

.index-section {
  margin: 3rem 0;
}
.index-section h3 {
  margin-bottom: 1rem;
}
.attribute-index {
  margin: 0;
  max-width: 820px;
}
.attribute-index > div {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 0 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.attribute-index dt {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
  padding-top: 0.15rem;
}
.attribute-index dd {
  margin: 0;
}
@media (max-width: 560px) {
  .attribute-index > div {
    grid-template-columns: 1fr;
  }
}

/* The seal ---------------------------------------------------------------------- */

.seal {
  color: var(--brass);
  flex: none;
}
.seal text {
  font-family: var(--grotesk);
  fill: var(--ink);
}
.seal .seal-ring {
  fill: var(--brass);
  font-weight: 500;
}
.seal .seal-month {
  font-weight: 600;
}
.seal .seal-year {
  font-weight: 500;
}
.seal-large {
  animation: seal-set 360ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes seal-set {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seal-large {
    animation: none;
  }
  a {
    transition: none;
  }
}

/* Entry page -------------------------------------------------------------------- */

.entry-header {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 0 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.entry-kicker {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
  margin-bottom: 0.6rem;
}
.entry-header h1 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}
@media (max-width: 560px) {
  .entry-header {
    grid-template-columns: 1fr;
    gap: 1.2rem 0;
  }
  .seal-large {
    width: 96px;
    height: 96px;
  }
}

.facts {
  margin: 0 0 3rem;
  max-width: 820px;
  border-top: 1px solid var(--rule);
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: 0 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.facts dt {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
  padding-top: 0.2rem;
}
.facts dd {
  margin: 0;
}
@media (max-width: 560px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }
}

.sources {
  max-width: 820px;
  margin-bottom: 3rem;
}
.sources h2,
.claim h2 {
  font-size: var(--step-1);
  margin-bottom: 0.8rem;
}
.sources ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
}
.sources li {
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
}
.verified-line {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--graphite);
}

.claim {
  max-width: 820px;
  padding: 1.6rem 0 0;
  border-top: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1.2rem;
}
.button {
  font-family: var(--grotesk);
  font-size: var(--step--1);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.6rem 1.1rem;
  border-radius: 2px;
  transition: border-color 160ms ease, color 160ms ease;
}
.button:hover {
  border-color: var(--brass);
  color: var(--green);
}
.button-quiet {
  border-color: var(--rule);
  color: var(--graphite);
}

.regulation {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
}
.regulation h2 {
  font-size: var(--step-1);
  margin-bottom: 0.8rem;
}
.backlink {
  font-family: var(--grotesk);
  font-size: var(--step--1);
}

/* Long-form pages --------------------------------------------------------------- */

.prose {
  max-width: var(--measure);
}
.prose h1 {
  margin-bottom: 1.4rem;
}
.prose h2 {
  font-size: var(--step-1);
  margin: 2rem 0 0.6rem;
}
.prose h3 {
  font-size: var(--step-0);
  margin: 1.6rem 0 0.4rem;
}
.prose h4 {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: var(--step--1);
  margin: 1.2rem 0 0.3rem;
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
}
.prose li {
  margin-bottom: 0.3rem;
}
.prose code {
  font-family: var(--grotesk);
  font-size: 0.9em;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
  border-left: 1px solid var(--brass);
  color: var(--graphite);
}
