/* ============================================================
   BASE.CSS — 合同会社TMグループ 共通スタイル
   ============================================================ */

/* ── Variables ── */
:root {
  --navy:      #1C2B4A;
  --navy-mid:  #243560;
  --navy-pale: #EEF1F8;
  --gold:      #B8821E;
  --gold-lt:   #F8EDD4;
  --white:     #FFFFFF;
  --bg:        #F5F4F0;
  --text:      #282828;
  --text-md:   #5A5A5A;
  --text-lt:   #999999;
  --border:    #CCCCCC;
  --border-lt: #E6E4DF;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Container ── */
.inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) { .inner { padding: 0 24px; } }

/* ============================================================
   HEADER
   ============================================================ */
#hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background .45s ease, box-shadow .45s ease;
}
#hdr.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 32px rgba(0,0,0,.09);
}
.hdr-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 48px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.18);
  transition: height .4s, border-color .4s;
}
#hdr.scrolled .hdr-inner {
  height: 64px;
  border-bottom-color: var(--border-lt);
}

/* Logo */
.logo { display: flex; flex-direction: column; gap: 3px; }
.logo-en {
  font-size: 10px; font-weight: 600;
  letter-spacing: .22em;
  color: rgba(255,255,255,.55);
  line-height: 1;
  transition: color .4s;
}
.logo-ja {
  font-size: 17px; font-weight: 900;
  letter-spacing: .06em;
  color: #fff; line-height: 1;
  transition: color .4s;
}
#hdr.scrolled .logo-en { color: var(--text-lt); }
#hdr.scrolled .logo-ja { color: var(--navy); }

/* Desk nav */
.hdr-nav { display: flex; align-items: center; gap: 2px; }
.nl {
  padding: 10px 15px;
  font-size: 13px; font-weight: 500;
  letter-spacing: .07em;
  color: rgba(255,255,255,.85);
  border-radius: 4px;
  transition: all .25s;
  white-space: nowrap;
}
.nl:hover { background: rgba(255,255,255,.12); color: #fff; }
#hdr.scrolled .nl { color: var(--text-md); }
#hdr.scrolled .nl:hover { background: var(--navy-pale); color: var(--navy); }
.nl-cta {
  margin-left: 10px;
  padding: 10px 22px;
  background: var(--gold);
  color: #fff !important;
  font-size: 13px; font-weight: 700;
  letter-spacing: .08em;
  border-radius: 4px;
  transition: all .3s;
}
.nl-cta:hover { background: #9A6C15 !important; transform: translateY(-1px); }

/* Hamburger */
.ham {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 6px; background: none; border: none;
}
.ham span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: all .3s;
}
#hdr.scrolled .ham span { background: var(--text); }
.ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Inner-page header (always opaque) ── */
body.pg #hdr {
  background: rgba(255,255,255,.98);
  box-shadow: 0 1px 28px rgba(0,0,0,.08);
}
body.pg .logo-en { color: var(--text-lt); }
body.pg .logo-ja { color: var(--navy); }
body.pg .nl { color: var(--text-md); }
body.pg .nl:hover { background: var(--navy-pale); color: var(--navy); }
body.pg .ham span { background: var(--text); }

