/* ==========================================================
   gleasin ご相談窓口 LP（東チャンネル経由）
   ========================================================== */

:root {
  --navy: #14203a;        /* スーツ・カーディガンの紺：本文・フォーム面 */
  --navy-deep: #0e1729;   /* フッター */
  --green: #0f5a3c;       /* 外野フェンスの緑：チャンネル色（タグ・加速・CTA） */
  --green-deep: #0b4630;
  --clay: #d9792b;        /* 内野の土色：「加速」のスピードラインのみ */
  --paper: #eef3f6;       /* 写真背景の白 */
  --white: #ffffff;
  --muted: #4a5568;
  --line: #d3dce4;
  --on-dark-muted: #d5dceb;
  --blue: #1f6fae;        /* gleasinのブランド青（参照資料・ロゴ）：標準機能・比較の強調 */
  --option-bg: #fff4e0;   /* オプション表示 */
  --option-line: #f0b26a;
  --option-text: #9a4f0e;
  --notice-bg: #222222;   /* 東チャンネル案内帯 */
  --notice-text: #8ec0f4;
  --cta: #ecc531;         /* ファーストビューの相談ボタン */
  --cta-deep: #ddb21a;
  --cta-text: #2a2a2a;

  --focus: var(--navy);
  --lean: 10deg;          /* 前傾角度：加速・写真の斜辺・タグで共通 */
  --tan-lean: 0.1763;     /* tan(10deg) */

  --gutter: clamp(20px, 5.4vw, 48px);
  --max: 1160px;
  --page-max: 1400px;     /* ページ全体の最大表示幅 */
  --page-w: min(100vw, var(--page-max));

  --font: "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

html { background: var(--paper); }

body {
  max-width: var(--page-max);
  margin: 0 auto;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--navy);
  background: var(--paper);
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 日本語の改行位置を <wbr> で制御（はみ出す場合のみ任意位置で折り返す） */
.jp-phrase {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ---------- header ---------- */
.site-header__inner {
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}

.site-header { border-bottom: 1px solid var(--line); }

.site-header__org { line-height: 0; }

/* エムディー株式会社ロゴ（md-logo_color.png 1399×398） */
.site-header__org img {
  width: auto;
  height: clamp(24px, 4vw, 32px);
}

.site-header__purpose {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- hero (mobile first) ---------- */
/* 東チャンネルのキャラクター画像 */
.hero__banner {
  margin: 0;
  background: var(--green); /* 画像の読み込み前・未配置時 */
}

.hero__banner img {
  width: 100%;
  min-height: 96px;
  object-fit: cover;
  object-position: 50% 40%;
}

/* 東チャンネル経由であることの案内帯 */
.hero__notice {
  padding: 0.7em var(--gutter);
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: clamp(1rem, 0.75rem + 1.25vw, 1.75rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
}

.hero__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "source"
    "photo"
    "body";
  overflow: clip;
  padding-bottom: clamp(56px, 12vw, 80px);
  background: linear-gradient(100deg, #e3ecf2 0%, #f1f6f9 55%, #f7fafc 100%);
}

/* 「＼ 東チャンネル・SNSからお越しの皆さまへ ／」 */
.hero__source {
  grid-area: source;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  padding: 20px var(--gutter) 16px;
  text-align: center;
  font-size: clamp(0.875rem, 0.55rem + 1.3vw, 1.375rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.hero__source::before,
.hero__source::after {
  content: "";
  flex: none;
  width: 1.5px;
  height: 1.6em;
  background: currentColor;
  transform: rotate(-40deg);
}

.hero__source::after { transform: rotate(40deg); }

.hero__photo {
  grid-area: photo;
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 11;
  max-height: min(46svh, 400px);
  background: #dfe8ef;
  /* 右肩上がりの下辺（前進方向） */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--page-w) * 0.0875), 0 100%);
}

.hero__photo picture { display: block; height: 100%; }

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 28%;
}

.hero__body {
  grid-area: body;
  padding: clamp(20px, 5vw, 32px) var(--gutter) 0;
  text-align: center;
}

/* メインコピー：「gleasinで / FC出店を加速する」 */
.hero__title {
  margin: 0;
  font-size: min(4rem, 13.6vw);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
}

.hero__line {
  display: block;
  white-space: nowrap;
}

/* 1行目：ロゴ＋「で」 */
.hero__line--service { font-size: 0.82em; }

.hero__logo {
  display: inline-block;
  width: auto;
  height: 1.3em;
  margin-right: 0.08em;
  vertical-align: -0.2em;
}

.hero__chunk { display: block; }

/* PCでは写真に重なるため、写真・淡い帯より前面に出す
   （z-index は「する」自身にだけ付け、乗算の「加速」には影響させない） */
.hero__sub {
  position: relative;
  z-index: 2;
  font-size: 0.82em;
}

@media (min-width: 600px) {
  .hero__title { font-size: min(5.5rem, 7.6vw); }
  .hero__chunk { display: inline; }
}

/* 「加速」：ロゴ画像（azuma-channel-kasoku.png 1835×857）
   画像の白背景は乗算で消し、上下左右の余白は負のマージンで詰める
   （乗算が背景に届くよう、親要素に container-type・isolation 等を付けないこと） */
.accel {
  display: inline-block;
  width: auto;
  height: 1.55em;
  margin: -0.17em 0.02em -0.21em 0.06em;
  vertical-align: -0.24em;
  mix-blend-mode: multiply;
  filter: contrast(1.15); /* 白背景のわずかなムラ（#fdfefe 等）を純白に寄せて乗算で消す */
}

/* 導入演出：読み込み時に一度だけ。動きを減らす設定では無効 */
@media (prefers-reduced-motion: no-preference) {
  .accel { animation: accel-in 0.6s 0.2s cubic-bezier(0.14, 0.82, 0.26, 1) both; }
}

@keyframes accel-in {
  from { opacity: 0; transform: translateX(-0.5em); }
  to   { opacity: 1; transform: none; }
}

/* 補足・CTA */
.hero__lead {
  margin-top: clamp(24px, 5vw, 48px);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.7;
}

.hero__action { margin-top: clamp(18px, 3vw, 28px); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  min-height: 64px;
  padding: 12px 2.2em;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-text);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(20, 32, 58, 0.18);
  transition: background-color 0.2s ease;
}

.button:hover { background: var(--cta-deep); }

/* ---------- hero (PC) ---------- */
@media (min-width: 900px) {
  .hero__main {
    --hero-h: clamp(460px, 26vw, 680px);

    min-height: var(--hero-h);
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".      photo"
      "source photo"
      "body   photo"
      ".      photo";
    padding-bottom: 0;
  }

  .hero__source,
  .hero__body {
    /* 中央揃えのため左右対称の余白にする */
    padding-left: clamp(24px, 4vw, 64px);
    padding-right: clamp(24px, 4vw, 64px);
  }

  .hero__source { padding-top: 40px; padding-bottom: 0; }

  .hero__body { padding-top: 24px; padding-bottom: 48px; }

  .hero__photo {
    aspect-ratio: auto;
    max-height: none;
    height: 100%;
    /* 上下いっぱいに表示し、左辺を前傾角度に合わせて斜めにカット */
    clip-path: polygon(
      calc(var(--hero-h) * var(--tan-lean)) 0,
      100% 0,
      100% 100%,
      0 100%
    );
  }

  .hero__photo img { object-position: 42% 30%; }

  .hero__title { font-size: min(4.5rem, 3.8vw); }

  .button { width: auto; min-width: 360px; min-height: 72px; }
}

/* ---------- about ---------- */
.about__intro {
  background: var(--white);
  padding: clamp(64px, 13vw, 120px) 0 clamp(52px, 10vw, 88px);
}

.about__inner {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
}

.about__lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.95;
}

