/* ==========================================================================
   MegExpress Web Studio — トップページ
   生成り（和紙）× 藍 × 朱（落款）／和モダン・「静」の中に一点の朱
   動きはすべてCSSのみ（JavaScript 0行）
   ========================================================================== */

:root {
  /* Color: 和の基調色 */
  --washi: #f8f5ee;        /* 生成り（ベース） */
  --washi-deep: #f1ecdf;   /* 生成り 濃（交互セクション） */
  --sumi: #2b2723;         /* 墨（本文） */
  --usuzumi: #6e675c;      /* 薄墨（補足） */
  --kon: #1d3a52;          /* 紺藍（見出し・帯） */
  --kon-deep: #14283b;     /* 濃紺（フッター） */
  --ai: #2f6a8e;           /* 藍（リンク） */
  --shu: #c73e2e;          /* 朱（落款・アクセント） */
  --shu-deep: #a93226;
  --keisen: #ddd5c4;       /* 罫線 */

  /* Type */
  --font-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic Medium", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Georgia", serif;

  /* Spacing / Radius / Shadow */
  --space-section: clamp(72px, 10vw, 112px);
  --space-inner: 24px;
  --radius: 6px;
  --shadow-card: 0 2px 12px rgba(43, 39, 35, 0.05);
  --shadow-hover: 0 14px 30px rgba(43, 39, 35, 0.12);

  --header-h: 64px;
  --max-w: 1080px;
}

/* details開閉を高さアニメーションできるブラウザでは有効化（段階的強化） */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  font-family: var(--font-sans);
  color: var(--sumi);
  background: var(--washi);
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--ai);
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--ai);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-feature-settings: "palt";
  color: var(--kon);
}

section {
  scroll-margin-top: var(--header-h);
}

.br-sp { display: none; }

/* ==========================================================================
   動き（CSSのみ・reduced-motion尊重・非対応ブラウザでは静的表示）
   ========================================================================== */

/* スクロール進捗バー: scroll() タイムライン */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--shu), #d96a48);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .progress {
      animation: progress-grow linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes progress-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* スクロール連動の出現: view() タイムライン */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-rise both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes reveal-rise {
  from { opacity: 0; translate: 0 26px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

/* 脇役: 罫線ボタン */
.btn--outline {
  color: var(--kon);
  border: 1.5px solid var(--kon);
  padding: 12.5px 34.5px; /* border分を差し引いて塗りボタンと同じ高さに */
}

.btn--outline:hover {
  background: rgba(29, 58, 82, 0.06);
}

/* 主役: 朱の塗りボタン */
.btn--fill {
  background: var(--shu);
  color: #fff;
  box-shadow: 0 4px 14px rgba(199, 62, 46, 0.3);
}

.btn--fill:hover {
  background: var(--shu-deep);
  box-shadow: 0 8px 22px rgba(199, 62, 46, 0.35);
}

.btn--contact {
  background: #fff;
  color: var(--shu);
  font-size: 1.1rem;
  padding: 16px 48px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.btn--contact:hover {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--washi) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--keisen);
}

.header__inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-inner);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kon);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header__mark,
.footer__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--shu);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85),
              inset 0 0 0 3px var(--shu);
}

.header__logo-sub {
  font-weight: 500;
  color: var(--usuzumi);
  font-size: 0.95rem;
}

.header__nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
}

.header__nav a {
  color: var(--sumi);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  position: relative;
  padding: 4px 0;
}

.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--shu);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.header__nav a:hover::after,
.header__nav a:focus-visible::after {
  transform: scaleX(1);
}

/* 「ご相談」だけ朱の小さな塗りボタン */
.header__nav a.header__cta {
  background: var(--shu);
  color: #fff;
  padding: 7px 18px;
  border-radius: 4px;
  transition: background-color 0.25s ease;
}

.header__nav a.header__cta::after {
  display: none;
}

.header__nav a.header__cta:hover {
  background: var(--shu-deep);
}

/* ==========================================================================
   Hero — 縦書きの見出し ＋ 落款
   ========================================================================== */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(56px, 9vw, 104px)) var(--space-inner) clamp(96px, 12vw, 140px);
  background:
    radial-gradient(ellipse 720px 480px at 88% 8%, rgba(199, 62, 46, 0.05), transparent 70%),
    radial-gradient(ellipse 900px 600px at 0% 100%, rgba(29, 58, 82, 0.05), transparent 70%),
    var(--washi);
  overflow: hidden;
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--kon);
  border: 1px solid var(--keisen);
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero__lead {
  font-size: 1.02rem;
  color: var(--sumi);
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--usuzumi);
}

/* 縦書き見出し（このページの顔） */
.hero__vert {
  writing-mode: vertical-rl;
  display: flex;
  flex-direction: column; /* 縦書きでは列が右→左に積まれる */
  gap: 22px;
  padding: 8px 4px;
}

