/* =========================================================
   Sober Mind  style.css
   書体・余白・文字サイズはここの変数で差し替える。
   背景色・文字色・球体の色はスクロールで変わるので js/main.js の CONFIG にある。
   ========================================================= */

:root {
  --bg: #F6FAFC;   /* JSが書き換える */
  --ink: #18252A;  /* JSが書き換える */
  --ink-soft: color-mix(in srgb, var(--ink) 80%, transparent);
  --ink-mute: color-mix(in srgb, var(--ink) 55%, transparent);
  --ink-faint: color-mix(in srgb, var(--ink) 20%, transparent);

  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --font-jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* 文字サイズと余白（テラノヴァデザインと共通にする前提の体系） */
  --fs-logo: clamp(76px, 14.5vw, 232px);
  --fs-display: clamp(120px, 24vw, 380px);
  --fs-h2: clamp(26px, 3vw, 40px);
  --fs-label: clamp(22px, 2.1vw, 32px);
  --fs-body: clamp(15px, 1.1vw, 17px);
  --gutter: clamp(22px, 7vw, 120px);
  --page-max: 1280px;   /* 中身の最大幅。これより広い画面では左右の余白が均等に広がり、中央に来る */
  --side: max(var(--gutter), calc((100vw - var(--page-max)) / 2));
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: var(--fs-body);
  line-height: 2.1;
  letter-spacing: .05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 改行の指定：br.pc はPC（768px以上）だけ、br.sp はスマホだけで効く */
@media (max-width: 767px) { br.pc { display: none; } }
@media (min-width: 768px) { br.sp { display: none; } }
h1, h2, h3, p, li, dd, dt { word-break: auto-phrase; line-break: strict; text-wrap: pretty; }
/* 長い本文は文節で折り返さない。文節まかせだと、長い語（「アドバイザリーフィー（いわゆる顧問料）」など）の前で行が早く折れ、右に大きな余白ができる（2026-11-27 丹田さん指摘） */
.s-name .body p, .pillar p, .commons-note { word-break: normal; text-wrap: pretty; }
.nb { display: inline-block; }
a { color: inherit; text-underline-offset: .35em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
/* メニューで選んだ場面にキーボードの位置を移すとき（tabindex="-1"）は、枠を出さない */
[tabindex="-1"]:focus { outline: none; }
/* 和文の見出しは、かなと括弧を詰めて組む */
.heading, .statement, .hero-jp, .pillar h3, .envelope-title, .gnav-jp, .profile dt { font-feature-settings: "palt"; }
::selection { background: color-mix(in srgb, var(--ink) 15%, transparent); }

/* ---------- 描画面・背景 ---------- */
.stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}
/* スマホ：アドレスバーが出入りしても描画面の大きさが変わらないよう、引っ込んだときの高さで固定する（main.js は幅が変わったときだけ測り直す） */
@media (pointer: coarse) {
  .stage { bottom: auto; height: 100vh; height: 100lvh; }
}
.orb-fallback { display: none; }
.no-gl .stage { display: none; }
.no-gl .orb-fallback {
  display: block; position: fixed; z-index: 0; pointer-events: none;
  width: 56vmin; height: 56vmin; right: 8vw; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(240,243,243,.92) 74%),
    linear-gradient(170deg, #2F8FD8 0%, #1A679E 42%, #2CB5CC 58%, #9AE6DA 80%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

/* 紙のような粒子（静止画なので軽い） */
.grain {
  position: fixed; inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- ヘッダー ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 26px var(--side);
  pointer-events: none;
}
/* ロゴと背景の帯は、冒頭を抜けてから出す。メニューは最初から出しておく */
.header::before {
  content: ""; position: absolute; inset: 0 0 -56px;
  background: linear-gradient(var(--bg) 30%, color-mix(in srgb, var(--bg) 70%, transparent) 60%, color-mix(in srgb, var(--bg) 0%, transparent));
  z-index: -1;
  opacity: var(--chrome, 0);
}
/* PCでは、ヘッダーの下をくぐる文字をぼかして、メニューと重なって見えないようにする */
@media (min-width: 768px) {
  .header::before {
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent);
  }
}
.logo-defs { position: absolute; }
.logo-svg { display: block; height: 100%; width: auto; fill: currentColor; overflow: visible; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header-logo {
  pointer-events: auto;
  display: block; height: 13px; text-decoration: none;
  opacity: var(--chrome, 0);
  transition: opacity .6s var(--ease);
}

/* ---------- グローバルメニュー ---------- */
.gnav { pointer-events: auto; color: var(--nav-ink, var(--ink)); text-shadow: var(--nav-shadow, none); }
.gnav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 2.6vw, 44px); }
.gnav-list a {
  position: relative; display: flex; align-items: baseline; gap: .55em;
  text-decoration: none; padding: .3em 0;
}
.gnav-num { font-family: var(--font-en); font-size: 12px; letter-spacing: .1em; opacity: .7; font-variant-numeric: lining-nums; }
.gnav-en { font-family: var(--font-en); font-style: italic; font-size: 19px; letter-spacing: .04em; }
.gnav-jp { display: none; }
.gnav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.gnav-list a:hover::after, .gnav-list a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.gnav-list a:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
.gnav-toggle { display: none; }

