/* =========================================================
   FULLEX — Thermal Environment Partner
   v3: Swiss / International Typographic Style
   grid-driven · rule-based · type-first · undecorated
   ========================================================= */

:root {
  --teal: #285d66;
  --teal-deep: #1c4249;
  --ink: #14181a;
  --ink-2: #3a4143;
  --body: #3f464a;
  --muted: #8a9092;
  --line: #14181a;            /* rules are near-black in Swiss style */
  --line-soft: #d8dcdc;
  --paper: #f4f3ef;           /* warm paper */
  --paper-2: #eceae4;
  --white: #ffffff;
  --yellow: #fae398;
  --yellow-deep: #e9c94f;

  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;

  --maxw: 1280px;
  --gutter: 32px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 小画面ではガターを縮める。12カラムのギャップ合計(11×gutter)が
   画面幅を超えて横スクロールが発生するのを防ぐ（375px端末で必須） */
@media (max-width: 480px) {
  :root { --gutter: 20px; }
}

/* case-2 の3条件カード（inline styleで3カラム固定）を小画面で1カラムに */
@media (max-width: 700px) {
  .conds { grid-template-columns: 1fr !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--jp);
  font-weight: 300;
  color: var(--body);
  background: var(--paper);
  line-height: 1.95;
  font-size: 15px;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Chrome系：本文・見出しは文節単位の自然な折り返し（非対応ブラウザは無視）。
   狭いデータセル（.stat/.d/表など）に効かせると列がはみ出すため本文系に限定 */
p, h2, h3 { word-break: auto-phrase; }
/* 手動の文節指定（全ブラウザ対応）。スパン内では改行しない */
.np { display: inline-block; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Type: Latin is the lead voice */
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; line-height: 1.04; }
.jp { font-family: var(--jp); }
p { margin: 0 0 1.3em; }
strong { color: var(--ink); font-weight: 600; }

/* Grid container */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }

/* Labels: uppercase Latin, wide tracking */
.label {
  font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink);
}
.label.muted { color: var(--muted); }
.idx { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .14em; color: var(--teal); }
/* 「EN / 日本語」併記ラベルは日本語の途中で改行しない（「て」だけ落ちる等を防ぐ） */
.idx, .metastrip .k, .p-side .k, .ph, .cb-idx .n, .f-links a, .ch-tag, .hero-kicker .yr { word-break: keep-all; overflow-wrap: normal; }
.metastrip .v { word-break: keep-all; } /* 値は単語の途中で折らない（<wbr>と／・で折る） */

/* Rules */
.rule { border: 0; border-top: 1.5px solid var(--line); margin: 0; }
.rule.soft { border-top: 1px solid var(--line-soft); }

