/* Lock Status website. One column, one typeface (Atkinson Hyperlegible, chosen for
   legibility), colors from the app: river fog, channel navy, water blue and the lock signal. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --fog: #eef3f6;
  --surface: #ffffff;
  --ink: #12324a;
  --ink-soft: #46606f;
  --water: #1f5f8b;
  --rule: #c9d7e0;
  --red: #b3181d;
  --amber: #9a5200;
  --green: #17703d;
  --lamp-off: #d6e0e6;
  --housing: #12324a;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fog: #0e1a24;
    --surface: #152634;
    --ink: #dce7ee;
    --ink-soft: #9fb4c2;
    --water: #6cb4ee;
    --rule: #2a4153;
    --red: #ff6b6f;
    --amber: #f9a94b;
    --green: #3fcb7a;
    --lamp-off: #23384a;
    --housing: #070f16;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a {
  color: var(--water);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* Site header on the document pages: the small signal and the app's name. */
.masthead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.masthead a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

/* The lock signal: a housing with red, amber and green lamps, as on the app icon. */
.signal {
  display: inline-flex;
  flex-direction: column;
  gap: 0.22em;
  padding: 0.3em 0.26em;
  border-radius: 0.5em;
  background: var(--housing);
  font-size: 1rem;
  flex: none;
}

.signal span {
  display: block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
}

.signal .red { background: var(--red); }
.signal .amber { background: var(--amber); }
.signal .green { background: var(--green); }

/* The home page's large signal lights in the order a lock gives it: stop, approach, enter. */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 3rem;
}

.hero .signal {
  font-size: 4.5rem;
  gap: 0.16em;
  padding: 0.22em 0.2em;
  border-radius: 0.28em;
}

.hero .signal span {
  width: 0.62em;
  height: 0.62em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .signal span {
    animation: lamp 3.6s ease forwards;
  }
  .hero .signal .red { animation-name: lamp-red; }
  .hero .signal .amber { animation-name: lamp-amber; }
  .hero .signal .green { animation-name: lamp-green; }
}

@keyframes lamp-red {
  0% { background: var(--lamp-off); }
  8%, 33% { background: var(--red); }
  40%, 100% { background: var(--lamp-off); }
}

@keyframes lamp-amber {
  0%, 33% { background: var(--lamp-off); }
  40%, 66% { background: var(--amber); }
  73%, 100% { background: var(--lamp-off); }
}

@keyframes lamp-green {
  0%, 66% { background: var(--lamp-off); }
  73%, 100% { background: var(--green); }
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0;
}

.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 2.5rem 0 0.5rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

li::marker {
  color: var(--water);
}

.updated {
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* The locks' status colors, explained with the colors themselves. */
.colors {
  list-style: none;
  padding: 0;
}

.colors li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.colors li::before {
  content: "";
  flex: none;
  width: 0.75em;
  height: 0.75em;
  border-radius: 50%;
  transform: translateY(0.05em);
}

.colors .red::before { background: var(--red); }
.colors .amber::before { background: var(--amber); }
.colors .green::before { background: var(--green); }

.contact {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 4px solid var(--water);
  border-radius: 0 8px 8px 0;
}

.contact h2 {
  margin-top: 0;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 1rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 34rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .hero .signal {
    font-size: 3.25rem;
    flex-direction: row;
    width: max-content;
  }
}
