/* =============================================================
   Playwithspect — Service landing pages (SEO)
   Shares the box's design language: yellow / cyan / ink, fat ink
   borders, rounded cards, Mabook display font. Static content
   pages — no JS required. First user: /services/遊戲製作服務/
   ============================================================= */

@font-face {
  font-family: "Mabook";
  src: url("../../asset/Mabook.ttf") format("truetype");
  font-display: swap;
}

:root {
  --pws-yellow: #ffcc00;
  --pws-cyan: #00c1ff;
  --pws-pink: #ff6fb5;
  --ink: #1a1a1a;
  --paper: #ffcc00;
  --muted: #6b6b6b;
  --card-radius: 22px;
  --border: 4px solid var(--ink);
  --shadow-hard: 8px 8px 0 var(--ink);
  --shadow-soft: 5px 5px 0 var(--ink);
  --display: "Mabook", "PingFang TC", "Microsoft JhengHei", "Inter", system-ui, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100%;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(26, 26, 26, 0.06) 1px, transparent 0);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.75;
}

a { color: inherit; }

/* ---------- Top bar ---------- */
.svc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 40px);
}

.svc-back {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.svc-back:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

/* ---------- Layout ---------- */
.svc-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 32px) 72px;
}

/* ---------- Hero ---------- */
.svc-hero { padding: 24px 4px 34px; }

.svc-hero__eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 20px;
}

.svc-hero__title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 rgba(26, 26, 26, 0.12);
}

.svc-hero__lead {
  max-width: 640px;
  margin-top: 16px;
  font-size: 1.06rem;
}

.svc-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: var(--border);
  border-radius: 14px;
  padding: 12px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.btn--primary { background: var(--pws-cyan); }

/* ---------- Section cards ---------- */
.svc-section {
  background: #fff;
  border: var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 30px;
}

.svc-section h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
  margin-bottom: 14px;
}

.svc-section h2::after {
  content: "";
  display: block;
  width: 58px;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--pws-cyan);
  border: 2px solid var(--ink);
}

.svc-section p + p { margin-top: 12px; }

.svc-section ul {
  margin: 14px 0 0 1.2em;
}

.svc-section li + li { margin-top: 6px; }

.svc-links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Process steps ---------- */
.svc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.svc-step {
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fffbe8;
  padding: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}

.svc-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--pws-cyan);
  border: 3px solid var(--ink);
  font-weight: 900;
  margin-bottom: 10px;
}

.svc-step h3 { font-size: 1.08rem; margin-bottom: 6px; }

.svc-step p { font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.svc-faq { margin-top: 6px; }

.svc-faq__item + .svc-faq__item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 3px dashed rgba(26, 26, 26, 0.25);
}

.svc-faq__item h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.svc-faq__item h3::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 8px;
  background: var(--pws-yellow);
  border: 3px solid var(--ink);
  font-weight: 900;
  font-size: 0.85rem;
}

/* ---------- CTA section ---------- */
.svc-cta {
  background: var(--pws-cyan);
  text-align: center;
}

.svc-cta h2::after { margin-left: auto; margin-right: auto; background: #fff; }

.svc-cta p { max-width: 560px; margin-left: auto; margin-right: auto; }

.svc-cta .svc-links { justify-content: center; }

.svc-cta__sign {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* ---------- Footer (mirrors the box's footer look) ---------- */
.svc-footer {
  margin-top: 44px;
  background: #141414;
  color: #eaeaea;
  border-top: 4px solid var(--pws-yellow);
}

.svc-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 28px 14px;
}

.svc-footer__brand strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--pws-yellow);
}

.svc-footer__brand p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #b5b5b5;
  max-width: 260px;
}

.svc-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.svc-footer__col h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pws-cyan);
  margin-bottom: 10px;
}

.svc-footer__col ul { list-style: none; }

.svc-footer__col li { margin: 6px 0; }

