/* NOKTOA HP — base.css（全ページ共通の正本。2026-11-12）
   色・字・間隔・動きのトークンはここだけで定義する。fx.css（トップ）と site.css（下層）はこの上に載る。
   原則: 黒と白の交互／余白とタイポグラフィ／ゴールドは面と点（CTA・印）だけ／動きは縦に静かに */

:root {
    /* 色 */
    --ink: #0e0e0e; --ink-2: #1a1a1a; --ink-rgb: 14, 14, 14; --paper: #f1f5f3; --white: #fff;
    --text: #1d1d1d; --text-2: #5f5c57; --text-d: #f1f5f3; --text-d2: #b9b7b2;
    --line-l: #d6dbd9; --line-d: rgba(255, 255, 255, .16);
    --matcha: #2b4421; --matcha-hi: #1f3318; --matcha-ink: #fff; --matcha-rgb: 43, 68, 33; --matcha-d-rgb: 163, 179, 155; --matcha-d: #a3b39b; --sirius: #85817a;
    /* 動き */
    --ease: cubic-bezier(.19, 1, .22, 1); --ease-slow: cubic-bezier(.16, 1, .3, 1);
    --mincho: 'Shippori Mincho', 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
    /* 字 */
    --font: 'Noto Sans JP', -apple-system, 'Hiragino Sans', sans-serif;
    /* 間隔・形 */
    --gutter: clamp(22px, 5vw, 72px); --max: 1180px; --header-h: 52px;
    --r-s: 14px; --r-m: 24px; --r-l: 32px;
}

/* 日本語の折り返し（全社ルール 2026-10-17）: 本文は句読点でだけ折れる */
html { word-break: keep-all; line-break: strict; overflow-wrap: anywhere; text-wrap: pretty; }
/* 見出し・キャッチは句読点がないので、文節の切れ目で折る（対応ブラウザのみ。非対応は従来どおり） */
@supports (word-break: auto-phrase) {
    h1, h2, h3, h4, .lead, .lead-l, .hero-sub, .lead-conclusion { word-break: auto-phrase; }
}
/* 約物の詰めと和欧間の空き（対応ブラウザのみ） */
html { text-spacing-trim: trim-start; text-autospace: normal; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body { font-family: var(--font); background: var(--ink); color: var(--text-d); line-height: 1.8; font-feature-settings: "palt"; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
@supports (overflow: clip) { body { overflow-x: clip; } }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--matcha-d); outline-offset: 4px; border-radius: 6px; }
.light :focus-visible, .paper :focus-visible, .service-index :focus-visible, main:not(.works-main) > section:not(.hero):not(.final):not(.final-cta) :focus-visible { outline-color: var(--matcha); }
::selection { background: var(--matcha); color: var(--matcha-ink); }
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---- タイポグラフィ ---- */
.display { font-size: clamp(2.7rem, 8.6vw, 6.9rem); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; }
.h1 { font-size: clamp(2.1rem, 6.2vw, 4.9rem); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.h2 { font-size: clamp(1.5rem, 3.4vw, 2.5rem); font-weight: 500; line-height: 1.4; letter-spacing: -.012em; }
.label { font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.dark .label, .on-dark .label { color: var(--text-d2); }
.lead-l { font-size: clamp(1.05rem, 1.9vw, 1.45rem); line-height: 1.85; color: var(--text-2); letter-spacing: -.01em; }
.dark .lead-l { color: var(--text-d2); }
.body-l { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 2.05; color: var(--text-2); }
.dark .body-l { color: var(--text-d2); }

/* ---- ボタン ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: .95rem; letter-spacing: .01em; cursor: pointer; transition: transform .6s var(--ease), background .5s var(--ease), color .5s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--matcha); color: var(--matcha-ink); box-shadow: inset 0 0 0 1px rgba(var(--matcha-d-rgb), .5); }
.btn-gold:hover { background: var(--matcha-hi); }
.btn-lg { min-height: 54px; padding: 0 36px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 0 16px; font-size: .78rem; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 1rem; font-weight: 500; color: var(--white); }
.link span { transition: transform .6s var(--ease); }
.link:hover span { transform: translateX(5px); }
.light .link, .paper .link { color: var(--text); }

/* ---- ヘッダー（全ページ同じ） ---- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); background: rgba(var(--ink-rgb), .72); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-bottom: 1px solid rgba(255, 255, 255, .06); transition: background .6s var(--ease); view-transition-name: site-header; }
.site-header.is-scrolled { background: rgba(var(--ink-rgb), .88); }
.hwrap { height: 100%; width: min(100% - var(--gutter) * 2, 1320px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.logo { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }
.logo img { height: 30px; width: auto; }
.hnav { display: none; gap: clamp(22px, 3vw, 44px); }
.hnav a { font-size: .74rem; font-weight: 400; letter-spacing: .06em; color: rgba(255, 255, 255, .72); min-height: 44px; display: inline-flex; align-items: center; transition: color .4s var(--ease); }
.hnav a:hover, .hnav a[aria-current="page"] { color: #fff; }
.hwrap .btn { justify-self: end; grid-column: 3; }
@media (min-width: 860px) { .hnav { display: flex; } }
@media (max-width: 859px) { .hwrap { grid-template-columns: 1fr auto; } .hwrap .btn { grid-column: 2; } }

/* ---- ページ遷移（対応ブラウザのみ。ヘッダーは残り、本文だけが静かに入れ替わる） ---- */
@view-transition { navigation: auto; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
::view-transition-group(site-header) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
