/* Comorebee — shared styles
   Two moods, one system: the landing hero is the forest (dark, komorebi light);
   every other surface is daylight (pale leaf-tinted ground, heavy ink type). */

:root {
  --bg: #edf1ea;
  --panel: #dfe6dc;
  --panel-hi: #d1dacd;
  --ink: #14170f;
  --ink-2: #565a4c;
  --ink-3: #7b8270;           /* large text only (≥3:1) */
  --line: rgb(20 23 15 / 0.14);
  --forest: #0f1f17;
  --forest-deep: #06100a;
  --sand: #e9e4d4;
  --sand-2: rgb(233 228 212 / 0.66);
  --sun: #e3a82b;
  --sun-soft: #f1d68a;
  --danger: #9b2c1f;
  --r-tile: 30px;
  --r-pill: 999px;
  --gap: 8px;
  --pad: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Pretendard Variable", Pretendard, "Noto Sans JP", system-ui, -apple-system, "Apple SD Gothic Neo", "Hiragino Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-3) transparent; scrollbar-width: thin; scroll-behavior: smooth; }
html[lang="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ja"] { line-break: strict; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--sun-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 12px; }
.skip {
  position: fixed; left: 8px; top: -80px; z-index: 60;
  padding: 10px 18px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 700;
}
.skip:focus { top: 8px; }

