/* ======================================================
   SOTORIE — header.css
   - Header / Drawer / Scroll lock
====================================================== */

/* ===== Header base (fixed) ===== */
.s-header{
  position:fixed;
  top:0; left:0;
  width:100%;
  height:var(--s-header-h);
  z-index:999;

  /* Flicker/shift guard (partsに適用する方針だが一旦維持) */
  transform:translateZ(0);
  backface-visibility:hidden;
}

.s-header__bg{
  position:absolute;
  inset:0;
  pointer-events:none;

  background:rgba(255,255,255,.25);
  border-bottom:1px solid transparent;

  backdrop-filter:blur(0px);
  -webkit-backdrop-filter:blur(0px);

  transition:
    background .22s var(--s-ease),
    border-color .22s var(--s-ease),
    backdrop-filter .22s var(--s-ease);
}

/* Glass lens after scroll */
.s-header.is-scrolled .s-header__bg{
  background:rgba(255,255,255,.74);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(0,0,0,.08);
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}

.s-header__inner{
  position:relative;
  z-index:1;

  width:min(92%,1180px);
  height:100%;
  margin:0 auto;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

/* Logo */
.s-header__logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  padding:10px 2px;
  border-radius:10px;
}
.s-header__logo img{
  display:block;
  height:15px;
  width:auto;
  image-rendering:-webkit-optimize-contrast;
}
.s-header__logo:focus-visible{
  outline:2px solid rgba(17,24,39,.22);
  outline-offset:3px;
}

/* Nav */
.s-header__nav{
  display:none;
  align-items:center;
  gap:18px;
}
.s-header__link{
  font-size:13px;
  color:var(--s-text);
  text-decoration:none;
  letter-spacing:.02em;
  opacity:.86;

  padding:8px 10px;
  border-radius:999px;

  transition:opacity .18s var(--s-ease), background .18s var(--s-ease);
}
.s-header__link:hover{
  opacity:1;
  background:rgba(0,0,0,.035);
}
.s-header__link:focus-visible{
  outline:2px solid rgba(17,24,39,.22);
  outline-offset:3px;
}

/* Right */
.s-header__right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* CTA */
.s-header__cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:36px;
  padding:0 16px;
  border-radius:999px;

  background:#111;
  color:#fff;
  text-decoration:none;
  font-size:13px;
  letter-spacing:.04em;

  border:1px solid rgba(0,0,0,.25);
  box-shadow:0 10px 24px rgba(0,0,0,.14);

  transform:translateZ(0);
  backface-visibility:hidden;

  transition:transform .18s var(--s-ease), box-shadow .18s var(--s-ease);
}
.s-header__cta:hover{
  transform:translate3d(0,-1px,0);
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}
.s-header__cta:active{
  transform:translate3d(0,0,0);
}

/* Burger */
.s-header__burger{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.68);

  display:inline-flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
  position:relative;

  transform:translateZ(0);
  backface-visibility:hidden;

  transition:background .18s var(--s-ease), border-color .18s var(--s-ease);
}
.s-header__burger:hover{
  background:rgba(255,255,255,.85);
  border-color:rgba(0,0,0,.14);
}
.s-header__burger span{
  position:absolute;
  width:18px;
  height:2px;
  background:rgba(0,0,0,.72);
  border-radius:2px;
  left:50%;
  transform:translateX(-50%);
  transition:transform .22s var(--s-ease), opacity .22s var(--s-ease);
}
.s-header__burger span:nth-child(1){ transform:translateX(-50%) translateY(-4px); }
.s-header__burger span:nth-child(2){ transform:translateX(-50%) translateY( 4px); }

.s-header.is-open .s-header__burger span:nth-child(1){
  transform:translateX(-50%) rotate(45deg);
}
.s-header.is-open .s-header__burger span:nth-child(2){
  transform:translateX(-50%) rotate(-45deg);
}