.hero__title {
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.62;
  color: var(--kon);
  text-wrap: balance;
}

/* 落款（朱印）: 見出しの結びに捺す */
.hero__seal {
  align-self: flex-end;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #fff;
  background: var(--shu);
  padding: 12px 7px 10px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85),
              inset 0 0 0 3.5px var(--shu),
              2px 2px 6px rgba(43, 39, 35, 0.18);
  rotate: -3deg;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__seal {
    animation: stamp 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) 0.45s both;
  }
}

@keyframes stamp {
  0%   { opacity: 0; scale: 1.9; rotate: -12deg; }
  70%  { opacity: 1; scale: 0.94; rotate: -2deg; }
  100% { opacity: 1; scale: 1; rotate: -3deg; }
}

/* 裾の青海波（せいがいは）文様 */
.hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='%23f8f5ee' stroke='%231d3a52' stroke-opacity='.12' stroke-width='1.2'%3E%3Ccircle cx='20' cy='40' r='18'/%3E%3Ccircle cx='20' cy='40' r='12'/%3E%3Ccircle cx='20' cy='40' r='6'/%3E%3Ccircle cx='60' cy='40' r='18'/%3E%3Ccircle cx='60' cy='40' r='12'/%3E%3Ccircle cx='60' cy='40' r='6'/%3E%3Ccircle cx='0' cy='52' r='18'/%3E%3Ccircle cx='0' cy='52' r='12'/%3E%3Ccircle cx='40' cy='52' r='18'/%3E%3Ccircle cx='40' cy='52' r='12'/%3E%3Ccircle cx='80' cy='52' r='18'/%3E%3Ccircle cx='80' cy='52' r='12'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom / 80px 40px;
  pointer-events: none;
}

/* ===== Section 共通 ===== */
.section {
  padding: var(--space-section) var(--space-inner);
}

.section--alt {
  background: var(--washi-deep);
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--shu);
  margin-bottom: 10px;
}

.section__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--shu);
}

.section__title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.section__lead {
  color: var(--usuzumi);
  margin-bottom: 56px;
  max-width: 46em;
}

.section__lead strong {
  color: var(--kon);
  font-weight: 700;
}

/* ==========================================================================
   Works — 公開中の実案件（CSSで描くミニブラウザカード・画像非依存）
   ========================================================================== */
.sites__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 26px;
}

/* 各サイトのブランド配色 */
.site-card--abeauto   { --sc-bg: radial-gradient(ellipse at 50% 120%, #2a2310, #0a0a0a 75%); --sc-fg: #d4af37; --sc-sub: rgba(212, 175, 55, 0.6); }
.site-card--vocab     { --sc-bg: radial-gradient(ellipse at 80% 0%, #272345, #100f14 70%); --sc-fg: #ffffff; --sc-sub: #f5a623; }
.site-card--juacademy { --sc-bg: linear-gradient(160deg, #eaf2fb, #ffffff 70%); --sc-fg: #00375f; --sc-sub: #2a5270; }

.site-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--keisen);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-card:hover,
.site-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* ミニブラウザのタイトルバー */
.site-card__browser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--keisen);
  background: #fbfaf5;
}

.site-card__dots {
  display: flex;
  gap: 5px;
}

.site-card__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--keisen);
}

.site-card__url {
  flex: 1;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--usuzumi);
  background: var(--washi);
  border: 1px solid var(--keisen);
  border-radius: 999px;
  padding: 1px 12px;
  text-align: center;
}

/* ブランド配色で描く「画面」（装飾: 実情報は本文に） */
.site-card__screen {
  height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--sc-bg);
}

.site-card__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--sc-fg);
}

.site-card__slogan {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--sc-sub);
}

.site-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.site-card__body .work-card__desc {
  margin-bottom: 18px;
}

.site-card__link {
  align-self: flex-start;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--kon);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 7px 16px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site-card__link:hover {
  background: var(--kon);
  color: #fff;
}

.site-card__soon {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--shu);
  border: 1px dashed color-mix(in srgb, var(--shu) 55%, var(--keisen));
  border-radius: 4px;
  padding: 7px 14px;
}

/* デモLPブロックとの間の静かな区切り */
.works__demos {
  margin-top: 88px;
  padding-top: 64px;
  border-top: 1px solid var(--keisen);
}

/* ==========================================================================
   Works — 6業種のデモLP（和色の色見本つき）
   ========================================================================== */
