/*
Theme Name: GIFTPIA Dots
Theme URI: https://giftpia-inc.co.jp/
Author: GIFTPIA Inc.
Description: GIFTPIA公式サイト用のドット絵・カイロソフト風オリジナルテーマ。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: giftpia-dots
*/

:root {
  --sky: #b8e4f5;
  --sky-deep: #8ecde8;
  --panel: #faf5eb;
  --panel-border: #8b6020;
  --title-bg: linear-gradient(180deg, #48a1ff 0%, #7ec8e8 50%, #2080c0 100%);
  --title-text: #fff;
  --btn-yellow: #f8d030;
  --btn-yellow-border: #c89820;
  --btn-hover: #ffe060;
  --text: #333;
  --text-muted: #666;
  --link: #2080c0;
  --caption-bg: #4f9fcb;
  --shadow: 0 4px 12px rgba(0, 60, 100, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Meiryo", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  color: var(--text);
  background: var(--sky);
  line-height: 1.7;
  font-size: 14px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a { color: var(--link); }

.gp-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 12px 40px;
}

/* ===== Header ===== */
.gp-top {
  background: var(--sky);
  margin-bottom: 8px;
  position: relative;
}

.gp-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.gp-banner-img {
  width: 100%;
  height: auto;
}

.gp-brand {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gp-brand-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.2));
}

.gp-brand-name {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: .12em;
  color: #fff;
  text-shadow:
    2px 2px 0 #2080c0,
    -1px -1px 0 #2080c0,
    1px -1px 0 #2080c0,
    -1px 1px 0 #2080c0,
    3px 3px 0 rgba(0,0,0,.15);
}

/* ===== Nav menu ===== */
.gp-menu {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 2px;
}

.gp-menu-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fff6a8 0%, #ffe24d 100%);
  border: 2px solid #e0b820;
  border-radius: 18px;
  text-decoration: none;
  color: #7a5a00;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .02em;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.75),
    0 4px 0 rgba(200, 150, 20, .16),
    0 6px 12px rgba(200, 150, 20, .12);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}

.gp-menu-btn:hover {
  background: linear-gradient(180deg, #fffbd0 0%, #ffeb70 100%);
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.04);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.85),
    0 6px 0 rgba(200, 150, 20, .16),
    0 10px 18px rgba(200, 150, 20, .14);
}

.gp-menu-btn:active {
  transform: translateY(1px) scale(.99);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 2px 0 rgba(200, 150, 20, .14),
    0 4px 8px rgba(200, 150, 20, .1);
}

.gp-menu-btn:focus-visible {
  outline: 3px solid rgba(255, 210, 60, .55);
  outline-offset: 2px;
}

.gp-menu-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 2px solid rgba(255,255,255,.98);
  box-shadow: 0 2px 0 rgba(200, 150, 20, .12);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}

.gp-icon-about::after { content: "🏠"; }
.gp-icon-service::after { content: "🎮"; }
.gp-icon-works::after { content: "🏆"; }
.gp-icon-gallery::after { content: "📷"; }
.gp-icon-team::after { content: "👥"; }
.gp-icon-contact::after { content: "✉️"; }

/* ===== Walking mascot lane (Kairosoft-style header critters) ===== */
.gp-mascot-lane {
  position: relative;
  height: 36px;
  overflow: hidden;
  margin-top: 6px;
}

.gp-walker {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 128px 32px; /* 4 frames x 32px */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation-timing-function: steps(4);
  animation-iteration-count: infinite;
  will-change: left, background-position;
}

.gp-walker-hero,
.gp-walker-mage,
.gp-walker-priest {
  animation-name: walk-step;
  animation-duration: .5s;
  transform: scaleX(-1);
}

.gp-walker-hero {
  background-image: url("assets/walker-hero.png");
  animation-delay: 0s;
}

.gp-walker-mage {
  background-image: url("assets/walker-mage.png");
  animation-delay: .15s;
}

.gp-walker-priest {
  background-image: url("assets/walker-priest.png");
  animation-delay: .3s;
}

.gp-walker-dog,
.gp-walker-dog-2 {
  width: 24px;
  height: 24px;
  background-size: 96px 24px; /* 4 frames x 24px */
  animation-name: walk-step-dog;
}

.gp-walker-dog {
  background-image: url("assets/walker-dog.png");
  animation-duration: .4s;
  animation-delay: .05s;
}

.gp-walker-dog-2 {
  background-image: url("assets/walker-dog-2.png");
  animation-duration: .42s;
  animation-delay: .2s;
}

@keyframes walk-move-right {
  0% { left: -36px; }
  100% { left: 100%; }
}

@keyframes walk-move-left {
  0% { right: -36px; transform: scaleX(-1); }
  100% { right: 100%; transform: scaleX(-1); }
}

@keyframes walk-step {
  from { background-position: 0 0; }
  to { background-position: -128px 0; }
}

@keyframes walk-step-dog {
  from { background-position: 0 0; }
  to { background-position: -96px 0; }
}

/* ===== Ticker ===== */
.gp-ticker {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.gp-ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 48px;
  animation: ticker 40s linear infinite;
}

