/* ============================================================
   OKAtec — TechsConnect theme structure
   変数名は TechsConnect テーマ準拠、値のみ OKAtec ネイビーに差し替え
   ============================================================ */
:root {
  --color-primary: #1B3A5B;        /* ネイビー */
  --color-primary-light: #2C5F8E;  /* ミッドブルー */
  --color-accent: #4A9FD8;         /* コバルト */
  --color-bg-main: #F7F9FB;
  --color-bg-section: #ECF1F6;
  --color-bg-card: #FFFFFF;
  --color-bg-dark: #0F2337;        /* ディープネイビー */
  --color-text-primary: #1A2733;
  --color-text-secondary: #5C6B7A;
  --color-border: #D6DEE7;
  --font-heading-en: 'Cormorant Garamond', serif;
  --font-heading-ja: 'Noto Serif JP', serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-accent: 'Montserrat', sans-serif;
  --space-section: clamp(5rem, 8vw, 8rem);
  --header-h: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text-primary);
  background: var(--color-bg-main);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.5; }
p { margin: 0 0 1.6em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ---------- container ---------- */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: 800px; }

/* ---------- 図面グリッド（署名要素） ---------- */
.blueprint {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 40%, transparent 100%);
}

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.header__logo {
  font-family: var(--font-accent); font-weight: 600; font-size: 1.2rem;
  letter-spacing: .14em; color: #fff; transition: color .4s var(--ease);
}
.header__logo span { color: var(--color-accent); }
.header.is-scrolled {
  box-shadow: 0 1px 0 var(--color-border);
}
/* フィルターは擬似要素に持たせる。
   .header 本体に backdrop-filter を付けると、子の position:fixed メニューが
   ヘッダー(高さ64px)基準になり、スクロール時に下方向が透過するため。 */
.header.is-scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.header.is-scrolled .header__logo { color: var(--color-primary); }
.header.is-scrolled .header__nav a { color: var(--color-text-primary); }
.header.is-scrolled .header__toggle span { background: var(--color-primary); }

.header__nav { position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
  background: var(--color-bg-dark); padding: calc(var(--header-h) + 32px) 32px 32px;
  transform: translateX(100%); transition: transform .45s var(--ease); }
.header__nav.is-open { transform: translateX(0); }
.header__nav ul { display: flex; flex-direction: column; gap: 4px; }
.header__nav a {
  display: block; padding: 12px 0; color: #fff;
  font-family: var(--font-accent); font-size: .8rem; letter-spacing: .12em;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.header__nav a small { display: block; font-family: var(--font-body); font-size: .7rem; letter-spacing: .04em; color: rgba(255,255,255,.55); }
.header__toggle { position: relative; z-index: 101; width: 36px; height: 36px; padding: 0;
  background: none; border: 0; cursor: pointer; display: grid; place-content: center; gap: 6px; }
.header__toggle span { display: block; width: 22px; height: 1.5px; background: #fff; transition: transform .35s var(--ease), opacity .3s; }
.header__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); background: #fff; }
.header__toggle.is-open span:nth-child(2) { opacity: 0; }
.header__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); background: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  display: flex; align-items: center;
  background: var(--color-bg-dark) top/cover no-repeat;
  background-image: url('img/hero.webp');
  color: #fff; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,35,55,.86) 0%, rgba(27,58,91,.72) 45%, rgba(15,35,55,.92) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero__label {
  font-family: var(--font-accent); font-size: .68rem; letter-spacing: .3em;
  color: var(--color-accent); margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-heading-ja); font-weight: 500;
  font-size: clamp(1.9rem, 8vw, 4.2rem); line-height: 1.35; letter-spacing: .02em;
  margin-bottom: 24px;
}
.hero__title em { font-style: normal; color: var(--color-accent); }
.hero__lead { max-width: 34em; color: rgba(255,255,255,.82); font-size: .95rem; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 2;
  font-family: var(--font-accent); font-size: .62rem; letter-spacing: .18em;
  color: rgba(255,255,255,.6);
}
.hero__meta ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero__meta li { position: relative; padding-left: 14px; }
.hero__meta li::before { content: ''; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; background: var(--color-accent); }

