/* 8E6 v4. Cosmic latte paper, shrine vermilion, wood. Mincho headings, editorial collage, crop marks.
   Colors match the business card. Motion lives in fx.js (GSAP); everything reads fine without it. */
@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #FFF8E7;          /* cosmic latte */
  --bg-2: #F6ECD6;
  --bg-3: #EFE2C7;
  --paper: #FFFCF4;
  --ink: #1E1A16;
  --text: #1E1A16;
  --text-2: #5E544A;
  --text-3: #6F6355;
  --line: rgba(30, 26, 22, 0.13);
  --line-2: rgba(30, 26, 22, 0.3);
  --accent: #D9411E;      /* shrine vermilion: large text, marks */
  --accent-ink: #B5381A;  /* vermilion for small text (AA on cream) */
  --wood: #7A5A3F;
  --wood-2: #B08968;
  --seg-off: #EFE2C9;
  --band: radial-gradient(120% 90% at 20% 10%, #E8663F 0%, #D9411E 35%, #B08968 72%, #7A5A3F 100%);
  --r: 2px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", sans-serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
  --z-grain: 70; --z-nav: 40; --z-omikuji: 80; --z-intro: 90;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html:not(.lenis) { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.8;
  font-feature-settings: "palt"; -webkit-font-smoothing: antialiased;
}
/* paper grain, fixed layer */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: 0.07; mix-blend-mode: multiply;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

html[lang="ja"] .en { display: none !important; }
html[lang="en"] .ja { display: none !important; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -0.01em; }

.wrap { width: min(1240px, 100% - 64px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1240px, 100% - 36px); } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; font-size: 14px; }
.skip:focus { top: 12px; }

/* ---------- 7-seg logo ---------- */
.seg-logo { display: block; height: 1em; width: auto; overflow: visible; }
.seg-logo .seg { fill: var(--seg-off); transition: fill 0.12s linear; }
.seg-logo .seg.on { fill: var(--ink); }
.seg-logo .seg-accent .seg.on { fill: var(--accent); }

/* ---------- crop marks (トンボ) ---------- */
.crop { position: relative; }
.crop::before, .crop::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  background: linear-gradient(var(--line-2), var(--line-2)) center / 1px 100% no-repeat, linear-gradient(var(--line-2), var(--line-2)) center / 100% 1px no-repeat;
}
.crop::before { left: -9px; top: -9px; }
.crop::after { right: -9px; bottom: -9px; }

