/* Joy Genesis — bright youthful game-studio UI */
:root {
  --bg: #f4f7ff;
  --bg-mid: #eef2ff;
  --bg-warm: #fdf4ff;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.92);
  --border: rgba(99, 102, 241, 0.12);
  --border-strong: rgba(99, 102, 241, 0.22);
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #64748b;
  --accent: #6366f1;
  --accent-bright: #818cf8;
  --pop-pink: #ec4899;
  --pop-cyan: #06b6d4;
  --pop-violet: #8b5cf6;
  --glow-pink: rgba(236, 72, 153, 0.35);
  --glow-cyan: rgba(6, 182, 212, 0.3);
  --glow-violet: rgba(139, 92, 246, 0.28);
  --shadow: 0 20px 50px rgba(99, 102, 241, 0.12);
  --shadow-hover: 0 24px 60px rgba(236, 72, 153, 0.15);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Syne", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --space: clamp(1rem, 2.5vw, 1.85rem);
  --max: 1140px;
  --header-h: 5.45rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-mid) 45%, var(--bg-warm) 100%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%236366f1' opacity='0.13'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pop-pink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.06);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.site-header .brand {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 1;
  max-width: min(90vw, 28rem);
}

.site-header .nav-main,
.site-header .header-tools {
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: min-content;
  /* 中文：副標題定寬，主標與之同寬；英文見 .lang-is-en */
  align-items: stretch;
  text-align: center;
  padding: 0.22rem 0;
  background: none;
  border: 0;
  box-shadow: none;
}

/* 英文副標題更長，避免「Joy」「Genesis」被拉得過開 */
html.lang-is-en .brand {
  align-items: center;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.1vw, 1.48rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  padding-block: 0.14em 0.08em;
  transform-origin: center center;
  display: block;
  width: 100%;
  white-space: nowrap;
  text-align: justify;
  text-align-last: justify;
  transform: scaleY(1.08);
  background: linear-gradient(110deg, #4f46e5 0%, #db2777 50%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85)) drop-shadow(0 2px 5px rgba(79, 70, 229, 0.22));
}

/* 單行兩端對齊：拉滿與 .brand-sub 相同的塊寬（與中文公司等寬） */
.brand-mark::after {
  content: "";
  display: inline-block;
  width: 100%;
  height: 0;
  vertical-align: top;
}

html.lang-is-en .brand-mark {
  display: inline-block;
  width: auto;
  white-space: normal;
  text-align: center;
  text-align-last: auto;
  transform: scale(0.94, 1.1);
}

html.lang-is-en .brand-mark::after {
  display: none;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: clamp(0.68rem, 1.35vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-transform: none;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: center;
}

html.lang-is-en .brand-sub {
  white-space: normal;
  max-width: min(22rem, 92vw);
}

.site-header .brand {
  align-items: stretch;
  gap: 0.08rem;
  width: fit-content;
}

.site-header .brand-sub {
  display: block;
  width: 100%;
  font-size: clamp(0.62rem, 1.08vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.16;
  white-space: nowrap;
  text-align: center;
}

.site-header .brand-mark {
  width: auto;
  text-align: left;
  text-align-last: auto;
  font-size: clamp(1.14rem, 2vw, 1.4rem);
  letter-spacing: -0.04em;
  transform: scale(0.82, 1.08);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (min-width: 901px) {
  .site-header .nav-main {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .header-tools {
    margin-left: auto;
  }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 6px rgba(99, 102, 241, 0.06);
}

.lang-switch__btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.55rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-muted);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.lang-switch__btn:hover {
  color: var(--ink);
}

.lang-switch__btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7 55%, #ec4899);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.12rem;
}

.nav-main a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-main a:hover,
.nav-main a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.1));
  color: var(--ink);
}

.nav-dd {
  position: relative;
}

.nav-dd > button {
  font: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.48rem 0.72rem;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s, color 0.2s;
}