.gp-ticker p {
  margin: 0;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Carousel ===== */
.gp-carousel-wrap {
  margin-left: 64px;
  margin-right: 64px;
  margin-bottom: 24px;
}

.gp-carousel {
  background: #fff;
  border: 3px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gp-carousel-track {
  position: relative;
  aspect-ratio: 5 / 3;
  background: #eee;
}

.gp-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}

.gp-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.gp-slide-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 40px;
  background: linear-gradient(rgba(0, 20, 40, .18), rgba(0, 32, 64, .94));
  color: #fff;
}

.gp-slide-sub {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.5;
  text-shadow:
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000,
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
}

.gp-slide-note {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #f5e7a8;
  text-shadow:
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000,
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
}

.gp-slide-caption {
  margin: 0;
  padding: 10px 16px;
  background: var(--caption-bg);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  text-align: center;
}

.gp-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--sky);
}

.gp-carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #999;
  background: #ddd;
  cursor: pointer;
  padding: 0;
}

.gp-carousel-dots button.is-active {
  background: #666;
  border-color: #444;
}

/* ===== Recommend block (like Kairosoft's おすすめゲーム) ===== */
.gp-reco {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 10px;
  box-shadow: var(--shadow);
}

.gp-reco-label {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 14px;
  color: #2080c0;
  letter-spacing: .08em;
}

.gp-reco-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gp-reco-list li {
  padding: 4px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 13px;
}

.gp-reco-list li:last-child { border-bottom: none; }

.gp-reco-list a {
  font-weight: 700;
  text-decoration: none;
}

.gp-reco-list a:hover { text-decoration: underline; }

.gp-reco {
  position: relative;
  padding-bottom: 44px;
}

.gp-mascot-link {
  text-decoration: none;
  cursor: pointer;
}

.gp-mascot-link-reco {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.gp-mascot-link-gallery,
.gp-mascot-link-contact {
  display: inline-block;
}

.gp-mascot-link-gallery {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
}

.gp-reco-char {
  width: 96px;
  display: block;
}

.gp-reco-cards {
  margin-bottom: 4px;
}

.gp-reco-card {
  background: #fff;
  border: 2px solid #c8a870;
  border-radius: var(--radius-sm);
  padding: 12px;
}

.gp-reco-card h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #2080c0;
}

.gp-reco-card p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.6;
}

.gp-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gp-keywords li {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* 企画・ゲームデザイン・体験設計・仕様 */
.gp-kw-plan {
  background: #dff7ea;
  border: 1px solid #7ecfa0;
  color: #1f7a4a;
}

/* UI・画面など見た目デザイン */
.gp-kw-ui {
  background: #e8e4ff;
  border: 1px solid #a89ae8;
  color: #4f3a98;
}

/* キャラクター・スタンプ */
.gp-kw-char {
  background: #ffe6f3;
  border: 1px solid #e89abc;
  color: #a03870;
}

/* グッズ・ノベルティ */
.gp-kw-goods {
  background: #fff0d8;
  border: 1px solid #e8b86a;
  color: #9a5a10;
}

/* ===== Sections ===== */
.gp-section {
  margin-bottom: 28px;
}

.gp-section-title {
  margin: 0 0 0;
  padding: 10px 16px;
  background: var(--title-bg);
  color: var(--title-text);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 2px solid var(--panel-border);
  border-bottom: none;
  text-shadow: 1px 1px 0 rgba(0,0,0,.2);
}

.gp-panel {
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.gp-panel-note {
  margin: 0 0 12px;
  font-size: 12px;
  text-align: right;
}

.gp-panel-note a {
  color: var(--link);
  font-weight: 700;
}

.gp-lead {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.gp-more {
  margin: 16px 0 0;
  text-align: center;
  font-weight: 700;
}

/* ===== Grid & Cards ===== */
.gp-grid {
  display: grid;
  gap: 12px;
}

.gp-grid-4 { grid-template-columns: repeat(4, 1fr); }
.gp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gp-grid-2 { grid-template-columns: repeat(2, 1fr); }

.gp-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 2px solid #c8a870;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}

.gp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.gp-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gp-card h3 {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f0e8d8 100%);
  border-top: 1px solid #ddd;
}

.gp-card-body {
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, #fff 0%, #f0e8d8 100%);
  border-top: 1px solid #ddd;
}

.gp-card-service .gp-card-body h3 {
  padding: 0;
  margin: 0 0 4px;
  background: none;
  border: none;
  text-align: center;
}

.gp-card-service .gp-card-body p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
}

.gp-card-gallery h3 {
  font-size: 12px;
  background: #f0e8d8;
}

.gp-card-gallery p {
  margin: 0;
  padding: 0 10px 10px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
  background: #fff8ee;
  min-height: calc(11px * 1.5 * 2 + 10px);
}

/* ===== News ===== */
.gp-news ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gp-news li {
  display: grid;
  grid-template-columns: 90px 70px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 13px;
}

.gp-news li:last-child { border-bottom: none; }

.gp-news time {
  font-weight: 700;
  color: var(--text-muted);
}

.gp-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--sky-deep);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-align: center;
}