/* ---------- small labels ---------- */
.label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.label b { color: var(--accent-ink); font-weight: 500; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: var(--z-nav); height: var(--nav-h); background: rgba(255, 248, 231, 0.8); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 22px; padding: 6px 0; cursor: pointer; }
.brand-name { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.04em; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 500; color: var(--text); }
.nav-links .link { position: relative; padding: 4px 0; transition: color 0.2s var(--ease); }
.nav-links .link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right 0.35s var(--ease); }
.nav-links .link:hover { color: var(--text); }
.nav-links .link:hover::after { right: 0; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; font-family: var(--mono); font-size: 12px; }
.lang button { appearance: none; border: 0; background: transparent; color: var(--text-3); padding: 7px 11px; cursor: pointer; font: inherit; line-height: 1; transition: background 0.2s, color 0.2s; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 860px) { .nav-links .link { display: none; } }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 52px; padding: 0 28px; border-radius: var(--r); font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; isolation: isolate; transition: transform 0.2s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary::before { content: ""; position: absolute; inset: 0; background: var(--accent-ink); clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%); transition: clip-path 0.55s var(--ease); z-index: -1; }
.btn-primary:hover::before { clip-path: polygon(0 0, 130% 0, 100% 100%, -30% 100%); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arr { font-family: var(--mono); font-size: 14px; transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; }
.text-link .arr { font-family: var(--mono); color: var(--accent-ink); transition: transform 0.3s var(--ease); }
.text-link:hover .arr { transform: translateX(4px); }

/* ---------- section scaffolding ---------- */
.section { padding-block: 132px 148px; position: relative; }
.section + .section, .section.bordered { border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(30px, 3.8vw, 50px); }
.lead { color: var(--text-2); max-width: 38em; font-size: 16.5px; line-height: 1.95; }
@media (max-width: 768px) { .section { padding-block: 88px 100px; } }

/* vertical English title with a gradient band, Tenyo-like */
.v-layout { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 56px; align-items: start; }
.vtitle { position: sticky; top: calc(var(--nav-h) + 40px); display: flex; gap: 12px; align-items: flex-start; }
.vtitle::before { content: ""; width: 26px; height: 168px; background: var(--band); border-radius: 1px; flex: none; }
.vtitle span { writing-mode: vertical-rl; font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: 0.22em; line-height: 1; color: var(--ink); }
.section-head { display: grid; gap: 16px; margin-bottom: 56px; }
@media (max-width: 900px) {
  .v-layout { grid-template-columns: 1fr; gap: 28px; }
  .vtitle { position: static; flex-direction: row; align-items: center; }
  .vtitle::before { width: 56px; height: 14px; }
  .vtitle span { writing-mode: horizontal-tb; font-size: 18px; }
  .section-head { margin-bottom: 36px; }
}

/* ---------- intro (top page, first visit) ---------- */
.intro { display: none; }
html.intro-on .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: var(--z-intro); background: var(--bg);
  animation: intro-fallback 0s linear 4.5s forwards; /* safety: never block the page */
}
html.intro-on body { overflow: hidden; }
.intro-inner { display: grid; justify-items: center; gap: 30px; }
.intro .seg-logo { font-size: clamp(64px, 12vw, 132px); }
.intro-copy { font-family: var(--serif); font-weight: 600; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: 0.2em; opacity: 0; }
.intro-copy em { font-style: normal; color: var(--accent); }
.intro-skip { position: absolute; right: 24px; bottom: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-3); background: none; border: 0; cursor: pointer; padding: 8px; }
@keyframes intro-fallback { to { visibility: hidden; opacity: 0; pointer-events: none; } }