/* ── Mobile menu ── */
.mnav {
  position: fixed; inset: 0;
  background: var(--white);
  z-index: 850;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.mnav.open { opacity: 1; pointer-events: auto; }
.mnav nav {
  display: flex; flex-direction: column;
  align-items: center;
  width: 100%; max-width: 300px;
}
.mnav a {
  display: block; width: 100%;
  padding: 19px 0;
  text-align: center;
  font-size: 17px; font-weight: 700;
  letter-spacing: .07em;
  color: var(--text);
  border-bottom: 1px solid var(--border-lt);
  transition: color .2s;
}
.mnav a:hover { color: var(--navy); }
.mnav .m-cta {
  margin-top: 24px;
  background: var(--gold);
  color: #fff; border-radius: 4px; border-bottom: none;
}
.mnav-close {
  position: absolute; top: 22px; right: 26px;
  font-size: 28px; color: var(--text-lt); line-height: 1;
}

/* ============================================================
   FAQ ACCORDION (.fq pattern — used by index / kaitori / ihin)
   ============================================================ */
.fq {
  border-bottom: 1px solid var(--border-lt);
  overflow: hidden;
}
.fq-q {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 8px; cursor: pointer;
  font-size: 15px; font-weight: 700;
  letter-spacing: .05em;
  user-select: none; transition: color .2s;
}
.fq-q:hover { color: var(--navy); }
.fq-q .qm {
  width: 28px; height: 28px; min-width: 28px;
  background: var(--navy); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; flex-shrink: 0;
}
.fq-q .qt { flex: 1; }
.fq-q .chev {
  width: 18px; height: 18px;
  color: var(--text-lt);
  transition: transform .3s; flex-shrink: 0;
}
.fq.open .chev { transform: rotate(180deg); }
.fq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.fq-ai {
  padding: 0 8px 22px 42px;
  font-size: 14px; color: var(--text-md);
  line-height: 2.1; letter-spacing: .05em;
}

/* ============================================================
   FOOTER CTA
   ============================================================ */
.foot-cta {
  background: var(--navy);
  padding: 80px 24px;
  text-align: center;
}
.foot-cta .fc-en {
  font-size: 10px; font-weight: 700;
  letter-spacing: .3em; color: var(--gold);
  margin-bottom: 16px;
}
.foot-cta .fc-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700; color: #fff;
  letter-spacing: .06em; line-height: 1.55;
  margin-bottom: 28px;
}
.foot-cta .fc-phone {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 900; color: #F5C968;
  letter-spacing: .05em; margin-bottom: 6px;
}
.foot-cta .fc-phone a { color: inherit; }
.foot-cta .fc-note {
  font-size: 12px; color: rgba(255,255,255,.55);
  letter-spacing: .1em; margin-bottom: 32px;
}
.foot-cta .fc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 40px;
  background: var(--gold); color: #fff;
  font-size: 14px; font-weight: 700;
  letter-spacing: .1em; border-radius: 4px;
  transition: all .3s;
}
.foot-cta .fc-btn:hover { background: #9A6C15; transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #0C1421;
  color: rgba(255,255,255,.5);
  padding: 64px 24px 28px;
}
.ft-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 28px;
}
.ft-logo { font-size: 17px; font-weight: 900; color: #fff; margin-bottom: 14px; letter-spacing: .06em; }
.ft-about { font-size: 12px; line-height: 2; letter-spacing: .04em; }
.ft-col-t { font-size: 10px; font-weight: 700; letter-spacing: .2em; color: #fff; margin-bottom: 16px; }
.ft-links li + li { margin-top: 10px; }
.ft-links a { font-size: 12px; color: rgba(255,255,255,.42); letter-spacing: .04em; transition: color .2s; }
.ft-links a:hover { color: #fff; }
.ft-copy { max-width: 1200px; margin: 0 auto; text-align: center; font-size: 11px; letter-spacing: .08em; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.pg-hero {
  position: relative;
  height: 380px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding-top: 80px;
}
.pg-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.pg-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,42,74,.55) 0%, rgba(26,42,74,.75) 100%);
  z-index: 1;
}
.pg-hero-body {
  position: relative; z-index: 2;
  padding: 0 80px 52px;
  max-width: 1360px; margin: 0 auto; width: 100%;
}
.pg-hero-en {
  font-size: 10px; font-weight: 700;
  letter-spacing: .3em; color: var(--gold);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.pg-hero-en::before {
  content: ''; width: 28px; height: 1px; background: var(--gold); flex-shrink: 0;
}
.pg-hero-ja {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 700; color: #fff;
  letter-spacing: .06em; line-height: 1.25;
}

/* Breadcrumb */
.bc {
  background: var(--bg);
  padding: 13px 0;
  border-bottom: 1px solid var(--border-lt);
}
.bc-list {
  max-width: 1360px; margin: 0 auto; padding: 0 80px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-lt); letter-spacing: .04em;
}
.bc-list a { color: var(--text-md); transition: color .2s; }
.bc-list a:hover { color: var(--navy); }
.bc-sep { font-size: 10px; }

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.s-tag {
  display: block;
  font-size: 10px; font-weight: 700;
  letter-spacing: .28em; color: var(--gold);
  margin-bottom: 12px;
}
.s-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700; color: var(--navy);
  letter-spacing: .05em; line-height: 1.45;
  margin-bottom: 20px;
}
.s-desc {
  font-size: clamp(14px, 1.3vw, 16px);
  color: var(--text-md);
  line-height: 2.15; letter-spacing: .06em;
}