.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* 各LPのアクセントカラー（該当LPのCSS変数と一致） */
.work-card--school  { --c1: #1a3a5c; --c2: #f07d00; }
.work-card--yoga    { --c1: #5a7a5a; --c2: #c47a5a; }
.work-card--reform  { --c1: #9e2016; --c2: #f1c40f; }
.work-card--recruit { --c1: #2d8fdd; --c2: #f5a623; }
.work-card--seminar { --c1: #0d1b3e; --c2: #c9a84c; }
.work-card--saas    { --c1: #0f1f3d; --c2: #2563eb; }

.work-card {
  container-type: inline-size; /* カード幅に応じて中の並びを変える */
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--keisen);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 上端の色帯（c1が主・c2が差し色） */
.work-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--c1) 0 72%, var(--c2) 72% 100%);
}

.work-card:hover,
.work-card:focus-within {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--c1) 40%, var(--keisen));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--c1) 18%, rgba(43, 39, 35, 0.08));
}

.work-card__tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c1);
  margin-bottom: 10px;
}

.work-card__title {
  font-family: var(--font-sans);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--kon);
  line-height: 1.5;
  margin-bottom: 8px;
}

.work-card__desc {
  font-size: 0.88rem;
  color: var(--usuzumi);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 20px;
}

.work-card__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px dashed var(--keisen);
  padding-top: 16px;
}

/* カードに十分な幅があるときは色見本とリンクを横並びに */
@container (min-width: 300px) {
  .work-card__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.work-card__palette {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--usuzumi);
  letter-spacing: 0.06em;
}

.chip {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(43, 39, 35, 0.12);
}

.chip--c1 { background: var(--c1); }
.chip--c2 { background: var(--c2); }

.work-card__x {
  color: #b5ad9c;
  font-size: 0.72rem;
}

.work-card__link {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c1);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 7px 16px;
  white-space: nowrap;
  align-self: flex-start;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@container (min-width: 300px) {
  .work-card__link {
    align-self: center;
  }
}

.work-card__link:hover {
  background: var(--c1);
  color: #fff;
}

/* ==========================================================================
   このページ自体も制作サンプル（紺藍の帯）
   ========================================================================== */
.techdemo {
  background: var(--kon);
  color: rgba(255, 255, 255, 0.92);
  padding: clamp(56px, 8vw, 88px) var(--space-inner);
}

.techdemo__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.techdemo__title {
  color: #fff;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding-left: 18px;
  border-left: 3px solid var(--shu);
  margin-bottom: 20px;
  text-wrap: balance;
}

.techdemo__text p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.techdemo__text strong {
  color: #fff;
  font-weight: 700;
}

.techdemo__chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.techdemo__chips li {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}

.techdemo__chips small {
  display: block;
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

/* ==========================================================================
   Strengths — できること
   ========================================================================== */
.strengths__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.strength-card {
  background: #fff;
  border: 1px solid var(--keisen);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-card);
}