/* ---------- stage: collage + mission (top) ---------- */
.stage { position: relative; background: var(--bg); overflow: clip; }
.stage-pin { position: relative; }
.stage-view { position: relative; min-height: calc(100svh - var(--nav-h)); }
.collage {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 14px; padding: 26px 32px 34px; pointer-events: none;
}
.c { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.c img { width: 100%; height: 100%; min-height: 0; object-fit: cover; flex: 1 1 0; }
.c.obj img { object-fit: contain; }
.c .cap { font-size: 11px; line-height: 1.55; color: var(--text-2); flex: none; }
.c .cap-t { display: block; font-family: var(--serif); font-weight: 600; font-size: 14.5px; color: var(--ink); letter-spacing: 0.04em; }
.c .cap-t i { font-style: normal; color: var(--accent); margin-right: 3px; }
.c-v { writing-mode: vertical-rl; font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: clamp(15px, 1.4vw, 20px); letter-spacing: 0.24em; line-height: 1.8; }
.c-v small { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.16em; color: var(--text-3); margin-top: 10px; }
.c-word { font-family: var(--serif); font-weight: 600; font-size: clamp(18px, 1.9vw, 28px); color: var(--ink); line-height: 1.1; justify-content: flex-end; }
.c-word small { display: block; font-family: var(--mono); font-weight: 400; font-size: 10.5px; color: var(--text-3); margin-top: 8px; letter-spacing: 0.08em; }
.c-band { background: var(--band); border-radius: 1px; opacity: 0.9; }
.c-cross::before { content: "+"; font-family: var(--mono); font-weight: 300; font-size: 28px; color: var(--line-2); line-height: 1; }
/* placement on a 12 x 8 grid. The center (cols 4-9, rows 3-6) stays clear for the title. */
.c1  { grid-area: 1 / 1 / 3 / 3; }
.c2  { grid-area: 1 / 3 / 3 / 4; }
.c3  { grid-area: 1 / 4 / 3 / 7; }
.c4  { grid-area: 1 / 7 / 3 / 9; }
.c5  { grid-area: 1 / 9 / 3 / 11; }
.c6  { grid-area: 1 / 11 / 4 / 12; }
.c7  { grid-area: 1 / 12 / 5 / 13; }
.c8  { grid-area: 3 / 1 / 6 / 3; }
.c9  { grid-area: 3 / 3 / 6 / 4; }
.c10 { grid-area: 5 / 11 / 8 / 13; }
.c12 { grid-area: 6 / 1 / 9 / 3; }
.c13 { grid-area: 7 / 3 / 9 / 6; }
.c14 { grid-area: 7 / 6 / 9 / 8; }
.c15 { grid-area: 7 / 8 / 9 / 11; }
.c16 { grid-area: 8 / 11 / 9 / 13; }
.c17 { grid-area: 6 / 3 / 7 / 4; }

.stage-center {
  position: relative; z-index: 2; min-height: calc(100svh - var(--nav-h)); display: grid; place-content: center; justify-items: center; text-align: center; gap: 24px; padding: 80px 24px;
}
.stage-center .seg-logo { font-size: clamp(60px, 8vw, 112px); }
.stage-center h1 { font-size: clamp(38px, 5.2vw, 74px); letter-spacing: 0.06em; line-height: 1.2; }
html[lang="en"] .stage-center h1 { letter-spacing: -0.01em; }
.stage-center h1 em { font-style: normal; color: var(--accent); }
.stage-center p { color: var(--text-2); font-size: 15px; max-width: 30em; line-height: 1.9; }
.stage-center::before { /* soft paper halo so the title reads over the collage */
  content: ""; position: absolute; left: 50%; top: 50%; width: min(820px, 96vw); height: 70%; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 248, 231, 0.97) 58%, rgba(255, 248, 231, 0));
}
.scroll-cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; color: var(--text-3); display: grid; justify-items: center; gap: 8px; }
.scroll-cue::after { content: ""; width: 1px; height: 36px; background: linear-gradient(var(--ink), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* manifesto (mission + values). Static by default; fx.js pins and plays it on wide screens. */
.manifesto { position: relative; z-index: 2; padding: 0 0 140px; }
.manifesto-inner { width: min(780px, 100% - 36px); margin-inline: auto; text-align: center; background: rgba(255, 248, 231, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 56px clamp(20px, 5vw, 64px) 60px; }
.manifesto .label { margin-bottom: 22px; }
.manifesto h2 { font-size: clamp(27px, 3.4vw, 44px); line-height: 1.5; }
.manifesto h2 em { font-style: normal; color: var(--accent); }
.values { list-style: none; margin: 46px 0 0; padding: 0; display: grid; gap: 26px; }
.values li { display: grid; gap: 4px; }
.values strong { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.06em; }
.values strong b { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--accent-ink); letter-spacing: 0.14em; margin-right: 12px; vertical-align: 3px; }
.values span { color: var(--text-2); font-size: 15px; }
html[lang="en"] .manifesto h2 { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.35; }
html[lang="en"] .values { margin-top: 34px; gap: 20px; }
html[lang="en"] .values span { font-size: 14px; }

/* pinned mode (fx.js adds .is-pinned on wide screens with motion allowed) */
.is-pinned .stage-pin { height: calc(100svh - var(--nav-h)); overflow: hidden; }
.is-pinned .manifesto { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; }
.is-pinned .manifesto-inner { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (max-width: 900px) {
  .collage { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(9, minmax(0, 1fr)); gap: 10px; padding: 16px; }
  .collage .hide-sp { display: none; }
  .c1  { grid-area: 1 / 1 / 3 / 3; }
  .c3  { grid-area: 1 / 3 / 3 / 7; }
  .c7  { grid-area: 3 / 6 / 6 / 7; }
  .c8  { grid-area: 3 / 1 / 5 / 2; }
  .c10 { grid-area: 7 / 5 / 10 / 7; }
  .c12 { grid-area: 7 / 1 / 10 / 3; }
  .c14 { grid-area: 8 / 3 / 10 / 5; }
  .c .cap { display: none; }
  .stage-view, .stage-center { min-height: calc(92svh - var(--nav-h)); }
}

/* ---------- business ---------- */
.biz-list { display: grid; gap: 22px; }
.biz {
  position: relative; display: grid; grid-template-columns: 5fr 7fr; min-height: 250px; background: var(--bg); border: 1px solid var(--line-2);
  transition: border-color 0.3s var(--ease);
}
.biz:nth-child(even) { grid-template-columns: 7fr 5fr; }
.biz:nth-child(even) .biz-text { order: 2; }
.biz:hover { border-color: var(--line-2); }
.biz-text { padding: 34px 36px 30px; display: grid; align-content: space-between; gap: 22px; }
.biz-no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent-ink); }
.biz h3 { font-size: clamp(24px, 2.4vw, 32px); margin-top: 8px; }
.biz p { color: var(--text-2); font-size: 14.5px; margin-top: 10px; }
.biz-go { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.biz-go .arr { font-family: var(--mono); color: var(--accent-ink); transition: transform 0.3s var(--ease); }
.biz:hover .biz-go .arr { transform: translate(3px, -3px); }
/* media side: a diagonal cut, a slow strip of objects, and a scene that appears on hover (the "change") */
.biz-media { position: relative; overflow: hidden; min-height: 230px; clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
.biz:nth-child(even) .biz-media { clip-path: polygon(0 0, 100% 0, 91% 100%, 0 100%); }
.biz-media::after { content: ""; position: absolute; inset: -10% -40%; z-index: 3; pointer-events: none; background: linear-gradient(105deg, transparent 49.7%, var(--accent) 49.8% 50.2%, transparent 50.3%); transform: translateX(-100%); }
.strip { position: absolute; inset: 0; display: flex; align-items: center; }
.strip-track { display: flex; gap: 24px; padding-left: 24px; animation: strip 40s linear infinite; }
.strip img { height: 184px; width: 184px; object-fit: contain; flex: none; }
@keyframes strip { to { transform: translateX(-50%); } }
.biz-scene { position: absolute; inset: 0; z-index: 2; clip-path: polygon(0 0, 0 0, -25% 100%, -25% 100%); transition: clip-path 0.8s var(--ease); }
.biz-scene img { width: 100%; height: 100%; object-fit: cover; }
.biz:hover .biz-scene, .biz:focus-visible .biz-scene, .biz.is-changed .biz-scene { clip-path: polygon(0 0, 125% 0, 100% 100%, -25% 100%); }
.biz:hover .biz-media::after { animation: slash 0.8s var(--ease); }
@keyframes slash { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (max-width: 900px) {
  .biz, .biz:nth-child(even) { grid-template-columns: 1fr; }
  .biz:nth-child(even) .biz-text { order: 0; }
  .biz-media, .biz:nth-child(even) .biz-media { clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%); min-height: 180px; }
  .strip img { height: 144px; width: 144px; }
  .biz-text { padding: 26px 22px 22px; }
}

/* ---------- news ---------- */
.news-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.news-head h2 { font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: 0.14em; }
.news-head span { font-size: 12px; color: var(--text-3); }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 9em 1fr auto; gap: 24px; padding: 22px 8px; align-items: baseline; transition: background 0.3s var(--ease); }
.news-list a:hover { background: var(--bg-2); }
.news-list time { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
.news-list .news-title { font-size: 15.5px; }
.news-list .arr { font-family: var(--mono); color: var(--text-3); transition: transform 0.3s var(--ease), color 0.3s; }
.news-list a:hover .arr { transform: translate(3px, -3px); color: var(--accent-ink); }
.news-more { margin-top: 36px; display: flex; justify-content: center; }
@media (max-width: 640px) { .news-list a { grid-template-columns: 1fr; gap: 4px; padding: 16px 4px; } .news-list .arr { display: none; } }

/* ---------- company ---------- */
.company-grid { display: grid; grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
.company-mark .seg-logo { font-size: clamp(56px, 7vw, 96px); }
.company-mark small { display: block; margin-top: 22px; font-size: 13px; letter-spacing: 0.08em; color: var(--text-3); }
.company-grid dl { margin: 0; border-top: 1px solid var(--ink); }
.company-grid dl div { display: grid; grid-template-columns: 9em 1fr; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.company-grid dt { color: var(--text-3); font-size: 13.5px; }
.company-grid dd { margin: 0; font-size: 15px; }
.note { margin-top: 24px; color: var(--text-3); font-size: 13px; }
@media (max-width: 900px) { .company-grid { grid-template-columns: 1fr; gap: 36px; } .company-grid dl div { grid-template-columns: 7.5em 1fr; } }

/* ---------- contact ---------- */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); overflow: hidden; }
.contact-inner { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: end; }
.contact h2 { font-size: clamp(38px, 5.6vw, 76px); line-height: 1.2; }
.contact h2 em { font-style: normal; color: var(--accent); }
.contact .lead { margin-top: 24px; }
.contact-mail { font-family: var(--mono); font-size: clamp(18px, 2.2vw, 24px); }
.contact-mail a { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.contact-mail a:hover { color: var(--accent-ink); }
.contact-pending { color: var(--text-2); font-size: 15px; }
.contact-aside { border-left: 1px solid var(--line-2); padding-left: 32px; display: grid; gap: 18px; }
@media (max-width: 900px) { .contact-inner { grid-template-columns: 1fr; } .contact-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 24px; } }

/* ---------- footer ---------- */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-links a { color: var(--text-2); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-ink); }
.footer-mark { font-size: 34px; margin-bottom: 22px; }
.footer-meta { text-align: right; line-height: 1.9; }
@media (max-width: 640px) { .footer .wrap { grid-template-columns: 1fr; } .footer-meta { text-align: left; } }

/* ---------- subpages ---------- */
.subhero { padding-block: 88px 88px; border-bottom: 1px solid var(--line); }
.subhero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.subhero h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.4; }
.subhero .lead { margin-top: 24px; font-size: 17px; }
.subhero-media { margin: 0; aspect-ratio: 3 / 2; }
.subhero-media img { width: 100%; height: 100%; object-fit: cover; clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%); }
.crumb { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--text-3); margin-bottom: 22px; }
.crumb a:hover { color: var(--accent-ink); }
@media (max-width: 900px) { .subhero { padding-block: 56px 56px; } .subhero-grid { grid-template-columns: 1fr; gap: 36px; } }

