/* =============================================
   のれんウェブ — common.css
   全ページ共通：リセット / デザイントークン / ヘッダー /
   ドロワーナビ / 下部固定サービス切替 / フッター
   ※ 個別ページのCSSより先に読み込むこと
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --gold:        #B8860B;
  --gold-light:  #C9A96E;
  --gold-pale:   #E8D5A8;
  --gold-bg:     #F5E6C8;
  --navy:        #2C3E5A;
  --navy-dark:   #1E2D42;
  --cream:       #FDF8F0;
  --cream-warm:  #F9F0E3;
  --white:       #FFFFFF;
  --text:        #3A3226;
  --text-light:  #7A7060;
  --border:      #E8DFD2;

  /* Type */
  --serif:  'Noto Serif JP', serif;
  --sans:   'Noto Sans JP', sans-serif;

  /* Spacing */
  --gap: 24px;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip; /* iOS: body をスクロールコンテナ化させない */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--gap);
  background: #fffaf4;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 32px;
  width: auto;
}

/* Bell toggle */
.bell-toggle {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 310;
  position: relative;
}
.bell-icon {
  transition: transform .15s cubic-bezier(.4,0,.2,1);
  transform-origin: 50% 30%;
  margin-top: 7px;
}
.bell-toggle.is-ringing .bell-icon {
  animation: bellRing .55s ease-in-out;
}
.bell-toggle:hover .bell-icon {
  transform: scale(1.08);
}
.bell-toggle.is-ringing .bell-icon {
  animation: bellRing .6s ease-in-out;
}
@keyframes bellRing {
  0%   { transform: rotate(0) }
  10%  { transform: rotate(14deg) }
  20%  { transform: rotate(-12deg) }
  30%  { transform: rotate(10deg) }
  40%  { transform: rotate(-8deg) }
  50%  { transform: rotate(6deg) }
  60%  { transform: rotate(-4deg) }
  70%  { transform: rotate(2deg) }
  80%  { transform: rotate(-1deg) }
  100% { transform: rotate(0) }
}
.bell-ring-wave {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0;
  pointer-events: none;
  display: none;
}
.bell-toggle.is-ringing .bell-ring-wave {
  display: block;
  animation: bellWave .8s ease-out forwards;
}
.bell-toggle.is-ringing .bell-ring-wave:nth-child(2) { animation-delay: .1s; }
.bell-toggle.is-ringing .bell-ring-wave:nth-child(3) { animation-delay: .2s; }
@keyframes bellWave {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(7); opacity: 0; }
}

