/*
 * ส่วนคอนเทนต์เสริมของหน้า Home และ Service
 * ใช้สีเดียวกับธีมสตูดิโอ: แดง ชมพู ครีม และเหลืองพังก์
 * โหลดท้ายสุด จึงทับค่าจากไฟล์ก่อนหน้าได้
 */

:root {
  --show-card: #171717;
  --show-line: #303030;
  --show-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- แก้ข้อความใน "How we work" ให้อ่านง่าย ---------- */
.process {
  gap: 28px;
}
.process article {
  position: relative;
  padding: 28px 26px 32px;
  background: linear-gradient(180deg, #181818, #131313);
  border: 1px solid var(--show-line);
  border-top: 3px solid var(--red);
  border-radius: 6px;
  transition:
    transform 0.4s var(--show-ease),
    border-color 0.3s;
}
.process article:hover {
  transform: translateY(-6px);
  border-top-color: var(--pink);
}
.process h3 span,
.process p span {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.process h3 {
  font-size: 24px;
  color: var(--cream);
}
.process p {
  font-size: 15px;
  line-height: 1.75;
  color: #b9b5b5;
}

/* ---------- แถบข้อความเลื่อน ---------- */
.marquee-band {
  overflow: hidden;
  background: linear-gradient(90deg, #ec008c, #ff2631 50%, #ec008c);
  color: #1b0612;
  border-block: 3px solid #210819;
  transform: rotate(-1.2deg) scale(1.03);
  margin: 40px 0;
  position: relative;
  z-index: 2;
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 14px 0;
  align-items: center;
  animation: marquee 32s linear infinite;
}
.marquee-track > span {
  font-family: "CheemsRed Display", Anuphan, sans-serif;
  font-size: clamp(20px, 2.4vw, 32px);
  white-space: nowrap;
}
.marquee-track .studio-mark {
  width: 26px;
  height: 26px;
  animation: spin 9s linear infinite;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- ส่วนเนื้อหาร่วม ---------- */
.show-section {
  position: relative;
  padding: 110px 6%;
  overflow: hidden;
}
.show-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 100% 0, #ff263122, transparent 70%),
    radial-gradient(ellipse 40% 40% at 0 100%, #ec008c1c, transparent 70%);
  pointer-events: none;
}
.show-section > * {
  position: relative;
}
.show-head {
  max-width: 820px;
  margin-bottom: 56px;
}
.show-head .eyebrow {
  margin-bottom: 22px;
}
.show-head h2 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.12;
  color: var(--cream);
}
.show-head h2 em {
  color: var(--red);
  text-shadow: 2px 3px #680335;
}
.show-lead {
  margin-top: 26px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.8;
  color: #b9b5b5;
}

/* ---------- การ์ด ---------- */
.show-grid {
  display: grid;
  gap: 26px;
}
.show-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.show-card {
  position: relative;
  overflow: hidden;
  padding: 36px 30px 34px;
  background: var(--show-card);
  border: 1px solid var(--show-line);
  border-radius: 8px;
  box-shadow: 0 6px 0 #0a0a0a;
  transition:
    transform 0.4s var(--show-ease),
    border-color 0.3s,
    box-shadow 0.3s;
}
.show-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.5s var(--show-ease);
}
.show-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, #ff263133, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.show-card:hover {
  transform: translateY(-8px) rotate(-0.4deg);
  border-color: #ff263188;
  box-shadow: 0 14px 0 #680335;
}
.show-card:hover::before {
  transform: scaleX(1);
}
.show-card:hover::after {
  opacity: 1;
}
.show-card.tint-b::before {
  background: linear-gradient(90deg, var(--pink), var(--punk));
}
.show-card.tint-c::before {
  background: linear-gradient(90deg, var(--punk), #83fd80);
}
.show-num {
  display: block;
  margin-bottom: 26px;
  font: normal 64px/1 "CheemsRed Display", Anuphan, sans-serif;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red);
  transition: color 0.3s;
}
.show-card:hover .show-num {
  color: var(--red);
  -webkit-text-stroke-color: var(--cream);
}
.show-card h3 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.3;
  color: var(--cream);
}
.show-card p {
  font-size: 15px;
  line-height: 1.75;
  color: #b9b5b5;
}

/* ---------- สองโลก ---------- */
.worlds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.world-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 40px 36px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--show-line);
  transition:
    transform 0.45s var(--show-ease),
    box-shadow 0.4s;
}
.world-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(#ffffff10 1px, transparent 1px),
    linear-gradient(90deg, #ffffff10 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(160deg, transparent 20%, #000);
}
.world-panel > * {
  position: relative;
}
.world-panel:hover {
  transform: translateY(-8px);
}
.roblox-panel {
  background:
    radial-gradient(circle at 85% 15%, #ff2631aa, transparent 55%),
    linear-gradient(160deg, #2a0a12, #120508);
}
.roblox-panel:hover {
  box-shadow: 0 16px 0 #680335;
}
.corehex-panel {
  background:
    radial-gradient(circle at 85% 15%, #1d8cf0aa, transparent 55%),
    linear-gradient(160deg, #0a1a2e, #060d17);
}
.corehex-panel:hover {
  box-shadow: 0 16px 0 #0b3d73;
}
.panel-tag {
  align-self: flex-start;
  padding: 7px 14px;
  font: 11px/1 monospace;
  letter-spacing: 0.12em;
  border: 1px solid #ffffff55;
  border-radius: 99px;
  color: #fff;
}
.world-panel h3 {
  margin: auto 0 16px;
  padding-top: 70px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  color: #fff;
}
.world-panel p {
  max-width: 460px;
  font-size: 15px;
  line-height: 1.75;
  color: #d4d0d0;
}
.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-family: "CheemsRed Display", Anuphan, sans-serif;
  font-size: 18px;
  color: #fff;
}
.panel-link span,
.panel-link b {
  font: inherit;
}
.panel-link b {
  transition: transform 0.3s var(--show-ease);
}
.world-panel:hover .panel-link b {
  transform: translateX(8px);
}
.corehex-panel h3,
.corehex-panel .panel-link {
  font-family: Anuphan, Arial, sans-serif;
  font-weight: 700;
}

/* ---------- สิ่งที่คุณจะได้รับ ---------- */
.deliver-section {
  background: #e9e8e3;
  color: #151515;
}
.deliver-section::before {
  background: radial-gradient(ellipse 45% 60% at 100% 100%, #ff263126, transparent 70%);
}
.deliver-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.deliver-section .show-head {
  margin: 0;
}
.deliver-section .eyebrow {
  color: #555;
}
.deliver-section .show-head h2 {
  color: #151515;
}
.deliver-section .show-head h2 em {
  text-shadow: none;
}
.deliver-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deliver-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  background: #fff;
  border: 2px solid #151515;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #151515;
  transition:
    transform 0.3s var(--show-ease),
    box-shadow 0.3s var(--show-ease),
    opacity 0.7s;
}
.deliver-list li:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--red);
}
.deliver-list i {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-style: normal;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
}

/* ---------- FAQ ---------- */
.faq-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 70px;
  align-items: start;
}
.faq-section .show-head {
  margin: 0;
  position: sticky;
  top: 120px;
}
.faq-list {
  display: grid;
  gap: 14px;
}
.faq-item {
  background: var(--show-card);
  border: 1px solid var(--show-line);
  border-radius: 10px;
  transition:
    border-color 0.3s,
    background 0.3s,
    opacity 0.7s,
    transform 0.7s;
}
.faq-item[open] {
  border-color: #ff263188;
  background: linear-gradient(180deg, #1f1114, #171717);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-q,
.faq-q span {
  font-family: "CheemsRed Display", Anuphan, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: var(--cream);
}
.faq-item summary b {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: 50%;
  transition: transform 0.35s var(--show-ease);
}
.faq-item summary b::before,
.faq-item summary b::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 2px;
  background: #210819;
  transform: translate(-50%, -50%);
}
.faq-item summary b::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq-item[open] summary b {
  transform: rotate(135deg);
  background: var(--punk);
}
.faq-item p {
  padding: 0 26px 26px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: #b9b5b5;
}

/* ---------- เข้าทีละใบ ---------- */
.js-motion .show-grid .reveal:nth-child(3n + 2),
.js-motion .faq-list .reveal:nth-child(even),
.js-motion .deliver-list .reveal:nth-child(even) {
  transition-delay: 0.12s;
}
.js-motion .show-grid .reveal:nth-child(3n),
.js-motion .deliver-list .reveal:nth-child(3) {
  transition-delay: 0.24s;
}

/* ---------- มือถือ ---------- */
@media (max-width: 960px) {
  .show-grid.three,
  .worlds-grid,
  .deliver-wrap,
  .faq-wrap {
    grid-template-columns: 1fr;
  }
  .faq-wrap,
  .deliver-wrap {
    gap: 40px;
  }
  .faq-section .show-head {
    position: static;
  }
  .process {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .show-section {
    padding: 80px 6%;
  }
  .show-head {
    margin-bottom: 38px;
  }
  .world-panel {
    min-height: 320px;
    padding: 30px 24px;
  }
  .faq-q,
  .faq-q span {
    font-size: 17px;
  }
  .faq-item summary {
    padding: 18px 18px;
  }
  .faq-item p {
    padding: 0 18px 20px;
  }
  .marquee-band {
    margin: 24px 0;
  }
}

/* ---------- ลดการเคลื่อนไหว ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .marquee-track .studio-mark {
    animation: none;
  }
  .show-card,
  .world-panel,
  .process article,
  .deliver-list li {
    transition: none;
  }
}

/* กันแถบข้อความที่เอียงทำให้เลื่อนแนวนอน (clip ไม่ทำให้ sticky เสีย) */
.home-page main {
  overflow-x: clip;
}

/* =====================================================
   ไพ่ทาโรต์: ด้านหลังเป็นลายวาด + โลโก้ พลิกแล้วเห็นเหตุผล
   ===================================================== */
.why-section {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0, #ec008c26, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 100%, #ff263122, transparent 70%),
    #0d0d0d;
}
.tarot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 30px;
}
.tarot {
  --tilt: 0deg;
  position: relative;
  display: block;
  width: 100%;
  height: 600px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 22px;
  perspective: 1500px;
  cursor: pointer;
  rotate: var(--tilt);
  translate: 0 var(--lift, 0px);
  transition:
    rotate 0.5s var(--show-ease),
    translate 0.5s var(--show-ease),
    opacity 0.7s;
}
.tarot:nth-child(1) {
  --tilt: -3deg;
  --lift: 16px;
}
.tarot:nth-child(3) {
  --tilt: 3deg;
  --lift: 16px;
}
.tarot:hover,
.tarot:focus-visible {
  --tilt: 0deg;
  --lift: -12px;
}
.tarot.is-flipped {
  --tilt: 0deg;
  --lift: 0px;
}
.tarot-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.95s var(--show-ease);
  border-radius: 22px;
}
.tarot.is-flipped .tarot-inner {
  transform: rotateY(180deg);
}
.tarot-back,
.tarot-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 24px 34px -10px #000c;
}