.gp-news p { margin: 0; }

/* ===== Works ===== */
#works .gp-grid {
  align-items: stretch;
}

.gp-work-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 2px solid #c8a870;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gp-work-item img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  image-rendering: auto;
}

.gp-work-item figcaption {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  font-size: 12px;
  text-align: center;
  background: #f0e8d8;
  gap: 4px;
}

.gp-work-item figcaption strong {
  flex-shrink: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
  color: #2080c0;
  min-height: calc(13px * 1.5 * 2);
}

.gp-work-item figcaption span {
  flex-shrink: 0;
  min-height: calc(11px * 1.5 * 3);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
}

.gp-work-item figcaption em {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  color: var(--text-muted);
}

/* ===== Gallery ===== */
.gp-gallery-char {
  width: 44px;
  margin: 0;
}

.gp-reco-char,
.gp-gallery-char,
.gp-contact-mascot {
  transform-origin: center bottom;
  transition: filter .2s ease;
  will-change: transform, filter;
}

.gp-reco-char:hover,
.gp-gallery-char:hover,
.gp-contact-mascot:hover {
  animation: gp-mascot-hover .7s ease-in-out infinite;
  filter: brightness(1.06);
}

@keyframes gp-mascot-hover {
  0%, 100% {
    transform: scale(1, 1);
  }
  35% {
    transform: scale(1.06, 0.94);
  }
  65% {
    transform: scale(0.95, 1.05);
  }
}

/* ===== Team ===== */
.gp-team-lead {
  margin: 0 0 16px;
  padding: 12px;
  background: var(--sky);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.7;
}

.gp-team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gp-team-grid article {
  text-align: center;
  background: #fff;
  border: 2px solid #c8a870;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
}

.gp-team-grid img {
  width: 80px;
  margin: 0 auto 8px;
}

.gp-team-grid h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.gp-team-grid p {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.gp-office {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 14px;
  background: #fff;
  border: 2px solid #c8a870;
  border-radius: var(--radius-sm);
}

.gp-office img {
  border-radius: var(--radius-sm);
  border: 2px solid var(--panel-border);
}

.gp-office h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #c87830;
}

.gp-office p {
  margin: 0 0 6px;
  font-size: 12px;
}

.gp-concept {
  margin: 20px 0 0;
  padding: 14px;
  background: var(--sky);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.9;
}

/* ===== Contact ===== */
.gp-contact {
  text-align: center;
  padding: 24px 16px;
}

.gp-contact-mascot {
  width: 120px;
  margin: 0 auto 12px;
  image-rendering: auto;
}

.gp-contact h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #c87830;
}

.gp-contact p {
  margin: 0 0 16px;
  font-size: 14px;
}

.gp-btn-mail {
  display: inline-block;
  padding: 12px 28px;
  background: var(--btn-yellow);
  border: 2px solid var(--btn-yellow-border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 3px 6px rgba(0,0,0,.12);
  transition: background .15s, transform .1s;
}

.gp-btn-mail:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}

/* ===== Footer ===== */
.gp-footer {
  text-align: center;
  padding-top: 20px;
  font-size: 12px;
}

.gp-pagetop {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--link);
  font-weight: 700;
}

.gp-footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.gp-footer-nav a {
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}

.gp-footer-nav a:hover { text-decoration: underline; }

.gp-copy {
  margin: 0;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .gp-menu { grid-template-columns: repeat(3, 1fr); }
  .gp-menu-btn {
    flex-direction: column;
    gap: 5px;
    min-height: 72px;
    padding: 10px 6px 8px;
    font-size: 11px;
  }
  .gp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gp-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gp-team-grid { grid-template-columns: repeat(2, 1fr); }
  .gp-news li { grid-template-columns: 1fr; gap: 4px; }
  .gp-carousel-wrap {
    margin-left: 32px;
    margin-right: 32px;
  }
  .gp-slide-text { padding: 14px 32px; }
  .gp-slide-sub { font-size: 20px; }
  .gp-slide-note { font-size: 16px; }
  .gp-slide-caption { font-size: 18px; }
}

@media (max-width: 480px) {
  .gp-menu { grid-template-columns: repeat(2, 1fr); }
  .gp-menu-btn { min-height: 68px; }
  .gp-grid-4, .gp-grid-3, .gp-grid-2 { grid-template-columns: 1fr; }
  .gp-brand-name { font-size: 24px; }
  .gp-brand-icon { width: 36px; height: 36px; }
  .gp-reco-char { display: none; }
  .gp-carousel-wrap {
    margin-left: 16px;
    margin-right: 16px;
  }
  .gp-slide-text { padding: 12px 20px; }
  .gp-mascot-link-reco {
    right: 8px;
    bottom: 8px;
  }
  .gp-reco-char {
    width: 72px;
  }
}


/* ===== WordPress Theme Reset ===== */
html, body { margin: 0; padding: 0; }
body { overflow-x: hidden; }
.gp-page, .gp-page * {
  font-family: "Meiryo", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}