/* ===== Drawer ===== */
.s-drawer{
  position:fixed;
  inset:0;
  z-index:1200;

  visibility:hidden;
  opacity:0;
  pointer-events:none;

  transition:opacity .22s var(--s-ease), visibility 0s linear .22s;
}
.s-drawer.is-open{
  visibility:visible;
  opacity:1;
  pointer-events:auto;

  transition:opacity .22s var(--s-ease), visibility 0s linear 0s;
}

.s-drawer__backdrop{
  position:absolute;
  inset:0;
  border:0;
  padding:0;
  background:rgba(0,0,0,.56);
  opacity:0;
  transition:opacity .22s var(--s-ease);
}
.s-drawer.is-open .s-drawer__backdrop{ opacity:1; }

.s-drawer__panel{
  position:absolute;
  right:0; top:0;
  height:100%;
  width:min(92vw,420px);

  background:#fff;
  border-left:1px solid rgba(0,0,0,.08);
  box-shadow:var(--s-shadow);

  padding:18px 18px 24px;

  display:flex;
  flex-direction:column;
  gap:14px;

  transform:translate3d(14px,0,0);
  transition:transform .22s var(--s-ease);

  /* polish */
  box-shadow:0 26px 80px rgba(15,23,42,.14);
}
.s-drawer.is-open .s-drawer__panel{ transform:translate3d(0,0,0); }

.s-drawer__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:12px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.s-drawer__title{
  margin:0;
  font-size:11px;
  letter-spacing:.26em;
  color:rgba(17,24,39,.50);
}
.s-drawer__close{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.92);
  cursor:pointer;
  font-size:18px;
}
.s-drawer__close:hover{ background:rgba(0,0,0,.03); }

.s-drawer__ctaRow{ display:grid; gap:10px; }
.s-drawer__cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:12px 14px;
  border-radius:999px;
  text-decoration:none;

  background:#111;
  color:#fff;
  font-size:13px;
  letter-spacing:.04em;
  border:1px solid rgba(0,0,0,.20);
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}
.s-drawer__cta.is-sub{
  background:#fff;
  color:#111;
  border:1px solid rgba(0,0,0,.14);
  justify-content:space-between;
  box-shadow:none;
}
.s-drawer__cta.is-sub span{
  font-size:11px;
  color:#6b7280;
  margin-left:10px;
}

.s-drawer__list{
  list-style:none;
  padding:0;
  margin:0;

  display:grid;
  gap:2px;
}
.s-drawer__list li{
  border-bottom:1px solid rgba(0,0,0,.06);
}
.s-drawer__list li:last-child{ border-bottom:0; }

.s-drawer__list a{
  display:flex;
  align-items:baseline;
  justify-content:space-between;

  text-decoration:none;
  color:#111827;
  font-size:14px;

  padding:14px 10px;
  border-radius:12px;

  background:transparent;
  border:0;

  transition:background .16s cubic-bezier(.2,.8,.2,1);
}
.s-drawer__list a:hover{ background:rgba(0,0,0,.035); }

.s-drawer__sns{
  display:flex;
  gap:10px;
  margin-top:auto;
}
.s-drawer__sns a{
  text-decoration:none;
  font-size:12px;
  color:#111827;

  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
}

.s-drawer__note{
  margin:10px 0 0;
  font-size:12px;
  color:#6b7280;
}

/* Scroll lock */
html.s-locked, body.s-locked{ overflow:hidden; }

/* PC */
@media (min-width:900px){
  .s-header__nav{ display:flex; }
  .s-header__tel{ display:inline-flex; }
  .s-header__burger{ display:none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .s-header__bg,
  .s-header__cta,
  .s-drawer,
  .s-drawer__backdrop,
  .s-drawer__panel,
  .s-header__burger span{
    transition:none !important;
  }
}

/* =========================================
   FIX: keep fixed truly fixed (no transform on wrapper)
========================================= */
.s-header{
  transform:none !important;
  backface-visibility:visible !important;
  will-change:auto !important;
}

/* flicker guard: apply to parts only */
.s-header__bg,
.s-header__cta,
.s-header__burger,
.s-header__burger span{
  transform:translateZ(0);
  backface-visibility:hidden;
}