/* ---- ด้านหลัง ---- */
.tone-red {
  --c1: #ff2631;
  --c2: #7b0a24;
  --accent: #f6ff00;
}
.tone-pink {
  --c1: #ec008c;
  --c2: #5d0a45;
  --accent: #ffebcb;
}
.tone-punk {
  --c1: #5a2cc4;
  --c2: #1d0b4a;
  --accent: #f6ff00;
}
.tarot-back {
  padding: 14px;
  background:
    radial-gradient(circle at 50% 40%, #ffffff30, transparent 55%),
    linear-gradient(160deg, var(--c1), var(--c2));
  border: 2px solid #ffebcb;
}
.tarot-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/card-pattern.svg") center / 120px 120px;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}
/* Light spills beyond the edge, while a softer reflection stays on the paper. */
.tarot::before,
.tarot-back::after,
.tarot-face::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.tarot::before {
  inset: -8px;
  background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 35%), var(--c1), transparent 80%);
  box-shadow: 0 0 22px var(--c1);
  filter: blur(18px);
}
.tarot-back::after,
.tarot-face::after {
  inset: 0;
  background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 35%),
    #fff9eab8, #fff4e22e 18%, transparent 48%);
}
@media (hover: hover) and (pointer: fine) {
  .tarot:hover::before { opacity: .84; }
  .tarot:hover :is(.tarot-back, .tarot-face)::after { opacity: .76; }
}
.tarot:focus-visible::before { opacity: .7; }
.back-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 22px 16px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  outline: 1px solid #ffebcb88;
  outline-offset: 5px;
  background: #1b061233;
}
.back-frame .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--accent);
}
.corner.tl {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 14px;
}
.corner.tr {
  top: -2px;
  right: -2px;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 14px;
}
.corner.bl {
  bottom: -2px;
  left: -2px;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 14px;
}
.corner.br {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 14px;
}
.back-roman {
  font: normal 34px/1 "CheemsRed Display", Anuphan, sans-serif;
  color: var(--accent);
  text-shadow: 2px 3px #00000066;
}
.back-roman.flip {
  transform: rotate(180deg);
}
.back-badge {
  display: grid;
  place-items: center;
  width: 78%;
  aspect-ratio: 1;
  padding: 14px;
  background: radial-gradient(circle, #210819 55%, #3a0f2c);
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px #ffebcb33,
    0 0 40px #00000088 inset;
}
.back-badge img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 0 #00000088);
}
.back-name,
.back-name span {
  font: normal 22px/1.2 "CheemsRed Display", Anuphan, sans-serif;
  color: #ffebcb;
  text-align: center;
  letter-spacing: 0.04em;
}
.back-hint,
.back-hint span {
  font: 10px/1 monospace;
  letter-spacing: 0.18em;
  color: var(--accent);
  animation: hint-pulse 2.4s ease-in-out infinite;
}
.back-hint {
  text-align: center;
}
@keyframes hint-pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---- ด้านหน้า (หลังพลิก) ---- */
.tarot-face {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 26px 26px;
  color: #210819;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--c1) 30%, transparent), transparent 55%),
    #ffebcb;
  border: 2px solid var(--c1);
  box-shadow:
    inset 0 0 0 6px #ffebcb,
    inset 0 0 0 8px var(--c1),
    0 24px 34px -10px #000c;
}
.face-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.face-num {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  font: normal 22px/1 "CheemsRed Display", Anuphan, sans-serif;
  color: #fff;
  background: var(--c1);
  border-radius: 50%;
}
.face-kicker,
.face-kicker span {
  font: 11px/1.3 monospace;
  letter-spacing: 0.14em;
  color: var(--c2);
}
.face-title,
.face-title span {
  display: block;
  font: normal 26px/1.25 "CheemsRed Display", Anuphan, sans-serif;
  color: #210819;
}
.face-text,
.face-text span {
  display: block;
  font: 400 14px/1.7 Anuphan, Arial, sans-serif;
  color: #3b2530;
}
.face-points {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 2px dashed color-mix(in srgb, var(--c1) 60%, transparent);
}
.face-point {
  position: relative;
  display: block;
  padding-left: 24px;
  font: 600 13.5px/1.45 Anuphan, Arial, sans-serif;
  color: #210819;
}
.face-point span {
  font: inherit;
  color: inherit;
}
.face-point::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c1);
}

