/* =========================================================================
   Trelogi サイト 共通スタイル（2026-11 刷新）
   決まりごとは docs/redesign/HANDOFF.md の 3章。
   - 色は下の変数だけを使う。新しい色を足さない
   - 角は丸めない（図の枠だけ --radius-fig）
   - 区切りは細い線。影は使わない（サイドのバナーとおすすめの札だけ例外）
   ページ固有のスタイルは css/<ページ>.css に書く。
   ========================================================================= */

:root {
  /* 4 系統 */
  --ink: #1c1f24;          /* 墨色: タイトル帯・フッター・主なボタン・札 */
  --sand: #f3efe8;         /* 砂色: ページの地 */
  --white: #ffffff;        /* 白: カード・表・区間の地 */
  --mustard: #e8c15a;      /* からし色: 暗い地の上の差し色・札の地・キャンペーン */
  --ochre: #8a6400;        /* 濃い黄土色: 明るい地の上の差し色 */

  /* 補助 */
  --text: #14171a;
  --text-sub: #414a45;
  --text-muted: #5f6862;
  --line: #d3cabb;
  --fig-bg: #faf7f1;
  --fig-blue: #0b6bcb;     /* 図: 利食い・買い */
  --fig-orange: #c2500a;   /* 図: 損切り・売り */
  --on-ink: #f4f2ee;
  --on-ink-sub: #d3d0c9;
  --on-ink-muted: #aaa69d;
  --on-ink-line: #3d4148;

  --font-sans: 'IBM Plex Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Sans JP', monospace;

  --content: 1120px;
  --content-narrow: 880px;
  --gutter: 32px;
  --radius-fig: 8px;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

/* ---- 基本 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--text); }
a:hover { color: var(--ochre); }
button { font-family: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); }

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap--narrow { max-width: var(--content-narrow); }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

/* ---- サイドのキャンペーンバナー ----
   1180px より広い: 右端に固定した縦書きの短冊
   1180px 以下: ページの一番上の横書きの帯 */
.camp {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  padding: 10px var(--gutter);
  background: var(--mustard);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
}
.camp:hover { color: var(--ink); }
.camp__badge {
  padding: 2px 10px;
  background: var(--ink);
  color: var(--mustard);
  font-size: 13px;
  letter-spacing: 0.16em;
}
.camp__title { font-size: 15px; letter-spacing: 0.06em; line-height: 1.3; }
.camp__date { font-size: 14px; letter-spacing: 0.04em; }
.camp__arrow { flex: none; }

@media (min-width: 1181px) {
  .camp {
    position: fixed;
    right: 0;
    top: 34vh;
    z-index: 50;
    width: 56px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 14px 0 18px;
    border: 1px solid var(--ink);
    border-right: 0;
    box-shadow: -6px 8px 18px -8px rgba(20, 23, 26, 0.45);
  }
  .camp__badge, .camp__title, .camp__date { writing-mode: vertical-rl; }
  .camp__badge { padding: 8px 4px; }
  .camp__title { font-size: 17px; letter-spacing: 0.12em; line-height: 1.2; }
  .camp__date { font-size: 14px; letter-spacing: 0.1em; line-height: 1.5; }
  .camp__date .tcy { text-combine-upright: all; -webkit-text-combine: horizontal; }
}

/* ---- ヘッダー ---- */
.site-header { background: var(--sand); position: relative; z-index: 40; }
.site-header__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { display: block; width: 40px; height: 40px; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-size: 18px; font-weight: 700; line-height: 1.4; }
.brand__sub { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.site-nav a { text-decoration: none; padding: 12px 0; }
.site-nav a[aria-current="page"] { color: var(--ochre); font-weight: 700; }
.site-nav .nav-cta { padding: 12px 20px; background: var(--ochre); color: var(--white); font-weight: 700; }
.site-nav .nav-cta:hover { color: var(--white); background: var(--ink); }
.site-nav .nav-cta[aria-current="page"] { color: var(--white); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.site-header.is-open .nav-toggle .icon-open { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter) 16px;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a { padding: 14px 0; border-top: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; border-top: 0; }
}

/* ---- タイトル帯 ---- */
.title-band { background: var(--ink); color: var(--on-ink); }
.title-band__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 48px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.eyebrow { display: flex; align-items: center; gap: 20px; }
.eyebrow__text { font-size: 18px; letter-spacing: 0.2em; color: var(--mustard); }
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--on-ink-line); }
.title-band h1 { margin: 0; font-size: clamp(22px, 4vw, 44px); line-height: 1.3; font-weight: 700; }
.title-band__lead { margin: 0; font-size: 15px; color: var(--on-ink-sub); }

/* トップのタイトル帯（大） */
.hero { min-height: clamp(180px, 30vw, 380px); display: flex; align-items: center; }
.hero .title-band__inner {
  width: 100%;
  padding: clamp(28px, 4.4vw, 56px) clamp(20px, 2.5vw, 32px);
  gap: clamp(14px, 1.9vw, 24px);
}
.hero .eyebrow__text { font-size: clamp(15px, 1.7vw, 21px); }
.hero h1 { font-size: clamp(34px, 6vw, 76px); line-height: 1.15; display: flex; flex-direction: column; }
.hero__strong { font-weight: 700; letter-spacing: 0.02em; }
.hero__light { font-weight: 200; letter-spacing: 0.06em; color: var(--mustard); }