.two-col { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; }
.offers { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: offer; }
.offers li { display: grid; grid-template-columns: 3.2em 1fr; gap: 6px 12px; padding: 26px 0; border-bottom: 1px solid var(--line); counter-increment: offer; }
.offers li::before { content: counter(offer, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-size: 12px; color: var(--accent-ink); padding-top: 6px; }
.offers strong { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.03em; }
.offers span { color: var(--text-2); }
.offers strong span { color: var(--text); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }

.service { background: var(--bg-2); }
.service-inner { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: end; }
.service h2 { font-size: clamp(30px, 4vw, 48px); }
.service-text .lead { margin-top: 18px; max-width: 36em; }
.service-text .btn { margin-top: 30px; }
@media (max-width: 900px) { .service-inner { grid-template-columns: 1fr; } }

.page-head { padding-block: 96px 40px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 56px); }
.page-head time { display: block; font-family: var(--mono); font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.section-tight { padding-block: 0 112px; }
.post-body { max-width: 42em; font-size: 16.5px; line-height: 2; }
.post-body p { margin: 0 0 1.25em; }
.post-body h2 { font-size: 24px; margin: 2em 0 0.6em; }
.post-body h3 { font-size: 19px; margin: 1.6em 0 0.5em; }
.post-body ul { padding-left: 1.3em; margin: 0 0 1.25em; }
.post-body a { border-bottom: 1px solid var(--accent); }

/* ---------- omikuji (hidden: tap the logo 6 times on the top page) ---------- */
.omikuji {
  position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; z-index: var(--z-omikuji); width: min(300px, 88vw); transform: translate(-50%, -12px); opacity: 0; visibility: hidden;
  background: var(--paper); border: 1px solid var(--line-2); padding: 26px 24px 22px; text-align: center; box-shadow: 0 24px 60px -24px rgba(122, 90, 63, 0.45);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.4s;
}
.omikuji.open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.omikuji .label { display: block; margin-bottom: 14px; }
.omikuji-result { font-family: var(--serif); font-weight: 700; font-size: 58px; line-height: 1.1; color: var(--accent); letter-spacing: 0.08em; min-height: 1.1em; }
html[lang="en"] .omikuji-result { font-size: 38px; letter-spacing: 0; }
.omikuji-msg { margin-top: 14px; font-size: 14px; color: var(--text-2); min-height: 3.2em; }
.omikuji-close { margin-top: 16px; background: none; border: 1px solid var(--line-2); font: inherit; font-size: 12px; padding: 6px 16px; cursor: pointer; color: var(--text-2); }
.omikuji-close:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- motion (CSS side) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track, .scroll-cue::after { animation: none; }
  .biz-scene { transition: none; }
}

