/* =========================================================
  common.css
  - Tokens / Base / Background / Header+Drawer
========================================================= */

/* =========================================================
  Tokens
========================================================= */
:root{
  --emerald:#2f7f6f;
  --emerald-0:#43a08e;
  --emerald-1:#2f7f6f;
  --emerald-2:#1f6b5c;
  --emerald-3:#165e52;

  --accent:#f4b740;
  --accent-soft:rgba(244,183,64,.16);

  --bg:#fbfdfc;
  --panel:#ffffff;
  --panel-2:#f7fbfa;

  --line:rgba(0,0,0,.07);
  --shadow:0 18px 44px rgba(0,0,0,.08);
  --shadow-soft:0 12px 28px rgba(0,0,0,.06);

  --gold-deep:#b88a1a;

  /* これが未定義だと paper/noise 系が効かない（＝のっぺりに見える） */
  /* 必要なら dataURL をここに入れてね */
  /* --noise: url("data:image/svg+xml,..."); */

  /* 背景の濃さ調整用 */
  --bg-overlay: rgba(251,253,252,.28);
  --bg-overlay-sp: rgba(251,253,252,.36);

  /* Hero画像のオーバーレイ */
  --hero-overlay: rgba(251,253,252,.22);
  --hero-overlay-dark: rgba(0,0,0,.10);
}

/* =========================================================
  Base reset (最低限)
========================================================= */
*,
*::before,
*::after{ box-sizing:border-box; }

html, body{ height:100%; }
body{
  margin:0;
  color: rgba(17,17,17,.86);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

img{ max-width:100%; height:auto; display:block; }
a, a *{ text-decoration:none; color:inherit; }

/* container（左右余白込みで安定させる） */
.container{
  max-width:1120px;
  margin-left:auto;
  margin-right:auto;
  padding-left: 28px;
  padding-right: 28px;
}
@media (max-width: 600px){
  .container{
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* =========================================================
  Page Background (image + overlay + noise)
========================================================= */
body.page{
  position:relative;
  min-height:100%;
  background:url("../img/top_bg6.jpg") center / cover no-repeat fixed;
}

body.page::before,
body.page::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

body.page::before{ background: var(--bg-overlay); }

body.page::after{
  background-image: var(--noise);
  opacity:.10;
  mix-blend-mode:multiply;
}

@media (max-width: 600px){
  body.page{ background-attachment: scroll; } /* iOS対策 */
  body.page::before{ background: var(--bg-overlay-sp); }
}

/* paper texture opacity tweak（紙質の粒度を統一） */
.section--paper::after,
.hero--paper::after{
  opacity:.38;
}

/* =========================================================
  Header
========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
}
.brand img{
  height: 34px;
  width: auto;
}

/* nav（PC） */
.nav{
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap:wrap;
}
.nav a{
  font-size: 13.5px;
  color: rgba(17,17,17,.74);
  padding: 8px 10px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav a:hover{
  background: rgba(47,127,111,.06);
  color: rgba(17,17,17,.86);
  transform: translateY(-1px);
}

.header-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex: 0 0 auto;
}

/* CTA */
.header-cta{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47,127,111,.22);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(17,17,17,.82);
  white-space: nowrap;
}
.header-cta:hover{
  background: rgba(47,127,111,.06);
  border-color: rgba(47,127,111,.30);
}

.header-cta .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(244,183,64,.12);
}

.header-cta--sub{
  border-color: rgba(0,0,0,.10);
}

/* burger */
.burger{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}
.burger span{
  width: 18px;
  height: 2px;
  background: rgba(17,17,17,.74);
  position: relative;
  display:block;
}
.burger span::before,
.burger span::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: rgba(17,17,17,.74);
}
.burger span::before{ top:-6px; }
.burger span::after{ top:6px; }

/* ヘッダーのコピー（ロゴ横の説明） */
.header-copy{
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 10px;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(17,17,17,.66);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PCだけ表示したい要素 */
.header-onlyPC{ display: inline-flex; }

/* SP：コピー＋バーガーだけにする */
@media (max-width: 920px){
  .header-onlyPC{ display:none !important; }

  .header-copy{
    font-size: 12.5px;
    letter-spacing: .08em;
    padding: 0 8px;
  }
}


/* =========================================================
  Drawer
========================================================= */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events:none;
}

.drawer::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.28);
  opacity: 0;
  transition: opacity .18s ease;
}

.drawer-panel{
  position:absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: rgba(255,255,255,.96);
  border-left: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 44px rgba(0,0,0,.18);
  transform: translateX(104%);
  transition: transform .22s ease;
  padding: 16px;
}

.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.drawer-close{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}

.drawer-nav{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.drawer-nav a{
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(47,127,111,.04);
  border: 1px solid rgba(47,127,111,.10);
  color: rgba(17,17,17,.82);
}
.drawer-nav a:hover{
  background: rgba(47,127,111,.08);
  border-color: rgba(47,127,111,.18);
}

/* drawer CTA */
.drawer-cta{
  margin-top: 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(47,127,111,.22);
  background: rgba(255,255,255,.92);
  font-weight: 800;
}
.drawer-cta--sub{
  border-color: rgba(0,0,0,.10);
}

/* 開いた状態（JSで .is-open を付ける想定） */
.drawer.is-open{
  pointer-events:auto;
}
.drawer.is-open::before{
  opacity: 1;
}
.drawer.is-open .drawer-panel{
  transform: translateX(0);
}

/* =========================================================
  Responsive: SPは nav 非表示にして burger 表示
========================================================= */
@media (max-width: 920px){
  .nav{ display:none; }
  .header-inner{ padding: 12px 18px; }
}
