/* Tiles that rise: a tile showroom's home page. The words sit at the top, the floor fills the rest: an SVG
   drawn by script.js, tile by tile, so each one can rise on its own. */
:root {
  --wall: #f3ece2;          /* the wall behind the floor */
  --ink: #2a211b;           /* text */
  --grout: #d9cab6;         /* the gaps between the tiles */
  --edge: clamp(18px, 3.4vw, 52px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--wall);
  color: var(--ink);
  font-family: 'DM Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.room {
  position: relative;
  height: 100%;
  height: 100svh;
  overflow: hidden;
  /* a finger on the floor plays with the tiles instead of moving the page */
  touch-action: none;
}

.bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px var(--edge);
  font-size: 15px;
}

.brand {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bar__nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 34px);
}

.bar__nav a {
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .bar__nav a:hover {
    opacity: 0.55;
  }
}

/* ---------------------------------------------------------------- the words */
.words {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 560px;
  padding: 4vh var(--edge) 0;
  pointer-events: none;
}

.words a {
  pointer-events: auto;
}

.words__title {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(38px, 5.4vw, 84px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.words__line {
  max-width: 38ch;
  margin: 0;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.45;
  opacity: 0.78;
}

.words__button {
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--wall);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@media (hover: hover) {
  .words__button:hover {
    transform: scale(1.05);
  }
}

.words__button:focus-visible,
.bar a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- the floor */
.floor {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.floor .grout {
  fill: var(--grout);
}

.hint {
  position: absolute;
  left: var(--edge);
  bottom: 18px;
  z-index: 3;
  margin: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(243, 236, 226, 0.88);
  font-size: 13px;
  pointer-events: none;
}

@media (max-width: 760px) {
  .bar__nav {
    display: none;
  }

  .words {
    gap: 12px;
  }
}