/* line break for wide screens only */
.br-pc { display: inline; }
@media (max-width: 640px) { .br-pc { display: none; } }

/* ---- 想定顧客の入口（トップ #for） ---- */
.auds { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.aud { background: var(--bg); }
.aud a { display: grid; gap: 12px; padding: 28px 24px 24px; height: 100%; align-content: start; transition: background 0.3s var(--ease); }
.aud a:hover { background: var(--paper); }
.aud img { width: 64px; height: 64px; object-fit: contain; }
.aud h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.04em; }
.aud p { color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.aud-go { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent-ink); }
html[lang="en"] .aud h3 { font-size: 18px; }
@media (max-width: 900px) { .auds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .auds { grid-template-columns: 1fr; } .aud a { padding: 22px 20px; } .aud img { width: 52px; height: 52px; } }


/* ---- 事業の2本柱 ---- */
.pillar { margin-top: 54px; }
.pillar:first-of-type { margin-top: 40px; }
.pillar-head { display: flex; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 22px; }
.pillar-no { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; color: var(--accent-ink); }
.pillar-head h3 { font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: 0.04em; }
@media (max-width: 560px) { .pillar-head { flex-direction: column; gap: 6px; } }

/* ---- お問い合わせフォーム ---- */
/* hidden属性は display:grid/flex を当てた要素では効かないので、明示的に優先させる */
[hidden] { display: none !important; }
/* .btn は <a> 前提のため button 用の最小リセット。
   background と color は .btn-primary が持っているので、ここでは触らない（specificityで勝ってしまう） */
