/* =========================================================
   SAITOWORKS / swx-detail.css (vivid palette)
   - 配色を鮮やかに再設計（黄を主役、青/橙で締め）
   - 既存の構造・クラスはそのまま互換
   ========================================================= */

/* ===== vivid palette (AA配慮) ===== */
:root{
  --ink:#101216;
  --muted:#5A6175;
  --bg:#FAFAFA;
  --card:#FFFFFF;
  --container:1100px;
  --radius:16px;
  --gap:28px;
  --shadow:0 6px 18px rgba(0,0,0,.10);

  /* Brand: Yellowを主役に、Blue/Orangeで締める */
  --brand-yellow:#FFD400;      /* 主色 */
  --brand-yellow-ink:#2B2B00;  /* 黄面の文字色 */

  --brand-blue:#2B6AFF;        /* 補助 */
  --brand-orange:#FF7A1A;      /* 強調 */

  /* Yellowの濃淡 */
  --brand-50:#FFF7C2;
  --brand-100:#FFE97A;
  --brand-200:#FFDF4D;
  --brand-300:#FFD400;         /* base */
  --brand-600:#E0B800;
  --brand-700:#C49E00;
  --brand-800:#9C7D00;

  /* 既存コードの互換用エイリアス */
  --brand-a: var(--brand-blue);
  --brand-b: var(--brand-yellow);
  --brand-b-weak: color-mix(in oklab, var(--brand-300) 22%, white);
}

.swx-page{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans JP",sans-serif;
  color:var(--ink);
  line-height:1.75;
  background:#fff;

  /* サイト標準トークンがある前提での上書き */
  --ring: color-mix(in oklab, var(--brand-blue) 55%, white);
  --surface-brand-soft: color-mix(in oklab, var(--brand-100) 68%, white);
}

/* Base */
.swx-container{max-width:var(--container);margin:0 auto;padding:0 20px;}
.swx-sec{padding:64px 0;}
.swx-sec--tight{padding:36px 0;}
.swx-title{font-size:clamp(28px,3.6vw,40px);letter-spacing:.02em;margin:0 0 14px;}
.swx-lead{font-size:clamp(16px,2.1vw,18px);color:var(--muted);margin:0 0 20px;}

/* H2見出しの左にロゴ（このページ限定） */
.swx-page h2.swx-title{
  display:flex; align-items:center; gap:12px;
}
.swx-page h2.swx-title::before{
  content:"";
  width:28px; height:28px; flex:0 0 28px;
  background: var(--h2-logo) center/contain no-repeat;
  border-radius:6px;
}
@media (min-width:900px){
  .swx-page h2.swx-title::before{ width:82px; height:82px; flex-basis:82px; }
}