/* ---------- pill navigation ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: var(--gap); padding: var(--pad);
  background: linear-gradient(var(--bg) 70%, transparent);
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  background: var(--panel); border: 0; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 650; letter-spacing: 0.005em; white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pill:hover { background: var(--panel-hi); }
.pill[aria-current="page"], .pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pill--brand { flex: 1 1 auto; justify-content: flex-start; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; }
.pill--brand img { height: 20px; width: auto; margin-right: 10px; flex: none; }
.bar[data-tone="dark"] .pill--brand img { filter: invert(1); }
.pill--brand small { margin-left: auto; font-weight: 550; letter-spacing: 0.01em; text-transform: none; color: var(--ink-2); font-size: 13px; }
.pill--sun { background: var(--sun); color: var(--ink); }
.pill--sun:hover { background: #f0b83a; }
.pill--ink { background: var(--ink); color: var(--bg); }
.pill--ink:hover { background: #2a2f22; }
.pill--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.pill .arrow { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.pill:hover .arrow { transform: translateX(3px); }
.nav { display: flex; gap: var(--gap); }
.lang { display: inline-flex; background: var(--panel); border-radius: var(--r-pill); padding: 4px; gap: 2px; transition: background 0.25s var(--ease); }
.lang a { display: grid; place-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 750; letter-spacing: 0.06em; color: var(--ink-2); transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.lang a:not([aria-current="true"]):hover { color: var(--ink); }
.menu-btn { display: none; }

/* dark tone: nav floating over the forest hero */
.bar[data-tone="dark"] .pill, .bar[data-tone="dark"] .lang {
  background: rgb(237 241 234 / 0.1); color: #f3f1e6;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.bar[data-tone="dark"] .pill:hover { background: rgb(237 241 234 / 0.2); }
.bar[data-tone="dark"] .pill[aria-current="page"], .bar[data-tone="dark"] .lang a[aria-current="true"] { background: #f3f1e6; color: var(--forest); }
.bar[data-tone="dark"] .lang a { color: rgb(243 241 230 / 0.72); }
.bar[data-tone="dark"] .lang a:not([aria-current="true"]):hover { color: #f3f1e6; }
.bar[data-tone="dark"] .pill--brand small { color: rgb(243 241 230 / 0.7); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .pill--brand small { display: none; }
  .bar { flex-wrap: wrap; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; background: var(--panel); border-radius: 28px; padding: 8px; }
  .nav[data-open="true"] { display: flex; }
  .nav .pill { justify-content: flex-start; background: transparent; height: 46px; }
  .nav .pill:hover { background: var(--panel-hi); }
  .nav .pill[aria-current="page"] { background: var(--ink); }
  .bar .lang { order: 2; }
  .bar[data-tone="dark"] .nav { background: rgb(6 16 10 / 0.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .bar[data-tone="dark"] .nav .pill { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- page head ---------- */
.head { padding: clamp(40px, 7vw, 96px) 16px 28px; max-width: 1500px; }
.head h1 {
  margin: 0; font-size: clamp(3.2rem, 10vw, 6rem); line-height: 0.95;
  font-weight: 850; letter-spacing: -0.035em; text-wrap: balance;
}
.head p { margin: 20px 0 0; max-width: 34em; color: var(--ink-2); font-size: 16px; }

.filters { display: flex; flex-wrap: wrap; gap: var(--gap); padding: 0 var(--pad) 18px; }
.filters .pill { height: 38px; padding: 0 16px; font-size: 13.5px; }
.filters .count { margin-left: auto; align-self: center; color: var(--ink-2); font-size: 13px; padding-right: 8px; font-variant-numeric: tabular-nums; }

/* ---------- tile grid ---------- */
.grid {
  display: grid; gap: var(--gap); padding: 0 var(--pad) var(--pad);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } :root { --r-tile: 22px; } }

.tile {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--r-tile); isolation: isolate;
  background: var(--panel);
}
.tile[hidden] { display: none; }
.tile__img, .shot {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 45% at 28% 22%, rgb(255 244 200 / 0.55), transparent 70%),
    radial-gradient(40% 30% at 78% 64%, rgb(255 236 170 / 0.28), transparent 70%),
    linear-gradient(160deg, var(--t1, #2f4a38), var(--t2, #c9d6b0));
  transition: transform 0.9s var(--ease);
}
.tile__img::after, div.shot::after {
  content: ""; position: absolute; inset: 0; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.tile__photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover .tile__img, .tile:hover .tile__photo { transform: scale(1.05); }
.tile__label {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px 13px; border-radius: 22px;
  background: rgb(237 241 234 / 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.5s var(--ease);
}
.tile:hover .tile__label { transform: translateY(-4px); }
.tile__title { font-weight: 750; font-size: 15px; line-height: 1.25; letter-spacing: -0.01em; }
.tile__client { color: var(--ink-2); font-size: 12.5px; line-height: 1.3; }
@media (max-width: 700px) {
  /* Two-up tiles are ~175px wide: a slimmer label (title ≤2 lines, client on one line) leaves the photo visible. */
  .grid .tile__label { left: 6px; right: 6px; bottom: 6px; padding: 8px 11px 9px; border-radius: 16px; }
  .grid .tile__title { font-size: 13px; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .grid .tile__client { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.tile__tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgb(20 23 15 / 0.74); color: var(--sand);
  font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
}
.grid__empty { grid-column: 1 / -1; padding: 60px 16px; color: var(--ink-2); }

/* ---------- sideways strip (Home work) ---------- */
.strip {
  display: flex; gap: var(--gap); padding: 0 var(--pad) 4px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--pad);
  scrollbar-width: none; cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip > .tile { flex: 0 0 clamp(250px, 26vw, 420px); scroll-snap-align: start; }
@media (max-width: 700px) { .strip > .tile { flex-basis: 74vw; } }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip.is-dragging .tile { pointer-events: none; }
.strip:focus-visible { outline-offset: -3px; border-radius: var(--r-tile); }
.strip-nav { display: flex; gap: var(--gap); }
.pill--icon { width: 42px; padding: 0; }
.pill--icon:hover .arrow { transform: none; }
.pill--icon[disabled] { opacity: 0.35; cursor: default; }
.pill--icon[disabled]:hover { background: var(--panel); }
.arrow.flip { scale: -1 1; }
.rail { cursor: grab; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
@media (max-width: 700px) { .strip-nav .pill--icon { display: none; } }

/* ---------- generic sections ---------- */
.section { padding: clamp(56px, 8vw, 120px) 16px 28px; }
.section h2, .sechead h2 { margin: 0 0 8px; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.section p { margin: 0; max-width: 34em; color: var(--ink-2); }
.sechead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; padding: clamp(64px, 9vw, 132px) 16px 22px; }
.sechead h2 { margin: 0; }

.wall { display: grid; gap: var(--gap); padding: 20px var(--pad) var(--pad); grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wall__cell {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border-radius: 22px; padding: 12%;
  background: var(--panel); color: var(--ink-2);
  font-size: 13px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 0.3s var(--ease);
}

.wall__cell:hover { background: var(--panel-hi); }

/* ---------- footer ---------- */
.foot {
  margin: clamp(56px, 8vw, 120px) var(--pad) var(--pad);
  padding: clamp(32px, 5vw, 64px); border-radius: 36px;
  background: var(--forest); color: var(--sand);
  display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr;
}
.foot--plain { grid-template-columns: 1fr; }
@media (max-width: 800px) { .foot { grid-template-columns: 1fr; border-radius: 28px; } }
.foot h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.02; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.foot dl { margin: 0; display: grid; gap: 14px; align-content: end; font-size: 14px; }
.foot--plain dl { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot dt { color: var(--sand-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.foot dd { margin: 2px 0 0; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .pill { margin-top: 24px; }
.copy { padding: 4px 24px 24px; color: var(--ink-2); font-size: 12.5px; }

/* ---------- project detail ---------- */
.detail { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--gap); padding: var(--pad); align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.side { position: sticky; top: 58px; display: grid; gap: var(--gap); }
@media (max-width: 900px) { .side { position: static; } }
.side h1 { margin: 22px 8px 10px; font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1.02; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.panel { background: var(--panel); border-radius: 28px; padding: 22px 24px 26px; display: grid; gap: 26px; }
.panel h3, .label { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.panel dl { margin: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px 12px; font-size: 14px; }
.panel dt { color: var(--ink-2); }
.panel dd { margin: 0; font-weight: 600; }
.panel p { margin: 0; font-size: 14.5px; }
.points { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 14.5px; font-weight: 600; }
.sidenav { display: flex; gap: var(--gap); flex-wrap: wrap; }
.rail { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.shot { position: relative; inset: auto; z-index: auto; flex: 0 0 auto; height: min(80vh, 780px); aspect-ratio: 4 / 5; border-radius: var(--r-tile); overflow: hidden; scroll-snap-align: start; object-fit: cover; }
.shot--wide { aspect-ratio: 16 / 10; }
@media (max-width: 900px) { .shot { height: 62vh; } }

/* Real photos keep their own shape (site.js sets --ar from the width/height in projects.json).
   Desktop: a filmstrip with one row height for all frames. The 56.25cqw cap (16:9 across the column)
   means even the widest photo fits the column whole, and 660px stops small files being blown up too far. */
.rail--photos { container-type: inline-size; align-items: flex-start; }
.rail--photos .shot { height: min(74vh, 660px, 56.25cqw); aspect-ratio: var(--ar, 4 / 5); width: auto; }
@media (min-width: 901px) { .rail--photos .shot:only-child { height: min(78vh, 760px, 88cqw); } }
@media (max-width: 900px) {
  /* Phones and tablets: photos stack at full width (no sideways swiping through tall frames), each at its own ratio. */
  .rail--photos { flex-direction: column; overflow: visible; scroll-snap-type: none; cursor: auto; padding-bottom: 0; }
  .rail--photos .shot { width: 100%; height: auto; }
  /* Show the work first: back link, title, photos, then the facts. */
  .side { display: contents; }
  .side > .sidenav:first-child { order: 0; }
  .side > h1 { order: 1; }
  .detail > .rail { order: 2; }
  .side > .panel { order: 3; }
  .side > .sidenav:last-child { order: 4; }
}

/* =========================================================
   HOME — below the landing journey (journey itself: landing.css)
   ========================================================= */
.intro { padding: clamp(24px, 6vw, 72px) 24px clamp(8px, 2vw, 24px); }
.statement { margin: 0; max-width: 21em; font-size: clamp(1.7rem, 4vw, 3.4rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; text-wrap: pretty; }
html[lang="ja"] .statement { letter-spacing: -0.01em; line-height: 1.32; max-width: 22em; }
.statement .mute { color: var(--ink-3); }

/* service rows (home + solutions index) */
.rows { list-style: none; margin: 0; padding: 0 var(--pad); }
.rows a {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 26px 16px; border-top: 1px solid var(--line);
  transition: background 0.35s var(--ease), border-radius 0.35s var(--ease);
}
.rows li:last-child a { border-bottom: 1px solid var(--line); }
.rows a:hover { background: var(--panel); border-radius: 24px; border-color: transparent; }
.rows li:has(+ li a:hover) a { border-bottom-color: transparent; }
.rows__name { font-size: clamp(1.45rem, 2.8vw, 2.3rem); line-height: 1.08; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.rows__desc { color: var(--ink-2); font-size: 15px; }
.rows .arrow { width: 28px; height: 28px; transition: transform 0.4s var(--ease); }
.rows a:hover .arrow { transform: translateX(6px); }
@media (max-width: 760px) {
  .rows a { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 20px 12px; }
  .rows__desc { grid-column: 1; grid-row: 2; }
  .rows .arrow { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; }
}

/* =========================================================
   SOLUTIONS
   ========================================================= */
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px 48px; padding: clamp(44px, 6vw, 88px) 16px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.svc:first-of-type { border-top: 0; }
.svc__title { position: sticky; top: 76px; align-self: start; }
.svc__title h2 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.02; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.svc__body > p { margin: 0; max-width: 32em; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.7; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--gap); margin: 26px 0 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: var(--r-pill); background: var(--panel); font-size: 14px; font-weight: 600; }
.related { margin-top: 34px; }
.related[hidden] { display: none; }
.related__list { display: flex; flex-wrap: wrap; gap: var(--gap); }
@media (max-width: 860px) { .svc { grid-template-columns: 1fr; } .svc__title { position: static; } }

.model { margin: 8px var(--pad) 0; padding: clamp(32px, 5vw, 72px); border-radius: 36px; background: var(--forest); color: var(--sand); }
.model h2 { margin: 0; max-width: 16em; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.04; font-weight: 850; letter-spacing: -0.03em; text-wrap: balance; }
.model > p { margin: 20px 0 0; max-width: 36em; color: var(--sand-2); font-size: 16px; }
.model dl { margin: clamp(32px, 5vw, 56px) 0 0; display: grid; }
.model dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 32px; padding: 22px 0; border-top: 1px solid rgb(233 228 212 / 0.16); align-items: baseline; }
.model dt { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 850; letter-spacing: -0.02em; }
.model dd { margin: 0; color: var(--sand-2); }
.model .hl dt { color: var(--sun-soft); }
.model .hl dd { color: var(--sand); }
@media (max-width: 700px) { .model dl > div { grid-template-columns: 1fr; } }

/* =========================================================
   ABOUT
   ========================================================= */
.story {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0 var(--pad); padding: clamp(36px, 7vw, 112px) clamp(24px, 6vw, 96px);
  border-radius: 36px; background: var(--forest); color: var(--sand);
}
.story::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(30% 40% at 86% 12%, rgb(241 214 138 / 0.22), transparent 70%),
    radial-gradient(18% 22% at 70% 30%, rgb(241 214 138 / 0.1), transparent 70%);
}
.story h2 { margin: 0; max-width: 12em; font-size: clamp(2.2rem, 5.6vw, 4.6rem); line-height: 1.02; font-weight: 850; letter-spacing: -0.035em; text-wrap: balance; }
.story p { margin: 28px 0 0; max-width: 30em; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.75; color: rgb(233 228 212 / 0.82); }
.ceo { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px 48px; align-items: stretch; padding: clamp(64px, 9vw, 132px) 16px 0; }
.ceo__side { display: flex; flex-direction: column; width: 100%; max-width: 340px; justify-self: center; }
.ceo__side > :not(.profile__photo) { flex: none; }
.letter__text p:last-child { margin-bottom: 0; }
.ceo__main { display: flex; flex-direction: column; }
.ceo__main .letter__text { flex: 1; display: flex; flex-direction: column; }
.ceo__main .letter__sign { margin-top: auto; padding-top: 28px; }
.ceo__main h2 { margin: 0 0 32px; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1; font-weight: 850; letter-spacing: -0.03em; }
.profile__photo { display: block; width: 100%; height: auto; aspect-ratio: 951 / 1214; object-fit: cover; border-radius: var(--r-tile); }
.ceo .profile__name { margin: auto 0 0; padding-top: 20px; font-size: 1.7rem; }
.ceo .career li { padding: 8px 0; font-size: 13.5px; }
.career__h { margin: 16px 0 4px; color: var(--ink-2); font-size: 11.5px; font-weight: 750; letter-spacing: 0.12em; }
.ceo .profile__name + .career__h { margin-top: 14px; }
.letter__text p { margin: 0 0 1.1em; max-width: 34em; font-size: 17px; line-height: 1.85; }
.letter__sign { font-weight: 750; }
.letter__sign span { display: block; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.profile__name { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 850; letter-spacing: -0.02em; line-height: 1.1; }
.profile__name small { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.career { list-style: none; margin: 0; padding: 0; }
.career li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; font-weight: 600; }
.career li:last-child { border-bottom: 1px solid var(--line); }
.facts { margin: 0; padding: 0 16px; display: grid; }
.facts > div { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr); gap: 6px 48px; padding: 18px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.facts dd ul { margin: 8px 0 0; padding-left: 1.1em; font-weight: 500; color: var(--ink-2); }
.facts dd a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ink-3); }
@media (max-width: 860px) { .ceo { grid-template-columns: 1fr; } .ceo__side { display: block; max-width: 320px; justify-self: start; } } 
@media (max-width: 860px) { .facts > div { grid-template-columns: 1fr; } }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: var(--gap); padding: 0 var(--pad); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.form { padding: clamp(22px, 3vw, 40px); gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .field .lbl { font-size: 13.5px; font-weight: 700; }
.field label i { font-style: normal; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  font-size: 15.5px; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2314170f' stroke-width='1.8'><path d='M1 1.5l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.field textarea { min-height: 180px; padding: 14px 18px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgb(20 23 15 / 0.3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgb(227 168 43 / 0.35); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.err { min-height: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px 18px; border-radius: 18px; background: var(--bg); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--forest); }
.consent label { font-size: 14px; font-weight: 700; }
.consent p { grid-column: 2; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.consent .err { grid-column: 2; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__foot .pill[disabled] { opacity: 0.55; cursor: progress; }
.status { margin: 0; font-size: 14px; font-weight: 600; }
.status[data-kind="ok"] { color: #24563a; }
.status[data-kind="err"] { color: var(--danger); }
.aside { position: sticky; top: 64px; display: grid; gap: 28px; padding: clamp(24px, 3vw, 40px); border-radius: 28px; background: var(--forest); color: var(--sand); }
@media (max-width: 900px) { .aside { position: static; } }
.aside .label { color: var(--sand-2); border-color: rgb(233 228 212 / 0.16); }
.aside__mail { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.aside__mail:hover { text-decoration: underline; text-underline-offset: 5px; }
.aside p { margin: 0; color: rgb(233 228 212 / 0.85); }
.aside .pill { background: rgb(237 241 234 / 0.1); color: var(--sand); margin-top: 14px; }
.aside .pill:hover { background: rgb(237 241 234 / 0.2); }

/* ---------- 404 / language gate ---------- */
.gate { min-height: 100svh; display: grid; place-content: center; gap: 22px; padding: 24px; text-align: center; }
.gate h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.04; font-weight: 850; letter-spacing: -0.03em; }
.gate p { margin: 0; color: var(--ink-2); }
.gate nav { display: flex; gap: var(--gap); justify-content: center; flex-wrap: wrap; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
.rise { animation: rise 0.7s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 6) * 40ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile:hover .tile__img, .tile:hover .tile__photo { transform: none; }
}

/* Japanese headings: each phrase (<span class="w">) stays whole, so lines break only between phrases.
   A phrase longer than the line can still wrap inside itself, so nothing ever overflows. */
html[lang="ja"] .w { display: inline-block; }

/* ---------- page transitions ----------
   Cross-document View Transitions (Chrome/Edge 126+, Safari 18.2+). The new page rises as a
   rounded sheet while the old one drifts up and dims; the nav stays put and cross-fades.
   Browsers without support simply navigate. */
@view-transition { navigation: auto; }
.bar { view-transition-name: site-nav; }
::view-transition-old(root) { animation: vt-leave 0.8s var(--ease) both; }
::view-transition-new(root) { animation: vt-enter 0.8s var(--ease) both; }
::view-transition-group(site-nav) { z-index: 2; animation-duration: 0.5s; }
@keyframes vt-leave { to { transform: translateY(-5%) scale(0.97); opacity: 0.3; filter: blur(4px); } }
@keyframes vt-enter {
  from { clip-path: inset(100% 0 0 0 round 44px 44px 0 0); }
  to { clip-path: inset(0 0 0 0 round 0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- client logos: optical sizing (see sizeLogos in site.js) ---------- */
/* --k is the logo's "visual size"; width = --k·√aspect, so every logo covers about the same area. */
img.logo { --a: 2.5; display: block; flex: none; width: min(var(--max), calc(var(--k) * sqrt(var(--a)))); height: auto; max-height: 100%; object-fit: contain; user-select: none; }
.wall__cell { container-type: inline-size; }
.wall__cell img.logo { --k: 31cqi; --max: 88cqi; max-height: 42cqi; }

/* ---------- client cloud (Home) ---------- */
/* Positions and drift are driven by the small physics loop in site.js (cloud); CSS only handles looks and fades. */
.cloud {
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1); --tile: clamp(96px, 8.8vw, 128px);
  position: relative; height: clamp(560px, 50vw, 720px); margin: clamp(32px, 5vw, 72px) var(--pad) 0; overflow: clip; touch-action: pan-y;
}
.cloud__centre { position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; width: min(36em, 62%); text-align: center; pointer-events: none; }
.cloud__centre h2 { margin: 0 auto; max-width: 11em; font-size: clamp(2rem, 4.4vw, 3.8rem); line-height: 1.12; font-weight: 850; letter-spacing: -0.035em; text-wrap: balance; }
.cloud__note { margin: 18px 0 0; color: var(--ink-3); font-size: 13.5px; }
.cloud__field { position: absolute; inset: 0; }
.cloud__item { position: absolute; margin: calc(var(--tile) / -2) 0 0 calc(var(--tile) / -2); will-change: transform; }

/* Bare logo, no tile behind it; the box only sets its size and keeps the logo inside. */
.cloud__card {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; overflow: hidden;
  width: var(--tile); height: var(--tile); padding: calc(var(--tile) * 0.04);
  background: none;
  transition: transform 0.5s var(--spring);
}
.cloud__card img.logo { --k: calc(var(--tile) * 0.54); --max: calc(var(--tile) * 0.92); max-height: calc(var(--tile) * 0.66); }
.cloud__card span { font-size: calc(var(--tile) * 0.15); font-weight: 800; letter-spacing: -0.02em; text-align: center; line-height: 1.15; word-break: keep-all; overflow-wrap: normal; }
.cloud__item:hover .cloud__card { transform: scale(1.1); }

/* Entrance: the headline focuses in; each tile grows in as it springs out from the centre (site.js adds .is-born). */
.cloud__centre > * { opacity: 0; translate: 0 16px; filter: blur(8px); transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease); }
.cloud__centre > :nth-child(2) { transition-delay: 0.1s; }
.cloud.is-in .cloud__centre > * { opacity: 1; translate: 0 0; filter: none; }
.cloud__card { opacity: 0; scale: 0.5; transition: opacity 0.6s var(--ease), scale 0.9s var(--spring), filter 0.35s var(--ease), transform 0.5s var(--spring); }
.cloud__item.is-born .cloud__card { opacity: 1; scale: 1; }
/* Swap: shrink and blur out, spring back in. */
.cloud .cloud__item .cloud__card.is-out { opacity: 0; scale: 0.6; filter: blur(8px); transition: opacity 0.35s var(--ease), scale 0.35s var(--ease), filter 0.35s var(--ease); }

@media (max-width: 760px) {
  .cloud { --tile: 72px; height: 600px; }
  .cloud__centre { width: 86%; }
}
@media (prefers-reduced-motion: reduce) {
  .cloud__centre > *, .cloud__card { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; transition: none !important; }
}