button.btn { appearance: none; -webkit-appearance: none; border: 0; font: inherit; cursor: pointer; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled]:hover::before { clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%); }

.form-wrap { max-width: 760px; }
.form-tabs { display: flex; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin-bottom: 36px; }
.form-tab { flex: 1; appearance: none; -webkit-appearance: none; border: 0; cursor: pointer; background: var(--bg); color: var(--text-2); font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: 0.04em; padding: 16px 12px; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.form-tab:hover { background: var(--paper); }
.form-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }

.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.req { color: var(--accent-ink); font-weight: 400; }
.field-note { font-size: 12.5px; color: var(--text-3); }

.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="url"], .form select, .form textarea {
  width: 100%; font-family: var(--font); font-size: 16px; /* 16px未満だとiOSで自動ズームする */
  color: var(--text); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 13px 14px; transition: border-color 0.2s var(--ease);
}
.form textarea { resize: vertical; min-height: 150px; line-height: 1.8; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink); }
.form ::placeholder { color: var(--text-3); opacity: 0.75; }
.form select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E544A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

.form-privacy { font-size: 12.5px; line-height: 1.85; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 20px; }
.form-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.form-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-note { font-size: 13.5px; line-height: 1.85; color: var(--text-2); background: var(--bg-2); border-left: 2px solid var(--accent); padding: 16px 18px; }
.form-error { font-size: 14px; color: var(--accent-ink); background: var(--bg-2); border-left: 2px solid var(--accent); padding: 12px 16px; }
.form-submit { margin-top: 2px; }

/* 画面外に置く。display:none を無視するボットがいるため */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-done { border: 1px solid var(--line-2); background: var(--paper); padding: 40px 36px; display: grid; gap: 12px; }
.form-done:focus { outline: none; }
.form-done-title { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 0.04em; }
.form-done p { color: var(--text-2); font-size: 14.5px; line-height: 1.85; }
.form-ref { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.form-ref b { color: var(--accent-ink); }

@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
  .form-done { padding: 30px 24px; }
}
.contact-cta { margin-bottom: 14px; }

/* おみくじの起動ボタン（コラージュ内） */
.omikuji-trigger { appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0; cursor: pointer; }
.omikuji-trigger img { transition: transform 0.4s var(--ease); }
.omikuji-trigger:hover img { transform: translateY(-5px) rotate(-3deg); }
.omikuji-label { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: 0.08em; color: var(--accent-ink); white-space: nowrap; }
.omikuji-label::before { content: "*"; margin-right: 4px; }