.strength-card__icon {
  width: 46px;
  height: 46px;
  color: var(--kon);
  background: var(--washi);
  border: 1px solid var(--keisen);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.strength-card__icon svg {
  width: 24px;
  height: 24px;
}

.strength-card h3 {
  font-family: var(--font-sans);
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.strength-card p {
  font-size: 0.9rem;
  color: var(--usuzumi);
}

/* ==========================================================================
   Flow — 漢数字のステップ
   ========================================================================== */
.flow__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.flow__step {
  position: relative;
  background: #fff;
  border: 1px solid var(--keisen);
  border-radius: var(--radius);
  padding: 28px 18px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

/* ステップ間の連結線（最後以外） */
.flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -21px;
  width: 22px;
  height: 1px;
  background: var(--keisen);
}

.flow__num {
  font-family: var(--font-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--shu);
  border: 1px solid color-mix(in srgb, var(--shu) 45%, var(--keisen));
  border-radius: 50%;
  margin-bottom: 12px;
}

.flow__step h3 {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.flow__step p {
  font-size: 0.8rem;
  color: var(--usuzumi);
  line-height: 1.7;
}

/* ==========================================================================
   About — 一人でやっています
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

.about__text p {
  font-size: 0.98rem;
  margin-bottom: 1.4em;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* 表装（掛け軸）ふうの白フチ */
.about__photo {
  background: #fff;
  border: 1px solid var(--keisen);
  padding: 10px 10px 12px;
  box-shadow: var(--shadow-card);
}

.about__photo--1 {
  rotate: -1deg;
}

.about__photo--2 {
  margin-top: 36px;
  rotate: 1deg;
}

.about__photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.about__photo figcaption {
  font-size: 0.74rem;
  color: var(--usuzumi);
  text-align: center;
  padding-top: 10px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   FAQ — details/summary（開閉もCSSのみ）
   ========================================================================== */
.faq__inner {
  max-width: 760px;
}

.faq__list {
  border-top: 1px solid var(--keisen);
}

.faq__item {
  border-bottom: 1px solid var(--keisen);
}

.faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 48px 22px 44px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--kon);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary:hover {
  color: var(--ai);
}

/* 「問」の朱文字 */
.faq__item summary::before {
  content: "問";
  position: absolute;
  left: 4px;
  top: 24px;
  font-size: 0.95rem;
  color: var(--shu);
}

/* 開閉マーク（＋ → ×） */
.faq__item summary::after {
  content: "＋";
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--usuzumi);
  transition: rotate 0.3s ease;
}

.faq__item[open] summary::after {
  rotate: 45deg;
}

.faq__body {
  padding: 0 24px 24px 44px;
  position: relative;
}

.faq__body::before {
  content: "答";
  position: absolute;
  left: 4px;
  top: 2px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ai);
}

.faq__body p {
  font-size: 0.94rem;
  color: var(--sumi);
}

/* 開閉の高さトランジション（対応ブラウザのみ滑らかに動く） */
.faq__item::details-content {
  opacity: 0;
  block-size: 0;
  overflow: clip;
  transition: block-size 0.35s ease, opacity 0.35s ease,
              content-visibility 0.35s allow-discrete;
}

.faq__item[open]::details-content {
  opacity: 1;
  block-size: auto;
}

/* ==========================================================================
   Contact / 最終CTA
   ========================================================================== */
.contact {
  position: relative;
  padding: var(--space-section) var(--space-inner) calc(var(--space-section) + 24px);
  background: var(--kon);
  color: #fff;
  overflow: hidden;
}

.contact__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact__title {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.7;
  margin-bottom: 20px;
  text-wrap: balance;
}

.contact__lead {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
}

/* 裾の青海波（白・ごく薄く） */
.contact__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='%231d3a52' stroke='%23ffffff' stroke-opacity='.14' stroke-width='1.2'%3E%3Ccircle cx='20' cy='40' r='18'/%3E%3Ccircle cx='20' cy='40' r='12'/%3E%3Ccircle cx='20' cy='40' r='6'/%3E%3Ccircle cx='60' cy='40' r='18'/%3E%3Ccircle cx='60' cy='40' r='12'/%3E%3Ccircle cx='60' cy='40' r='6'/%3E%3Ccircle cx='0' cy='52' r='18'/%3E%3Ccircle cx='0' cy='52' r='12'/%3E%3Ccircle cx='40' cy='52' r='18'/%3E%3Ccircle cx='40' cy='52' r='12'/%3E%3Ccircle cx='80' cy='52' r='18'/%3E%3Ccircle cx='80' cy='52' r='12'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom / 80px 40px;
  pointer-events: none;
}

/* ===== Footer ===== */
.footer {
  background: var(--kon-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px var(--space-inner) 32px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.footer__nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: #fff;
}

.footer__credit {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* --- Tablet: 〜1024px --- */
@media (max-width: 1024px) {
  .works__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .techdemo__inner {
    grid-template-columns: 1fr;
  }

  .flow__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  /* 3列折返しでは連結線が段をまたぐため非表示 */
  .flow__step:not(:last-child)::after {
    display: none;
  }
}

/* --- Tablet small: 〜768px --- */
@media (max-width: 768px) {
  /* ロゴ+5項目のナビは1行に収まらないため2段組みに */
  section {
    scroll-margin-top: 116px;
  }

  .header {
    height: auto;
  }

  .header__inner {
    flex-direction: column;
    gap: 6px;
    padding: 10px var(--space-inner);
  }

  .header__nav ul {
    gap: 6px 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .header__nav a {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .header__nav a.header__cta {
    padding: 5px 12px;
  }

  .hero {
    padding-top: 168px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  /* 縦書き見出しを先頭・右寄せに（和の組版のまま） */
  .hero__vert {
    order: -1;
    margin-left: auto;
    padding-right: 4px;
  }

  .strengths__grid {
    grid-template-columns: 1fr;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__photos {
    max-width: 520px;
  }

  .flow__steps {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .flow__step {
    text-align: left;
    padding: 22px 22px 20px;
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 16px;
    align-items: center;
  }

  .flow__num {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  /* 縦並びでは下向きの連結線 */
  .flow__step:not(:last-child)::after {
    display: block;
    top: auto;
    bottom: -22px;
    right: auto;
    left: 38px;
    width: 1px;
    height: 20px;
  }
}

/* --- Mobile large: 〜640px --- */
@media (max-width: 640px) {
  .works__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile: 〜480px --- */
@media (max-width: 480px) {
  .br-sp { display: inline; }
  .br-pc { display: none; }

  .hero {
    padding-top: 156px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    text-align: center;
  }

  .techdemo__chips {
    grid-template-columns: 1fr;
  }

  /* 15文字の行が342px幅に収まるよう一段小さく（「い。」だけの折返し防止） */
  .contact__title {
    font-size: 1.28rem;
    letter-spacing: 0.05em;
  }

  .about__photo--2 {
    margin-top: 24px;
  }

  .btn--contact {
    display: block;
    padding: 16px 24px;
  }
}