/* ===== Hero ===== */
.swx-hero{
  position:relative; display:grid; place-items:end start;
  min-height:58vh; color:#fff; overflow:hidden; isolation:isolate;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, #000 30%, var(--brand-blue) 10%) 0%,
      rgba(0,0,0,.55) 65%),
    var(--hero-img, none) center/cover no-repeat;
}
.swx-hero__bg{position:absolute;inset:0;z-index:0;pointer-events:none;}
.swx-hero__body{padding:56px 0;max-width:780px;}
.swx-hero .swx-title{color:#FCFDFE;font-weight:800;font-size:clamp(34px,5.2vw,56px);margin-bottom:10px;}
.swx-hero .swx-lead{color:#F3F6FA;opacity:.98;}

/* CTA（サイト横断で使用可） */
.swx-cta{
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 20px; border-radius:999px;
  background: var(--brand-300);
  color: var(--brand-yellow-ink);
  font-weight:700; text-decoration:none;
  box-shadow: 0 8px 24px rgba(255,181,0,.28);
}
.swx-cta:hover{ background: var(--brand-200); }
.swx-cta:focus-visible{ outline:3px solid #fff; outline-offset:2px; }

/* 一時的に押せなくする（資料DLなど） */
a.is-disabled{ pointer-events:none; user-select:none; opacity:.65; position:relative; }
a.is-disabled::after{ content:"（作成中）"; margin-left:.5em; font-weight:700; color:var(--muted); }

/* ===== Steps ===== */
.swx-steps{display:grid;gap:var(--gap);grid-template-columns:1fr;}
@media (min-width:900px){ .swx-steps{grid-template-columns:repeat(3,1fr);} }
.swx-step{
  background:var(--card); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:24px; position:relative;
}
.swx-step__num{
  display:inline-block; font-weight:800; font-size:12px; letter-spacing:.12em;
  background: var(--brand-100); color: var(--brand-800);
  padding:6px 12px; border-radius:999px; margin-bottom:10px;
  border:1px solid var(--brand-300);
}
.swx-step h3{font-size:18px; font-weight:800; letter-spacing:.01em; margin:0 0 8px;}
.swx-step p{margin:0;}

/* Step media */
.swx-step__media{margin:12px 0 10px;border-radius:12px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.10);}
.swx-step__media img{display:block;width:100%;height:auto;}
.swx-step__cap{font-size:13px;color:var(--muted);margin-top:8px;}

/* 吹き出し */
.swx-bubble{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:flex-start;margin-top:14px;}
.swx-bubble__img{width:54px;height:54px;border-radius:12px;object-fit:cover;box-shadow:0 2px 8px rgba(0,0,0,.15);background:#fff;}
.swx-bubble__box{
  background: color-mix(in oklab, var(--brand-100) 74%, white);
  border-radius:12px; padding:12px 14px;
  border:1px solid var(--brand-300); position:relative;
}
.swx-bubble__box p{margin:0;font-size:15px;}
.swx-bubble__box::after{
  content:""; position:absolute; left:-8px; top:14px; width:12px; height:12px;
  background: color-mix(in oklab, var(--brand-100) 74%, white);
  border-left:1px solid var(--brand-300);
  border-bottom:1px solid var(--brand-300);
  transform:rotate(45deg);
}

/* ===== Day section background ===== */
.swx-sec--daybg{position:relative;isolation:isolate;}
.swx-sec--daybg::before{content:"";position:absolute;inset:0;z-index:-1;background:center/cover no-repeat;background-image:var(--day-bg, none);}
.swx-sec--daybg::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.88));}
.swx-timeline{margin-top:10px;background:rgba(255,255,255,.78);border-radius:var(--radius);padding:18px;}
.swx-tl{display:grid;gap:12px;}
.swx-tl__row{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:start;background:#fff;border-radius:12px;padding:12px;box-shadow:0 1px 10px rgba(0,0,0,.08);}
.swx-tl__time{font-weight:800;color:var(--brand-700);}
.swx-tl__txt{color:var(--ink);}

/* ===== FAQ ===== */
.swx-faq{display:grid;gap:12px;}
.swx-qa{background:#fff;border-radius:12px;box-shadow:var(--shadow);}
.swx-qa summary{list-style:none;cursor:pointer;padding:16px 18px;font-weight:700;display:flex;gap:10px;align-items:center;position:relative;}
.swx-qa summary::-webkit-details-marker{display:none;}
.swx-qa summary::after{content:"▾";position:absolute;right:16px;transform:translateY(-2px);transition:.2s;}
.swx-qa[open] summary::after{transform:rotate(180deg) translateY(2px);}
.swx-qa__a{padding:0 18px 16px;color:var(--muted);}
.swx-qa__a p{margin:12px 0 0;}
.swx-qa summary:hover{ background: color-mix(in oklab, var(--brand-50) 55%, white); }
.swx-qa[open]{ border:1px solid var(--brand-200); }
.swx-qa summary:focus-visible{
  outline:3px solid color-mix(in oklab, var(--brand-200) 70%, white);
  outline-offset:3px; border-radius:12px;
}

/* ===== Results / CTA / Policy ===== */
.swx-cards{display:grid;gap:var(--gap);grid-template-columns:1fr;}
@media (min-width:900px){.swx-cards{grid-template-columns:repeat(2,1fr);}}
.swx-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;}
.swx-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;}
.swx-metric{background:var(--bg);border-radius:12px;padding:14px;}
.swx-metric b{display:block;font-size:20px;}
.swx-cta-bar{
  display:flex; justify-content:center; padding:28px 0;
  background: linear-gradient(90deg, var(--brand-100), var(--brand-300));
  border-radius:16px;
}
.swx-cta-bar .swx-cta{font-size:16px;}
.swx-policy{font-size:14px;color:#777;}

/* ===== Reveal ===== */
.js-reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease, transform .6s ease;}
.js-reveal.is-in{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){
  .js-reveal{opacity:1;transform:none;transition:none;}
}

