/* The room card that stands up: the card of a room in a small hotel, with the room drawn as an architect's plan in
   black and warm greys, set in Archivo. One amber accent: the patch of sun from the window. */
:root {
  --page: #ffffff;          /* the page */
  --card: #ffffff;          /* the card */
  --line: #e6e1d8;          /* the card's hairlines */
  --paper: #f2efe8;         /* the drawing's ground */
  --ink: #1a1815;           /* the walls cut by the plan, the lines, the words */
  --muted: #8d877c;         /* the small print */
  --floor: #fbfaf6;         /* the floor */
  --side: #e3ded4;          /* the sides in light */
  --shade: #d2ccc0;         /* the sides in shade */
  --sun: #f0a637;           /* the patch of sun */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.room {
  position: relative;
  width: min(340px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(26, 24, 21, 0.04), 0 14px 30px -18px rgba(26, 24, 21, 0.22);
}

/* ---------------------------------------------------------------- the drawing: a button that stands the room up */
.plan {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 340 / 252;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.plan:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.plan__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.f-floor {
  fill: var(--floor);
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.f-cut {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.f-side {
  fill: var(--side);
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.f-shade {
  fill: var(--shade);
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.f-top {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.f-glass {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 0.6;
}

.f-sun {
  fill: var(--sun);
  opacity: 0.42;
}

.f-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-linecap: round;
}

.f-thin {
  fill: none;
  stroke: var(--muted);
  stroke-width: 0.6;
  stroke-dasharray: 2 2;
}

.plan__view,
.plan__sun {
  position: absolute;
  top: 12px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variation-settings: 'wght' 560, 'wdth' 96;
  pointer-events: none;
}

.plan__view {
  left: 14px;
  color: var(--ink);
}

.plan__sun {
  right: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- the words */
.info {
  padding: 16px 18px 18px;
}

.info__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.info__name {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: normal;
  font-variation-settings: 'wght' 620, 'wdth' 88;
  white-space: nowrap;
}

.info__price {
  margin: 0;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wght' 600, 'wdth' 92;
  white-space: nowrap;
}

.info__night {
  color: var(--muted);
  font-size: 12px;
  font-variation-settings: 'wght' 460, 'wdth' 96;
}

.info__facts {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wght' 450, 'wdth' 96;
}

/* the three rooms: words on a hairline, the chosen one in ink with a short bar under it that slides */
.kinds {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 14px 0 0 -8px;
}

.kind {
  position: relative;
  min-height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-variation-settings: 'wght' 500, 'wdth' 92;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 0.25s ease, font-variation-settings 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.kind[aria-checked='true'] {
  color: var(--ink);
  font-variation-settings: 'wght' 680, 'wdth' 92;
}

@media (hover: hover) and (pointer: fine) {
  .kind[aria-checked='false']:hover {
    color: #4f4a42;
  }
}

.kind:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: -2px;
}

.kinds__bar {
  position: absolute;
  bottom: 2px;
  left: 0;
  height: 1.5px;
  background: var(--ink);
  pointer-events: none;
}

.book {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-variation-settings: 'wght' 600, 'wdth' 96;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: font-variation-settings 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.book svg {
  width: 18px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
  .book:hover {
    font-variation-settings: 'wght' 720, 'wdth' 108;
  }

  .book:hover svg {
    transform: translateX(4px);
  }
}

.book:active svg {
  transform: translateX(7px);
}

.book:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