.nav-dd > button:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.1));
  color: var(--ink);
}

.nav-dd > button::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-soft);
}

.nav-dd-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 12rem;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-dd:focus-within .nav-dd-panel,
.nav-dd:hover .nav-dd-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dd-panel a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 10px;
}

.nav-dd-panel a:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.08));
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-main {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem var(--space) 1.25rem;
    display: none;
    gap: 0.15rem;
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-main {
    display: flex;
  }

  .nav-dd-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0.25rem 0 0.5rem 0.75rem;
    background: transparent;
  }

  .site-header .brand {
    max-width: min(88vw, 24rem);
  }

  .site-header .brand-mark {
    font-size: clamp(0.96rem, 3.35vw, 1.16rem);
    transform: scale(0.84, 1.04);
  }

  html.lang-is-en .site-header .brand-mark {
    transform: scale(0.9, 1.08);
  }

  html.lang-is-en .site-header .brand {
    max-width: min(58vw, 16rem);
  }
}

main {
  flex: 1;
}

.home-hero-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 85% 70% at 15% 20%, var(--glow-cyan), transparent 52%),
    radial-gradient(ellipse 70% 60% at 90% 15%, var(--glow-pink), transparent 48%),
    radial-gradient(ellipse 55% 50% at 50% 100%, var(--glow-violet), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 55%, var(--bg-mid) 100%);
  border-bottom: 1px solid var(--border);
}

.home-hero-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(244, 247, 255, 0.9) 100%);
  pointer-events: none;
}

.home-hero-wrap > .section {
  position: relative;
  z-index: 1;
  padding-top: clamp(1.5rem, 3.6vw, 3rem);
  padding-bottom: clamp(1.4rem, 3.3vw, 2.8rem);
}

.section--elevated {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(238, 242, 255, 0.9) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 4.5rem) var(--space);
}

