/* =========================================================
   伊藤祐貴法律事務所 — 共通ヘッダー・フッター（独自デザイン3ページ用）
   startup.html / anime-law.html / ai-law.html が style-legacy.css の後に読み込む。
   内容は style.css の「3. ヘッダー・フッター・スマホ固定バー」と同じ見た目。
   クラス名・変数名に iy- を付け、各ページ独自のCSSと干渉しないようにしている。
   ========================================================= */
:root {
  --iy-paper: #faf9f6;
  --iy-ink: #16191d;
  --iy-ink-2: #3a3f46;
  --iy-ink-3: #6a707a;
  --iy-rule-hair: rgba(22, 25, 29, .08);
  --iy-brand-solid: #0e7562;
  --iy-brand-deep: #0a5345;
  --iy-maxw: 1120px;
  --iy-pad: clamp(20px, 4.4vw, 40px);
  --iy-header-h: 72px;
  --iy-ease: cubic-bezier(.22, 1, .36, 1);
  --iy-font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
}
.iy-container { width: 100%; max-width: calc(var(--iy-maxw) + var(--iy-pad) * 2); margin-inline: auto; padding-inline: var(--iy-pad); }
html body .iy-site-header, html body .iy-site-footer { color: var(--iy-ink-2); letter-spacing: normal; text-align: left; }
.iy-site-header *, .iy-site-footer * { box-sizing: border-box; }
.iy-site-header img, .iy-site-footer img { display: block; max-width: 100%; }

/* =========================================================
   3. ヘッダー・フッター・スマホ固定バー（全ページ共通の外枠）
   ※ このブロックは chrome.css（独自デザイン3ページ用）にも
     クラス名を置き換えて出力される。他の部品に依存させない。
   ========================================================= */
.iy-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, .88);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  font-family: var(--iy-font-sans);
  font-style: normal;
  font-feature-settings: "palt" 1;
}
html body .iy-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--iy-header-h);
}
html body .iy-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--iy-ink);
  text-decoration: none;
}
html body .iy-brand-mark { width: 30px; height: auto; flex: none; mix-blend-mode: multiply; }
html body .iy-brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--iy-font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .05em;
  color: var(--iy-ink);
  white-space: nowrap;
  font-feature-settings: "palt" 1;
}
html body .iy-brand-name span {
  margin-top: 3px;
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--iy-ink-3);
}

html body .iy-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html body .iy-nav-links li { margin: 0; padding: 0; border: 0; }
html body .iy-nav-links a {
  position: relative;
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-family: var(--iy-font-sans);
  font-size: .8125rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .03em;
  color: var(--iy-ink-2);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
html body .iy-nav-links a::after { content: none; }
html body .iy-nav-links a:hover { background: rgba(22, 25, 29, .06); color: var(--iy-ink); }
html body .iy-nav-links a.active { color: var(--iy-ink); font-weight: 600; background: rgba(22, 25, 29, .06); }
html body .iy-nav-cta { margin-left: 10px; }
html body .iy-nav-cta > a,
html body .iy-nav-cta > a.active {
  min-height: 0;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--iy-brand-solid);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
  transform: none;
  animation: none;
}
html body .iy-nav-cta > a:hover { background: var(--iy-brand-deep); color: #fff; }

html body .iy-nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
html body .iy-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0;
  border-radius: 2px;
  background: var(--iy-ink);
  transition: transform .28s var(--iy-ease), opacity .2s;
}

@media (max-width: 920px) {
  html body .iy-nav-toggle { display: inline-flex; }
  html body .iy-nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--iy-header-h));
    max-height: calc(100dvh - var(--iy-header-h));
    padding: 6px var(--iy-pad) 22px;
    overflow-y: auto;
    background: var(--iy-paper);
    border-top: 1px solid var(--iy-rule-hair);
    border-bottom: 1px solid var(--iy-rule-hair);
    box-shadow: 0 28px 44px -28px rgba(22, 25, 29, .32);
  }
  html body .iy-nav-links.open { display: flex; }
  html body .iy-nav-links li + li { border-top: 1px solid var(--iy-rule-hair); }
  html body .iy-nav-links li.iy-nav-cta { border-top: 0; }
  html body .iy-nav-links a {
    padding: 15px 4px;
    border-radius: 0;
    font-size: 1rem;
    white-space: normal;
  }
  html body .iy-nav-links a:hover,
