/* =====================================================================
   machinology - style.css
   制作会社系コーポレートサイト風デザイン
   余白広め / 色数少なめ / 英字大見出し / 控えめな動き
   ===================================================================== */

/* ---------- デザイントークン（色・影） ---------- */
:root {
  --color-bg: #faf9f5;        /* 全体の生成り背景 */
  --color-bg-cream: #f8f6f0;  /* セクション用の生成り */
  --color-bg-gray: #f3f2ee;   /* 薄いグレー背景 */
  --color-white: #ffffff;
  --color-dark: #2a2723;      /* 濃いめの落ち着いた背景（Contact） */
  --color-text: #222222;      /* メイン文字 */
  --color-sub: #666666;       /* サブ文字 */
  --color-accent: #b89b5e;    /* ゴールド系アクセント */
  --color-line: #e6e2d8;      /* 線 */

  --radius: 20px;
  --radius-sm: 14px;
  --shadow-soft: 0 14px 40px rgba(42, 39, 35, 0.06);

  --max-width: 1120px;
  --max-narrow: 760px;
}

/* ---------- ベース ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- レイアウト共通 ---------- */
.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

.container-narrow {
  max-width: var(--max-narrow);
}

.section {
  padding: 120px 0;
}

/* セクション英字＋日本語の見出しセット */
.section-head {
  margin-bottom: 56px;
}

.section-head-center {
  text-align: center;
}

.en-heading {
  margin: 0;
  font-family: "Jost", sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 72px);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--color-line);
}

.en-heading-light {
  color: rgba(255, 255, 255, 0.18);
}

.jp-heading {
  margin: 14px 0 0;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.jp-heading-light {
  color: var(--color-white);
}

.section-note {
  margin: 14px 0 0;
  color: var(--color-sub);
  font-size: 14px;
}

.lead-text {
  margin: 0 0 20px;
  color: var(--color-sub);
  max-width: 620px;
}

/* ---------- ボタン ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.button.primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.button.primary:hover {
  transform: translateY(-2px);
  background: #a98c50;
}

.button.ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-line);
}

.button.ghost:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- スクロール表示アニメーション（控えめ） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   Header（固定ヘッダー）
   =================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: "Jost", sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: "Jost", sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-sub);
}

.global-nav a {
  position: relative;
  transition: color 0.25s ease;
}

.global-nav a:hover {
  color: var(--color-accent);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===================================================================
   Hero（生成り背景・余白多め）
   =================================================================== */
.hero {
  padding: 220px 0 160px;
  /* pic.png をブロック全体の背景にする。左側に薄い生成りオーバーレイを重ねて文字を読みやすく */
  background:
    linear-gradient(90deg,
      rgba(248, 246, 240, 0.94) 0%,
      rgba(248, 246, 240, 0.78) 40%,
      rgba(248, 246, 240, 0.25) 75%,
      rgba(248, 246, 240, 0.10) 100%),
    url("../images/pic.png") center / cover no-repeat;
}

.hero-inner {
  display: block;
}

.hero-copy {
  max-width: 560px;
}

.hero-eyebrow {
  margin: 0 0 24px;
  font-family: "Jost", sans-serif;
  font-size: 14px;
  letter-spacing: 0.28em;
  color: var(--color-accent);
}

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.hero-lead {
  margin: 0 0 40px;
  max-width: 480px;
  color: var(--color-sub);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===================================================================
   About（白背景）
   =================================================================== */
.section-about {
  background: var(--color-white);
}

.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;  /* 画像列を広げて画像を大きく */
  gap: 56px;
  align-items: center;
}

.about-visual img {
  width: 100%;
  height: auto;          /* 画像本来の比率で表示（切れ・すき間なし） */
  border-radius: var(--radius);
  display: block;
}

/* ===================================================================
   Service（薄い生成り背景）
   =================================================================== */
.section-service {
  background: var(--color-bg-cream);
}

/* ---------- カード共通 ---------- */
.card-grid {
  display: grid;
  gap: 32px;
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(42, 39, 35, 0.1);
}

.card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-gray);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 28px 26px 32px;
}

.card-body h3 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
}

.card-body p {
  margin: 0;
  color: var(--color-sub);
  font-size: 15px;
}

/* ===================================================================
   Works（白背景）
   =================================================================== */
.section-works {
  background: var(--color-white);
}

/* サンプルが少ないうちは中央寄せ、増えたら最大3列まで自動で埋まる */
.section-works .card-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
}

/* カード全体をリンクにするため、a をカードいっぱいに広げる */
.work-card-link {
  display: block;
  height: 100%;
}

.work-card-cta {
  display: inline-block;
  margin-top: 18px;
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 500;
}

.work-card-cta::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.work-card:hover .work-card-cta::after {
  transform: translateX(4px);
}

/* ===================================================================
   Price（薄いグレー背景）
   =================================================================== */
.section-price {
  background: var(--color-bg-gray);
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(42, 39, 35, 0.1);
}

/* おすすめプランを控えめに強調 */
.price-card.featured {
  border-color: var(--color-accent);
  position: relative;
}

.price-card.featured::before {
  content: "RECOMMENDED";
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: "Jost", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.price-card h3 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
}

.price {
  margin: 0 0 24px;
  font-family: "Jost", sans-serif;
  font-size: 38px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
}

.price span {
  font-size: 16px;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--color-sub);
  margin-left: 4px;
}

.price-card ul {
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.price-card li {
  position: relative;
  padding: 8px 0 8px 22px;
  color: var(--color-sub);
  font-size: 15px;
}

.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.price-note {
  margin: 40px 0 0;
  text-align: center;
  color: var(--color-sub);
  font-size: 14px;
}

/* ===================================================================
   FAQ（生成り背景・アコーディオン）
   =================================================================== */
.section-faq {
  background: var(--color-bg-cream);
}

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

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  color: var(--color-text);
}

.faq-icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--color-accent);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 28px 26px;
  color: var(--color-sub);
  font-size: 15px;
}

/* ===================================================================
   Contact（濃いめの落ち着いた背景）
   =================================================================== */
.section-contact {
  background: var(--color-dark);
  text-align: center;
}

.contact-text {
  margin: 0 auto 40px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.7);
}

/* メール・LINEボタンの横並び（スマホでは縦並び） */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* LINE友だち追加ボタン（公式カラー） */
.button.line {
  background: #06c755;
  color: var(--color-white);
}

.button.line:hover {
  transform: translateY(-2px);
  background: #05b54d;
}

/* PC向けQRコード */
.contact-qr {
  margin-top: 40px;
}

.contact-qr img {
  display: inline-block;
  padding: 10px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
}

.contact-qr-text {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* ===================================================================
   Footer
   =================================================================== */
.site-footer {
  padding: 64px 0;
  background: var(--color-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-logo {
  margin: 0 0 10px;
  font-family: "Jost", sans-serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--color-white);
}

.footer-tagline {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ===================================================================
   レスポンシブ
   =================================================================== */

/* タブレット */
@media (max-width: 960px) {
  .section {
    padding: 96px 0;
  }

  .hero-inner,
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    order: -1;
  }

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

/* スマホ（余白を少し狭める・ハンバーガー表示） */
@media (max-width: 680px) {
  .container {
    width: min(var(--max-width), calc(100% - 32px));
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .header-inner {
    min-height: 64px;
  }

  .menu-button {
    display: block;
  }

  .global-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: rgba(250, 249, 245, 0.98);
    border-bottom: 1px solid var(--color-line);
  }

  .global-nav.is-open {
    display: flex;
  }

  .global-nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-line);
  }

  .global-nav a:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 132px 0 80px;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}