.section-tight {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: min(70vh, 620px);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.48em;
  text-indent: 0.48em;
  margin: 0 0 1rem;
  white-space: nowrap;
  overflow-x: auto;
  background: linear-gradient(90deg, #0891b2, #6366f1, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 首頁主標語：與原「創造簡單的快樂」同款 display 字重 + 青–紫–粉漸變，長句收緊字距、可換行 */
.hero h1.hero-tagline--lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.55vw, 1.38rem);
  line-height: 1.55;
  margin: 0 0 1.05rem;
  letter-spacing: 0.14em;
  text-indent: 0;
  white-space: normal;
  max-width: 38em;
  overflow-wrap: anywhere;
  background: linear-gradient(90deg, #0891b2, #6366f1, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 520px) {
  .hero-tagline {
    letter-spacing: 0.26em;
    text-indent: 0.26em;
    white-space: normal;
  }

  .hero h1.hero-tagline--lead {
    letter-spacing: 0.08em;
    font-size: clamp(1rem, 4.2vw, 1.22rem);
  }
}

.hero h1:not(.hero-tagline--lead) {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-lead {
  font-size: 1.04rem;
  color: var(--ink-muted);
  max-width: 44ch;
  margin: 0 0 1.75rem;
}

.hero-lead span[lang="en"] {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.45rem;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 45%, #ec4899 100%);
  color: #ffffff !important;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 40px rgba(236, 72, 153, 0.35);
  filter: brightness(1.05);
  color: #ffffff !important;
}

.btn-ghost {
  background: var(--surface);
  border: 2px solid var(--border-strong);
  color: var(--ink) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.btn-ghost:hover {
  border-color: var(--accent-bright);
  background: #fff;
  color: var(--accent) !important;
  filter: none;
}

.hero-visual {
  position: relative;
  min-height: 340px;
  width: min(100%, 430px);
  margin-left: auto;
}

.hero-orbs {
  position: absolute;
  inset: 1rem 0 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 242, 255, 0.85));
  box-shadow: var(--shadow);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.orb-a {
  width: 180px;
  height: 180px;
  background: rgba(6, 182, 212, 0.55);
  top: 12%;
  left: 4%;
  opacity: 0.78;
}

.orb-b {
  width: 200px;
  height: 200px;
  background: rgba(236, 72, 153, 0.45);
  bottom: 6%;
  right: -2%;
  opacity: 0.78;
}

.orb-c {
  width: 140px;
  height: 140px;
  background: rgba(139, 92, 246, 0.4);
  top: 36%;
  right: 22%;
  opacity: 0.62;
}

.hero-card {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 1.1rem;
  transform: translateY(-50%);
  margin: 0;
  width: min(100%, 248px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 240, 255, 0.9));
  backdrop-filter: blur(10px);
  padding: 1rem 1.05rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card dt {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.28rem;
}

.hero-card dd {
  margin: 0 0 0.82rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.03rem;
  color: var(--ink);
}

.hero-card dd:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .hero-visual {
    width: min(100%, 460px);
    min-height: 300px;
    margin: 0 auto;
  }

  .hero-orbs {
    inset: 0;
  }

  .hero-card {
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    width: min(100%, 240px);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem 1.35rem;
  height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.08);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.55rem;
  color: var(--ink);
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-kicker {
  font-size: clamp(0.82rem, 1.15vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--pop-cyan), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.55rem;
}

.prose {
  max-width: 65ch;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.prose h1:first-child {
  margin-top: 0;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.prose strong {
  color: var(--ink);
}

.about-intro {
  display: block;
}

.about-intro__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.about-intro__body {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(240px, 0.78fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: stretch;
}

.about-intro #about-us {
  max-width: none;
}

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

.about-sidephoto {
  align-self: start;
  justify-self: end;
  width: fit-content;
  height: clamp(200px, 19.5vw, 225px);
  margin-top: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 980px) {
  .about-intro__body {
    grid-template-columns: 1fr;
  }

  .about-sidephoto {
    align-self: start;
    height: auto;
    margin-top: 0;
  }
}

/* 同頁多個 prose 區塊：階段分隔（關於頁公司簡介 / 發展歷程 / 願景等） */
.section .prose + .prose {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--border);
}

.section .prose + .prose > h2:first-child {
  margin-top: 0;
}

.about-gallery {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--border);
}

.about-gallery + .prose.prose--milestone {
  margin-top: clamp(3rem, 6.5vw, 4.6rem);
}

.about-gallery__head {
  max-width: 62ch;
  margin-bottom: 1.2rem;
}

.about-gallery__head h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.about-gallery__head p:last-child {
  margin: 0;
  color: var(--ink-muted);
}

.about-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "main side wide";
  gap: 1.1rem;
  align-items: stretch;
}

.about-shot {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 246, 255, 0.92));
  border: 1px solid rgba(186, 198, 245, 0.35);
  box-shadow: 0 16px 40px rgba(131, 147, 220, 0.12);
}

.about-shot.about-sidephoto {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.about-shot--focus {
  padding: 0;
  display: block;
  isolation: auto;
}

.about-shot--focus::before {
  display: none;
}

.about-shot--focus::after {
  display: none;
}

.about-shot--main {
  grid-area: main;
  aspect-ratio: 16 / 9;
}

.about-shot--side {
  grid-area: side;
  aspect-ratio: 16 / 9;
}

.about-shot--wide {
  grid-area: wide;
  aspect-ratio: 16 / 9;
}

.about-shot img {
  width: 100%;
  height: 100%;
  max-height: clamp(280px, 42vw, 520px);
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
  position: relative;
  z-index: 2;
  border-radius: calc(var(--radius) - 6px);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.14);
}

.about-shot--main img {
  transform: scale(1.18);
  transform-origin: left center;
}

.about-sidephoto img {
  max-height: none;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: calc(var(--radius) - 6px);
  box-shadow: none;
}

