@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #080705;
  --surface: #15110e;
  --surface-deep: #0d0b09;
  --paper: #f1eadf;
  --muted: #aaa095;
  --accent: #b09368;
  --legal: #7f776d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--paper);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: -8rem;
  z-index: -3;
  background:
    url("../images/the-circle-unwritten-cover.jpg") center 26% / cover no-repeat;
  filter: blur(78px) saturate(0.65) brightness(0.26);
  opacity: 0.42;
  transform: scale(1.08);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgb(6 5 4 / 0.45) 0%, rgb(8 7 5 / 0.82) 42%, var(--background) 100%);
}

.fog-canvas {
  position: fixed;
  inset: -1.5rem;
  z-index: -1;
  width: calc(100vw + 3rem);
  height: calc(100vh + 3rem);
  pointer-events: none;
  opacity: 0.64;
  filter: blur(14px);
  mix-blend-mode: screen;
  transform: translateZ(0);
}

.grain-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: soft-light;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 3.25rem 0 3rem;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin: 0 0 2.8rem 1.25rem;
}

.ryu-logo {
  display: block;
  width: 6rem;
  height: auto;
  object-fit: contain;
}

.imprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.project {
  margin: 0 auto;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  gap: 0;
  align-items: center;
}

.project-cover {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  transform: translateX(1.5rem);
  border-radius: 0.18rem;
  box-shadow:
    0 2.2rem 4.8rem rgb(0 0 0 / 0.52),
    0 0.25rem 0.9rem rgb(0 0 0 / 0.5);
}

.project-copy {
  position: relative;
  min-width: 0;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.1rem 3.1rem 3rem 4.6rem;
  background:
    linear-gradient(125deg, rgb(27 22 17 / 0.97), rgb(15 13 11 / 0.98));
  box-shadow: 0 2rem 5rem rgb(0 0 0 / 0.24);
}

.project-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background:
    linear-gradient(180deg, transparent 3%, var(--accent) 22%, #6e5b42 78%, transparent 97%);
  opacity: 0.86;
}

.project h1 {
  max-width: 26rem;
  margin: 0 0 0.8rem;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5vw, 3.45rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.project-subtitle {
  max-width: 25rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.65rem;
  align-items: center;
}

.store-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  padding: 0.25rem 0 0.3rem;
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 120ms ease,
    transform 120ms ease;
}

.store-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 1.8rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 140ms ease;
}

.store-link:hover {
  color: #fffaf0;
  transform: translateY(-1px);
}

.store-link:hover::after {
  transform: scaleX(1);
}

.store-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.link-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.external-mark {
  margin-left: -0.12rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 400;
}

.legal {
  max-width: 52rem;
  margin: 4rem auto 0;
  padding: 1.6rem 1.75rem 1.45rem;
  background: rgb(10 9 8 / 0.72);
  color: var(--legal);
  font-size: 0.7rem;
  line-height: 1.55;
  text-align: left;
}

.legal p {
  margin: 0 0 0.8rem;
}

.legal p:last-child {
  margin-bottom: 0;
}

.legal a {
  color: #9c9387;
  text-decoration-color: #655d54;
  text-underline-offset: 0.15em;
}

.legal a:hover {
  color: var(--paper);
}

@media (max-width: 46rem) {
  .page {
    width: min(100% - 2rem, 31rem);
    padding-top: 2.25rem;
  }

  .masthead {
    justify-content: center;
    margin: 0 0 2.4rem;
  }

  .ryu-logo {
    width: 5.7rem;
  }

  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-cover {
    width: min(76vw, 17rem);
    margin: 0 auto -2.6rem;
    transform: none;
  }

  .project-copy {
    min-height: 0;
    padding: 4.5rem 1.6rem 2rem;
    text-align: center;
  }

  .project-copy::before {
    inset: 0 8% auto;
    width: auto;
    height: 0.24rem;
    background:
      linear-gradient(90deg, transparent, var(--accent) 28%, #6e5b42 72%, transparent);
  }

  .project h1,
  .project-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .project h1 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .store-links {
    justify-content: center;
  }

  .legal {
    margin-top: 2.75rem;
    padding: 1.35rem 1.25rem;
    font-size: 0.67rem;
  }
}
