@font-face {
  font-family: "Karnak Condensed Bold";
  src: url("https://assets.codepen.io/1084813/karnakcondensedbold.otf") format("opentype");
}
@font-face {
  font-family: "Karnak Medium";
  src: url("https://assets.codepen.io/1084813/karnakmedium.otf") format("opentype");
}
@font-face {
  font-family: "Franklin";
  src: url("https://assets.codepen.io/1084813/nytfranklin.otf") format("opentype");
}
@font-face {
  font-family: "Franklin Bold";
  src: url("https://assets.codepen.io/1084813/nytfranklinbold.otf") format("opentype");
}
:root {
  --yellow: #f8cb2c;
  --grey: #c4c1af;
  --lightgrey: #DBD8C5;
  --blue: #aedfee;
  --hint-blue: #49a8c6;
  --text-blue: #0f7ea0;
}

html, body {
  padding: 0;
  margin: 0;
  background: #fff;
  overflow: hidden;
}

.container {
  font-family: "Karnak Medium", serif;
  width: 100vw;
  height: 100dvh;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.intro {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgb(192, 221, 217);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  z-index: 2;
}
.intro.hidden {
  display: none;
}
.intro .description {
  font-size: 24px;
  max-width: 310px;
}
.intro .play-btn {
  font-family: "Franklin Bold", serif;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 150px;
  height: 48px;
}
.intro .date {
  font-family: "Franklin Bold";
  margin-top: 26px;
}
.intro .byline {
  font-family: "Franklin Bold";
}

.intro-content {
  transition: transform 1s, opacity 1s;
}
.intro-content.hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.intro-logo {
  width: 68px;
}

h1 {
  font-family: "Karnak Condensed Bold", serif;
  font-size: 36px;
}

.header {
  width: 100%;
  height: 45px;
  border-bottom: 1px solid #bfbfbf;
}

.desktop-header-1,
.desktop-header-2 {
  display: none;
}

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.game::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.game.won::after {
  opacity: 1;
  visibility: visible;
}

.theme-container {
  width: 315px;
  border: 1px solid #bcbcbc;
  border-radius: 8px;
  margin-top: 10px;
}
.theme-container .theme-title {
  background: var(--blue);
  text-transform: uppercase;
  font-family: "Franklin Bold";
  font-size: 12px;
  padding: 2px;
  letter-spacing: 0.7px;
}
.theme-container .theme {
  font-family: "Franklin Bold";
  font-size: 20px;
  margin: 7px 0;
}

.words-found {
  font-family: "Franklin";
}
.words-found.hidden {
  display: none;
}
.words-found .found-counter, .words-found .total {
  font-family: "Franklin Bold";
}

.guesses {
  height: 24px;
  line-height: 24px;
  font-family: "Franklin Bold";
  font-size: 24px;
  margin: 12px 0;
  text-transform: uppercase;
}
.guesses.found {
  color: var(--text-blue);
}
.guesses.spangram {
  color: var(--yellow);
}
.guesses.error {
  animation: shake 1s;
  animation-fill-mode: forwards;
}

.board {
  position: relative;
  overflow: hidden;
}
.board .row {
  white-space: nowrap;
}
.board .letter {
  position: relative;
  color: #000;
  font-family: "Franklin";
  font-size: 26px;
  background: #FFF;
  border: none;
  text-transform: uppercase;
  width: 44px;
  height: 44px;
  margin: 5px;
  text-align: center;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  transition: background 0.4s;
}
.board .letter span {
  position: relative;
  z-index: 1;
}
.board .letter.selected {
  background-color: var(--grey);
}
.board .letter.selected .connector {
  background-color: var(--grey);
}
.board .letter.found {
  background-color: var(--blue);
  animation: found 0.5s;
  animation-fill-mode: forwards;
}
.board .letter.found .connector {
  background-color: var(--blue);
}
.board .letter.found-spangram {
  background-color: var(--yellow);
  animation: found 0.7s;
  animation-fill-mode: forwards;
}
.board .letter.found-spangram .connector {
  background-color: var(--yellow);
}
.board::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.9) 50%, transparent 80%);
  transform: translate(-100%, -100%);
  transition: transform 3s;
}
.board.won::after {
  transform: translate(100%, 100%);
}

