@charset "UTF-8";

:root {
  --font-size-xs: calc(12 / 16 * 1rem);
  --font-size-ss: calc(14 / 16 * 1rem);
  --font-size-s: calc(15 / 16 * 1rem);
  --font-size-m: 1rem;
  --font-size-l: calc(18 / 16 * 1rem);
  --font-size-ll: calc(20 / 16 * 1rem);
  --font-size-xl: calc(24 / 16 * 1rem);

  --color-white: rgb(250, 250, 250);
  --color-gray: rgb(176, 176, 176);
  --color-text: rgba(0, 0, 0, 70%);
  --color-header-text: hsl(272, 88%, 23%);
  --color-sec-title: rgba(0, 0, 0, 60%);
  --color-hero-bg: hsl(272, 64%, 64%);
  --color-about-bg: hsl(198, 100%, 78%);
  --color-news-bg: hsl(120, 98%, 81%);
  --color-games-bg: hsl(62, 100%, 78%);
  --color-contact-bg: hsl(343, 100%, 78%);

  --width-wrapper-wide: min(calc(100% - 32px), 1920px);
  --width-wrapper-narrow: min(80vw, 1280px);
  --height-header: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--height-header);
}

:where(body) {
  font-family: "Coda", sans-serif;
  font-feature-settings: "palt";
  font-size: var(--font-size-m);
  color: var(--color-text);
}

:where(a) {
  text-decoration: none;
  color: inherit;
}

.lang-en {
  display: none;
}

html[lang="en"] .lang-ja {
  display: none;
}

html[lang="en"] .lang-en {
  display: revert;
}

section {
  display: flex;
  width: 100%;
  padding-block: 64px;
}

section .section-inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: var(--width-wrapper-narrow);
  margin-inline: auto;
}

section .sec-title,
h3 {
  color: var(--color-sec-title);
}

section .sec-title svg {
  height: 54px;
}

section .content {
  align-self: center;
}

h3 svg {
  height: 36px;
  margin-bottom: 16px;
}

.dot-logo path {
  opacity: 0;
  transform: translateX(18px);
}

.dot-logo.is-visible path {
  animation: dot-slide-in 0.35s ease-out forwards;
}

@keyframes dot-slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== ヘッダー ============================== */

#header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 10;
  background-color: rgba(167, 104, 222, 85%);
  color: var(--color-header-text);
  font-size: var(--font-size-l);
}

#header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--width-wrapper-wide);
  height: var(--height-header);
  margin-inline: auto;
}

#header .header-logo {
  padding: 4px;
}

#header .header-logo img {
  width: 150px;
}

#header .global-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 480px;
}

#header .global-nav a {
  padding: 5px 15px;
}

#header #language-button {
  width: 48px;
  height: 32px;
  text-align: center;
  border: 1px solid var(--color-text);
  background-color: rgba(255, 255, 255, 30%);
}

#header .global-nav a:hover,
#header #language-button:hover {
  background-color: rgba(0, 0, 0, 20%);
  color: var(--color-white);
}

/* ===== メインビジュアル ============================== */

#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-hero-bg);
}

#hero .hero-container p {
  margin-bottom: 8px;
  font-size: var(--font-size-l);
  text-align: center;
  color: var(--color-white);
}

#hero .hero-container img {
  width: 540px;
  background-color: var(--color-white);
}

/* ===== アバウト ============================== */

#about {
  background-color: var(--color-about-bg);
}

#about .content {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

#about .portrait {
  display: flex;
  justify-content: center;
}

#about .portrait img {
  width: 160px;
  image-rendering: pixelated;
}

#about .business {
  position: relative;
  padding: 32px;
  margin-inline: auto;
  font-size: var(--font-size-s);
  background-color: #fff79d;
  box-shadow: -1px 3px 0 rgba(0, 0, 0, 15%);
  transform: rotate(-0.5deg);
}

#about .business::before {
  content: "";
  position: absolute;
  top: -12px;
  left: calc(50% - 80px);
  width: 140px;
  height: 24px;
  background-color: rgba(200, 200, 200, 0.3);
  transform: rotate(-1deg);
}

#about .business th {
  padding-right: 24px;
}

#about .business th,
#about .business td {
  padding-block: 8px;
  vertical-align: baseline;
}

/* ===== ニュース ============================== */

#news {
  background-color: var(--color-news-bg);
}

#news .content {
  padding: 12px;
  background-color: #c58e50;
}

