/* lextribunalis.com. One stylesheet, no scripts. The colours and the two
   typefaces are the application's own. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --burgundy: #5c1a24;
  --burgundy-deep: #48131b;
  --paper: #fbf9f4;
  --card: #ffffff;
  --band: #f3eee3;
  --ink: #26201d;
  --quiet: #625853;
  --rule: #e2dbcd;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--burgundy-deep);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}
h3 {
  font-size: 1.4rem;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}
.prose {
  max-width: 37rem;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--card);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--card);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-block: 1.1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--burgundy);
  text-decoration: none;
  margin: 0;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.55rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--burgundy);
  color: var(--burgundy);
}

/* Sections */
.section {
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
}
.section + .section {
  border-top: 1px solid var(--rule);
}
/* The heading of a page runs straight on into its first part. */
.section.head {
  padding-bottom: 0;
}
.section.head + .section {
  border-top: 0;
  padding-top: clamp(2rem, 4vw, 2.8rem);
}
.band {
  background: var(--band);
}
.section h2 {
  margin-bottom: 1.1rem;
}
h1 + * {
  margin-top: 1.3rem;
}
.lead {
  font-size: 1.4rem;
  line-height: 1.45;
  max-width: 38rem;
}
.note {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--quiet);
}

/* Opening of the home page */
.opening {
  padding-block: clamp(2.8rem, 6vw, 4.5rem) 0;
}
.opening h1 {
  max-width: 17em;
  margin-bottom: 1.2rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.6rem;
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--burgundy);
  border-radius: 4px;
  background: var(--burgundy);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--burgundy-deep);
  color: #fff;
}

/* Screenshots */
.shot {
  margin: 2.2rem 0 0;
}
.shot .hint {
  display: none;
}
.shot img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(38 32 29 / 6%), 0 10px 30px rgb(38 32 29 / 8%);
  background: var(--card);
}
.shot figcaption {
  margin-top: 0.7rem;
  max-width: 44rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--quiet);
}

/* Two columns of short items on the home page */
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3.5rem;
  margin-top: 2rem;
}
.points h3 {
  font-size: 1.3rem;
  margin-bottom: 0.45rem;
}
.points p {
  margin-bottom: 0;
}

/* A part of the system on the longer page: the words, then its picture at full width */
.part > h2,
.part > p,
.part > ul {
  max-width: 37rem;
}
.part .shot {
  margin-top: 1.8rem;
}
.part .shot.narrow {
  max-width: 49rem;
}

.facts {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 37rem);
  gap: 0 2.5rem;
  margin: 0;
}
.facts dt {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.facts dd {
  margin: 0;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}
.facts dd p:last-child {
  margin-bottom: 0;
}
.facts dd ul {
  margin-bottom: 0;
}
.facts dd li:last-child {
  margin-bottom: 0;
}
.band .facts dt:first-of-type,
.band .facts dd:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.plain-list {
  padding-left: 1.1em;
}
.plain-list li {
  margin-bottom: 0.5em;
}
.status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem 3.5rem;
}
.contents {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.9;
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  columns: 2 16rem;
  max-width: 44rem;
}
.status h3 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 0.7rem;
}

/* The closing invitation */
.invite {
  background: var(--burgundy);
  color: #f4efe4;
}
.invite h2 {
  margin-bottom: 0.8rem;
}
.invite :focus-visible {
  outline-color: #f4efe4;
}
.invite a {
  color: #fff;
}
.invite .button {
  background: #f4efe4;
  border-color: #f4efe4;
  color: var(--burgundy);
}
.invite .button:hover {
  background: #fff;
  color: var(--burgundy-deep);
}

/* The form */
form.enquiry {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.enquiry label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.enquiry input,
.enquiry textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #857a6d;
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.enquiry textarea {
  min-height: 9rem;
  resize: vertical;
}
.enquiry label i {
  font-style: normal;
  font-weight: 400;
  color: var(--quiet);
}
.enquiry .hidden {
  display: none;
}
.three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem 3rem;
  align-items: start;
}
.three h3,
.two h3 {
  margin-bottom: 0.6rem;
}
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2.5rem 4rem;
  align-items: start;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  padding-block: 2.5rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--quiet);
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 3rem;
}
.site-footer p {
  margin: 0 0 0.3rem;
}
.site-footer .brand {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}
.site-footer .small {
  font-size: 0.85rem;
}

@media (max-width: 44rem) {
  .points {
    grid-template-columns: 1fr;
  }
  /* A picture of a whole screen cannot be read at this width, so it keeps a
     readable size and is moved sideways with a finger. */
  .shot .frame {
    overflow-x: auto;
  }
  .shot .frame img {
    width: 56rem;
    max-width: none;
  }
  .shot .hint {
    display: inline;
  }
  .nav {
    gap: 0.1rem 1.1rem;
    font-size: 0.9rem;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .facts dd {
    padding-top: 0.2rem;
    border-top: 0;
  }
}
@media (max-width: 30rem) {
  body {
    font-size: 1.15rem;
  }
  .lead {
    font-size: 1.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