.connector {
  position: absolute;
  width: 10px;
  height: 50px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  border-radius: 20%;
}
.connector.top {
  opacity: 1;
  height: 28px;
  top: 0;
  left: 50%;
  transform: translate(-50%, -63%);
}
.connector.right {
  opacity: 1;
  top: 50%;
  left: 0;
  width: 25px;
  height: 10px;
  transform: translate(155%, -50%);
}
.connector.bottom {
  opacity: 1;
  top: 100%;
  left: 50%;
  height: 28px;
  transform: translate(-50%, -10%);
}
.connector.left {
  opacity: 1;
  top: 50%;
  left: 0;
  width: 25px;
  height: 10px;
  transform: translate(-75%, -50%);
}
.connector.topleft {
  opacity: 1;
  top: 50%;
  left: 0;
  transform: translate(-105%, -105%) rotate(-45deg);
}
.connector.topright {
  opacity: 1;
  top: 50%;
  left: 100%;
  transform: translate(5%, -105%) rotate(45deg);
}
.connector.bottomright {
  opacity: 1;
  top: 100%;
  left: 100%;
  transform: translate(0%, -36%) rotate(-45deg);
}
.connector.bottomleft {
  opacity: 1;
  top: 100%;
  left: 0;
  transform: translate(-100%, -36%) rotate(45deg);
}

.win-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 100vh);
  min-width: 280px;
  background: #fff;
  border: 1px solid #bcbcbc;
  border-radius: 8px;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.5s;
}
.win-container.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}
.win-container .win-title {
  background: var(--yellow);
  margin-top: 0;
  padding: 16px;
  border-radius: 6px 6px 0 0;
}
.win-container .win-text {
  padding: 0 32px;
}
.win-container a img {
  display: block;
  width: 200px;
  margin: 24px auto;
  animation: dance 0.6s infinite;
}

@media (min-width: 900px) {
  .desktop-header-1,
  .desktop-header-2 {
    display: block;
    border-bottom: 1px solid #bfbfbf;
    text-align: left;
  }
  .desktop-header-1 {
    padding-left: 48px;
  }
  .desktop-header-1 h1 {
    margin: 16px 0;
    font-size: 38px;
  }
  .desktop-header-2 {
    padding: 44px 0 24px 128px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
  }
  .desktop-header-2 h1 {
    display: inline-block;
    margin: 0;
    margin-bottom: 4px;
    font-size: 38px;
  }
  .desktop-header-2 span {
    font-family: "Franklin";
    font-size: 28px;
  }
  .game {
    flex-direction: row;
    justify-content: center;
    gap: 86px;
  }
  .theme-container {
    width: min(222px + 15vw, 474px);
  }
  .theme-container .theme-title {
    font-size: 14px;
    padding: 4px;
  }
  .theme-container .theme {
    font-size: 24px;
    margin: 10px 0;
  }
  .words-found {
    font-size: 24px;
  }
  .guesses {
    margin: 32px 0;
    font-size: 26px;
  }
  .board .letter {
    margin: 7px;
  }
}
@keyframes found {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shake {
  0% {
    transform: translateX(0);
    text-transform: uppercase;
  }
  10% {
    transform: translateX(-5px);
  }
  20% {
    transform: translateX(5px);
  }
  30% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  50% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  70% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
  90% {
    transform: translateX(-5px);
  }
  99% {
    text-transform: uppercase;
  }
  100% {
    transform: translateX(0);
    text-transform: none;
  }
}
@keyframes dance {
  0% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0);
  }
}

/*# sourceMappingURL=style.css.map */