@media (min-width: 900px) {
  .about__inner {
    justify-items: center;
  }
  .about__lead {
    max-width: 40em;
  }
}

/* サービスの流れ・比較（参照資料の構成に準拠） */
.flow {
  background: var(--paper);
  padding: clamp(56px, 11vw, 104px) 0 clamp(64px, 12vw, 112px);
}

.flow__inner {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.flow__title {
  margin: 0;
  text-wrap: balance;
  text-align: center;
  font-size: clamp(1.375rem, 1rem + 1.8vw, 2.25rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
}

.flow__lead {
  margin-top: 12px;
  text-align: center;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.8;
}

/* 5つの機能 */
.steps {
  list-style: none;
  margin: clamp(32px, 6vw, 44px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.step {
  --accent: var(--blue);
  padding: 16px 16px 20px;
  background: var(--white);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
}

.step--option { --accent: var(--clay); }

.step__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.step__num {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.step__badge {
  display: inline-block;
  padding: 0.1em 0.85em;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.step--option .step__badge {
  border-color: var(--option-line);
  background: var(--option-bg);
  color: var(--option-text);
}

.step__title {
  margin: 10px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
}

.step__text {
  word-break: keep-all;
  overflow-wrap: anywhere;
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.75;
}

/* タブレット：1行に「番号・機能名・説明・区分」を並べる */
@media (min-width: 640px) and (max-width: 1079px) {
  .step {
    display: grid;
    grid-template-columns: 2.4em 9.5em minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: center;
    padding: 16px 20px;
  }
  .step__meta { display: contents; }
  .step__num { grid-column: 1; grid-row: 1; }
  .step__badge { grid-column: 4; grid-row: 1; }
  .step__title { grid-column: 2; grid-row: 1; margin: 0; }
  .step__text { grid-column: 3; grid-row: 1; margin: 0; }
}

/* PC：5列 */
@media (min-width: 1080px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* 凡例 */
.legend {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend__swatch {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 3px;
  background: var(--white);
}

.legend__swatch--option { border-top-color: var(--clay); }

/* 比較 */
.compare {
  list-style: none;
  margin: clamp(40px, 7vw, 56px) 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .compare {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.compare__item {
  padding: clamp(20px, 4vw, 26px) clamp(20px, 4vw, 28px) clamp(22px, 4vw, 28px);
  background: var(--white);
  border-radius: 10px;
}

.compare__label {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}

.compare__title {
  margin: 8px 0 0;
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.5;
}

.compare__title,
.compare__text {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.compare__text {
  margin-top: 12px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
}

.compare__item--ours {
  background: var(--blue);
  color: var(--white);
}

.compare__item--ours .compare__text { color: var(--white); }

/* ---------- contact ---------- */
.contact {
  --focus: var(--white);
  background: var(--navy);
  color: var(--white);
  padding: clamp(64px, 13vw, 120px) 0;
}

.contact__inner {
  max-width: calc(800px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.contact .section-title { scroll-margin-top: 24px; }

.contact .section-title:focus:not(:focus-visible) { outline: none; }

.contact__note {
  margin-top: 12px;
  color: var(--on-dark-muted);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
}

.form-frame {
  --focus: var(--navy);
  margin-top: 32px;
  padding: clamp(20px, 5vw, 40px);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}

@media (min-width: 900px) {
  .contact__inner {
    max-width: calc(var(--max) + var(--gutter) * 2);
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 64px;
    align-items: start;
  }
  .contact__head { grid-column: 1; grid-row: 1 / span 2; }
  .form-frame { grid-column: 2; grid-row: 1; margin-top: 0; }
  .contact__fallback { grid-column: 2; grid-row: 2; }
}

.contact__fallback {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
  line-height: 1.8;
}

.contact__fallback a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

/* ---------- thanks（thanks.html） ---------- */
/* フッターを画面下端に固定し、内容が少なくても余白で埋める */
.page-thanks {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.page-thanks .thanks { flex: 1; }

.thanks {
  background: var(--white);
  padding: clamp(56px, 11vw, 104px) 0 clamp(64px, 12vw, 112px);
}

.thanks__inner {
  max-width: calc(760px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.thanks__title {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
}

.thanks__body {
  margin-top: clamp(24px, 5vw, 36px);
  display: grid;
  gap: 1em;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  font-weight: 500;
}

.thanks__notice {
  margin-top: clamp(32px, 6vw, 48px);
  padding: clamp(20px, 4vw, 28px);
  display: grid;
  gap: 0.9em;
  border-radius: 8px;
  background: var(--paper);
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.85;
}

.thanks__tel {
  margin: 0.4em 0 0;
  display: grid;
  gap: 4px;
  color: var(--navy);
}

.thanks__tel div { display: flex; flex-wrap: wrap; gap: 0 1em; }

.thanks__tel dt { font-weight: 700; }

.thanks__tel dd { margin: 0; }

.thanks__tel a {
  font-weight: 700;
  text-underline-offset: 0.22em;
}

.thanks__back { margin-top: clamp(32px, 6vw, 48px); }

.thanks__back a {
  font-weight: 700;
  text-underline-offset: 0.22em;
}

/* ---------- footer ---------- */
.site-footer {
  --focus: var(--white);
  background: var(--navy-deep);
  color: var(--white);
}

.site-footer__inner {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 0.875rem;
}

.site-footer__org { font-weight: 700; letter-spacing: 0.04em; }

.site-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  text-underline-offset: 0.22em;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

/* ---------- hero: reiwa FC reference layout ---------- */
.hero {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  color: #3f3f3f;
}

.hero__banner {
  padding: clamp(12px, 1.2vw, 24px) var(--gutter);
  background: #f4f4f4;
}

.hero__banner img {
  width: min(100%, 804px);
  min-height: 0;
  margin: 0 auto;
  object-fit: contain;
}

.hero__main {
  padding-bottom: clamp(42px, 7vw, 72px);
  background: linear-gradient(110deg, #e2f4f8 0%, #f8faff 100%);
}

.hero__photo { display: none; }

.hero__source {
  padding-top: clamp(28px, 5vw, 70px);
  padding-bottom: clamp(30px, 5vw, 62px);
  font-size: clamp(1rem, 1.2vw + 0.55rem, 2.25rem);
  font-weight: 700;
}

.hero__body { padding-top: 0; }

.hero__title {
  color: #303030;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  line-height: 1.18;
}

.hero__lead {
  margin-top: clamp(26px, 5vw, 48px);
  font-size: clamp(1rem, 1vw + 0.6rem, 1.75rem);
  font-weight: 700;
}

.accel {
  content: url("../images/kasoku.png");
  height: 1.45em;
  margin-right: 0;
  filter: contrast(1.08);
}

@media (min-width: 1200px) {
  .hero__main {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "source"
      "body";
    padding-bottom: clamp(56px, 4vw, 76px);
  }

  .hero__source {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

  .hero__body {
    width: min(100%, 1680px);
    margin: 0 auto;
    padding: 0 clamp(36px, 4vw, 80px);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    grid-template-rows: auto auto;
    column-gap: clamp(24px, 3vw, 56px);
    align-items: center;
    text-align: center;
  }

  .hero__title {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: clamp(3rem, 3.9vw, 4.6rem);
  }

  .hero__lead {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin-top: 0;
    margin-bottom: 18px;
  }

  .hero__action {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  .button {
    width: 100%;
    min-width: 0;
    max-width: 570px;
    min-height: 80px;
    padding-right: 1.2em;
    padding-left: 1.2em;
    font-size: clamp(1.25rem, 0.75vw + 0.55rem, 1.6rem);
    white-space: nowrap;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .hero__main {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "source"
      "body";
    padding-bottom: 64px;
  }

  .hero__source {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

  .hero__body {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  .hero__title { font-size: clamp(3.5rem, 7vw, 4.75rem); }

  .hero__lead { margin-top: 28px; }
}