/* ---------- section heading ---------- */
.section { padding-block: var(--space-section); position: relative; }
.section--gray { background: var(--color-bg-section); }
.section--dark { background: var(--color-bg-dark); color: #fff; overflow: hidden; }
.section-heading { margin-bottom: 48px; }
.section-heading .heading-en {
  display: block; font-family: var(--font-heading-en); font-size: .95rem;
  letter-spacing: .34em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 10px;
}
.section-heading h2 {
  font-family: var(--font-heading-ja); font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: .04em;
}
.section-heading .heading-line { display: block; width: 48px; height: 2px; background: var(--color-primary); margin-top: 22px; }
.section--dark .section-heading .heading-line { background: var(--color-accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-accent); font-size: .74rem; font-weight: 500; letter-spacing: .16em;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn::after { content: ''; width: 18px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { width: 26px; }
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: #fff; color: var(--color-primary); }
.btn--outline { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.section:not(.section--dark) .btn--outline { border-color: var(--color-primary); color: var(--color-primary); }
.section:not(.section--dark) .btn--outline:hover { background: var(--color-primary); color: #fff; }

/* ---------- about ---------- */
.about__body { font-size: .95rem; }
.about__lead {
  font-family: var(--font-heading-ja); font-size: clamp(1.15rem, 4vw, 1.5rem);
  line-height: 1.9; letter-spacing: .03em; margin-bottom: 32px;
}
.about__figure { margin: 48px 0 0; position: relative; }
.about__figure img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.about__figure figcaption {
  font-family: var(--font-accent); font-size: .62rem; letter-spacing: .18em;
  color: var(--color-text-secondary); margin-top: 12px;
}
.profile { margin-top: 48px; border-top: 1px solid var(--color-border); }
.profile div { display: grid; grid-template-columns: 6.5em 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.profile dt { font-family: var(--font-accent); font-size: .68rem; letter-spacing: .14em;
  color: var(--color-primary); padding-top: .35em; }
.profile dd { margin: 0; font-size: .92rem; }

/* ---------- overview（事務所概要）---------- */
.overview__list { margin-top: 0; }
.overview__list dt { white-space: nowrap; }
.overview__list dd small {
  display: block; margin-top: 4px;
  font-family: var(--font-body); font-size: .72rem; letter-spacing: .02em;
  color: var(--color-text-secondary);
}

/* ---------- service ---------- */
.service__grid { display: grid; gap: 24px; }
.card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: 0 18px 40px -20px rgba(27,58,91,.4); }
.card__img { aspect-ratio: 3/2; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card__img img { transform: scale(1.06); }
.card__body { padding: 28px 26px 32px; }
.card__no { font-family: var(--font-accent); font-size: .62rem; letter-spacing: .22em; color: var(--color-accent); }
.card__title { font-family: var(--font-heading-ja); font-size: 1.15rem; margin: 10px 0 14px; }
.card__text { font-size: .88rem; color: var(--color-text-secondary); }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.card__tags li {
  font-family: var(--font-accent); font-size: .6rem; letter-spacing: .1em;
  padding: 5px 10px; border: 1px solid var(--color-border); color: var(--color-text-secondary);
}

/* ---------- news ---------- */
.news__list { border-top: 1px solid var(--color-border); }
.news__item { border-bottom: 1px solid var(--color-border); }
.news__link { display: block; padding: 24px 0; transition: opacity .3s; }
.news__link:hover { opacity: .62; }
.news__meta { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.news__date { font-family: var(--font-accent); font-size: .7rem; letter-spacing: .12em; color: var(--color-text-secondary); }
.news__cat {
  font-family: var(--font-accent); font-size: .58rem; letter-spacing: .12em;
  padding: 4px 10px; background: var(--color-primary); color: #fff;
}
.news__title { font-size: .95rem; font-weight: 500; }
.news__more { margin-top: 40px; }

/* ---------- contact ---------- */
.section--contact { position: relative; }
.section--contact .container { position: relative; z-index: 2; }
.contact__lead { color: rgba(255,255,255,.78); font-size: .95rem; margin-bottom: 40px; }
.contact__box { display: grid; gap: 32px; }
.contact__item { border-top: 1px solid rgba(255,255,255,.18); padding-top: 20px; }
.contact__item dt { font-family: var(--font-accent); font-size: .62rem; letter-spacing: .2em; color: var(--color-accent); margin-bottom: 10px; }
.contact__item dd { margin: 0; font-size: 1.05rem; letter-spacing: .04em; }
.contact__item dd small { display: block; font-size: .72rem; color: rgba(255,255,255,.55); letter-spacing: .02em; margin-top: 6px; }
.contact__actions { margin-top: 48px; }

/* ---------- footer ---------- */
.footer { background: #0A1926; color: rgba(255,255,255,.65); padding: 56px 0 32px; font-size: .8rem; }
.footer__top { display: grid; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__logo { font-family: var(--font-accent); font-weight: 600; font-size: 1.15rem; letter-spacing: .14em; color: #fff; }
.footer__logo span { color: var(--color-accent); }
.footer__tagline { margin-top: 12px; font-size: .78rem; }
.footer__nav ul { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer__nav a { font-family: var(--font-accent); font-size: .68rem; letter-spacing: .14em; }
.footer__nav a:hover { color: var(--color-accent); }
.footer__copy { padding-top: 28px; font-family: var(--font-accent); font-size: .6rem; letter-spacing: .12em; color: rgba(255,255,255,.4); }

/* ---------- mobile fixed CTA（スマホ下部固定 電話/問い合わせ）---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1fr;
  box-shadow: 0 -3px 18px -8px rgba(15,35,55,.55);
  transition: transform .35s var(--ease), opacity .3s var(--ease);
  height: 54.92px;
}
.mobile-cta__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  /* iPhone のホームインジケーター分を各ボタンに均等に確保 */
  padding: 15px 8px calc(15px + env(safe-area-inset-bottom));
  color: #fff; font-family: var(--font-accent); font-weight: 500;
  font-size: .82rem; letter-spacing: .08em;
}
.mobile-cta__btn svg { flex: none; }
.mobile-cta__btn--tel { background: var(--color-primary); }
.mobile-cta__btn--contact { background: var(--color-accent); }
.mobile-cta__btn:active { filter: brightness(.92); }
/* メニュー展開中は隠す */
body.menu-open .mobile-cta { transform: translateY(100%); opacity: 0; pointer-events: none; }
/* バーに隠れないようフッター下に余白を確保（スマホのみ） */
/* @media (max-width: 767px) {
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
} */
@media (max-width: 767px) {
  .footer { padding-bottom: 60px; }
}


/* ---------- scroll animation ---------- */
[data-animate] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-animate].is-visible { opacity: 1; transform: none; }
[data-animate][data-delay="1"] { transition-delay: .12s; }
[data-animate][data-delay="2"] { transition-delay: .24s; }
[data-animate][data-delay="3"] { transition-delay: .36s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 768px) {
  body { font-size: 16px; }
  :root { --header-h: 80px; }
  .mobile-cta { display: none; }
  .container { padding-inline: 40px; }
  .service__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__box { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .footer__top { grid-template-columns: 1fr auto; align-items: center; }
  .hero__meta ul { gap: 10px 32px; }
}

@media (min-width: 1024px) {
  .header__toggle { display: none; }
  .header__nav {
    position: static; width: auto; padding: 0; background: none;
    transform: none; transition: none;
  }
  .header__nav ul { flex-direction: row; gap: 34px; }
  .header__nav a { padding: 0; border: 0; color: #fff; transition: color .3s var(--ease); }
  .header__nav a small { display: none; }
  .header__nav a:hover { color: var(--color-accent); }
  .service__grid { grid-template-columns: repeat(3, 1fr); }
  .about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .about__figure { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-animate] { opacity: 1; transform: none; }
}