/* スマホ：Menu を押すと、深い緑の面がひらく */
@media (max-width: 767px) {
  .gnav-toggle {
    position: relative; z-index: 2;
    display: flex; align-items: center; gap: 12px;
    margin: -14px -10px -14px 0; padding: 14px 10px;
    background: none; border: 0; color: inherit; cursor: pointer;
    font: italic 17px/1 var(--font-en); letter-spacing: .06em;
    text-shadow: inherit;
  }
  .gnav-toggle-lines { position: relative; width: 26px; height: 9px; }
  .gnav-toggle-lines span {
    position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
    transition: transform .5s var(--ease), top .5s var(--ease);
  }
  .gnav-toggle-lines span:first-child { top: 0; }
  .gnav-toggle-lines span:last-child { top: 8px; }
  .gnav.is-open .gnav-toggle { color: #EEF5FA; text-shadow: none; }
  .gnav.is-open .gnav-toggle-lines span:first-child { top: 4px; transform: rotate(20deg); }
  .gnav.is-open .gnav-toggle-lines span:last-child { top: 4px; transform: rotate(-20deg); }

  .gnav-list {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 0;
    padding: 80px var(--side) 60px;
    background: #133D5C; color: #EEF5FA; text-shadow: none;
    visibility: hidden; opacity: 0;
    transition: opacity .5s var(--ease), visibility 0s linear .5s;
  }
  .gnav.is-open .gnav-list { visibility: visible; opacity: 1; transition: opacity .5s var(--ease); }
  .gnav-list li { border-top: 1px solid rgba(238, 245, 250, .2); }
  .gnav-list li:last-child { border-bottom: 1px solid rgba(238, 245, 250, .2); }
  .gnav-list a {
    display: grid; grid-template-columns: 2.6em 1fr; align-items: baseline;
    padding: 1.05em 0;
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
  }
  .gnav.is-open .gnav-list a { opacity: 1; transform: none; }
  .gnav.is-open .gnav-list li:nth-child(2) a { transition-delay: .06s; }
  .gnav.is-open .gnav-list li:nth-child(3) a { transition-delay: .12s; }
  .gnav.is-open .gnav-list li:nth-child(4) a { transition-delay: .18s; }
  .gnav-list a::after { display: none; }
  .gnav-num { grid-row: 1 / 3; font-size: 13px; }
  .gnav-en { font-size: 38px; line-height: 1.15; }
  .gnav-jp { display: block; grid-column: 2; font-size: 12.5px; letter-spacing: .16em; opacity: .75; margin-top: .3em; }
  .gnav-list a[aria-current] .gnav-en { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
}

/* ---------- 共通 ---------- */
main { position: relative; z-index: 2; }
.section { position: relative; padding: 24vh var(--side); min-height: 100svh; display: flex; align-items: center; }
.inner { width: 100%; max-width: 820px; }

.label {
  margin: 0 0 .9em;
  font-family: var(--font-en); font-style: italic;
  font-size: var(--fs-label);
  letter-spacing: .06em;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 1em;
}
.label::before { content: ""; width: 72px; height: 1px; background: currentColor; opacity: .6; }
.js .label.reveal::before { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) .25s; }
.js .label.reveal.is-in::before { transform: none; }
.heading {
  margin: 0 0 1.4em;
  font-weight: 500; font-size: var(--fs-h2);
  line-height: 1.55; letter-spacing: .14em;
}
.heading-en {
  display: block;
  font-family: var(--font-en); font-style: italic; font-weight: 300;
  font-size: 2.3em; letter-spacing: .01em; line-height: 1.05;
  margin-bottom: .25em;
}
.body { max-width: 30em; color: var(--ink-soft); }
.body p { margin: 0 0 1.2em; }

/* 見えたときにふわっと上がる */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 1. 冒頭 ---------- */
.s-hero { position: relative; height: 290vh; }
.hero-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero-body {
  position: absolute; left: var(--side); right: var(--side); bottom: 11vh;
  /* JSが動いていないときは、球体の色に関係なく墨色（--hero-ink は main.js が入れる） */
  color: var(--hero-ink, var(--ink));
  text-shadow: var(--hero-shadow, none);
}
.logotype {
  margin: 0;
  font-family: var(--font-en); font-weight: 400;
  font-size: var(--fs-logo);
  line-height: .9; letter-spacing: .01em;
  white-space: nowrap;
  will-change: filter, opacity;
}
/* 冒頭の文字を隠して立ち上げるのは、main.js が準備を終えたとき（html.js）だけ */
.js .logotype { opacity: 0; }
/* 社名はロゴの書体（SVG）。高さを字の大きさに対する割合で決める */
.logotype { line-height: 0; margin-bottom: .14em; }
.logotype > span { display: inline-block; height: .5em; vertical-align: top; }
.logotype > span + span { margin-left: .232em; }
.logotype .logo-svg { filter: drop-shadow(var(--hero-shadow, 0 0 0 transparent)); }
.js .logotype .lg {
  --k: clamp(0, calc(var(--e, 1) * 2.4 - var(--i) * .16), 1);
  opacity: var(--k);
  transform: translateY(calc((1 - var(--k)) * 9px));
}
.hero-sub {
  display: flex; gap: 3.5em; align-items: flex-end; flex-wrap: wrap;
  margin-top: 2.2em;
  /* 欧文の「S」は字の左に余白があるので、和文をその分だけ右へずらして左端をそろえる */
  padding-left: 0;
}
.hero-jp { margin: 0; font-size: 22.5px; letter-spacing: .3em; }
.hero-lead { margin: 0; line-height: 2.1; font-size: 17.4px; }
.js .hero-jp { opacity: 0; }
.js .hero-lead { opacity: 0; transform: translateY(14px); }
.hero-scroll {
  position: absolute; right: var(--side); bottom: 10vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--hero-ink, var(--ink));
}
.js .hero-scroll { opacity: 0; }
.hero-scroll-ring {
  position: relative; display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid currentColor;
}
.hero-scroll-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid currentColor;
  animation: scroll-ripple 2.8s var(--ease) infinite;
}
.hero-scroll-arrow { font-family: var(--font-en); font-size: 26px; line-height: 1; animation: scroll-bob 2.8s var(--ease) infinite; }
.hero-scroll-text { font-family: var(--font-en); font-size: 13px; letter-spacing: .34em; text-transform: uppercase; padding-left: .34em; }
@keyframes scroll-ripple { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
@keyframes scroll-bob { 0%, 100% { transform: translateY(-5px); opacity: .5; } 45% { transform: translateY(7px); opacity: 1; } }

/* ---------- 2. 社名の由来 ---------- */
.s-name { padding-top: 28vh; }
.dict { margin: 0 0 9vh; }
.dict-word {
  margin: 0 0 .05em;
  font-family: var(--font-en); font-style: italic; font-weight: 300;
  font-size: var(--fs-display);
  line-height: .9;
  height: .42em;
  will-change: filter, opacity;
}
.dict-meta {
  margin: 0 0 1.6em; display: flex; gap: 1.6em; align-items: baseline;
  font-family: var(--font-en); font-size: 19px; color: var(--ink-soft); letter-spacing: .04em;
}
.dict-senses {
  margin: 0; padding: 0; list-style: none; counter-reset: s;
  display: flex; flex-wrap: wrap; gap: .4em 2.6em;
  font-size: 16px;
}
.dict-senses li { counter-increment: s; }
.dict-senses li::before {
  content: counter(s); font-family: var(--font-en); font-style: italic;
  margin-right: .7em; color: var(--ink-soft);
}
.statement {
  margin: 0 0 1.6em; max-width: 16em;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.85; letter-spacing: .12em;
}
.ink-reveal .ch { opacity: clamp(.16, calc(var(--p, 0) * var(--n) - var(--i)), 1); }

/* ---------- 3. 事業内容 ---------- */
.s-commons { position: relative; height: 330vh; }
.commons-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; align-items: center;
  padding: 96px var(--side) 0;
}
.commons-text { width: min(48%, 600px); position: relative; }
.commons-lead { margin: 0; max-width: 27em; }
.commons-note { margin: 1.1em 0 0; max-width: 36em; font-size: 15.5px; line-height: 1.9; color: var(--ink-soft); }
.s-commons .heading-en { font-size: 1.75em; letter-spacing: .06em; }
.s-commons .heading { margin-bottom: 1em; }
.pillars { list-style: none; margin: 1.6em 0 0; padding: 0; position: relative; }
.pillar {
  position: relative;
  display: grid; grid-template-columns: 3.2em 1fr; align-items: baseline;
  padding: 1.1em 0;
  border-top: 1px solid var(--ink-faint);
}
/* 項目を薄くしたり説明を折りたたんだりするのは、main.js が準備を終えたとき（html.js）だけ */
.js .pillar { opacity: .28; transition: opacity .9s var(--ease); }
.pillar:last-child { border-bottom: 1px solid var(--ink-faint); }
/* いまの項目をどこまで読み進めたかを、上の線が伸びて示す */
.pillar::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--ink); transform: scaleX(var(--pp, 0)); transform-origin: left;
}
.js .pillar.is-active { opacity: 1; }
.js .pillar.is-done { opacity: .55; }
.pillar-num { font-family: var(--font-en); font-style: italic; font-size: 26px; line-height: 1; }
.pillar h3 { margin: 0 0 .3em; font-weight: 500; font-size: 18px; letter-spacing: .14em; line-height: 1.6; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.95; }
.js .pillar p { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .9s var(--ease), opacity .9s var(--ease); }
.js .pillar.is-active p { max-height: 9em; opacity: 1; }
.more {
  position: relative;
  display: inline-flex; align-items: center; gap: 1.2em;
  margin-top: 1.4em; padding: .7em 0;
  text-decoration: none; letter-spacing: .14em;
}
/* 下線：ホバーで一度消えて、左から引き直される */
.more::before, .more::after, .contact-sub a::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
}
.more::before { opacity: .25; }
.more:hover::after, .contact-sub a:hover::before { animation: line-redraw 1s var(--ease); }
@keyframes line-redraw {
  0% { transform: scaleX(1); transform-origin: right; }
  45% { transform: scaleX(0); transform-origin: right; }
  46% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
.more-arrow { font-family: var(--font-en); font-size: 1.3em; line-height: 1; transition: transform .6s var(--ease); }
.more:hover .more-arrow { transform: translate(4px, -4px); }
.pillars-bar { position: absolute; left: -26px; top: 0; bottom: 0; width: 1px; background: var(--ink-faint); display: none; }
.pillars-bar span { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: top; transform: scaleY(0); }

/* ---------- 4. 会社概要 ---------- */
.profile { margin: 0; max-width: 680px; }
.profile .row {
  position: relative;
  display: grid; grid-template-columns: 9.5em 1fr;
  padding: 1.25em 0;
  line-height: 1.9;
}
.profile .row::before, .profile .row:last-child::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--ink-faint);
}
.js .profile .row::before, .js .profile .row:last-child::after { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); }
.profile .row:last-child::after { top: auto; bottom: 0; }
.profile dt { color: var(--ink-soft); letter-spacing: .14em; }
/* color を親から受け継がせず直接指定する。受け継ぎだと、Chromeで出現の動きの最中に色の更新が遅れ、黒いまま残る */
.profile dd { margin: 0; color: var(--ink); }
.profile .en { display: block; font-family: var(--font-en); font-style: italic; font-size: 1.1em; letter-spacing: .04em; color: var(--ink-soft); }
.js .profile dt, .js .profile dd { opacity: 0; transform: translateY(10px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .profile .row.is-in::before, .js .profile .row.is-in::after { transform: scaleX(1); }
.profile .row.is-in dt, .profile .row.is-in dd { opacity: 1; transform: none; }
.profile .row.is-in dd { transition-delay: .12s; }

/* ---------- 5. お問い合わせ ---------- */
.s-contact { overflow-x: clip; min-height: 120svh; align-items: flex-end; padding-bottom: 16vh; }
.contact-inner { display: grid; grid-template-columns: 1fr auto; column-gap: 6vw; align-items: end; max-width: none; }
.contact-inner > .label, .contact-inner > .heading, .contact-inner > .body, .contact-inner > .contact-sub { grid-column: 1; }
.envelope {
  grid-column: 2; grid-row: 1 / span 4;
  position: relative; display: block;
  width: 300px; height: 190px;
  text-decoration: none;
}
.envelope-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.envelope-lines rect, .envelope-lines polyline {
  fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke;
}
.envelope-lines rect { fill: color-mix(in srgb, var(--bg) 70%, transparent); }
.envelope-flap { transform-origin: 50% 0; transform-box: view-box; transition: transform .8s var(--ease); }
.envelope-bottom { opacity: .45; }
.plane {
  position: absolute; left: 50%; top: 30px; width: 34px; height: 34px; margin-left: -17px;
  fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round;
}
.envelope-text {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; flex-direction: column; align-items: center; gap: .2em;
}
.envelope-title { font-size: 17px; letter-spacing: .24em; }
.envelope-sub { font-size: 12.5px; letter-spacing: .12em; color: var(--ink-soft); }
.envelope-sub::after { content: " \2197"; font-family: var(--font-en); }
.envelope.is-open .envelope-flap { transform: scaleY(-1); }
.plane { will-change: transform; z-index: 2; }
.plane.is-back { animation: plane-back 1.1s var(--ease) both; }
@keyframes plane-back { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.flight { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; z-index: 1; }
.flight-trail { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1.5 7; stroke-linecap: round; opacity: .55; transition: opacity 1.4s var(--ease); }
.flight-trail.is-fading { opacity: 0; }
.envelope:focus-visible { outline: 1px solid var(--ink); outline-offset: 8px; }
.contact-sub { margin: 0; font-size: 24px; letter-spacing: .08em; }
.contact-sub a { position: relative; display: inline-block; text-decoration: none; padding-bottom: .15em; }
.contact-sub a::after { content: " \2197"; font-family: var(--font-en); display: inline-block; margin-left: .25em; transition: transform .6s var(--ease); }
.contact-sub a:hover::after { transform: translate(3px, -3px); }

/* ---------- フッター ---------- */
.footer {
  position: relative; z-index: 2;
  padding: 0 var(--side) 34px;
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-en);
}
.footer::before { content: ""; flex-basis: 100%; height: 1px; background: var(--ink-faint); margin-bottom: 14px; }
.footer-logo { margin: 0; height: 14px; }
.footer-meta { margin: 0; display: flex; align-items: baseline; gap: 2.4em; font-size: 13px; letter-spacing: .14em; color: var(--ink-soft); }
.footer-top { text-decoration: none; font-style: italic; font-size: 17px; letter-spacing: .06em; color: var(--ink); }
.footer-top span { display: inline-block; margin-left: .3em; transition: transform .6s var(--ease); }
.footer-top:hover span { transform: translateY(-4px); }

/* 高さの低いノートPCでは、事業内容を詰めて1画面に収める。
   2026-11-27：文が長くなって下の端がはみ出したので、余白と本文の行間を詰めた。見出しとラベルの文字の大きさはここでは変えない（丹田さん指示） */
@media (min-width: 768px) and (max-height: 1020px) {
  .commons-sticky { padding-top: 76px; }
  .s-commons .heading-en { font-size: 1.45em; }
  .s-commons .heading { margin-bottom: .55em; }
  .pillar { padding: .6em 0; }
  .pillars { margin-top: .9em; }
  .commons-note { margin-top: .8em; }
}

/* 高さ880px以下：余白と本文をさらに詰める（見出しとラベルの大きさはそのまま） */
@media (min-width: 768px) and (max-height: 880px) {
  .commons-sticky { padding-top: 64px; }
  .s-commons .label { margin-bottom: .5em; }
  .s-commons .heading { margin-bottom: .45em; line-height: 1.45; }
  .commons-lead { font-size: 14.5px; line-height: 1.9; }
  .pillars { margin-top: .8em; }
  .pillar { padding: .5em 0; }
  .pillar h3 { font-size: 16.5px; }
  .pillar p { font-size: 14px; line-height: 1.8; }
  .commons-note { font-size: 14px; line-height: 1.8; margin-top: .8em; }
  .more { margin-top: .5em; padding: .5em 0; }
}

/* さらに低い画面（高さ780px以下のノートPC）。ここだけ見出しとラベルも小さくする（以前からの指定） */
@media (min-width: 768px) and (max-height: 780px) {
  .s-commons .label { font-size: 22px; }
  .s-commons .heading { font-size: 26px; margin-bottom: .5em; }
}

/* 幅が狭めの画面では、封筒を本文の下に置く */
@media (min-width: 768px) and (max-width: 979px) {
  .contact-inner { grid-template-columns: 1fr; }
  .envelope { grid-column: 1; grid-row: auto; margin: 130px 0 2em; }   /* ふたが開いても本文に重ならない間隔 */
}

/* ---------- スマホ ---------- */
@media (max-width: 767px) {
  .header { padding: 18px var(--side); }
  .header-logo { height: 11.5px; }
  .hero-body { bottom: 9vh; }
  .hero-sub { gap: 1.2em; flex-direction: column; align-items: flex-start; }
  .hero-jp { font-size: 17px; letter-spacing: .22em; }
  .hero-lead { font-size: 15px; }
  .contact-sub { font-size: 20px; }
  .logotype { white-space: normal; }
  .logotype > span { display: block; height: .62em; }
  .logotype > span + span { margin-left: 0; margin-top: .2em; }
  .dict-senses { flex-direction: column; }
  /* 事業内容：中身が画面の高さに収まらない機種では、下の端（「詳しく見る」）が見える位置で貼りつける。
     --commons-top は main.js が「画面の高さ − 中身の高さ」を入れる（収まるときは 0） */
  /* 区切りと区切りの間隔を、どこも「事業内容の終わり → 会社概要」と同じ（24vh + 20px）にそろえる（2026-11-27 丹田さん指示）。
     画面の高さで間隔が変わらないよう、スマホでは区切りの最低の高さ（min-height）を外す */
  .section, .s-contact { min-height: 0; }
  .s-name { padding-top: calc(15vh + 2px); padding-bottom: calc(24vh - 62px); }
  .s-profile { padding-bottom: 20px; }
  .commons-sticky { top: var(--commons-top, 0px); height: auto; align-items: flex-start; padding: 64px var(--side) 20px; }
  .s-commons .label { line-height: 1.4; margin-bottom: .55em; }
  .s-commons .heading { font-size: 21px; line-height: 1.4; margin-bottom: .45em; }
  .commons-text { width: 100%; }
  .commons-lead { font-size: 13.5px; line-height: 1.75; }
  .pillars { margin-top: .7em; }
  .pillar { padding: .5em 0; }
  .pillar h3 { font-size: 16.5px; }
  .pillar p { font-size: 13px; line-height: 1.8; }
  .commons-note { font-size: 13px; line-height: 1.8; margin-top: .7em; }
  /* iPhoneのブラウザは text-wrap: pretty で段落の各行を同じくらいの長さにそろえるので、右に大きな余白ができる。
     スマホでは右端まで詰めてから折り返す（2026-11-27 丹田さん指摘。社名の本文も同じ） */
  .s-name .body p, .pillar p, .commons-note { text-wrap: wrap; }
  .more { margin-top: .5em; padding: .6em 0; font-size: 14px; }
  .heading-en { font-size: 1.9em; }
  .profile .row { grid-template-columns: 1fr; padding: 1em 0; }
  .profile dt { font-size: 12.5px; }
  .contact-inner { grid-template-columns: 1fr; }
  .envelope { grid-column: 1; grid-row: auto; width: 100%; max-width: 320px; height: 190px; margin: 120px 0 1.8em; }
  /* 和文の社名と同じ高さに並ぶと接触するので、小さくして右下の隅へ下げる */
  .hero-scroll { bottom: 24px; gap: 9px; }
  .hero-scroll-ring { width: 52px; height: 52px; }
  .hero-scroll-arrow { font-size: 22px; }
  .hero-scroll-text { font-size: 11px; line-height: 1.6; }
  /* フッター：幅の狭い機種で「Ginza, Tokyo」などが2行に割れないよう、1行に固定して両端にそろえる */
  .footer-meta { width: 100%; justify-content: space-between; gap: 1em; white-space: nowrap; font-size: 12px; letter-spacing: .1em; }
  .footer-top { padding: .6em 0; margin: -.6em 0; }
  /* お問い合わせの下に、球体が収まる余白を画面の高さによらず確保する */
  .s-contact { padding-bottom: 110px; }
  /* 最後は球体が画面いっぱいの青になる。白い文字が明るい所でも読めるよう、うすい影をつける */
  .s-contact, .footer { text-shadow: 0 0 18px rgba(6, 34, 52, calc(.5 * var(--cover, 0))); }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
  .s-hero { height: 100svh; }
  .s-commons { height: auto; }
  .commons-sticky { position: relative; top: 0; height: auto; padding-top: 20vh; padding-bottom: 20vh; }
  .js .pillar { opacity: 1; }
  /* 貼りつかないので、3項目とも説明を出しておく（以前は最後の1項目しか説明が出ていなかった） */
  .js .pillar p { max-height: none; opacity: 1; transition: none; }
  .pillar::before { display: none; }
  .hero-scroll-ring::after, .hero-scroll-arrow, .more:hover::after, .contact-sub a:hover::before { animation: none; }
  .js .label.reveal::before { transform: none; transition: none; }
  .js .reveal, .js .profile dt, .js .profile dd { opacity: 1; transform: none; transition: none; }
  .js .profile .row::before, .js .profile .row:last-child::after { transform: scaleX(1); transition: none; }
}

/* JSの演出が動いていないとき（JS無効、main.js が読み込めない、途中で止まった）は、動かない読める形で見せる。
   main.js は準備を終えたら html に .js を付ける */
html:not(.js) .s-hero { height: 100vh; height: 100svh; }
html:not(.js) .s-commons { height: auto; }
html:not(.js) .commons-sticky { position: relative; top: 0; height: auto; padding-top: 20vh; padding-bottom: 20vh; }
html:not(.js) .pillar::before { display: none; }
/* スマホの Menu はJSで開くので、JSが動かないときは出さない（本文はスクロールで読める） */
@media (max-width: 767px) {
  html:not(.js) .gnav { display: none; }
}

/* ---------- 印刷 ----------
   ページを開いてすぐ（一度もスクロールせず）印刷しても、社名・社名について・事業内容・会社概要・お問い合わせが上から順に読めるようにする。
   - 画面に固定しているもの（メニュー・球体の描画面・粒子）と、動きのための高さ・貼りつきは外す
   - main.js が要素に直接入れる色・透明度・ぼかしは、ここの !important で打ち消す（スクロール前は多くの文字がまだ透明）
   - 事業内容の I〜III の説明と契約の注記は、3つともひらいて出す
   - 白地に濃い文字。問い合わせ先とリンクは、紙でもたどれるようURLを添える（文言はHTMLのまま。URLはここで足す）
   - 紙の幅では「767px以下」の指定も効くことがあるので、スマホ用の指定で変わる所は、ここで決め直している */
@media print {
  :root {
    --bg: #fff !important; --ink: #121C20 !important;
    --hero-ink: #121C20 !important; --hero-shadow: none !important;
    --nav-ink: #121C20 !important; --nav-shadow: none !important;
    --cover: 0 !important; --chrome: 1 !important;
    --ink-soft: #2B383D; --ink-mute: #4A565B; --ink-faint: #9AA4A8;
  }
  html { overflow: visible !important; height: auto !important; }
  body { background: #fff; color: #121C20; overflow: visible; font-size: 10.5pt; line-height: 1.9; }
  *, *::before, *::after { animation: none !important; transition: none !important; text-shadow: none !important; }

  /* 外すもの */
  .stage, .orb-fallback, .grain, .header, .hero-scroll, .footer-top,
  .envelope-lines, .flight, .plane, .more-arrow, .label::before, .pillar::before { display: none !important; }

  /* 改行の指定は画面用。紙では流しこむ */
  br.sp, br.pc { display: none; }
  .s-name .body p, .pillar p, .commons-note { text-wrap: pretty; }

  /* 隠して出す演出・ぼかし・折りたたみを解く */
  .js .reveal, .js .profile dt, .js .profile dd, .js .hero-jp, .js .hero-lead, .js .logotype, .js .logotype .lg,
  .hero-jp, .hero-lead, .logotype, .dict-word, .js .pillar, .ink-reveal .ch {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .js .pillar p { max-height: none !important; overflow: visible; opacity: 1 !important; }
  .logotype .logo-svg { filter: none; }

  /* 配置：どの場面も、上から順に流す */
  main { position: static; }
  [tabindex="-1"]:focus { outline: none; }
  .s-hero, .s-commons { height: auto !important; }
  .hero-sticky, .commons-sticky {
    position: static !important; height: auto !important; min-height: 0; overflow: visible; display: block; padding: 0;
  }
  .hero-body { position: static; color: #121C20; }
  .section, .s-contact { display: block; min-height: 0 !important; padding: 0; overflow: visible; }
  .s-hero, .section, .s-commons { margin: 0 0 9mm; }
  .s-contact { margin-bottom: 5mm; }
  .inner, .commons-text, .body, .commons-lead, .commons-note, .statement, .profile { width: auto; max-width: none; }

  /* 社名 */
  .logotype { font-size: 50pt; white-space: nowrap; margin-bottom: .16em; }
  .logotype > span { display: inline-block; height: .5em; }
  .logotype > span + span { margin-left: .232em; margin-top: 0; }
  .hero-sub { display: block; margin-top: 4mm; }
  .hero-jp { font-size: 15pt; letter-spacing: .26em; }
  .hero-lead { font-size: 10.5pt; margin-top: 2mm; line-height: 1.8; }

  /* 見出しまわり */
  .label { font-size: 14pt; margin-bottom: .2em; line-height: 1.5; break-after: avoid; }
  .heading { font-size: 16pt; margin-bottom: .5em; line-height: 1.45; break-after: avoid; }
  .heading-en, .s-commons .heading-en { font-size: 1.5em; }

  /* 社名について */
  .s-name { padding: 0 !important; }
  .dict { margin-bottom: 4mm; break-inside: avoid; }
  .dict-word { font-size: 64pt; margin-bottom: 3mm; }
  .dict-meta { font-size: 12pt; margin-bottom: .3em; line-height: 1.5; }
  .dict-senses { flex-direction: row; font-size: 10.5pt; }
  .statement { font-size: 14pt; margin-bottom: .5em; line-height: 1.6; }

  /* 事業内容：I〜III と注記をすべて出す */
  .commons-lead { font-size: 10.5pt; line-height: 1.9; }
  .pillars { margin-top: .7em; }
  .pillar { padding: .5em 0; break-inside: avoid; }
  .pillar-num { font-size: 17pt; }
  .pillar h3 { font-size: 12pt; }
  .pillar p { font-size: 10pt; line-height: 1.85; }
  .commons-note { font-size: 10pt; line-height: 1.85; margin-top: 1em; break-inside: avoid; }
  .more { display: block; margin-top: 1em; padding: 0; font-size: 10.5pt; break-inside: avoid; }
  .more::before { display: none; }
  .more::after {
    content: attr(href); display: block; position: static; height: auto; background: none;
    font-family: var(--font-en); font-size: 12pt; letter-spacing: .04em; transform: none;
  }

  /* 会社概要（区切りの線は背景色で描いているので、紙では枠線にする） */
  .s-profile { padding: 0 !important; break-inside: avoid; }
  .profile .row { grid-template-columns: 9.5em 1fr; padding: .5em 0; line-height: 1.7; border-top: 1px solid #9AA4A8; break-inside: avoid; }
  .profile .row:last-child { border-bottom: 1px solid #9AA4A8; }
  .profile .row::before, .profile .row::after { display: none !important; }
  .profile dt { font-size: inherit; }

  /* お問い合わせ：封筒の絵は外し、宛先をURLつきの文字で出す */
  .s-contact { padding: 0 !important; break-inside: avoid; }
  .contact-inner { display: block; }
  .envelope {
    display: block; position: static; width: auto; max-width: none; height: auto;
    margin: .8em 0 0; padding: .6em 1em; border: 1px solid #121C20; line-height: 1.6;
  }
  .envelope-text { position: static; display: block; }
  .envelope-title { display: block; font-size: 12pt; }
  .envelope-sub { display: block; font-size: 10pt; }
  .envelope-sub::after { content: none; }
  .envelope::after {
    content: attr(href); display: block; margin-top: .2em;
    font-family: var(--font-en); font-size: 13pt; letter-spacing: .04em;
  }
  .contact-sub { margin-top: .7em; font-size: 12pt; }
  .contact-sub a { display: inline; padding: 0; }
  .contact-sub a::before { display: none; }
  .contact-sub a::after {
    content: "\3000" attr(href); display: inline; margin: 0;
    font-family: var(--font-en); font-size: 13pt; letter-spacing: .04em; transform: none;
  }

  /* フッター */
  .footer { position: static; padding: 0; display: block; break-inside: avoid; }
  .footer::before { display: none; }
  .footer-logo { display: none; }   /* 社名は先頭に大きく出ている */
  .footer-meta { width: auto; justify-content: flex-start; gap: 2.4em; font-size: 9pt; padding-top: 2mm; border-top: 1px solid #9AA4A8; }
}
