/*
Theme Name: がんまデザイン
Theme URI: https://gamma-design.com
Author: がんまデザイン 服部 敬裕
Author URI: https://gamma-design.com
Description: がんまデザインのオリジナルテーマ。トップページ・実績（カスタム投稿）・固定ページに対応。
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamma-design
*/

/* ===== 色と基本設定 ===== */
:root {
  --accent: #40B9B7;   /* ロゴのティール（飾り用） */
  --deep: #237A78;     /* 濃いティール（ボタン・リンク・小見出し） */
  --tint: #E8F6F6;     /* 淡いティール（背景） */
  --ink: #3A3F44;      /* 本文 */
  --muted: #5F6B6E;    /* 補足文字 */
  --line: #E3ECEC;     /* 罫線 */
  --navy: #22303A;     /* 濃色セクション */
  --navy-deep: #1A252D;/* フッター */
  --font: 'LINE Seed JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--deep); }
a:hover { color: #1A5E5C; }
h1, h2, h3 { line-height: 1.4; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 12px; top: 12px; z-index: 1000; width: auto; height: auto; clip: auto;
  background: #fff; padding: 10px 16px; border-radius: 8px;
}

/* ===== 共通パーツ ===== */
.label {
  margin: 0; font-family: var(--mono); font-weight: 400; font-size: 13px;
  letter-spacing: .06em; color: var(--deep);
}
.sec-head { display: flex; flex-direction: column; gap: 8px; }
.sec-head h2 { margin: 0; font-weight: 800; font-size: 34px; }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border-radius: 12px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid var(--deep);
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-outline { background: #fff; color: var(--deep); }
.more-link { font-weight: 700; font-size: 15px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.bg-tint { background: var(--tint); }

/* ===== ヘッダー ===== */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.site-logo img { height: 42px; width: auto; display: block; }
.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 400; font-size: 15px; }
.main-nav a:hover { color: var(--deep); }
.main-nav .menu-contact a, .main-nav li:last-child a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px;
  border-radius: 12px; background: var(--deep); color: #fff; font-weight: 700;
}
.nav-toggle { display: none; }

/* ===== ヒーロー ===== */
.hero {
  background-color: #fff;
  background-image: radial-gradient(#D5E6E6 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.hero .wrap { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; padding-top: 88px; padding-bottom: 104px; }
.hero-text { flex: 1 1 460px; display: flex; flex-direction: column; gap: 22px; }
.hero-text h1 { margin: 0; font-weight: 800; font-size: 52px; line-height: 1.4; text-wrap: balance; }
.hero-text h1 em { font-style: normal; color: var(--deep); }
.hero-text p.lead { margin: 0; font-size: 17px; line-height: 1.9; max-width: 34em; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
.hero-visual { flex: 1 1 380px; display: flex; justify-content: center; }
.mock { position: relative; width: 100%; max-width: 500px; min-height: 400px; }
.mock-browser {
  position: absolute; left: 0; top: 0; width: 86%; border-radius: 18px; background: #fff;
  box-shadow: 0 18px 48px rgba(34,48,58,.14); overflow: hidden;
}
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 12px 16px; background: #F1F5F5; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mock-bar i:nth-child(1) { background: #E8A598; }
.mock-bar i:nth-child(2) { background: #E9CF8C; }
.mock-bar i:nth-child(3) { background: #9FD3C2; }
.mock-url {
  margin-left: 12px; flex: 1; height: 20px; border-radius: 6px; background: #fff;
  font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; align-items: center; padding: 0 10px;
}
.mock-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.mock-body .l { height: 10px; border-radius: 5px; background: var(--line); }
.mock-body .h { width: 60%; height: 16px; border-radius: 8px; background: var(--accent); }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding-top: 8px; }
.mock-grid span { height: 64px; border-radius: 10px; background: var(--tint); }
.mock-app {
  position: absolute; right: 0; bottom: 0; width: 62%; border-radius: 18px; background: var(--navy); color: #fff;
  padding: 18px 20px; box-shadow: 0 18px 48px rgba(34,48,58,.22); display: flex; flex-direction: column; gap: 10px;
}
.mock-app .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: #C9D3D6; }
.mock-app .top b { color: #9FE3E1; font-weight: 400; }
.mock-app .val { font-family: var(--mono); font-size: 26px; font-weight: 700; }
.mock-app .val small { font-size: 13px; color: #C9D3D6; }

/* 写真：うっすらティールを重ねて色味をそろえる */
.photo { position: relative; overflow: hidden; background: var(--tint); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.photo::after { content: ""; position: absolute; inset: 0; background: rgba(64, 185, 183, .14); pointer-events: none; }
/* 写真があるときは、写真を右上に大きく、計測カードは左下の角に小さく重ねる */
.mock.has-photo { max-width: 520px; min-height: 440px; }
.mock-photo { position: absolute; right: 0; top: 0; width: 88%; height: 84%; border-radius: 28px; }
.mock.has-photo .mock-browser { display: none; }
.mock.has-photo .mock-app { left: 0; right: auto; width: 44%; padding: 16px 18px; }
.mock.has-photo .mock-app svg { height: 64px; }
.band-photo { height: 340px; border-radius: 28px; }

/* ===== 対応技術 ===== */
.stack .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.chips li {
  padding: 8px 16px; border-radius: 10px; background: #fff; border: 1px solid #D5E6E6;
  font-family: var(--mono); font-size: 14px; line-height: 1.5;
}

/* ===== サービス ===== */
.services .wrap { display: flex; flex-direction: column; gap: 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
}
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 14px; }
.card-photo { aspect-ratio: 16 / 9; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--tint); color: var(--deep);
  display: flex; align-items: center; justify-content: center;
}
.card-top .label { color: var(--muted); }
.card h3 { margin: 0; font-weight: 800; font-size: 20px; }
.card p { margin: 0; font-size: 15px; line-height: 1.85; }

/* ===== 流れ ===== */
.flow .wrap { display: flex; flex-direction: column; gap: 40px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 28px; flex-wrap: wrap; }
.steps li { flex: 1 1 220px; display: flex; flex-direction: column; gap: 12px; }
.step-no { display: flex; align-items: center; gap: 12px; }
.step-no span {
  width: 44px; height: 44px; border-radius: 12px; background: var(--deep); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.step-no i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, #9CCFCD 0 6px, transparent 6px 12px); }
.steps h3 { margin: 0; font-weight: 800; font-size: 18px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.8; }

/* ===== 実績 ===== */
.works .wrap { display: flex; flex-direction: column; gap: 40px; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; }
.work-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.work-card:hover { color: var(--ink); }
.work-card:hover .work-thumb img { transform: scale(1.03); }
.work-thumb { aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #EEF2F2; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.work-thumb.empty { border: 2px dashed #C9D6D6; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); }
.work-card h3 { margin: 0; font-weight: 800; font-size: 18px; }
.work-empty { padding: 40px; border: 2px dashed #C9D6D6; border-radius: 16px; text-align: center; color: var(--muted); }

/* ===== プロフィール ===== */
.profile .box {
  border: 1px solid var(--line); border-radius: 24px; padding: 40px;
  display: flex; gap: 40px; align-items: center; flex-wrap: wrap;
}
.profile-photo { flex: 0 0 auto; width: 180px; height: 180px; border-radius: 24px; overflow: hidden; background: var(--tint); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo.empty { display: flex; align-items: center; justify-content: center; }
.profile-photo.empty img { width: 70%; height: auto; }
.profile-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.profile-text h2 { margin: 0; font-weight: 800; font-size: 28px; }
.profile-text h2 small { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .08em; margin-left: 14px; color: var(--muted); }
.profile-text p { margin: 0; }

/* ===== お問い合わせ ===== */
.contact-cta { background: var(--navy); color: #fff; }
.contact-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-top: 88px; padding-bottom: 88px; }
.contact-cta .label { color: #9FE3E1; }
.contact-cta h2 { margin: 0; font-weight: 800; font-size: 34px; line-height: 1.4; }
.contact-cta p { margin: 0; color: #DCE5E7; }
.cta-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.cta-act { flex: 0 1 380px; display: flex; flex-direction: column; gap: 14px; }
.cta-act .btn { min-height: 58px; background: var(--accent); border-color: var(--accent); color: var(--navy); font-weight: 800; font-size: 17px; }
.cta-act .info { font-family: var(--mono); font-size: 14px; line-height: 1.9; }
.cta-act .info a { color: #DCE5E7; }

/* ===== フッター ===== */
.site-footer { background: var(--navy-deep); color: #fff; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 36px; padding-bottom: 36px; }
.site-footer img { height: 48px; width: auto; display: block; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-nav a { color: #fff; text-decoration: none; }
.privacy-link { margin: 0; width: 100%; font-size: 13px; }
.privacy-link a { color: #C9D3D6; }
.copyright { margin: 0; width: 100%; font-family: var(--mono); font-size: 12px; color: #C9D3D6; }

/* ===== 下層ページ ===== */
.page-head { background: var(--tint); }
.page-head .wrap { padding-top: 64px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 8px; }
.page-head h1 { margin: 0; font-weight: 800; font-size: 36px; }
.content { max-width: 820px; margin: 0 auto; padding: 64px 24px 96px; }
.content h2 { font-size: 26px; font-weight: 800; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--tint); }
.content h3 { font-size: 20px; font-weight: 800; margin: 1.8em 0 .5em; }
.content img { border-radius: 12px; }
.content table { width: 100%; border-collapse: collapse; }
.content th, .content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.content th { background: var(--tint); width: 30%; }
.work-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.work-meta li { padding: 4px 14px; border-radius: 999px; background: var(--tint); font-weight: 700; font-size: 13px; color: var(--deep); }
.work-hero { margin: 0 0 32px; border-radius: 16px; overflow: hidden; }
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.cat-filter a { display: inline-flex; min-height: 40px; align-items: center; padding: 0 16px; border-radius: 10px; border: 1px solid #D5E6E6; text-decoration: none; font-size: 14px; color: var(--ink); }
.cat-filter a.is-current { background: var(--deep); border-color: var(--deep); color: #fff; }
.pagination { margin-top: 40px; display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--deep); color: #fff; border-color: var(--deep); }

/* Contact Form 7 */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-acceptance label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.wpcf7 .wpcf7-acceptance input { width: 20px; height: 20px; accent-color: var(--deep); }
.wpcf7 input[type="submit"]:disabled { opacity: .45; cursor: not-allowed; }
.wpcf7 label { display: block; font-weight: 700; margin-bottom: 6px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select {
  width: 100%; padding: 12px 14px; border: 1px solid #C9D6D6; border-radius: 10px; font: inherit; color: var(--ink);
}
.wpcf7 input[type="submit"] {
  min-height: 52px; padding: 0 36px; border: none; border-radius: 12px; background: var(--deep); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer;
}

/* ===== スマホ ===== */
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
  }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 0; }
  .main-nav a { display: block; padding: 12px 4px; }
  .main-nav li:last-child a { justify-content: center; margin-top: 8px; }
  .hero .wrap { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
  .hero-text h1 { font-size: 30px; }
  .mock { min-height: 320px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .sec-head h2, .contact-cta h2 { font-size: 26px; }
  .profile .box { padding: 28px; }
  .band-photo { height: 200px; border-radius: 20px; }
  .mock.has-photo { min-height: 340px; }
  .mock.has-photo .mock-app { width: 56%; }
  .page-head h1 { font-size: 28px; }
}