#news .news-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 54px;
  background-color: #1e6c34;
  color: var(--color-white);
}

#news .news-item {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  gap: 8px 40px;
}

#news .news-item time {
  white-space: nowrap;
}

#news .chalk {
  position: absolute;
  right: 16px;
  bottom: 0;
  height: 10px;
}

/* ===== ゲームズ ============================== */

#games {
  background-color: var(--color-games-bg);
}

#games .game-card {
  position: relative;
  box-sizing: border-box;
  width: 640px;
  margin-inline: auto;
  padding: 64px 8px 32px;
  border-radius: 32px;
}

#games .game-card::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 112px;
  height: 40px;
  background-color: var(--color-games-bg);
  clip-path: path(
    "M 53 0 H 59 Q 73 0 73 16 Q 73 20 78 20 H 96 Q 112 20 112 30 Q 112 40 96 40 H 16 Q 0 40 0 30 Q 0 20 16 20 H 34 Q 39 20 39 16 Q 39 0 53 0"
  );
  transform: translateX(-50%);
}

#games .game-card-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "title title"
    "logo info"
    "description description";
  gap: 32px;
  padding: 24px;
  background-color: var(--color-white);
}

#games .game-card_title {
  grid-area: title;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

#games .game-card_title {
  font-size: var(--font-size-ll);
  text-align: center;
}

#games .mobile .game-card_title img {
  width: 48px;
  border-radius: 12px;
}

#games .game-card_logo {
  grid-area: logo;
  display: flex;
  justify-content: center;
  align-items: center;
}

#games .game-card_info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#games .game-card_info table {
  padding: 6px 16px;
  font-size: var(--font-size-s);
  border: 1px solid #d6daff;
  background-color: #f0f1ff;
  border-radius: 8px;
}

#games .game-card_info th {
  padding-right: 24px;
  text-align: right;
}

#games .game-card_info th,
#games .game-card_info td {
  padding-top: 4px;
  vertical-align: baseline;
}

#games .game-card_info .small {
  display: block;
  font-size: var(--font-size-ss);
}

#games .game-card_description {
  grid-area: description;
}

#games .game-card_description p + p {
  margin-top: 1em;
}

#games .privacy {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 16px;
  font-size: var(--font-size-xs);
  background-color: var(--color-gray);
  color: var(--color-white);
}

#games .game-card.card_dungeon-trek {
  background-color: #3477eb;
}

#games .game-card.card_dungeon-trek .game-card_logo img {
  width: 240px;
}

/* ===== コンタクト ============================== */

#contact {
  background-color: var(--color-contact-bg);
}

#contact .mail {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

#contact .mail svg {
  height: 24px;
  background-color: var(--color-white);
}

#contact .mail:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== フッター ============================== */

#footer {
  padding-top: 24px;
  background-color: var(--color-hero-bg);
  font-size: var(--font-size-ss);
  color: var(--color-header-text);
}

#footer nav {
  width: var(--width-wrapper-wide);
  margin-inline: auto;
  margin-bottom: 8px;
  text-align: right;
}

#footer a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

#footer .copy {
  padding-bottom: env(safe-area-inset-bottom);
  text-align: center;
}

/* ---------------------------------------------------------
　レスポンシブ
--------------------------------------------------------- */

@media (max-width: 767px) {
  :root {
    --font-size-xs: calc(12 / 16 * 1rem);
    --font-size-ss: calc(13 / 16 * 1rem);
    --font-size-s: calc(14 / 16 * 1rem);
    --font-size-m: 1rem;
    --font-size-l: 1rem;
    --font-size-ll: calc(18 / 16 * 1rem);
    --font-size-xl: calc(20 / 16 * 1rem);
  }

  section {
    padding-block: 48px;
  }

  section .section-inner {
    gap: 48px;
  }

  section .sec-title svg {
    height: 42px;
  }

  h3 svg {
    display: block;
    height: 30px;
    margin-inline: auto;
    margin-bottom: 24px;
  }

  #hero .hero-container img {
    width: 270px;
  }

  #header .global-nav {
    width: auto;
  }

  #header .global-nav li:has(a) {
    display: none;
  }

  #about .portrait img {
    width: 128px;
  }

  #news .content {
    padding: 8px;
  }

  #news .news-list {
    padding: 24px;
  }

  #games .game-card {
    width: min(100%, 360px);
  }

  #games .game-card-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "logo"
      "info"
      "description";
    justify-items: center;
  }

  #footer {
    padding-top: 16px;
  }
}