/* キャンペーンの細い帯（料金プランの題の帯のすぐ下） */
.camp-strip {
  background: var(--mustard);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px var(--gutter);
}

/* ---- 区間 ---- */
.section { padding: 88px 0; }
.section--white { background: var(--white); }
.section--sand { background: var(--sand); }
.section--sand-to-white { background: linear-gradient(to bottom, var(--sand) 0, var(--white) 240px); }
.section--white-to-sand { background: linear-gradient(to bottom, var(--white) 0, var(--sand) 100%); }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.section-title { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.35; font-weight: 700; }
.section-lead { margin: 0; font-size: 15px; color: var(--text-sub); }

/* ---- ボタン・リンク ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ochre); border-color: var(--ochre); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--block { display: flex; width: 100%; }

.more-link { color: var(--ochre); font-weight: 500; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* ---- 札 ---- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--ink);
  color: var(--white);
}
.tag--mustard { background: var(--mustard); color: var(--ink); }
.tag--outline { background: transparent; color: var(--text-sub); border: 1px solid var(--line); }
.tag--new { background: var(--ochre); color: var(--white); font-family: var(--font-mono); }

/* ---- カード ---- */
.card { background: var(--white); border: 1px solid var(--line); padding: 28px; }

/* ---- 動画（トップ・ダウンロードページ） ----
   サムネイルのボタン。押すと site.js が iframe.video-frame に置き換える */
.video-lazy {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
}
.video-lazy img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mustard);
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play svg { display: block; }
.video-play--large { width: 84px; height: 84px; }
.video-lazy:hover .video-play, .video-lazy:focus-visible .video-play { background: var(--white); }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--ink); }

/* ---- よくある質問（details） ---- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: 'Q';
  flex: none;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ochre);
}
.faq summary::after {
  content: '+';
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
}
.faq details[open] summary::after { content: '−'; }
.faq .faq__a { margin: 0; padding: 0 0 24px 32px; font-size: 15px; color: var(--text-sub); }
.faq .faq__a p { margin: 0 0 8px; }
.faq .faq__a p:last-child { margin-bottom: 0; }
.faq .faq__a a { color: var(--ochre); }

/* ---- 規約のページ（白い紙の枠） ---- */
.legal { padding: 56px 0 88px; }
.paper { background: var(--white); border: 1px solid var(--line); padding: 12px 40px 20px; }
@media (max-width: 640px) { .paper { padding: 4px 20px 12px; } }
.paper a { color: var(--ochre); }
.legal-rows { margin: 0; display: flex; flex-direction: column; }
.legal-row { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.legal-row:last-child { border-bottom: 0; }
.legal-row dt { flex: 0 0 240px; font-size: 15px; font-weight: 700; }
.legal-row dd { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 15px; color: var(--text-sub); }
.legal-row dd p { margin: 0 0 8px; }
.legal-row dd p:last-child { margin-bottom: 0; }
.legal-row .note { font-size: 13px; color: var(--text-muted); }

.article { font-size: 15px; color: var(--text-sub); }
.article h2 { margin: 32px 0 12px; font-size: 18px; color: var(--text); }
.article h2:first-child { margin-top: 20px; }
.article p { margin: 0 0 12px; }
.article ol, .article ul { margin: 0 0 12px; padding-left: 1.6em; }
.article li { margin-bottom: 6px; }
.article .article-date { margin-top: 32px; text-align: right; color: var(--text-muted); }

/* ---- フッター ---- */
.site-footer { background: var(--ink); color: var(--on-ink-sub); }
.site-footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 48px var(--gutter) 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px 64px;
}
.footer-brand { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-brand a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-ink); }
.footer-brand img { display: block; width: 32px; height: 32px; }
.footer-brand__name { font-size: 16px; font-weight: 700; }
.footer-brand__desc { font-size: 13px; line-height: 1.8; }
.footer-nav { display: flex; flex-direction: column; font-size: 14px; }
.footer-nav__title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; padding-bottom: 8px; color: var(--mustard); }
.footer-nav a { color: var(--on-ink); text-decoration: none; padding: 5px 0; }
.footer-nav a:hover { color: var(--mustard); }
.site-footer__copy { border-top: 1px solid var(--on-ink-line); }
.site-footer__copy p { max-width: var(--content); margin: 0 auto; padding: 16px var(--gutter); font-size: 12px; color: var(--on-ink-muted); }
.site-footer__copy a { color: var(--on-ink-muted); text-decoration: none; }
.site-footer__copy a:hover { color: var(--mustard); }

/* 画面には出さず、読み上げにだけ渡す文字 */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* 縦書きの短冊では「キャンペーン」を省く（「特典」の札で伝わる。長くしすぎない） */
@media (min-width: 1181px) { .camp__word { display: none; } }

/* 見出しと短い文は文節の切れ目で折り返す（「ます」「を」だけが次の行に落ちないように）。対応しないブラウザでは今までどおり */
h1, h2, h3, dt, th, summary, .section-lead, .title-band__lead, .bn-copy, .bn-note { word-break: auto-phrase; }
.camp-strip span { display: inline-block; }  /* 名前と期限を、それぞれ途中で折り返さない */

/* 2027-01-01 から通常料金（<html data-phase="regular">）。キャンペーンの短冊と料金ページの帯を出さない */
html[data-phase="regular"] .camp, html[data-phase="regular"] .camp-strip { display: none; }
