/* =============================================
   Portfolio – Chiai Watanabe
   WordPressテーマ移行を見越した構成
   ============================================= */

/* ------------------------------------------
   1. CSS カスタムプロパティ（デザイントークン）
------------------------------------------ */
:root {
  --color-base:       #333333;
  --color-muted:      #666666;
  --color-bg-light:   #f8f8f8;
  --color-bg-gray:    #f1f1f1;
  --color-border:     #333333;
  --color-white:      #ffffff;
  --color-footer-bg: #e8e8e8;

  --font-sans:   'Noto Sans JP', sans-serif;
  --font-serif:  'Noto Serif JP', serif;

  --fw-regular: 400;
  --fw-medium:  500;

  --lh-base:    1.6;
  --lh-heading: 1.2;

  --max-width:  1440px;
  --content-width: 1240px;
  --side-pad:   20px;

  --radius-sm:  4px;
  --radius-md:  6px;

  --transition: 0.2s ease;
}

/* ------------------------------------------
   2. リセット・ベーススタイル
------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 15px;
  line-height: var(--lh-base);
  color: var(--color-base);
  background: var(--color-white);
  overflow-x: hidden;
}

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

/* 表示切り替え */
.pc_only { display: block; }
.sp_only { display: none; }
.sp_none { display: inline; }
@media (max-width: 767px) {
  .pc_only { display: none; }
  .sp_only { display: block; }
  .sp_none { display: none; }
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ------------------------------------------
   3. ユーティリティ
------------------------------------------ */
.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

.section {
  padding: 150px 0;
}

/* セクション見出し（h2）共通 */
.section-heading {
  text-align: center;
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: 32px;
  line-height: 1;
  color: var(--color-base);
  margin-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.heading-line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-base);
}

/* サブ見出し（h3）共通 */
.about-subheading {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 18px;
  line-height: 30px;
  color: var(--color-base);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.subheading-line {
  display: block;
  flex: 1;
  max-width: 150px;
  height: 0.5px;
  background: var(--color-base);
}

/* ボタン */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn:hover {
  opacity: 0.75;
}

.btn-dark {
  display: inline-block;
  width: fit-content;
  background: var(--color-base);
  color: var(--color-white);
  padding: 18px 32px;
  border: 0.5px solid var(--color-base);
}

.btn-outline {
  background: var(--color-white);
  color: var(--color-base);
  border: 0.5px solid var(--color-base);
  padding: 18px 48px;
  font-size: 20px;
}

/* ------------------------------------------
   4. ヘッダー
------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 0.5px solid rgba(51, 51, 51, 0.1);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--color-base);
}

.global-nav ul {
  display: flex;
  gap: 45px;
}

.global-nav a {
  font-size: 15px;
  color: var(--color-base);
  transition: opacity var(--transition);
}
.global-nav a:hover {
  opacity: 0.6;
}

/* ハンバーガー（SP用） */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-base);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 767px) {
  .global-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 60vw;
    height: 100vh;
    background: var(--color-white);
    z-index: 99;
    justify-content: center;
    align-items: center;
  }
  .global-nav.is-open {
    display: flex;
  }
  .global-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .hamburger {
    display: flex;
    position: relative;
    z-index: 100;
  }
}

/* ------------------------------------------
   5. KV（キービジュアル）
------------------------------------------ */
.kv {
  position: relative;
  height: 720px;
  margin-top: 60px;
  overflow: hidden;
}

.kv-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/kv.webp');
  background-size: cover;
  background-position: center;
}
@media (max-width: 767px) {
  .kv-bg {
    background-image: url('../img/kv_sp.webp');
  }
}

.kv-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.kv-heading {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: 32px;
  line-height: 57px;
  color: var(--color-base);
  margin-bottom: 24px;
}

.kv-text {
  font-size: 15px;
  line-height: 24px;
  color: var(--color-muted);
  margin-bottom: 48px;
}
@media (max-width: 767px) {
  .kv {
    height: auto;
    min-height: 750px;
    display: flex;
    align-items: flex-start;
  }
  .kv-content {
    height: auto;
    width: 100%;
    padding-top: 80px;
  }
  .kv-heading {
    font-size: 24px;
    line-height: 1.6;
  }
}

/* ------------------------------------------
   6. 制作実績（Works）
------------------------------------------ */
.works {
  padding: 150px 0;
}
.works .section-inner {
  max-width: 980px;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin-bottom: 150px;
}
@media (max-width: 767px) {
  .works-grid {
    margin-bottom: 0;
  }
}