.about-shot:hover img {
  transform: scale(1.015);
  filter: saturate(1.04);
}

.about-shot--main:hover img {
  transform: scale(1.2);
}

@media (max-width: 860px) {
  .about-sidephoto {
    justify-self: start;
  }

  .about-sidephoto img {
    width: 100%;
    height: auto;
  }

  .about-gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "main main"
      "side wide";
  }

  .about-shot--main {
    aspect-ratio: 16 / 9;
  }

  .about-shot--side,
  .about-shot--wide {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 620px) {
  .about-sidephoto {
    min-height: 0;
  }

  .about-shot--focus {
    padding: 0;
  }

  .about-shot--focus::before {
    filter: blur(18px) saturate(1.02);
  }

  .about-gallery__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side"
      "wide";
  }

  .about-shot--main,
  .about-shot--side,
  .about-shot--wide {
    aspect-ratio: 16 / 9;
  }

  .about-shot img {
    max-height: 260px;
  }
}

/* 關於頁 · 里程碑：橫版時間軸（左 → 右為時間順序） */
.prose.prose--milestone {
  max-width: min(var(--max), 100%);
  width: 100%;
}

.milestone-rail {
  margin: 1.5rem 0 0;
  border-top: 3px solid rgba(99, 102, 241, 0.22);
  position: relative;
}

.milestone-rail__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  list-style: none;
  margin: -9px 0 0;
  padding: 0;
}

.milestone-step {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 1.1rem 0.65rem 0;
  position: relative;
}

/* PPT「發展歷程」：六色六邊形；寬屏 ≥1200px 橫軸自右→左；≤720px 縱軸 2025 上、2018 下 */
.milestone-step__hex {
  width: 42px;
  height: 36px;
  margin: 0 auto 0.55rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.1));
}

