/* ============================================================
   IIC Corporate Site — Design System
   Tone: Urban × Trustworthy  (Dark Charcoal × Off-White)
   ============================================================ */

:root {
  --bg:           #f7f6f3;
  --surface:      #ffffff;
  --surface-alt:  #f0eeea;
  --text:         #18181b;
  --muted:        #71717a;
  --line:         #e4e2de;
  --primary:      #18181b;
  --primary-hover:#000000;
  --dark:         #111110;
  --dark-mid:     #1c1c1e;
  --radius-lg:    10px;
  --radius-md:    6px;
  --max:          1120px;
}

/* ── Reset ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Work Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }

/* ── Typography ── */
h1 {
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin-bottom: 20px;
}
h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Layout ── */
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section       { padding: 96px 0; }
.section-tight { padding: 64px 0; }

/* ── Eyebrow label ── */
.eyebrow {
  display: inline-block;
  align-self: flex-start; /* flex コンテナ内でも文字幅に収める */
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* ── Utility ── */
.lead  { font-size: 1.05rem; color: var(--muted); line-height: 1.8; font-weight: 400; }
.muted { color: var(--muted); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
}
.logo-img { height: 1.2em; width: auto; display: block; }
.nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 4px 0;
  transition: color .15s;
}
.nav a:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .01em;
  transition: .18s ease;
  cursor: pointer;
}

/* ライト背景用：チャコールボタン */
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

/* ライト背景用：アウトラインボタン */
.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--surface-alt);
}

/* ダーク背景用：白ボタン（.hero・.cta-band 内で上書き） */
.hero .btn-primary,
.cta-band .btn-primary {
  background: #ffffff;
  color: var(--dark);
  border-color: transparent;
}
.hero .btn-primary:hover,
.cta-band .btn-primary:hover {
  background: #f0eeea;
}

/* ダーク背景用：アウトラインボタン */
.hero .btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,.35);
  color: #fff;
}
.hero .btn-secondary:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
}

/* ── Hero（dark + 背景画像） ── */
.hero {
  background:
    linear-gradient(
      105deg,
      rgba(8, 10, 16, .55)  0%,
      rgba(8, 10, 16, .38) 45%,
      rgba(8, 10, 16, .20) 100%
    ),
    url('/Images/hero_background.png') center / cover no-repeat;
  padding: 80px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: start;
}
.hero-main {
  padding: 48px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
}
.hero-main h1    { color: #fff; }
.hero-main > p,
.hero-main > .lead,
.hero-main > .muted { margin-bottom: 14px; }
.hero-main .lead { color: rgba(255,255,255,.72); }
.hero-main .muted{ color: rgba(255,255,255,.5); font-size: .95rem; }
.hero-actions    { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.hero-panel {
  padding: 28px;
  display: grid;
  gap: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
}
.hero .eyebrow {
  color: rgba(255,255,255,.6);
  border-color: rgba(255,255,255,.18);
  background: transparent;
}

/* ── Point（hero panel内） ── */
.point {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.point strong  { display: block; margin-bottom: 5px; color: #fff; font-size: .95rem; }
.point .muted  { color: rgba(255,255,255,.52); font-size: .88rem; }

/* ── Section head ── */
.section-head { max-width: 100%; margin-bottom: 40px; }

/* ── Grid ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }

/* ── Cards（共通） ── */
.card,
.service-card,
.case-card,
.contact-card,
.profile-card,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.card p,
.service-card p,
.case-card p,
.contact-card p,
.profile-card p,
.faq-item p,
.rich-text { color: var(--muted); font-size: .95rem; }

/* ── List（サービスカード内） ── */
.list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.list li { position: relative; padding-left: 16px; color: var(--muted); font-size: .9rem; }
.list li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text);
}

/* ── Tag（サービス番号） ── */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Case card（実績） ── */
.case-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.case-meta span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  letter-spacing: .02em;
}
.cases { display: grid; gap: 16px; }

/* ── Profile ── */
.profile-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 24px; align-items: start; }
.profile-photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #e8e6e1 0%, #f0eeea 55%, #f7f6f3 100%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .06em;
  /* アップロード画像を縦横比を保ったまま領域に収める */
  object-fit: contain;
}
.profile-points { display: grid; gap: 12px; margin-top: 24px; }
.profile-point {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}
.profile-point strong { display: block; margin-bottom: 4px; font-size: .95rem; }
.profile-point .muted { font-size: .88rem; }