.works-card {
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.works-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.works-card-link:hover {
  transform: scale(1.03);
}

.works-thumb {
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  height: 260px;
}

.works-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.works-info {
  padding: 20px;
}

.works-title {
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 26px;
  margin-bottom: 6px;
}

.works-role {
  font-size: 15px;
  line-height: 24px;
  margin-bottom: 10px;
}

.works-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.works-tags li {
  font-size: 12px;
  line-height: 26px;
  padding: 0 5px;
  border: 1px solid var(--color-border);
  color: var(--color-base);
}

.works-card--hidden {
  display: none;
}

.works-more {
  text-align: center;
  margin-bottom: 48px;
}
@media (max-width: 767px) {
  .works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}


/* ------------------------------------------
   7. できること（Skill / Service）
------------------------------------------ */
.skill {
  background: var(--color-bg-light);
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 0;
  max-width: 1020px;
  margin: 0 auto;
}

.skill-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}
@media (max-width: 768px) {
  .skill-item {
    align-items: center;
  }
}

.skill-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}
.skill-icon img,
.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name {
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 30px;
  color: var(--color-base);
}

.skill-desc {
  font-size: 14px;
  line-height: 24px;
  color: var(--color-base);
}
@media (max-width: 1024px) {
  .skill-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 0;
  }
}
@media (max-width: 767px) {
  .skill-list {
    grid-template-columns: 1fr;
    gap: 32px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ------------------------------------------
   8. 私について（About）
------------------------------------------ */
.about .section-inner {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
@media (max-width: 767px) {
  .about .section-inner {
    gap: 0;
  }
}

/* プロフィール */
.about-profile {
  display: flex;
  gap: 5%;
  align-items: flex-start;
}

.about-photo {
  flex: 0 0 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.about-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
@media (max-width: 767px) {
  .about-right {
    gap: 80px;
  }
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-bio p {
  font-size: 15px;
  line-height: 24px;
}

/* 強み */
.strengths-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.strengths-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 5px;
  gap: 8px;
}

.strengths-icon {
  width: 55px;
  height: 55px;
  margin-bottom: 12px;
}
@media (max-width: 767px) {
  .strengths-icon {
    margin-bottom: 0;
  }
}

.strengths-icon img,
.strengths-icon svg {
  width: 100%;
  height: 100%;
}

.strengths-title {
  font-size: 15px;
  font-weight: var(--fw-medium);
  line-height: 24px;
  color: var(--color-base);
}

.strengths-desc {
  font-size: 14px;
  line-height: 24px;
  color: var(--color-base);
}

/* 大切にしていること */
.about-value p {
  font-size: 15px;
  line-height: 24px;
}
@media (max-width: 1024px) {
  .strengths-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 0;
  }
}
@media (max-width: 767px) {
  .about-profile {
    flex-direction: column;
    gap: 32px;
  }
  .about-photo {
    flex: none;
    width: 200px;
    margin: 0 auto;
  }
  .strengths-list {
    grid-template-columns: repeat(1, 1fr);
    gap: 30px 0;
  }
}

/* ------------------------------------------
   9. ブログ（Blog）
------------------------------------------ */
.blog {
  background: var(--color-bg-light);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 45px;
}

.blog-card-link {
  display: block;
  transition: opacity var(--transition);
}
.blog-card-link:hover {
  opacity: 0.75;
}

.blog-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-gray);
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.08);
  aspect-ratio: 350 / 219;
}
.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-date {
  display: block;
  font-size: 15px;
  line-height: 24px;
  color: var(--color-muted);
  margin-top: 16px;
}

.blog-title {
  font-size: 16px;
  font-weight: var(--fw-medium);
  line-height: 26px;
  color: var(--color-base);
  margin-top: 4px;
}

.blog-cat span {
  display: inline-block;
  font-size: 14px;
  line-height: 26px;
  padding: 2px 16px;
  border: 0.5px solid var(--color-border);
  color: var(--color-base);
  margin-top: 10px;
}
@media (max-width: 767px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ------------------------------------------
   10. FAQ
------------------------------------------ */
.faq {
  background: var(--color-bg-light);
}
.faq .section-inner {
  max-width: 788px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  border: 0.5px solid var(--color-border);
}

.faq-item[open] > .faq-question {
  background: var(--color-bg-light);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 43px;
  font-size: 18px;
  line-height: 30px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--color-white);
  transition: background var(--transition);
}
.faq-question::-webkit-details-marker { display: none; }

