@import url("./Font/noto-sans-tc/index.css");
@import url("./Font/noto-serif-tc/index.css");

@font-face {
  font-family: "FofCCSetoFont";
  src:
    local("setofont"),
    url("./setofont.woff2") format("woff2"),
    url("./setofont.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "FofCCHansFont";
  src:
    local("xingyelangmanyuzhouwenrou"),
    url("./xingyelangmanyuzhouwenrou.woff2") format("woff2"),
    url("./xingyelangmanyuzhouwenrou.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #f6f0e3;
  --bg-deep: #eadcc2;
  --paper: rgba(255, 250, 241, 0.84);
  --paper-strong: rgba(255, 248, 237, 0.94);
  --ink: #4e3219;
  --muted: #806350;
  --line: rgba(108, 76, 46, 0.16);
  --accent: #b86e34;
  --accent-strong: #8e4a1a;
  --forest: #3e7053;
  --forest-soft: rgba(62, 112, 83, 0.14);
  --mist: rgba(89, 60, 34, 0.08);
  --glow: rgba(255, 205, 128, 0.5);
  --shadow-soft: 0 22px 44px rgba(94, 68, 38, 0.12);
  --shadow-strong: 0 30px 70px rgba(87, 58, 28, 0.16);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --fofcc-hant-body-font: "FofCCSetoFont", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  --fofcc-hans-body-font: "FofCCHansFont", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --fofcc-serif-font: "Noto Serif TC Variable", "Noto Serif TC", "Songti TC", serif;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.platform-home {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fofcc-hant-body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(171, 212, 189, 0.38), transparent 0 24rem),
    radial-gradient(circle at 84% 12%, rgba(248, 206, 145, 0.44), transparent 0 26rem),
    radial-gradient(circle at 50% 78%, rgba(255, 236, 202, 0.52), transparent 0 28rem),
    linear-gradient(180deg, #fcf8f1 0%, var(--bg) 46%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

html[lang="zh-Hans"] body.platform-home {
  font-family: var(--fofcc-hans-body-font);
}

body.platform-home::before,
body.platform-home::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  filter: blur(12px);
}

body.platform-home::before {
  top: -8rem;
  right: -5rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 219, 165, 0.7) 0%, rgba(255, 219, 165, 0) 72%);
}

body.platform-home::after {
  left: -9rem;
  bottom: -10rem;
  width: 26rem;
  height: 26rem;
  border-radius: 40%;
  background: radial-gradient(circle, rgba(133, 187, 160, 0.5) 0%, rgba(133, 187, 160, 0) 74%);
}

body.platform-home a {
  color: inherit;
  text-decoration: none;
}

body.platform-home button {
  font: inherit;
}

body.platform-home img {
  display: block;
  max-width: 100%;
}

.home-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-emblem {
  width: 48px;
  height: 48px;
  padding: 5px;
  border-radius: 15px;
  border: 1px solid rgba(108, 76, 46, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 249, 240, 0.96), rgba(245, 229, 202, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.site-nav a,
.site-nav button,
.home-settings-trigger,
.lang-btn,
.entry-link,
.button-primary,
.button-secondary {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.site-nav a,
.site-nav-btn,
.home-settings-trigger {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav-btn:hover,
.site-nav-btn:focus-visible,
.home-settings-trigger:hover,
.home-settings-trigger:focus-visible,
.home-settings-trigger[aria-expanded="true"] {
  background: rgba(184, 110, 52, 0.12);
  color: var(--accent-strong);
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(107, 79, 51, 0.08);
}

.lang-btn {
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-btn.is-active {
  background: linear-gradient(135deg, rgba(184, 110, 52, 0.2), rgba(255, 240, 214, 0.9));
  color: var(--accent-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.landing-main {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

body.platform-home.has-home-modal-open {
  overflow: hidden;
}

.home-utility-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-utility-modal[hidden] {
  display: none !important;
}

.home-utility-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(63, 39, 18, 0.24);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.home-utility-card {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(255, 245, 230, 0.92));
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.home-utility-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 12px;
}

.home-utility-head h2 {
  margin: 0;
  font-family: var(--fofcc-serif-font);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
}

.home-utility-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(108, 76, 46, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.home-utility-close:hover,
.home-utility-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(184, 110, 52, 0.22);
  background: rgba(255, 244, 226, 0.96);
  color: var(--accent-strong);
}

.home-utility-body {
  padding: 0 24px 24px;
}

.home-utility-text {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 247, 236, 0.82);
  padding: 20px 22px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
}

.home-settings-card {
  width: min(700px, calc(100vw - 36px));
}

.home-settings-head {
  align-items: flex-start;
}

.home-settings-language {
  flex: 0 0 auto;
  margin-left: auto;
}

.home-settings-body {
  display: grid;
  gap: 12px;
}

.font-select-control {
  display: grid;
  gap: 7px;
  width: 100%;
}

.font-select-control[hidden] {
  display: none !important;
}

.font-select-label,
.page-link-label {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.font-select-input {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(108, 76, 46, 0.18);
  border-radius: 16px;
  background-color: rgba(255, 251, 244, 0.9);
  color: var(--ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

select.font-select-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.25 4.5L6 8.25L9.75 4.5' stroke='%23735B44' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

.font-select-input:focus {
  border-color: rgba(184, 110, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(184, 110, 52, 0.12);
}

.page-link-control {
  display: grid;
  gap: 8px;
}

.page-link-list {
  display: grid;
  gap: 8px;
}

.home-page-link-btn {
  min-height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(107, 79, 51, 0.08);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.home-page-link-btn:hover,
.home-page-link-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(184, 110, 52, 0.14);
  color: var(--accent-strong);
}

.hero-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.hero-copy,
.matrix-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.88), rgba(255, 246, 233, 0.74));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.hero-copy {
  position: relative;
  padding: 24px 28px;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -5rem;
  width: 12rem;
  height: 12rem;
  border-radius: 40%;
  background: radial-gradient(circle, rgba(95, 151, 117, 0.26) 0%, rgba(95, 151, 117, 0) 72%);
}

.hero-copy-compact {
  display: grid;
  gap: 10px;
  align-items: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-intro h2 {
  margin: 0;
  font-family: var(--fofcc-serif-font);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  font-size: clamp(34px, 4vw, 54px);
  max-width: none;
}

html[lang="zh-Hans"] .hero-copy h1 {
  max-width: none;
}

.hero-text,
.section-copy,
.entry-card p,
.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hero-text {
  margin-top: 0;
  max-width: none;
  font-size: 15px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.button-primary,
.button-secondary,
.entry-link {
  min-height: 42px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.button-primary {
  background: linear-gradient(135deg, #b76e34, #8e4a1a);
  color: #fff8ef;
  box-shadow: 0 18px 34px rgba(133, 73, 25, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(133, 73, 25, 0.22);
}

.button-secondary,
.entry-link {
  border: 1px solid rgba(108, 76, 46, 0.16);
  background: rgba(255, 251, 244, 0.82);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.entry-link:hover,
.entry-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(138, 75, 28, 0.28);
  color: var(--accent-strong);
  background: rgba(255, 244, 228, 0.9);
}

.signal-chip,
.status-pill,
.atlas-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.signal-chip {
  background: rgba(184, 110, 52, 0.12);
  color: var(--accent-strong);
}

.matrix-section {
  padding: 18px;
}

.matrix-section-minimal .matrix-grid {
  margin-top: 0;
}

.matrix-grid {
  display: grid;
  gap: 22px;
}

.game-category-row {
  display: grid;
  gap: 12px;
}

.game-category-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

.game-category-title {
  margin: 0;
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--fofcc-serif-font);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.game-category-divider {
  display: block;
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, rgba(108, 76, 46, 0.32), rgba(108, 76, 46, 0.06));
}

.game-category-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.game-card {
  position: relative;
  border: 1px solid rgba(108, 76, 46, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(247, 238, 223, 0.82));
  box-shadow: 0 14px 26px rgba(97, 71, 39, 0.08);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.game-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.game-card-linkable {
  cursor: pointer;
}

.game-card-linkable:hover,
.game-card-linkable:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(138, 75, 28, 0.22);
  box-shadow: 0 20px 34px rgba(97, 71, 39, 0.12);
}

.game-card-linkable:active {
  transform: translateY(1px) scale(0.986);
  border-color: rgba(138, 75, 28, 0.28);
  box-shadow: 0 10px 18px rgba(97, 71, 39, 0.12);
  background:
    linear-gradient(180deg, rgba(251, 243, 229, 0.98), rgba(240, 226, 202, 0.9));
}

.game-card-linkable:focus-visible {
  outline: 2px solid rgba(138, 75, 28, 0.26);
  outline-offset: 3px;
}

.game-card[hidden] {
  display: none !important;
}

.game-card.is-live {
  border-color: rgba(62, 112, 83, 0.24);
  box-shadow: 0 20px 34px rgba(62, 112, 83, 0.12);
}

.game-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.status-pill {
  background: rgba(62, 112, 83, 0.12);
  color: #2f6044;
}

.status-planning {
  background: rgba(184, 110, 52, 0.12);
  color: var(--accent-strong);
}

.status-lab {
  background: rgba(98, 93, 156, 0.12);
  color: #4a4483;
}

.game-index,
.roadmap-index {
  color: rgba(78, 50, 25, 0.32);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.game-presence {
  margin-top: auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.reveal {
  opacity: 1;
  transform: none;
}

.platform-home.motion-on .reveal {
  opacity: 0.01;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.platform-home.motion-on .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lang-btn:focus-visible,
.site-nav a:focus-visible,
.site-nav-btn:focus-visible,
.home-settings-trigger:focus-visible,
.home-page-link-btn:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.entry-link:focus-visible {
  outline: 2px solid rgba(138, 75, 28, 0.26);
  outline-offset: 2px;
}

@media (max-width: 1220px) {
  .game-category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
    border-radius: 30px;
  }

  .site-nav {
    justify-content: start;
  }
}

@media (max-width: 760px) {
  .home-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
  }

  .site-header,
  .hero-copy,
  .matrix-section {
    padding: 22px 18px;
    border-radius: 28px;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-subtitle {
    font-size: 13px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(30px, 9vw, 44px);
  }

  .matrix-grid {
    gap: 18px;
  }

  .game-category-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions {
    justify-content: stretch;
  }

  .button-primary,
  .button-secondary,
  .entry-link {
    width: 100%;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a,
  .site-nav-btn {
    flex: 1 1 auto;
  }

  .home-utility-modal {
    padding: 16px;
  }

  .home-utility-head {
    padding: 18px 18px 10px;
  }

  .home-utility-body {
    padding: 0 18px 18px;
  }

  .home-settings-head {
    flex-wrap: wrap;
  }

  .home-settings-language {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .game-category-cards {
    grid-template-columns: 1fr;
  }
}