/* ── Buttons ── */
.btn-dark {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 32px;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; border-radius: 4px;
  transition: all .3s;
}
.btn-dark:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,42,74,.25); }

.btn-gold {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 32px;
  background: var(--gold); color: #fff;
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; border-radius: 4px;
  transition: all .3s;
}
.btn-gold:hover { background: #9A6C15; transform: translateY(-2px); }

.btn-line {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 30px;
  border: 1.5px solid var(--navy); color: var(--navy);
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; border-radius: 4px;
  transition: all .3s;
}
.btn-line:hover { background: var(--navy); color: #fff; }

/* ── Check list ── */
.ck-list { list-style: none; }
.ck-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-lt);
  font-size: 14px; color: var(--text-md);
  letter-spacing: .05em; line-height: 1.7;
}
.ck-list li:last-child { border-bottom: none; }
.ck-list li .ck-icon {
  width: 20px; height: 20px; min-width: 20px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; flex-shrink: 0;
}
.ck-list li .ck-icon i { font-size: 9px; color: #fff; }
.ck-list li strong { color: var(--text); font-weight: 700; }

/* ── Tag chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  padding: 5px 14px;
  background: var(--gold-lt); color: var(--gold);
  border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fu {
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.fu.in { opacity: 1; transform: none; }
.fu.d1 { transition-delay: .1s; }
.fu.d2 { transition-delay: .2s; }
.fu.d3 { transition-delay: .3s; }
.fu.d4 { transition-delay: .4s; }
.fu.d5 { transition-delay: .5s; }

/* ============================================================
   UTILITY
   ============================================================ */
#pg-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 48px; height: 48px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 800;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
#pg-top.show { opacity: 1; pointer-events: auto; }
#pg-top:hover { transform: translateY(-3px); }

.tel-float {
  display: none;
  position: fixed; bottom: 24px; left: 16px;
  background: var(--gold); color: #fff;
  padding: 13px 20px;
  border-radius: 40px;
  font-size: 14px; font-weight: 900;
  letter-spacing: .04em;
  align-items: center; gap: 8px;
  box-shadow: 0 6px 24px rgba(184,130,30,.5);
  z-index: 800; transition: transform .2s;
}
.tel-float:hover { transform: scale(1.04); }

/* ============================================================
   RESPONSIVE – SHARED
   ============================================================ */
@media (max-width: 1100px) {
  .ft-grid { grid-template-columns: repeat(2,1fr); }
  .hdr-inner { padding: 0 28px; }
}

@media (max-width: 768px) {
  .hdr-nav { display: none; }
  .ham { display: flex; }
  .pg-hero { height: 240px; padding-top: 64px; }
  .pg-hero-body { padding: 0 24px 36px; }
  .bc-list { padding: 0 24px; }
  .ft-grid { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 48px 24px 24px; }
  .tel-float { display: flex; }

  /* Prevent iOS auto-zoom on form focus (font-size must be >= 16px) */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .hdr-inner { padding: 0 18px; }
  .hdr-inner .hdr-inner { height: 60px; }
}