/* ── Blog ── */
.blog-card { display: flex; flex-direction: column; }
.blog-card h3 { margin-bottom: 8px; }
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { text-decoration: underline; }
.blog-card p { flex: 1; font-size: .9rem; color: var(--muted); }
.blog-card-eyecatch {
  margin: -24px -24px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.blog-card-eyecatch a { display: block; width: 100%; height: 100%; }
.blog-card-eyecatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .2s;
}
.blog-card-eyecatch a:hover img { opacity: .85; }
.blog-card-date { font-size: .8rem; color: var(--muted); margin-top: 12px; }
/* ブログ詳細 本文スタイル */
.blog-body { line-height: 1.85; }
.blog-body p { margin-bottom: 1.2em; }
.blog-body h2, .blog-body h3 { margin: 1.8em 0 .6em; font-weight: 700; }
.blog-body ul, .blog-body ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.blog-body li { margin-bottom: .4em; }
.blog-body strong { font-weight: 700; }
/* バッジ（タグ表示） */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}
/* ブログ詳細のカテゴリラベル（タグより目立つ塗りつぶし） */
.blog-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ── お知らせバー（ヘッダ上部） ── */
.notice-bar {
  width: 100%;
}
.notice-bar__item {
  width: 100%;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}
.notice-bar__item--info {
  background: #e8e8e8;
  color: #333;
}
.notice-bar__item--warning {
  background: #fff3cd;
  color: #664d03;
}
.notice-bar__item--error {
  background: #f8d7da;
  color: #842029;
}

/* ── お問い合わせフォーム ── */
.field-honeypot        { position: absolute; left: -9999px; top: -9999px; }
.contact-required      { color: #c0392b; font-weight: 700; }
.contact-required-note { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
.contact-field-note    { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.contact-field-error   { font-size: 12px; color: #842029; margin: 4px 0 0; }
.contact-success {
  background: #d1f2eb;
  color: #1a6645;
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
}
.contact-error {
  background: #f8d7da;
  color: #842029;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(145deg, #111110 0%, #1c1c1e 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
.cta-band p  { color: rgba(255,255,255,.65); max-width: 640px; font-size: .95rem; }

/* ── Contact form ── */
.mock-form { display: grid; gap: 18px; }
.contact-form-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.field + .field { margin-top: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: .85rem; font-weight: 700; letter-spacing: .01em; }
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  transition: border-color .15s;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--text);
}
.textarea { min-height: 130px; resize: vertical; }

/* ── Footer ── */
.site-footer {
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-nav a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 4px 0;
  transition: color .15s;
}
.footer-nav a:hover { color: var(--text); }
.footer-rss-link { display: inline-flex; align-items: center; gap: 4px; }

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .08);
  z-index: 60;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.cookie-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 0;
  }
  .cookie-btn { width: 100%; }
}

/* ── Scroll to top ── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 17, 16, .55);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, background .18s, border-color .18s;
  pointer-events: none;
  z-index: 50;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: rgba(17, 17, 16, .55);
  border-color: rgba(255, 255, 255, .85);
}

/* ── Hamburger toggle ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 7px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .25s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .profile-layout { grid-template-columns: 1fr; }

  /* ヘッダー：ハンバーガーメニュー対応 */
  .header-cta  { display: none; }
  .nav-toggle  { display: flex; margin-left: auto; }
  .header-inner { flex-wrap: wrap; }

  .nav {
    display: none;
    order: 99;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
    padding: 4px 0;
    margin-top: 6px;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
    font-size: .9375rem;
    color: var(--text);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a:hover { color: var(--primary); }

  .hero-main { padding: 32px; }
  .cta-band  { padding: 32px; }

  /* スマホ縦積み時：背景画像をテキスト側（上端）に合わせる */
  .hero {
    background-position-y: top;
  }
}

@media (max-width: 640px) {
  .section       { padding: 72px 0; }
  .section-tight { padding: 48px 0; }
  .hero          { padding: 40px 0 48px; }
  .card,
  .service-card,
  .case-card,
  .contact-card,
  .profile-card,
  .faq-item { padding: 24px; }
  .cta-band { padding: 28px 24px; }

  /* 上へ戻るボタン：小さい画面ではやや内側に */
  .scroll-top {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