/* アコーディオンアイコン（+ / -）*/
.faq-icon {
  position: relative;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--color-base);
  transition: transform var(--transition), opacity var(--transition);
}
.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}
.faq-icon::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}
details[open] .faq-icon::after {
  opacity: 0;
}

.faq-answer {
  padding: 18px 43px 20px;
  font-size: 18px;
  line-height: 30px;
  border-top: 0.5px solid var(--color-border);
}
.faq-answer p {
  padding-left: 2em;
  text-indent: -2em;
}
.faq-question > span:first-child {
  padding-left: 2em;
  text-indent: -2em;
}
@media (max-width: 767px) {
  .faq-question {
    font-size: 15px;
    padding: 16px 20px;
  }
  .faq-answer {
    font-size: 15px;
    padding: 14px 20px;
  }
}

/* ------------------------------------------
   11. フッターCTA
------------------------------------------ */
.footer-cta {
  position: relative;
  height: 345px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.footer-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/cta-bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.7;
}
@media (max-width: 767px) {
  .footer-cta {
    height: 400px;
  }
  .footer-cta::before {
    background-image: url('../img/cta-bg_sp.webp');
  }
}

.footer-cta-content {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-left: auto;
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10%;
}
@media (max-width: 767px) {
  .footer-cta-content {
    padding: 0 5%;
  }
}

.footer-cta-text-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-cta-heading {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: 32px;
  line-height: 1;
  color: var(--color-base);
}

.footer-cta-text {
  font-size: 15px;
  line-height: 24px;
  color: var(--color-muted);
}
@media (max-width: 767px) {
  .footer-cta-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-cta-content .btn-dark {
    margin: 0 auto;
  }
  .footer-cta-heading {
    font-size: 24px;
  }
}

/* ------------------------------------------
   12. サイトフッター
------------------------------------------ */
.site-footer {
  background: var(--color-footer-bg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 25px var(--side-pad);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 767px) {
  .footer-inner {
    align-items: center;
    gap: 40px;
    padding: 35px 20px;
  }
  .footer-nav ul {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--color-base);
  text-decoration: none;
}
@media (max-width: 767px) {
  .footer-logo {
    display: none;
  }
}

.footer-nav ul {
  display: flex;
  gap: 45px;
}
@media (max-width: 767px) {
  .footer-nav ul {
    gap: 25px;
  }
}
.footer-nav a {
  font-size: 15px;
  color: var(--color-base);
  transition: opacity var(--transition);
}
.footer-nav a:hover { opacity: 0.6; }

.footer-copy {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 12px;
  color: #000;
}
@media (max-width: 767px) {
  .footer-copy {
    margin-right: auto;
  }
}


/* ------------------------------------------
   12b. フェードインアニメーション（JS連携）
------------------------------------------ */
.js-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ヘッダースクロール時のシャドウ */
.site-header.is-scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ------------------------------------------
   13. side-pad レスポンシブ
------------------------------------------ */
@media (max-width: 1024px) {
  :root { --side-pad: 40px; }
}
@media (max-width: 767px) {
  :root { --side-pad: 20px; }
}

/* ------------------------------------------
   14. お問い合わせ・サンクスページ
------------------------------------------ */
.page-contact,
.page-thanks {
  padding-top: 60px;
}

.page-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px var(--side-pad) 120px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.page-heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: var(--fw-regular);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-muted);
}

/* CF7 フォームスタイル */
.contact-form-wrap .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cf7-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cf7-field label {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--color-base);
}

.cf7-field abbr {
  color: #c00;
  text-decoration: none;
  margin-left: 4px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--color-base);
  background: #fff;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-base);
}

.wpcf7-form textarea {
  height: 180px;
  resize: vertical;
}

.wpcf7-form input[type="submit"] {
  display: block;
  width: fit-content;
  margin: 8px auto 0;
  padding: 14px 48px;
  background: var(--color-base);
  color: #fff;
  font-size: 15px;
  font-family: var(--font-sans);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.wpcf7-form input[type="submit"]:hover {
  opacity: 0.7;
}

.wpcf7-not-valid-tip {
  font-size: 13px;
  color: #c00;
  margin-top: 4px;
}

.wpcf7-response-output {
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 8px;
}

/* サンクスページ */
.thanks-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
  line-height: 1.8;
  color: var(--color-muted);
}
.thanks-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-muted);
  max-width: 480px;
  background: var(--color-bg-light);
  border-left: 3px solid var(--color-border);
  padding: 16px 20px;
  text-align: left;
}
.thanks-note-title {
  font-weight: var(--fw-medium);
  color: var(--color-base);
  margin-bottom: 6px;
}