/* ---------- Blur Glass Drawer Nav ---------- */
body.drawer-open .site-header,
body.drawer-open main,
body.drawer-open .service-switch{
  filter:blur(9px) brightness(.82);
  transition:filter .45s cubic-bezier(.4,0,.2,1);
  pointer-events:none;
}
body:not(.drawer-open) .site-header,
body:not(.drawer-open) main,
body:not(.drawer-open) .service-switch{
  filter:none;
  transition:filter .38s cubic-bezier(.4,0,.2,1);
}
.blur-overlay{
  position:fixed;inset:0;z-index:243;
  background:rgba(245,240,232,.08);
  pointer-events:none;opacity:0;
  transition:opacity .4s;
}
body.drawer-open .blur-overlay{opacity:1;pointer-events:auto;}
.drawer-panel{
  position:fixed;top:54px;right:0;bottom:0;z-index:244;
  width:46%;max-width:300px;
  background:rgba(252,249,243,.82);
  border-left:0.5px solid rgba(255,255,255,.65);
  pointer-events:none;
  transform:translateX(100%);
  transition:transform .42s cubic-bezier(.4,0,.2,1);
}
@media(max-width:480px){.drawer-panel{width:62%;max-width:none;}}
body.drawer-open .drawer-panel{
  transform:translateX(0);
  pointer-events:auto;
}
.drawer-nav{position:absolute;top:10px;left:0;right:0;}
.drawer-row{
  position:relative;display:flex;align-items:center;justify-content:flex-end;
  gap:7px;height:46px;padding:0 14px;
  text-decoration:none;color:#1a1f35;
  opacity:0;transform:translateX(10px);
  transition:opacity .32s,transform .32s;
  overflow:hidden;
}
body.drawer-open .drawer-row{opacity:1;transform:translateX(0);}
.drawer-row::after{content:'';position:absolute;bottom:0;left:10px;right:10px;height:0.5px;background:rgba(30,45,80,.09);}
.drawer-row .dr-num{font-family:var(--serif);font-size:.6rem;color:rgba(30,45,80,.3);letter-spacing:.15em;}
.drawer-row .dr-lbl{font-family:var(--serif);font-size:.95rem;letter-spacing:.1em;color:#1a1f35;}
.drawer-row .dr-bar{position:absolute;left:0;top:8px;bottom:8px;width:2px;background:var(--gold);transform:scaleY(0);transform-origin:bottom;transition:transform .28s;}
.drawer-row:hover .dr-bar{transform:scaleY(1);}
/* フォーカスリング：マウス／タップ時は出さず、キーボード操作時のみ金色で表示 */
.drawer-panel:focus{outline:none;}
.drawer-row:focus{outline:none;}
.drawer-row:focus-visible{outline:2px solid var(--gold);outline-offset:-3px;border-radius:4px;}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px var(--gap);
  text-align: center;
  font-size: .72rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* ===== サービス別ページ切り替え：全画面で下部固定 ===== */
body {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
.service-switch {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 220;
  margin: 0;
  padding: 10px clamp(10px, 3vw, 32px) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,250,244,.98);
  border-top: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: 0 -10px 26px rgba(44,62,90,.10);
  /* iOS Safari: fixed + backdrop-filter はスクロール中にレイヤーが破棄され消える。
     背景は不透明度98%でぼかしはほぼ不可視のため削除し、代わりに合成レイヤーへ昇格させる */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* nav.js がビジュアルビューポートとのズレを transform で補正する */
  will-change: transform;

}
.service-switch-inner {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(44,62,90,.06);
}
.service-switch a {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--serif);
  font-size: clamp(.72rem, 2.4vw, .88rem);
  line-height: 1.35;
  text-align: center;
  color: var(--navy);
  transition: background .2s, color .2s, transform .2s;
}
@media (hover: hover) and (pointer: fine) {
  .service-switch a:hover { transform: translateY(-1px); }
}
.service-switch a.is-line-active {
  color: #fff;
  background: var(--line-green, #06c755);
  box-shadow: 0 5px 16px rgba(6,199,85,.20);
}
.service-switch a.is-web-active {
  color: #fff;
  background: var(--gold);
  box-shadow: 0 5px 16px rgba(184,134,11,.18);
}
.service-switch-badge {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 21px;
  padding: 0 5px;
  border-radius: 7px;
  font-family: var(--sans);
  font-size: .52rem;
  font-weight: 600;
  letter-spacing: 0;
  background: rgba(255,255,255,.95);
}
.is-line-active .service-switch-badge { color: var(--line-green, #06c755); }
.is-web-active .service-switch-badge { color: var(--gold); }
.service-switch a:not([class*="active"]) .service-switch-badge {
  color: var(--text-light);
  background: var(--cream-warm);
}

@media (max-width: 768px) {
  .service-switch {
    padding-inline: 10px;
  }
  .service-switch-inner {
    width: min(100%, 620px);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(44,62,90,.08);
  }
  .service-switch a {
    min-height: 52px;
    padding: 10px 8px;
    font-size: clamp(.72rem, 3.2vw, .9rem);
    line-height: 1.25;
  }
  .service-switch-badge {
    min-width: 30px;
    height: 24px;
    border-radius: 999px;
    font-size: .60rem;
  }
}

@media (max-width: 480px) {
  .service-switch { padding-inline: 8px; }
  .service-switch a { gap: 5px; padding-inline: 6px; }
}



/* ---------- Footer information links ---------- */
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 18px;
  margin-bottom: 9px;
}
.site-footer .footer-links a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(44,62,90,.28);
  text-underline-offset: 4px;
}
.site-footer .footer-links a:hover { color: var(--gold); }
.site-footer .footer-copy { margin: 0; }