/* ===== Steps: always-on carousel ===== */
.swx-steps.is-carousel{
  display:flex; gap:18px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:8px;
  scroll-padding-inline:16px;
}
.swx-steps.is-carousel .swx-step{
  flex:0 0 86%; scroll-snap-align:start; scroll-margin-inline:16px;
}
@media (min-width:900px){
  .swx-steps.is-carousel .swx-step{ flex-basis:70%; }
}

/* nav（常時表示） */
.swx-steps-nav{display:flex; align-items:center; justify-content:center; gap:10px; margin-top:10px;}
.swx-step-btn{
  appearance:none; border:0; background:#fff; width:38px; height:38px;
  border-radius:999px; box-shadow:0 2px 10px rgba(0,0,0,.15); font-size:22px; line-height:1; cursor:pointer;
}
.swx-step-btn:focus-visible{ outline:3px solid var(--brand-b-weak); }
.swx-step-dots{display:flex; gap:8px;}
.swx-step-dots span{ width:8px; height:8px; border-radius:999px; background:#DADDE6; display:inline-block; }
.swx-step-dots span.is-active{ background: var(--brand-700); width:24px; border-radius:8px; transition:width .2s; }

/* ===== 撮影ポリシー（背景＋大きめ文字＋広い余白） ===== */
.swx-sec--policybg{
  position: relative; isolation: isolate; padding: 88px 0;
}
.swx-sec--policybg::before{
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: center/cover no-repeat; background-image: var(--policy-bg, none);
}
.swx-sec--policybg::after{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.88));
}
.swx-sec--policybg .swx-title{ margin-bottom: 18px; }
.swx-sec--policybg .swx-policy{
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.9; background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.04); border-radius: 16px;
  padding: 20px 22px; box-shadow: 0 6px 18px rgba(0,0,0,.06);
  margin: 10px 0 0;
}
/* ===== Results: 3段を固定（1→2→3） ===== */
/* 旧: @media (min-width:900px){ .swx-results-card{ grid-template-columns:1.2fr .8fr; ... } } がある場合は削除
   もしくは下の上書きが後勝ちになるよう、これをファイルの一番下に置いてください。 */

.swx-results-card{
  --card-pad: 22px;
  position: relative;
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
  padding: var(--card-pad);
  display: grid;
  grid-template-areas:
    "lead"
    "metrics"
    "cta";               /* 3段レイアウトを明示 */
  grid-template-columns: 1fr !important; /* 旧2カラム指定を無効化 */
  gap: 16px;
}

/* 1段目：本文 */
.swx-results__lead{ grid-area: lead; }
.swx-results__lead > p{ margin:0; color:var(--ink); }

/* 2段目：メトリクス（2カードを横並びで“いっぱい”） */
.swx-results__metrics{
  grid-area: metrics;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr)); /* 2分割 */
  gap:14px;
}
.swx-metric-card{
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 10px rgba(0,0,0,.06) inset;
}
.swx-metric-card__title{ display:block; font-size:18px; font-weight:800; margin-bottom:4px; }
.swx-metric-card__desc{ color: var(--muted); font-size:14px; }

/* 3段目：カード下辺にぴったり重ねるCTA（中央寄せ） */
.swx-results__cta{
  grid-area: cta;
  margin-inline: calc(var(--card-pad) * -1);
  margin-bottom: calc(var(--card-pad) * -1);  /* 下辺を外周カードに揃える */
  background: linear-gradient(90deg, var(--brand-100), var(--brand-300));
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 10px 26px rgba(255,181,0,.20) inset;
}
.swx-results__note{ margin:0; font-size:13px; color:#6A6F7A; }

/* SPはメトリクスを縦積みに */
@media (max-width: 599.98px){
  .swx-results__metrics{ grid-template-columns: 1fr; }
  .swx-results-card{ --card-pad: 18px; gap: 14px; }
  .swx-results__cta{ padding: 24px; }
}
/* 黄帯の上で映えるコントラストCTA */
.swx-cta--contrast{
  background: var(--brand-blue);
  color:#fff;
  box-shadow: 0 10px 24px rgba(43,106,255,.28), 0 0 0 3px rgba(255,255,255,.45) inset;
}
.swx-cta--contrast:hover{ filter:none; background: color-mix(in oklab, var(--brand-blue) 88%, black); }
.swx-cta--contrast:focus-visible{ outline:3px solid #fff; outline-offset:2px; }