.svc-footer__col a {
  color: #dcdcdc;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.svc-footer__col a:hover { color: var(--pws-yellow); }

.svc-footer__bar {
  padding: 12px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: #9a9a9a;
  text-align: center;
}

@media (max-width: 600px) {
  .svc-footer__inner { flex-direction: column; gap: 20px; padding: 24px 20px 10px; }
  .svc-footer__cols { gap: 26px; }
}

/* =============================================================
   v2 components — per-service accents, icons, stats, case cards,
   hub doors grid, language switcher, scroll reveal.
   Pages set their accent inline:  <main style="--accent:#00ff66">
   ============================================================= */

/* Accent plumbing: let the per-page accent recolor existing parts */
.svc-section h2::after { background: var(--accent, var(--pws-cyan)); }
.svc-step__num { background: var(--accent, var(--pws-cyan)); }
.btn--primary { background: var(--accent, var(--pws-cyan)); }
.svc-cta { background: var(--accent, var(--pws-cyan)); }

/* ---------- Hero icon ---------- */
.svc-hero__icon {
  width: 88px;
  height: 88px;
  display: block;
  margin-bottom: 14px;
  filter: drop-shadow(5px 5px 0 rgba(26, 26, 26, 0.85));
}

/* ---------- Language mini-switcher (injected by lang.js) ---------- */
.svc-lang {
  display: flex;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
}

.svc-lang a { padding: 8px 15px; text-decoration: none; }

.svc-lang a.is-active { background: var(--ink); color: #fff; }

/* ---------- Stat tiles ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat {
  background: #fff;
  border: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 16px;
}

.stat__num {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.1;
}

.stat__label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.stat::after {
  content: "";
  display: block;
  width: 44px;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--accent, var(--pws-cyan));
  border: 2px solid var(--ink);
}

/* ---------- Case cards (real projects, real screenshots) ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.case-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fffbe8;
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.case-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }

.case-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 3px solid var(--ink);
}

.case-card__body { padding: 13px 16px 15px; }

.case-card__title { display: block; font-weight: 800; }

.case-card__sub { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Playable embed ---------- */
.svc-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 4px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
  background: #000;
  margin-top: 16px;
}

.svc-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Hub: hero with mascot ---------- */
.hub-hero { display: flex; align-items: flex-end; gap: 26px; }

.hub-hero__text { flex: 1; }

.hub-mascot-wrap { position: relative; flex: none; padding-top: 34px; }

.hub-mascot { width: clamp(84px, 14vw, 128px); display: block; filter: drop-shadow(5px 5px 0 rgba(26, 26, 26, 0.85)); }

.hub-bubble {
  position: absolute;
  top: -8px;
  right: -14px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
}

.hub-bubble::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -12px;
  border: 6px solid transparent;
  border-top: 8px solid var(--ink);
}

@media (max-width: 560px) {
  .hub-hero { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
}

/* ---------- Hub: doors grid ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.door {
  display: flex;
  flex-direction: column;
  background: var(--accent, var(--pws-cyan));
  border: var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}

.door:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }

.door__main {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.door__face {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 22px;
}

.door__icon { width: 76px; height: 76px; display: block; filter: drop-shadow(4px 4px 0 rgba(26, 26, 26, 0.85)); }

.door__title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 3px 3px 0 rgba(26, 26, 26, 0.9);
  margin-top: 6px;
}

.door__zh { font-weight: 900; color: var(--ink); font-size: 1.05rem; }

.door__info {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #141414;
  border-top: 3px solid var(--ink);
  padding: 16px 20px 18px;
}

.door__desc { font-size: 0.93rem; line-height: 1.6; color: #cfcfcf; }

.door__thumbs { display: flex; gap: 8px; }

.door__thumbs img {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #333;
}

.door__cta { font-weight: 900; color: var(--accent, var(--pws-cyan)); }

/* ---------- Hub: mini doors ("And more…") ---------- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.mini-door {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  background: #fffbe8;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mini-door:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }

.mini-door::before {
  content: "";
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent, var(--pws-cyan));
  border: 2px solid var(--ink);
  margin-bottom: 8px;
}

.mini-door__title { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }

.mini-door__zh { font-weight: 800; color: var(--muted); font-size: 0.92rem; }

.mini-door__desc { font-size: 0.93rem; line-height: 1.6; margin-top: 4px; }

.mini-door__cta { margin-top: 10px; font-weight: 900; }

/* ---------- Scroll reveal (fx.js adds .fx / .fx-in) ---------- */
.fx { opacity: 0; transform: translateY(26px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }

.fx-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fx { opacity: 1; transform: none; transition: none; }
}