.tarot-actions {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.flip-all {
  padding: 13px 26px;
  font-size: 17px;
  color: #ffebcb;
  background: transparent;
  border: 2px solid #ffebcb66;
  border-radius: 99px;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.flip-all:hover {
  color: #210819;
  background: var(--punk);
  border-color: var(--punk);
}

@media (max-width: 960px) {
  .tarot-row {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 34px;
  }
  .tarot,
  .tarot:nth-child(1),
  .tarot:nth-child(3) {
    --tilt: 0deg;
    --lift: 0px;
    height: 620px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tarot-inner {
    transition-duration: 0.01s;
  }
  .back-hint,
  .back-hint span {
    animation: none;
  }
}

/* ข้อความหลังพลิกไพ่ใช้ Anuphan เพื่อให้อ่านง่าย (ทับกฎฟอนต์ปุ่มใน studio.css) */
html body .tarot .face-text,
html body .tarot .face-text span,
html body .tarot .face-point,
html body .tarot .face-point span,
html body .tarot .face-kicker span {
  font-family: Anuphan, Arial, sans-serif !important;
  letter-spacing: normal;
}
html body .tarot .face-text,
html body .tarot .face-text span {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
}
html body .tarot .face-point,
html body .tarot .face-point span {
  font-size: 14px;
  font-weight: 600;
}
html body .tarot .face-kicker,
html body .tarot .face-kicker span {
  font-size: 13px;
  font-family: ui-monospace, Menlo, monospace !important;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.tarot {
  height: 500px;
}
@media (max-width: 960px) {
  .tarot,
  .tarot:nth-child(1),
  .tarot:nth-child(3) {
    height: 520px;
  }
}
