@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ground: #fafaf8;
  --room: #ffffff;
  --wall: #1c1c1a;
  --text: #1c1c1a;
  --muted: #4b4b46;
  --faint: #5a5a54;
  --fixture: #8a8a82;
  --accent: #1d4ed8;
  --accent-hover: #172f7a;
  --wall-width: 7px;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141413;
    --room: #1e1e1c;
    --wall: #d9d8d2;
    --text: #efeee9;
    --muted: #b5b4ad;
    --faint: #a3a29b;
    --fixture: #6b6b64;
    --accent: #8fb0ff;
    --accent-hover: #c2d3ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.site-header h1 {
  margin: 0 0 10px;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.site-header p {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.compass {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compass svg {
  color: var(--wall);
}

/* Dimension line */

.dimension {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dimension::before,
.dimension::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--faint);
}

.dimension {
  border-inline: 1px solid var(--faint);
  padding-block: 4px;
}

/* Plan: the grid gap and the border are the walls */

.plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wall-width);
  background: var(--wall);
  border: var(--wall-width) solid var(--wall);
}

.room {
  position: relative;
  background: var(--room);
  padding: 36px 28px 28px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.room--wide {
  grid-column: span 2;
  padding-inline: 32px;
}

.room-label {
  color: var(--accent);
}

.room h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.room--wide h2 {
  font-size: 34px;
}

.room p {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
}

.room-status {
  align-self: flex-end;
}

.room-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px;
}

.room-body > div {
  flex: 1 1 320px;
}

.fixtures {
  flex: 0 1 220px;
  border: 1px dashed var(--fixture);
  padding: 14px 16px;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.room > .fixtures {
  flex: none;
  width: 220px;
  max-width: 100%;
}

.fixtures li:first-child {
  color: var(--accent);
}

/* Doors: a gap in a wall, plus a swing arc */

.door {
  position: absolute;
  background: var(--room);
}

.door--bottom {
  bottom: calc(var(--wall-width) * -1);
  left: 48px;
  width: 64px;
  height: var(--wall-width);
}

.door--right {
  top: 56px;
  right: calc(var(--wall-width) * -1);
  width: var(--wall-width);
  height: 64px;
}

.room--door-bottom {
  padding-bottom: 84px;
}

.swing {
  position: absolute;
  bottom: 0;
  left: 48px;
  color: var(--fixture);
  overflow: visible;
}

/* Prose room (privacy) */

.room--prose {
  grid-column: 1 / -1;
  display: block;
  padding: 40px 32px;
}

.room--prose .room-label {
  display: block;
  margin-bottom: 20px;
}

.room--prose h2 {
  font-size: 22px;
  margin: 36px 0 10px;
}

.room--prose p {
  margin: 0 0 14px;
}


.room--prose p,
.room--prose li {
  font-size: 17px;
  color: var(--muted);
  max-width: 720px;
}

.room--prose ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.room--prose li + li {
  margin-top: 6px;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.site-footer a {
  color: var(--accent);
}

@media (max-width: 760px) {
  .plan {
    grid-template-columns: minmax(0, 1fr);
  }

  .room--wide {
    grid-column: span 1;
  }

  .door--right {
    display: none;
  }
}