.milestone-step__hex-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.milestone-step__hex--y2018 {
  background: linear-gradient(165deg, #fef9c3, #eab308);
}

.milestone-step__hex--y2019 {
  background: linear-gradient(165deg, #d9f99d, #86efac);
}

.milestone-step__hex--y2020 {
  background: linear-gradient(165deg, #ddd6fe, #a78bfa);
}

.milestone-step__hex--y2021 {
  background: linear-gradient(165deg, #bbf7d0, #22c55e);
}

.milestone-step__hex--y2023 {
  background: linear-gradient(165deg, #fecaca, #ef4444);
}

.milestone-step__hex--y2025 {
  background: linear-gradient(165deg, #ffedd5, #fb923c);
}

.milestone-rail--ppt .milestone-rail__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem 0.4rem;
  margin: -9px 0 0;
}

.milestone-rail--ppt .milestone-step__era {
  text-transform: none;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.milestone-rail--ppt .milestone-step__desc {
  font-size: 0.86rem;
  line-height: 1.45;
}

.milestone-step__era {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.milestone-step__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted);
  text-align: center;
}

@media (min-width: 721px) and (max-width: 1199px) {
  .milestone-rail--ppt .milestone-rail__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 僅單行六列時整體鏡像，避免 3×2 平板柵格出現行間時間跳變 */
@media (min-width: 1200px) {
  .milestone-rail--ppt .milestone-rail__list {
    transform: scaleX(-1);
  }

  .milestone-rail--ppt .milestone-step {
    transform: scaleX(-1);
  }
}

@media (max-width: 720px) {
  .milestone-rail {
    border-top: none;
    border-left: 3px solid rgba(99, 102, 241, 0.22);
    padding-left: 1.15rem;
    margin-top: 1.25rem;
  }

  .milestone-rail__list {
    flex-direction: column;
    flex-wrap: wrap;
    margin: 0;
    gap: 1.35rem;
  }

  .milestone-step {
    text-align: left;
    padding: 0 0 0 0.2rem;
  }

  .milestone-step__desc {
    text-align: left;
  }

  .milestone-step__hex {
    position: absolute;
    left: calc(-1.15rem - 13px);
    top: 0.12rem;
    margin: 0;
    width: 36px;
    height: 31px;
  }

  .milestone-step__era {
    margin-left: 0;
  }

  .milestone-rail--ppt .milestone-rail__list {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.35rem;
  }
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.app-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.08);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.app-tile:hover {
  border-color: rgba(236, 72, 153, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.app-tile h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
}

.job-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.job-list li {
  border-bottom: 1px solid var(--border);
  padding: 1.15rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.job-list a {
  font-weight: 700;
  white-space: nowrap;
}

.job-list strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
}

.job-list span {
  color: var(--ink-muted);
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.callout {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.25rem 0;
}

.callout strong {
  color: var(--ink);
}

.callout p,
.callout__lead {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.65;
}

.callout p a,
.callout__lead a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.callout p a:hover,
.callout__lead a:hover {
  text-decoration: underline;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

dl.contact-block dt {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-muted);
  margin-top: 1.1rem;
}

dl.contact-block dt:first-child {
  margin-top: 0;
}

dl.contact-block dd {
  margin: 0.35rem 0 0;
  font-size: 1.02rem;
  color: var(--ink-muted);
}

dl.contact-block dd a {
  color: var(--accent);
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-mid) 100%);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem var(--space);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  align-items: start;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-inner .footer-legal {
    text-align: center;
  }
}

.footer-inner .brand {
  justify-self: center;
  align-self: start;
  align-items: stretch;
  gap: 0.08rem;
  width: fit-content;
}

.footer-inner .brand-sub {
  display: block;
  width: 100%;
  font-size: clamp(0.62rem, 1.08vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.16;
  white-space: nowrap;
  text-align: center;
}

.footer-inner .brand-mark {
  width: auto;
  text-align: left;
  text-align-last: auto;
  font-size: clamp(1.14rem, 2vw, 1.4rem);
  letter-spacing: -0.04em;
  transform: scale(0.82, 1.08);
}

.footer-legal {
  line-height: 1.6;
}

.footer-legal p {
  margin: 0 0 0.85rem;
}

.footer-legal a {
  color: var(--accent);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* —— 遊戲頁 games.html / 合作頁 partnership.html（共用 portfolio-main_* 排版）—— */
.portfolio-main__intro {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.portfolio-main__jump {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.portfolio-main__jump a {
  color: var(--accent);
}

.portfolio-main__jump a:hover {
  color: var(--pop-pink);
}

.portfolio-main__h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.portfolio-main__sub {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  max-width: 54ch;
}

.pf-bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .pf-bento {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }

  .pf-card--featured {
    grid-column: 1 / -1;
  }
}

/* games.html：多款在架 — 大屏三列網格、小屏統一上圖下文 */
.pf-bento--games {
  align-items: stretch;
}

.pf-bento--games .pf-card {
  height: 100%;
}

.pf-bento--games .pf-card--has-img .pf-card__media {
  aspect-ratio: 16 / 9;
  max-height: min(240px, 56vw);
}

.pf-bento--games .pf-card__img {
  min-height: 112px;
}

@media (max-width: 1023px) {
  .pf-bento--games .pf-card--featured {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured .pf-card__media {
    width: 100%;
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured .pf-card__body {
    padding: 1.15rem 1.25rem 1.35rem;
    justify-content: flex-start;
  }

  .pf-bento--games .pf-card--featured.pf-card--has-img .pf-card__media {
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured.pf-card--has-img .pf-card__img {
    min-height: 0;
    height: 100%;
  }
}

@media (min-width: 1024px) {
  .pf-bento.pf-bento--games {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .pf-bento--games .pf-card--featured {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured .pf-card__media {
    width: 100%;
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured .pf-card__body {
    padding: 1.15rem 1.25rem 1.35rem;
    justify-content: flex-start;
  }

  .pf-bento--games .pf-card--has-img .pf-card__media {
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .pf-bento--games .pf-card__img,
  .pf-bento--games .pf-card--featured.pf-card--has-img .pf-card__img {
    min-height: 0;
    height: 100%;
  }
}

.pf-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

@media (min-width: 640px) {
  .pf-card--featured {
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
  }

  .pf-card--featured .pf-card__media {
    width: min(38%, 240px);
    min-height: auto;
    flex-shrink: 0;
  }

  .pf-card--featured .pf-card__body {
    padding: 1.5rem 1.5rem 1.5rem 0;
    justify-content: center;
  }
}

.pf-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.pf-card__media {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  line-height: 1;
}

.pf-card--snake .pf-card__media {
  background: linear-gradient(145deg, #064e3b, #14b8a6 55%, #5eead4);
}

.pf-card--pixel .pf-card__media {
  background: linear-gradient(145deg, #4c1d95, #a78bfa 50%, #e9d5ff);
}

.pf-card--police .pf-card__media {
  background: linear-gradient(145deg, #1e3a8a, #3b82f6 45%, #93c5fd);
}

.pf-card--bamboo .pf-card__media {
  background: linear-gradient(145deg, #14532d, #4ade80 55%, #bbf7d0);
}

.pf-card--bombs .pf-card__media {
  background: linear-gradient(145deg, #9a3412, #fb923c 50%, #fed7aa);
}

/* 遊戲與合作：從 Word「遊戲下載鏈接.doc」OLE 內嵌 JPEG 導出的圖標 */
.pf-card--has-img .pf-card__media {
  display: block;
  padding: 0;
  font-size: 0;
  line-height: 0;
  min-height: 0;
  overflow: hidden;
  background: #e2e8f0;
}

.pf-card__img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  display: block;
}

@media (min-width: 640px) {
  .pf-card--featured.pf-card--has-img .pf-card__media {
    align-self: stretch;
    min-height: 200px;
  }

  .pf-card--featured.pf-card--has-img .pf-card__img {
    min-height: 200px;
    height: 100%;
  }

  .pf-bento--games .pf-card--featured.pf-card--has-img .pf-card__media {
    min-height: 0;
  }

  .pf-bento--games .pf-card--featured.pf-card--has-img .pf-card__img {
    min-height: 0;
  }
}

.pf-card__body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.pf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pf-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

.pf-tag--pink {
  background: rgba(236, 72, 153, 0.12);
  color: var(--pop-pink);
}

.pf-tag--muted {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-soft);
}

.pf-card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.pf-card--featured .pf-card__title {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
}

/* 遊戲頁作品名：用正文字體，避免 Syne 過寬難讀 */
.pf-bento--games .pf-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.02rem, 1.35vw, 1.14rem);
  letter-spacing: -0.02em;
  line-height: 1.32;
}

.pf-card__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.55;
  flex: 1;
}

.pf-card__cta {
  align-self: flex-start;
  margin-top: 0.35rem;
  font-size: 0.86rem;
  padding: 0.55rem 1rem;
}

.pf-pillars {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 0.5rem;
}

@media (min-width: 720px) {
  .pf-pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pf-pillar {
  padding: 1.35rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pf-pillar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.1);
}

.pf-pillar__icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.65rem;
}

.pf-pillar__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.pf-pillar__text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

html.lang-is-en .hero h1:not(.hero-tagline--lead),
html.lang-is-en .section-title,
html.lang-is-en .prose h1,
html.lang-is-en .prose h2,
html.lang-is-en .about-intro__title,
html.lang-is-en .about-gallery__head h2,
html.lang-is-en .card h3,
html.lang-is-en .app-tile h3,
html.lang-is-en .job-list strong,
html.lang-is-en .portfolio-main__h2,
html.lang-is-en .pf-card__title,
html.lang-is-en .pf-pillar__title {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.025em;
}