/* Links / buttons: text + rule, minimal */
.link {
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .06em;
  color: var(--ink); display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px;
  border-bottom: 1.5px solid var(--ink); transition: gap .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.link:hover { gap: 16px; color: var(--teal); border-color: var(--teal); }
.link.on-dark { color: #fff; border-color: #fff; }
.link.on-dark:hover { color: var(--yellow); border-color: var(--yellow); }

.btn {
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px;
  background: var(--ink); color: #fff; border: 1.5px solid var(--ink); border-radius: 0;
  transition: background .2s var(--ease), color .2s var(--ease);
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn .arw { transition: transform .2s var(--ease); }
.btn:hover .arw { transform: translateX(5px); }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.teal:hover { background: transparent; color: var(--teal); }
.btn.on-dark { background: #fff; color: var(--ink); border-color: #fff; }
.btn.on-dark:hover { background: transparent; color: #fff; }
.btn.ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn.ghost-dark:hover { background: #fff; color: var(--ink); border-color:#fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: 1.5px solid var(--line); }
.nav { display: flex; align-items: stretch; justify-content: space-between; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--sans); font-weight: 700; letter-spacing: .12em; color: var(--ink); font-size: 17px; }
.brand .mark { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .04em; color: var(--ink-2); padding: 8px 16px; transition: color .18s var(--ease); }
.nav-links > li > a:hover { color: var(--teal); }
.nav-links .num { font-size: 9px; color: var(--muted); margin-right: 5px; letter-spacing: .1em; }
.nav-links .jp-nav { font-family: var(--jp); font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 6px; }
.nav-links > li > a:hover .jp-nav { color: var(--teal); }
.nav-cta a { margin-left: 12px; padding: 10px 20px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; align-self: center; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: .25s var(--ease); }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1.5px solid var(--line); padding: 8px var(--gutter) 20px;
    clip-path: inset(0 0 100% 0); transition: clip-path .3s var(--ease);
  }
  .nav[data-open="true"] .nav-links { clip-path: inset(0 0 0 0); }
  .nav-links > li > a { display: block; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line-soft); }
  .nav-cta a { margin: 14px 0 0; display: inline-flex; }
  .nav[data-open="true"] .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav[data-open="true"] .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- HERO (type left / photo right, on grid) ---------- */
.hero { border-bottom: 1.5px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }
.hero-copy { grid-column: 1 / 7; padding: 68px 0 54px; display: flex; flex-direction: column; }
.hero-media { grid-column: 7 / 13; border-left: 1.5px solid var(--line); position: relative; overflow: hidden; }

.hero-kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: auto; }
.hero-kicker .co { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.hero-kicker .yr { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: .1em; }

.hero h1 {
  font-size: clamp(52px, 8.5vw, 116px);
  line-height: .92; letter-spacing: -0.045em; color: var(--ink);
  margin: 40px 0 0;
}
.hero h1 .l2 { color: var(--teal); }
.hero h1 .dot { color: var(--yellow-deep); }
.hero .jp-sub { font-family: var(--jp); font-weight: 500; font-size: clamp(17px, 2vw, 22px); letter-spacing: .06em; color: var(--ink); margin: 26px 0 0; line-height: 1.7; }
.hero .lead { max-width: 30em; margin: 22px 0 0; color: var(--body); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; margin-top: 40px; }

/* photo placeholder — replace .hero-media background-image with a real photo */
.photo-ph {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(20,24,26,.035) 22px 23px),
    linear-gradient(160deg, var(--paper-2), #e3e1da);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 22px 24px;
}
.photo-ph .ph-tag { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
/* 実写真。assets/hero.jpg が存在すればプレースホルダーの上に表示される */
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .meta-v {
  position: absolute; top: 24px; right: 24px; writing-mode: vertical-rl;
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2);
}

@media (max-width: 900px) {
  .hero-copy { grid-column: 1 / 13; padding: 44px 0 20px; }
  .hero-media { grid-column: 1 / 13; border-left: 0; border-top: 1.5px solid var(--line); aspect-ratio: 16/10; }
  .hero h1 { margin-top: 26px; }
}

/* meta strip under hero */
.metastrip { border-bottom: 1.5px solid var(--line); }
.metastrip .grid12 { padding: 0; }
.metastrip .cell { grid-column: span 3; padding: 20px 0; border-left: 1px solid var(--line-soft); padding-left: 20px; }
.metastrip .cell:first-child { border-left: 0; padding-left: 0; }
.metastrip .k { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.metastrip .v { font-family: var(--jp); font-weight: 500; color: var(--ink); font-size: 14px; margin-top: 4px; }
@media (max-width: 720px){ .metastrip .cell { grid-column: span 6; } .metastrip .cell:nth-child(3){ border-left:0; padding-left:0;} }

/* ---------- Section scaffold ---------- */
.sec { padding: 96px 0; border-bottom: 1.5px solid var(--line); }
.sec.dark { background: var(--ink); color: #cfd6d6; border-bottom-color: #2a3133; }
.sec.teal { background: var(--teal); color: #d6e6e5; border-bottom-color: var(--teal-deep); }
.sec-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; margin-bottom: 60px; }
.sec-head .idxcol { grid-column: 1 / 3; }
.sec-head .titcol { grid-column: 3 / 9; }
.sec-head .metacol { grid-column: 10 / 13; text-align: right; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 54px); letter-spacing: -0.035em; line-height: 1.0; }
.sec-head .h2jp { font-family: var(--jp); font-weight: 500; font-size: clamp(18px,2.2vw,24px); letter-spacing:.04em; line-height:1.5; color: var(--ink); }
.dark .sec-head h2, .teal .sec-head h2, .dark .sec-head .h2jp, .teal .sec-head .h2jp { color: #fff; }
.sec-head p { color: var(--body); font-size: 14.5px; margin: 0; }
.dark .sec-head p, .teal .sec-head p { color: rgba(255,255,255,.7); }
.dark .idx, .teal .idx { color: var(--yellow-deep); }
@media (max-width: 820px){
  .sec-head { margin-bottom: 40px; }
  .sec-head .idxcol { grid-column: 1/13; margin-bottom: 14px; }
  .sec-head .titcol { grid-column: 1/13; }
  .sec-head .metacol { grid-column: 1/13; text-align: left; margin-top: 16px; }
}

/* ---------- About ---------- */
.about-body { grid-column: 3 / 10; }
.about-body .big { font-family: var(--jp); font-weight: 300; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.85; letter-spacing: .03em; color: var(--ink); }
.about-body .big em { font-style: normal; color: var(--teal); font-weight: 500; }
@media (max-width: 820px){ .about-body { grid-column: 1/13; } }

/* ---------- Services (numbered rows, Swiss list) ---------- */
.phase-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: 40px 0; border-top: 1.5px solid var(--line); align-items: start; }
.phase-row:last-child { border-bottom: 1.5px solid var(--line); }
.phase-row .p-idx { grid-column: 1 / 3; }
.phase-row .p-idx .n { font-family: var(--sans); font-weight: 600; font-size: 40px; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.phase-row .p-idx .en { display:block; font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-top: 10px; }
.phase-row .p-main { grid-column: 3 / 9; }
.phase-row .p-main h3 { font-family: var(--jp); font-weight: 600; font-size: clamp(19px, 2.4vw, 25px); letter-spacing: .02em; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.phase-row .p-main p { color: var(--body); max-width: 40em; margin: 0; font-size: 14.5px; }
.phase-row .p-side { grid-column: 10 / 13; }
.phase-row .p-side .k { font-family: var(--sans); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.phase-row .p-side ul { list-style: none; margin: 0; padding: 0; }
.phase-row .p-side li { font-size: 13px; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.phase-row .p-side li:last-child { border-bottom: 0; }
@media (max-width: 820px){
  .phase-row .p-idx { grid-column: 1/13; display:flex; align-items:baseline; gap:16px; }
  .phase-row .p-idx .en { margin-top: 0; }
  .phase-row .p-main { grid-column: 1/13; margin: 16px 0; }
  .phase-row .p-side { grid-column: 1/13; }
}

/* ---------- 黄色い点のモーション ----------
   数秒に一度だけ小さく跳ねる。prefers-reduced-motion 時は
   冒頭のグローバル規則で自動的に停止する */
@keyframes dot-hop {
  0%, 10%, 100% { transform: none; }
  3.5% { transform: translateY(-0.16em); }
  7% { transform: translateY(0.02em); }
}
.hero h1 .dot, .dot-hop { display: inline-block; animation: dot-hop 4.6s var(--ease) 1.4s infinite; }

/* ---------- Services cycle dial（採用案 Pattern C）----------
   JS有効時はダイヤル＋固定パネルを表示し .phases を隠す。
   JS無効時はダイヤルを出さず、従来の縦リスト(.phases)がそのまま出る */
.js .phases { display: none; }
.cycle-grid { display: none; }
.js .cycle-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cycle-dial { position: relative; width: min(480px, 100%); aspect-ratio: 1; margin-inline: auto; }
.cycle-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cycle-ring { transform-origin: 50% 50%; animation: cycle-rot 80s linear infinite; }
@keyframes cycle-rot { to { transform: rotate(360deg); } }
.cycle-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.cycle-center .l1 { font-family: var(--sans); font-weight: 600; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cycle-center .l2 { font-family: var(--jp); font-weight: 700; font-size: 18px; letter-spacing: .1em; color: var(--ink); }
.cycle-num {
  position: absolute; transform: translate(-50%, -50%);
  border: 0; background: none; padding: 6px 10px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: -0.02em; color: #7d8781; line-height: 1; transition: color .18s var(--ease);
}
.cycle-num:hover, .cycle-num:focus-visible { color: var(--ink-2); }
.cycle-num[aria-expanded="true"] { color: var(--ink); }
.cycle-num[aria-expanded="true"]::after { content: "."; color: var(--yellow-deep); display: inline-block; animation: dot-hop 4.6s var(--ease) .8s infinite; }
.cycle-num:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.cycle-num .en { display: block; font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.cycle-num[aria-expanded="true"] .en { color: var(--teal); }
.cycle-num.cn1 { left: 76.9%; top: 23.1%; }
.cycle-num.cn2 { left: 76.9%; top: 76.9%; }
.cycle-num.cn3 { left: 23.1%; top: 76.9%; }
.cycle-num.cn4 { left: 23.1%; top: 23.1%; }
.cycle-panel { border-left: 1.5px solid var(--line); padding: 8px 0 8px clamp(22px, 3vw, 36px); min-height: 340px; }
.cycle-panel .no-row { display: flex; align-items: baseline; gap: 12px; }
.cycle-panel .no { font-family: var(--sans); font-weight: 700; font-size: 44px; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.cycle-panel .en { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.cycle-panel h3 { font-family: var(--jp); font-weight: 600; font-size: clamp(19px, 2.2vw, 23px); letter-spacing: .02em; color: var(--ink); margin: 18px 0 10px; line-height: 1.6; }
.cycle-panel p { font-size: 14px; color: var(--body); margin: 0; max-width: 34em; }
.cycle-panel .dl { border-top: 1px solid var(--line-soft); margin-top: 20px; padding-top: 12px; font-size: 12.5px; color: var(--muted); max-width: 34em; }
.cycle-panel .dl b { font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.cycle-body { transition: opacity .18s var(--ease); }
@media (max-width: 800px) {
  .js .cycle-grid { grid-template-columns: 1fr; }
  .cycle-panel { min-height: 0; }
}

/* ---------- Works ティザー行（チラ見せ・クリックで準備中ポップアップ） ---------- */
.case-row.is-teaser { cursor: pointer; }
.case-row.is-teaser:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.cr-thumb img.th { width: 100%; height: auto; object-fit: cover; }
.case-row .cr-soon { grid-column: 12 / 13; text-align: right; font-family: var(--jp); font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; align-self: center; }
@media (max-width: 820px) { .case-row .cr-soon { grid-column: 11 / 13; } }
.case-list + .works-notice { border-top: 0; }

/* ---------- 準備中ダイアログ ---------- */
.soon-dialog { border: 1.5px solid var(--line); background: var(--paper); padding: 0; max-width: 480px; width: calc(100% - 40px); }
.soon-dialog::backdrop { background: rgba(20, 24, 26, .45); }
.soon-dialog .sd-inner { padding: 36px 38px 34px; }
.soon-dialog .sd-title { font-family: var(--jp); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--ink); margin: 14px 0 6px; }
.soon-dialog .sd-text { font-size: 14px; margin: 0 0 26px; }
.soon-dialog .sd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.soon-dialog .sd-close { background: none; border: 0; border-bottom: 1.5px solid var(--ink); font-size: 13px; padding: 0 0 4px; }

/* ---------- お問い合わせフォーム（main.js が生成） ---------- */
.contact-dialog { max-width: 560px; }
.contact-dialog .sd-inner { margin: 0; }
.cf-label { display: block; font-family: var(--sans); font-weight: 600; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 16px; }
.cf-label .req { color: var(--teal); font-size: 9.5px; margin-left: 6px; }
.cf-input {
  display: block; width: 100%; margin-top: 6px;
  font-family: var(--jp); font-weight: 300; font-size: 14px; letter-spacing: .01em; color: var(--ink);
  background: #fff; border: 1px solid var(--line-soft); border-radius: 0; padding: 10px 12px;
}
.cf-input:focus-visible { outline: 2px solid var(--teal); outline-offset: -1px; }
textarea.cf-input { resize: vertical; line-height: 1.8; }
select.cf-input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.cf-note { font-size: 12px; color: var(--muted); margin: 4px 0 20px; }

/* ---------- Works 準備中ブロック ---------- */
.works-notice { border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); padding: 64px 0; }
.wn-label { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin: 0 0 18px; }
.works-notice .wn-text { font-family: var(--jp); font-weight: 500; font-size: clamp(19px, 2.6vw, 26px); line-height: 1.8; letter-spacing: .03em; color: var(--ink); margin: 0 0 30px; }

/* ---------- Case index (Swiss table-like cards) ---------- */
.case-list { border-top: 1.5px solid var(--line); }
.case-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: 30px 0; border-bottom: 1.5px solid var(--line); align-items: center; transition: background .2s var(--ease); position: relative; }
.case-row:hover { background: var(--paper-2); }
.case-row .cr-no { grid-column: 1 / 2; font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--teal); }
.case-row .cr-thumb { grid-column: 2 / 4; }
.case-row .cr-thumb .th { aspect-ratio: 4/3; background: repeating-linear-gradient(135deg,transparent 0 12px, rgba(20,24,26,.05) 12px 13px), var(--paper-2); border: 1px solid var(--line-soft); }
.case-row .cr-main { grid-column: 4 / 9; }
.case-row .cr-main .ph { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.case-row .cr-main h3 { font-family: var(--jp); font-weight: 600; font-size: clamp(17px,2vw,22px); letter-spacing: .02em; line-height: 1.5; color: var(--ink); }
.case-row .cr-tags { grid-column: 9 / 12; }
.case-row .cr-tags span { font-family: var(--sans); font-size: 11px; color: var(--muted); display:block; line-height: 1.9; }
.case-row .cr-tags span::before { content:"— "; color: var(--line-soft); }
.case-row .cr-go { grid-column: 12 / 13; text-align: right; font-family: var(--sans); font-weight: 600; font-size: 20px; color: var(--ink); transition: transform .2s var(--ease), color .2s var(--ease); }
.case-row:hover .cr-go { transform: translateX(5px); color: var(--teal); }
@media (max-width: 820px){
  .case-row { padding: 22px 0; row-gap: 12px; }
  .case-row .cr-no { grid-column: 1/3; }
  .case-row .cr-thumb { display: none; }
  .case-row .cr-main { grid-column: 1/13; }
  .case-row .cr-tags { grid-column: 1/11; }
  .case-row .cr-go { grid-column: 11/13; }
}

/* ---------- CTA ---------- */
.cta .grid12 { align-items: end; }
.cta .cta-lead { grid-column: 1 / 8; }
.cta .cta-lead h2 { font-size: clamp(30px, 4.6vw, 58px); letter-spacing: -0.035em; line-height: 1.0; color:#fff; }
.cta .cta-lead .jp { font-family: var(--jp); font-weight: 300; color: rgba(255,255,255,.72); margin-top: 22px; font-size: 15px; max-width: 34em; }
.cta .cta-act { grid-column: 9 / 13; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
@media (max-width: 820px){ .cta .cta-lead, .cta .cta-act { grid-column: 1/13; } .cta .cta-act { margin-top: 34px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9aa2a3; padding: 60px 0 30px; }
.footer-top { display: grid; grid-template-columns: repeat(12,1fr); column-gap: var(--gutter); padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-top .fb { grid-column: 1 / 6; }
.footer-top .fb .brand { color: #fff; }
.footer-top .fb p { margin-top: 16px; font-size: 13px; color: #7f8889; max-width: 24em; }
.footer-top .fc { grid-column: 7 / 10; }
.footer-top .fd { grid-column: 10 / 13; }
.footer-top h4 { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.f-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.f-links a { font-family: var(--sans); font-size: 13px; color: #9aa2a3; transition: color .18s var(--ease); }
.f-links a:hover { color: var(--yellow); }
.f-company { font-size: 12.5px; line-height: 2; color: #7f8889; }
.f-company a:hover { color: var(--yellow); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-family: var(--sans); font-size: 11px; letter-spacing: .06em; color: #6b7374; }
@media (max-width: 820px){
  .footer-top .fb { grid-column: 1/13; }
  .footer-top .fc { grid-column: 1/7; margin-top: 30px; }
  .footer-top .fd { grid-column: 7/13; margin-top: 30px; }
}

/* ---------- Case detail ---------- */
.case-hero { border-bottom: 1.5px solid var(--line); padding: 46px 0 40px; }
.crumb { font-family: var(--sans); font-size: 12px; letter-spacing: .06em; color: var(--muted); margin-bottom: 30px; }
.crumb a { color: var(--teal); }
.case-hero .ch-grid { display:grid; grid-template-columns: repeat(12,1fr); column-gap: var(--gutter); }
.case-hero .ch-tag { grid-column: 1/13; font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 20px; }
.case-hero .ch-tag .use { color: var(--muted); margin-left: 10px; }
.case-hero h1 { grid-column: 1 / 10; font-family: var(--jp); font-weight: 600; font-size: clamp(26px,4vw,46px); letter-spacing: .01em; line-height: 1.34; color: var(--ink); }
.case-hero .summary { grid-column: 1 / 9; margin-top: 22px; font-size: 15.5px; color: var(--body); }
.case-hero .hashtags { grid-column: 1/13; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 16px; }
.case-hero .hashtags span { font-family: var(--sans); font-size: 11.5px; color: var(--muted); }

.case-body { padding: 20px 0 20px; }
.case-block { padding: 48px 0; border-bottom: 1.5px solid var(--line); }
.case-block > .wrap { display: grid; grid-template-columns: repeat(12,1fr); column-gap: var(--gutter); }
.case-block .cb-idx { grid-column: 1 / 3; }
.case-block .cb-idx .n { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .16em; color: var(--teal); text-transform: uppercase; }
.case-block .cb-main { grid-column: 3 / 11; }
.case-block .cb-main h2 { font-family: var(--jp); font-weight: 600; font-size: clamp(20px,2.8vw,30px); letter-spacing: .01em; line-height: 1.5; color: var(--ink); margin-bottom: 22px; }
.case-block .cb-main p { color: var(--body); }
.case-block.wide .cb-main { grid-column: 3 / 12; }
@media (max-width: 820px){
  .case-block .cb-idx { grid-column: 1/13; margin-bottom: 14px; }
  .case-block .cb-main, .case-block.wide .cb-main { grid-column: 1/13; }
  .case-hero h1, .case-hero .summary { grid-column: 1/13; }
}

.note { border-left: 2px solid var(--teal); background: var(--white); padding: 16px 20px; margin: 22px 0; font-size: 14px; color: var(--ink-2); }

/* stats — Swiss numeric table */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1.5px solid var(--line); margin: 26px 0 6px; }
.stat { padding: 20px 18px 18px; border-left: 1px solid var(--line-soft); border-bottom: 1.5px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .v { font-family: var(--sans); font-weight: 600; font-size: clamp(22px,3vw,30px); letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.stat .k { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.stat .k small { display:block; color: var(--line-soft); }
.stat-cap { font-size: 12px; color: var(--muted); margin-top: 12px; }
@media (max-width:620px){ .stat-grid { grid-template-columns: repeat(2,1fr);} .stat:nth-child(3){ border-left:0;} }

.mini-label { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }

/* report mocks — flat, ruled */
.reports { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin: 26px 0; }
.reports.single { grid-template-columns: 1fr; }
.report { position: relative; background: var(--white); border: 1.5px solid var(--line); padding: 20px; overflow: hidden; }
.report .r-head { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.report .r-title { font-family: var(--jp); font-weight: 600; font-size: 14px; color: var(--ink); margin: 8px 0 14px; line-height: 1.5; }
.report .r-note { font-size: 12.5px; color: var(--body); margin-top: 14px; }
.report .r-cap { font-size: 11px; color: var(--muted); margin-top: 10px; }
.report .sample-badge { position: absolute; top: 0; right: 0; background: var(--ink); color: var(--yellow); font-family: var(--sans); font-weight: 600; font-size: 9px; letter-spacing: .2em; padding: 5px 12px; }
.mock-chart { height: 100px; border: 1px solid var(--line-soft); position: relative; overflow: hidden; background:
  linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0/28px 100%,
  linear-gradient(180deg, var(--line-soft) 1px, transparent 1px) 0 0/100% 25px, var(--white); }
.mock-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.report .r-legend { display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; font-size:11px; color: var(--muted); }
.report .r-legend i { display:inline-block; width:9px; height:9px; margin-right:5px; vertical-align:middle; }
@media (max-width:620px){ .reports { grid-template-columns: 1fr; } }

/* comparison table */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1.5px solid var(--line); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; background: var(--white); }
table.cmp th, table.cmp td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.cmp thead th { background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp td:first-child { color: var(--muted); }

/* decision summary */
.summary-box { border: 1.5px solid var(--line); background: var(--white); padding: 24px 26px; margin: 26px 0; }
.summary-box .s-label { font-family: var(--sans); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.summary-box p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.summary-box p:last-child { margin-bottom: 0; }

/* deliverables */
.deliv-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1.5px solid var(--line); margin: 26px 0 6px; }
.deliv-grid .d { padding: 20px 16px; border-left: 1px solid var(--line-soft); border-bottom: 1.5px solid var(--line); font-family: var(--jp); font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.deliv-grid .d:first-child { border-left: 0; }
.deliv-grid .d .dn { display:block; font-family: var(--sans); font-weight: 600; font-size: 11px; color: var(--teal); margin-bottom: 10px; letter-spacing: .1em; }
@media (max-width:620px){ .deliv-grid { grid-template-columns: repeat(2,1fr);} .deliv-grid .d:nth-child(3){border-left:0;} }

/* day timeline */
.days { margin: 24px 0; }
.day { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.day:first-child { border-top: 1.5px solid var(--line); }
.day .d-label { font-family: var(--sans); font-weight: 600; color: var(--teal); font-size: 12px; letter-spacing: .06em; padding-top: 2px; }
.day p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* ---------- Case Studies filter page ---------- */
.filters { border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); padding: 22px 0; margin-bottom: 40px; display: grid; gap: 16px; }
.filter-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; }
.filter-row .f-legend { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.filter-row .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--sans); font-size: 12.5px; letter-spacing: .02em; padding: 7px 15px; border: 1px solid var(--line-soft); background: transparent; color: var(--ink-2); cursor: pointer; transition: .16s var(--ease); }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.no-results { display: none; text-align: center; color: var(--muted); padding: 40px 0; }
.no-results.show { display: block; }
.case-row.hidden { display: none; }
@media (max-width: 620px){ .filter-row { grid-template-columns: 1fr; gap: 8px; } }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

.center { text-align: center; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