html body .iy-nav-links a.active { background: none; }
  html body .iy-nav-cta { margin: 14px 0 0; }
  html body .iy-nav-cta > a,
html body .iy-nav-cta > a.active { padding: 15px 20px; border-radius: 999px; font-size: .9375rem; text-align: center; }
  /* 開いているときは ≡ を × に（aria-expanded は site.js が付ける） */
  .iy-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html body .iy-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  html body .iy-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 760px) {
  :root { --iy-header-h: 60px; }
  html body .iy-brand { gap: 9px; }
  html body .iy-brand-mark { width: 26px; }
  html body .iy-brand-name { font-size: .9375rem; }
  html body .iy-brand-name span { display: none; }
}

/* ---------- フッター ---------- */
.iy-site-footer {
  margin-top: 0;
  padding: clamp(40px, 5vw, 60px) 0 36px;
  border-top: 1px solid var(--iy-rule-hair);
  background: transparent;
  color: var(--iy-ink-2);
  font-family: var(--iy-font-sans);
  font-size: .8125rem;
  font-style: normal;
  line-height: 1.9;
  opacity: 1;
  animation: none;
}
html body .iy-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
}
html body .iy-site-footer .iy-brand-mark { width: 30px; }
html body .iy-site-footer .iy-brand-name { color: var(--iy-ink); }
html body .iy-site-footer .iy-brand-name span { color: var(--iy-ink-3); }
html body .iy-site-footer p { margin-top: 16px; max-width: 34em; color: var(--iy-ink-3); font-size: .8125rem; line-height: 1.9; }
html body .iy-footer-col h4 {
  margin-bottom: 14px;
  font-family: var(--iy-font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--iy-ink);
}
html body .iy-footer-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
html body .iy-footer-col li { margin: 0; color: var(--iy-ink-2); }
html body .iy-footer-col a { color: var(--iy-ink-2); text-decoration: none; transition: color .2s; }
html body .iy-footer-col a:hover { color: var(--iy-ink); text-decoration: underline; text-underline-offset: .25em; }
html body .iy-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--iy-rule-hair);
  color: var(--iy-ink-3);
  font-size: .75rem;
}
html body .iy-footer-bottom a { text-decoration: underline; text-underline-offset: .25em; }
@media (max-width: 860px) {
  html body .iy-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html body .iy-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  html body .iy-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- スマホ固定バー ---------- */
.mobile-cta-bar { display: none; }
@media (max-width: 760px) {
  .mobile-cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 249, 246, .92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--iy-rule-hair);
    box-shadow: none;
    font-family: var(--iy-font-sans);
  }
  .mobile-cta-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: .875rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .02em;
    text-align: center;
    text-decoration: none;
  }
  .mobile-cta-bar .mcta-line { background: var(--iy-brand-solid); color: #fff; }
  .mobile-cta-bar .mcta-form { background: var(--iy-ink); color: #fff; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  html body .iy-site-footer { padding-bottom: 28px; }
}

/* 各ページの配色に関係なく、ヘッダー・フッターは紙色の面にする */
.iy-site-header { background: var(--iy-paper); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--iy-rule-hair); }
html body .iy-site-footer { margin-top: 0; background: var(--iy-paper); border-top: 1px solid var(--iy-rule-hair); }
html body .iy-site-footer p,
html body .iy-site-footer li,
html body .iy-site-footer h4,
html body .iy-site-footer a,
html body .iy-site-footer span,
html body .iy-site-header a,
html body .iy-site-header span { font-style: normal; text-shadow: none; text-transform: none; }
html body .iy-site-footer li { color: var(--iy-ink-2); font-family: var(--iy-font-sans); }
html body .iy-footer-bottom a { color: inherit; }
@media (max-width: 760px) {
  html body .mobile-cta-bar { background: var(--iy-paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
