/* ============================================================
   トップページ（index.html）だけの部品。washi.css の上に重ねる
   ヒーロー：一枚絵が動く（js/top-hero.js）／本文：つくっているもの・つくり方・データの置き場所・ニュース・チーム・お問い合わせ
   ============================================================ */

/* width/height 属性（レイアウトのずれ防止）で高さが固定されないように。高さを決めたい画像は個別のルールで上書きする */
:where(.top) img { height: auto; }

/* ── 見出しの型 ── */
.top .lp-sec { position: relative; padding: 140px 0; }
.top .lp-sec > .container { position: relative; z-index: 1; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: .6em; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); margin-bottom: 1.1rem; }
.lp-eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.lp-h2 { position: relative; padding-bottom: .42em; font-size: clamp(1.9rem, 3.4vw, 3.1rem); font-weight: 700; line-height: 1.28; letter-spacing: -.005em; color: var(--ink); font-feature-settings: 'palt'; }
.lp-h2.ink::after { content: ''; position: absolute; left: 0; bottom: 0; width: 2.6em; max-width: 120px; height: .26em; background: no-repeat left center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C40 3 90 5 140 6 S190 9 198 7 L197 11 C150 12 100 13 50 13 S10 13 3 12 Z' fill='%23F2380F'/%3E%3C/svg%3E"); transform: scaleX(0); transform-origin: left; transition: transform .8s .75s cubic-bezier(.7, 0, .2, 1); }
.lp-h2.ink.is-in::after { transform: scaleX(1); }
.lp-lead { font-size: 1.04rem; line-height: 2; color: var(--body); margin-top: 1.3rem; max-width: 640px; }
.lp-head { margin-bottom: 60px; }
.lp-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.lp-link { display: inline-flex; align-items: center; gap: .45em; font-weight: 700; font-size: .92rem; color: var(--orange); }
.lp-link i { font-style: normal; transition: transform .3s var(--ease); }
a:hover .lp-link i, .lp-link:hover i { transform: translateX(4px); }
.lp-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: .45rem; }

/* ── Contact ボタン ── */
.dd-cta { display: inline-flex; align-items: center; gap: .7em; margin-top: 2.2rem; padding: 1rem 2.1rem; border-radius: 100px; background: var(--orange); color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .02em; position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 16px 30px -18px rgba(242, 56, 15, .9); }
.dd-cta i { font-style: normal; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.dd-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 55%); opacity: 0; transition: opacity .3s; }
.dd-cta:hover { color: #fff; transform: translateY(-2px); }
.dd-cta:hover::before { opacity: 1; }
.dd-cta:hover i { transform: translateX(4px); }

/* ============ ヒーロー：一枚絵が動く（js/top-hero.js） ============ */
.hx-d1 { position: relative; height: 200vh; }
.hx-d1.is-static { height: 100vh; }
.d1-pin { position: sticky; top: 0; height: 100vh; min-height: 680px; overflow: hidden; background: var(--washi); }
.d1-scene { position: absolute; inset: 0; }
/* 空と日：読み込みで下から昇る */
.d1-sky { position: absolute; inset: -5%; will-change: transform; }
.d1-sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; animation: d1Rise 3s .15s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes d1Rise { from { transform: translateY(9%); } to { transform: none; } }
.d1-sunglow { position: absolute; left: 65.5%; top: 36%; width: 34vw; aspect-ratio: 1; border-radius: 50%; pointer-events: none; will-change: transform;
    background: radial-gradient(circle, rgba(255, 176, 96, .55) 0%, rgba(255, 150, 80, .2) 32%, rgba(255, 150, 80, 0) 62%); }
.d1-sunglow::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: d1Pulse 5.5s ease-in-out infinite; }
@keyframes d1Pulse { 0%, 100% { transform: scale(.92); opacity: .55; } 50% { transform: scale(1.08); opacity: 1; } }
/* 奥の雲：日の前をゆっくり横切る */
.d1-cloud { position: absolute; max-width: none; height: auto; pointer-events: none; }
.d1-cloud--back { top: 2%; left: 36%; width: 58vw; clip-path: inset(0 50% 0 0); opacity: .62; animation: d1Drift 70s ease-in-out infinite alternate; }
@keyframes d1Drift { from { transform: translateX(-6vw); } to { transform: translateX(10vw); } }
/* 鳥：ときどき空を横切る */
.d1-birds { position: absolute; top: 15%; left: 0; width: 170px; overflow: visible; animation: d1Fly 26s linear infinite; animation-delay: 3.5s; opacity: 0; }
.d1-birds path { fill: none; stroke: #3a2e24; stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: d1Flap .75s ease-in-out infinite alternate; animation-delay: var(--bd); }
@keyframes d1Fly { 0% { transform: translate(-22vw, 6vh); opacity: 0; } 4% { opacity: .85; } 50% { transform: translate(50vw, -2vh); } 92% { opacity: .85; } 100% { transform: translate(122vw, 4vh); opacity: 0; } }
@keyframes d1Flap { from { transform: scaleY(1); } to { transform: scaleY(.3); } }
/* 建物：墨で描き起こすように下から現れる。窓の灯がゆらぐ */
@property --rv { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.d1-bld { position: absolute; right: 1.5vw; bottom: 0; width: min(56vw, 1040px); aspect-ratio: 2240 / 1792; transform-origin: 25% 33%; will-change: transform; }
.d1-bld img { width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to top, #000 var(--rv), transparent calc(var(--rv) + 14%)); mask-image: linear-gradient(to top, #000 var(--rv), transparent calc(var(--rv) + 14%)); animation: d1Draw 2.1s .55s cubic-bezier(.45, .05, .25, 1) forwards; filter: drop-shadow(0 30px 30px rgba(90, 50, 10, .12)); }
@keyframes d1Draw { to { --rv: 118%; } }
.d1-lamp { position: absolute; left: var(--x); top: var(--y); width: 17%; aspect-ratio: 1.5; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: soft-light; opacity: 0;
    background: radial-gradient(ellipse, rgba(255, 214, 140, .95), rgba(255, 190, 110, 0) 68%); animation: d1Lamp var(--t) ease-in-out infinite alternate; animation-delay: 2.4s; }
@keyframes d1Lamp { 0% { opacity: .15; } 40% { opacity: .8; } 55% { opacity: .5; } 100% { opacity: .95; } }
/* 手前の瑞雲：読み込みで左右に割れ、スクロールの終わりに閉じて次の節へ（位置は js で動かす） */
.d1-cloud--front { top: 56%; left: 50%; width: 150vw; will-change: transform, opacity; }
.d1-cloud--l { clip-path: inset(0 50% 0 0); }
.d1-cloud--r { clip-path: inset(0 0 0 50%); }
.d1-veil { position: absolute; inset: 0; background: var(--washi); animation: d1Veil 1.3s .2s ease forwards; pointer-events: none; }
@keyframes d1Veil { to { opacity: 0; visibility: hidden; } }

/* 文字 */
.d1-copy { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; will-change: transform, opacity; }
.hx-kicker { display: block; width: fit-content; position: relative; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; color: var(--orange); margin-bottom: .9rem; opacity: 0; animation: topUp .9s .7s var(--ease) forwards; }
.hx-kicker::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.3em; height: .38em; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C40 3 90 5 140 5 S188 7 198 6 L196 10 C150 11 100 12 52 12 S10 12 3 11 Z' fill='%23F2380F' fill-opacity='.35'/%3E%3C/svg%3E"); transform: scaleX(0); transform-origin: left; animation: topBrush .9s 1.6s cubic-bezier(.7, 0, .2, 1) forwards; }
@keyframes topBrush { to { transform: scaleX(1); } }
.hx-title { display: block; font-size: clamp(3rem, 5.8vw, 5.7rem); font-weight: 900; line-height: .98; letter-spacing: -.045em; color: var(--ink); }
.hx-title em { font-style: normal; color: var(--orange); }
.hx-title .ch { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(4deg); animation: topChar .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(.9s + var(--i) * 38ms); }
@keyframes topChar { to { opacity: 1; transform: none; } }
.hx-sub { font-size: 1.08rem; line-height: 1.95; color: var(--body); margin-top: 1.8rem; max-width: 470px; opacity: 0; animation: topUp 1s 1.7s var(--ease) forwards; }
.hx-d1 .dd-cta { opacity: 0; animation: topUp 1s 1.95s var(--ease) forwards; }
@keyframes topUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.d1-scroll { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3; font-size: .72rem; font-weight: 700; letter-spacing: .24em; color: rgba(13, 13, 13, .6); opacity: 0; animation: topUp 1s 2.6s forwards; transition: opacity .4s; }
.d1-scroll span::after { content: ''; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(rgba(13, 13, 13, .55), transparent); animation: topDrop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes topDrop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hx-d1.is-scrolled .d1-scroll { opacity: 0 !important; }

/* ============ つくっているもの ============ */
.top .lp-products { background: transparent; overflow: visible; }
.lp-product { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.lp-product:first-of-type { border-top: 0; padding-top: 0; }
.lp-product--flip { grid-template-columns: 7fr 5fr; } /* 画像が左の行も、画像を広い列に置いて4つの画面をそろえる */
.lp-product--flip .lp-product-copy { order: 2; }
.lp-product-logo { height: 34px; width: auto; margin-bottom: 20px; }
.lp-product-logo--wide { height: 26px; }
/* CARTE は画像のロゴが無いので、CARTE ページと同じ文字の組み方（青緑＋橙の版ズレ）で置く */
.lp-product-wordmark { display: block; width: fit-content; margin-bottom: 18px; font-size: 1.9rem; font-weight: 900; line-height: 1; letter-spacing: -.04em; color: #2F6E78; text-shadow: .06em .045em 0 rgba(242, 56, 15, .92); }
.lp-product h3 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 700; line-height: 1.35; margin-top: .3rem; }
.lp-product-lead { color: var(--body); margin-top: .9rem; line-height: 1.9; }
.lp-ticks { margin: 1.6rem 0 1.8rem; display: grid; gap: 14px; list-style: none; }
.lp-ticks li { position: relative; padding-left: 28px; font-size: .9rem; color: var(--muted); line-height: 1.75; }
.lp-ticks li b { display: block; color: var(--ink); font-size: .98rem; font-weight: 700; }
.lp-ticks li::before { content: ''; position: absolute; left: 0; top: .5em; width: 16px; height: 16px; border-radius: 50%; background: var(--orange); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.7 5.8-4.3 4.6a.8.8 0 0 1-1.1 0L4.3 8.3a.8.8 0 1 1 1.1-1.1l1.4 1.4 3.8-4a.8.8 0 1 1 1.1 1.2Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.7 5.8-4.3 4.6a.8.8 0 0 1-1.1 0L4.3 8.3a.8.8 0 1 1 1.1-1.1l1.4 1.4 3.8-4a.8.8 0 1 1 1.1 1.2Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.lp-frame { border-radius: 16px; overflow: hidden; background: #fffaf1; border: 1px solid var(--line); box-shadow: 0 40px 80px -44px rgba(70, 30, 0, .55); transform: perspective(1600px) rotateY(-4deg); transition: transform .8s var(--ease); margin: 0; }
.lp-product--flip .lp-frame { transform: perspective(1600px) rotateY(4deg); }
.lp-product:hover .lp-frame { transform: perspective(1600px) rotateY(0); }
.lp-frame img { width: 100%; display: block; }
.lp-frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f6efe2; }
.lp-frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e2ded3; }
.lp-frame-bar span { margin-left: 10px; font-size: .72rem; color: var(--muted); font-family: var(--mono); background: #fff; border-radius: 6px; padding: 2px 12px; }
.lp-frame--soft { background: #f6ede4; border: 0; }
.lp-sub-products { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.lp-sub-products--single { grid-template-columns: 1fr; }
.lp-mini { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px; background: var(--paper); transition: border-color .3s, transform .45s var(--ease); }
.lp-mini:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.lp-mini h4 { font-size: 1.15rem; margin: .1rem 0 .5rem; }
.lp-mini p:not(.lp-kicker) { font-size: .88rem; color: var(--body); line-height: 1.8; }
.lp-mini-thumb { width: 132px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.lp-mini-mark { width: 64px; height: auto; opacity: .9; }

/* ============ つくり方：工房の絵巻（スクロールで部屋を照らす） ============ */
/* PC：節を画面に留め、スクロールで部屋を1つずつ照らして説明を差し替える。札（一〜四）は各部屋の真下に置く */
.dd-stack { position: relative; height: 340vh; background: var(--washi-2); }
.dd-stack-pin { position: sticky; top: 0; height: 100vh; min-height: 640px; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); padding: 100px 0 28px; overflow: hidden; }
.dd-stack-top { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: end; width: 100%; }
/* 説明の4層は同じ升目に重ね、いちばん長い層の高さを確保する（差し替えても見出しにかぶらず、絵も動かない） */
.dd-stack-desc { display: grid; align-items: end; }
.dd-layer { grid-area: 1 / 1; display: grid; grid-template-columns: 64px 1fr; gap: 14px; opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .7s var(--ease); pointer-events: none; }
.dd-layer.is-on { opacity: 1; transform: none; pointer-events: auto; }
/* 漢数字：明朝は横画が細いので、太字＋同じ色の縁で全体に太らせる */
.dd-layer em { font-family: var(--mincho); font-style: normal; font-weight: 700; font-size: 3.2rem; line-height: 1; color: var(--orange); -webkit-text-stroke: .055em currentColor; }
.dd-layer b { display: block; font-size: 1.2rem; margin-bottom: .2rem; }
.dd-layer p { font-size: .92rem; line-height: 1.85; color: var(--body); }
.dd-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: .8rem; list-style: none; }
.dd-apps li { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .75rem .55rem; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); line-height: 1.4; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .6s var(--ease); }
.dd-layer.is-on .dd-apps li { opacity: 1; transform: none; }
.dd-apps li:nth-child(2) { transition-delay: .06s; } .dd-apps li:nth-child(3) { transition-delay: .12s; } .dd-apps li:nth-child(4) { transition-delay: .18s; } .dd-apps li:nth-child(5) { transition-delay: .24s; } .dd-apps li:nth-child(6) { transition-delay: .3s; }
.dd-apps li b { font-size: .8rem; margin: 0; }
.dd-apps li span { font-size: .68rem; color: var(--muted); }
/* 絵の幅は、空いている高さ（札の分を除く）・画面幅・46vh のうち小さいほうで決める。札の列も同じ幅の 92.8%（＝4部屋ぶん）にそろえる */
.dd-stack-art { --fw: min(94vw, 46vh * 2.3333, 1166px); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 0; min-width: 0; padding-top: 16px; }
@supports (width: 1cqw) {
    .dd-stack-art { --fw: min(94cqw, (100cqh - 64px) * 2.3333, 46vh * 2.3333, 1166px); container-type: size; }
}
.dd-stack-frame { --zx: 0px; position: relative; flex: none; width: var(--fw); aspect-ratio: 2688 / 1152; transform: translateX(var(--zx)); transition: transform 1s var(--ease); }
.dd-stack-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 40px 80px -50px rgba(70, 30, 0, .6); }
.dd-zone { position: absolute; top: 0; bottom: 0; width: 23.2%; background: rgba(240, 230, 211, .78); backdrop-filter: grayscale(.8); -webkit-backdrop-filter: grayscale(.8); transition: opacity .7s ease; }
.dd-zone[data-z="0"] { left: 3.4%; } .dd-zone[data-z="1"] { left: 26.6%; } .dd-zone[data-z="2"] { left: 49.8%; } .dd-zone[data-z="3"] { left: 73%; }
.dd-zone.is-on { opacity: 0; }
.dd-zone-ring { position: absolute; top: 20%; bottom: 3%; width: 23.2%; left: 3.4%; border: 2.5px solid var(--orange); border-radius: 10px; box-shadow: 0 0 0 6px rgba(242, 56, 15, .12); transition: left .9s cubic-bezier(.7, 0, .2, 1); }
/* 札：各部屋の真下。上の線は進み具合（--p は js で 0〜1） */
.dd-stack-steps { --p: 0; position: relative; flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: calc(var(--fw) * .928); padding-top: 12px; border-top: 1px solid var(--line-strong); list-style: none; }
.dd-stack-steps::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--orange); transform: scaleX(var(--p)); transform-origin: left; }
.dd-stack-steps li { display: flex; align-items: center; justify-content: center; gap: .5em; font-size: .92rem; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .4s; }
.dd-stack-steps li em { font-family: var(--mincho); font-style: normal; font-weight: 700; font-size: 1.5rem; line-height: 1; color: rgba(60, 30, 0, .42); -webkit-text-stroke: .07em currentColor; transition: color .4s; }
.dd-stack-steps li.is-on { color: var(--ink); }
.dd-stack-steps li.is-on em { color: var(--orange); }

/* ============ 患者データの置き場所（藍） ============ */
.top .dd-sov { background: var(--ai); color: #f4efe6; overflow: visible; }
.dd-sov .lp-h2 { color: #fff; }
.dd-sov .lp-lead { color: rgba(244, 239, 230, .74); }
.dd-sov .lp-eyebrow { color: var(--orange-2); }
.dd-sov-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
.lp-deploy { margin-top: 2.2rem; border-top: 1px solid rgba(255, 255, 255, .14); list-style: none; }
.lp-deploy li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; color: rgba(244, 239, 230, .7); line-height: 1.8; }
.lp-deploy li > span { font-family: var(--mono); font-size: .8rem; color: var(--orange-2); padding-top: .2rem; }
.lp-deploy b { display: inline-block; color: #fff; font-size: 1.05rem; margin-right: .8rem; }
.lp-deploy em { font-style: normal; font-size: .75rem; color: rgba(244, 239, 230, .5); }
.dd-sov-art { max-width: 470px; margin-left: auto; }
.dd-sov-art img { width: 100%; border-radius: 6px; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9); }

/* ============ ニュース ============ */
.top .lp-news { background: var(--washi-2); }
.lp-news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; list-style: none; }
.lp-news-card { display: block; height: 100%; background: var(--paper); border-radius: 14px; padding: 10px 10px 16px; border: 1px solid var(--line); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s; }
.lp-news-card:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 30px 50px -30px rgba(70, 30, 0, .45); }
.lp-news-thumb { aspect-ratio: 1200 / 630; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; margin-bottom: 14px; }
.lp-news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.lp-news-card:hover .lp-news-thumb img { transform: scale(1.04); }
.lp-news-card time { display: block; font-family: var(--mono); font-size: .76rem; color: var(--muted); padding: 0 4px; }
.lp-news-card h3 { font-size: .95rem; line-height: 1.7; margin-top: .3rem; padding: 0 4px; font-weight: 700; transition: color .3s; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-news-card:hover h3 { color: var(--orange); }

/* ============ チーム ============ */
.lp-team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lp-person { display: grid; grid-template-columns: 168px 1fr; gap: 28px; align-items: start; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.lp-person img { width: 168px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; object-position: center 30%; }
.lp-person-role { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--orange); }
.lp-person h3 { font-size: 1.5rem; margin: .3rem 0 .8rem; }
.lp-person h3 span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin-top: .2rem; }
.lp-person p:not(.lp-person-role) { font-size: .9rem; line-height: 1.9; color: var(--body); }
.lp-team-links { display: flex; gap: 28px; margin-top: 36px; }

/* ============ お問い合わせ：瑞雲が割れて絵が見える ============ */
.top .lp-contact { padding-top: 0; background: var(--washi); overflow: hidden; }
.dd-contact-art { position: relative; height: 70vh; min-height: 440px; overflow: hidden; margin-bottom: -70px; }
.dd-contact-img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; object-position: 60% 40%; }
.dd-contact-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(247, 239, 227, .2) 0%, rgba(247, 239, 227, 0) 30%, rgba(247, 239, 227, 0) 55%, var(--washi) 97%); }
.dd-contact-cloud { position: absolute; top: 50%; left: 50%; width: 170vw; max-width: none; z-index: 2; transition: transform 2.2s cubic-bezier(.65, 0, .25, 1), opacity 2.2s ease; }
.dd-contact-cloud--l { clip-path: inset(0 50% 0 0); transform: translate(calc(-50% + 38vw), -50%) scale(1.3); }
.dd-contact-cloud--r { clip-path: inset(0 0 0 50%); transform: translate(calc(-50% - 38vw), -50%) scale(1.3); }
.dd-contact-art.is-open .dd-contact-cloud--l { transform: translate(calc(-50% - 70vw), -58%) scale(1); opacity: 0; }
.dd-contact-art.is-open .dd-contact-cloud--r { transform: translate(calc(-50% + 70vw), -42%) scale(1); opacity: 0; }
.top .lp-contact .lp-head { text-align: center; }
.top .lp-contact .lp-lead { margin-left: auto; margin-right: auto; }
.top .lp-contact .lp-h2 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
.top .lp-contact .lp-h2.ink::after { left: 50%; transform: translateX(-50%) scaleX(0); transform-origin: center; }
.top .lp-contact .lp-h2.ink.is-in::after { transform: translateX(-50%) scaleX(1); }

/* 節の境目を横切る雲 */
.top .wz-kasumi--prod { top: -13vw; right: -24vw; }
.top .wz-kasumi--sov { top: -12vw; left: -8vw; }

@media (max-width: 1100px) {
    .lp-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .d1-bld { right: 50%; transform-origin: 50% 40%; width: 104vw; bottom: auto; top: 76px; margin-right: -52vw; }
    .d1-copy { justify-content: flex-end; padding-bottom: 56px; }
    .d1-copy::before { content: ''; position: absolute; left: -24px; right: -24px; bottom: 0; height: 62%; z-index: -1; background: linear-gradient(0deg, var(--washi) 55%, rgba(247, 239, 227, 0)); }
    .d1-sunglow { left: 60%; top: 16%; width: 70vw; }
    .d1-cloud--front { top: 44%; width: 260vw; }
    .d1-scroll { display: none; }
    .top .lp-sec { padding: 96px 0; }
    .lp-product, .dd-sov-grid { grid-template-columns: 1fr; gap: 40px; }
    .lp-product--flip .lp-product-copy { order: 0; }
    .lp-frame, .lp-product--flip .lp-frame { transform: none; }
    .lp-team-grid, .lp-sub-products { grid-template-columns: 1fr; }
    .lp-head--row { flex-direction: column; align-items: flex-start; }
    /* つくり方（スマホ・タブレット）：節は留めない。絵と札を画面の上に留め、説明は普通にスクロールして読む。
       説明が絵の少し下の線を越えたら、その部屋を照らして真ん中へ寄せる（js/main.js） */
    .dd-stack { height: auto; }
    .dd-stack-pin { position: relative; height: auto; min-height: 0; display: flex; flex-direction: column; padding: 96px 0 64px; overflow: visible; }
    .dd-stack-top { display: contents; }
    .dd-stack-head { order: 1; padding: 0 24px; }
    .dd-stack-art { order: 2; container-type: normal; position: sticky; top: 76px; z-index: 2; display: block; padding: 18px 0 14px; background: var(--washi-2); overflow: hidden; overflow: clip visible; }
    .dd-stack-art::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 28px; background: linear-gradient(var(--washi-2), rgba(240, 230, 211, 0)); pointer-events: none; }
    .dd-stack-frame { width: calc(clamp(160px, 31vh, 360px) * 2.3333); }
    .dd-stack-steps { width: auto; margin: 14px 24px 0; }
    .dd-stack-desc { order: 3; display: block; padding: 0 24px; }
    .dd-layer { padding: 28px 0; border-top: 1px solid var(--line); opacity: .35; transform: none; pointer-events: auto; transition: opacity .5s ease; }
    .dd-layer:first-child { border-top: 0; }
    .dd-layer.is-on { opacity: 1; }
    .dd-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dd-apps li { opacity: 1; transform: none; }
    .dd-sov-art { margin: 0 auto; }
}
/* 横向きのスマホなど背の低い画面では、絵を留めると読む場所がなくなるので留めない */
@media (max-width: 900px) and (max-height: 520px) {
    .dd-stack-art { position: relative; top: auto; }
}
@media (max-width: 600px) {
    .d1-birds { top: 12%; width: 120px; }
    .hx-d1 .dd-cta { margin-top: 1.4rem; }
    .top .lp-sec { padding: 80px 0; }
    .lp-news-grid { grid-template-columns: 1fr; }
    .lp-person { grid-template-columns: 96px 1fr; gap: 18px; padding: 18px; }
    .lp-person img { width: 96px; }
    .lp-mini { grid-template-columns: 1fr; }
    .lp-mini-thumb { width: 100%; }
    .dd-stack-pin { padding: 80px 0 48px; }
    /* 数字と見出しを1行に並べ、本文とアプリの一覧は横幅いっぱいに */
    .dd-layer { grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: center; }
    .dd-layer > div { display: contents; }
    .dd-layer em { font-size: 2.3rem; }
    .dd-layer b { margin: 0; }
    .dd-layer p, .dd-apps { grid-column: 1 / -1; }
    .dd-layer p { font-size: .88rem; margin-top: .7rem; }
    .dd-apps li { padding: .45rem .65rem .5rem; }
    .dd-stack-steps li { gap: .35em; font-size: .74rem; }
    .dd-stack-steps li em { font-size: 1.2rem; }
    .dd-contact-art { height: 44vh; min-height: 280px; }
    .hx-sub { font-size: .92rem; margin-top: 1rem; line-height: 1.85; }
    .hx-title { font-size: clamp(2.6rem, 13vw, 3.6rem); }
}
@media (prefers-reduced-motion: reduce) {
    .hx-title .ch, .hx-kicker, .hx-kicker::after, .hx-sub, .hx-d1 .dd-cta, .d1-scroll { animation: none; opacity: 1; transform: none; }
    .d1-sky img, .d1-bld img, .d1-veil, .d1-birds, .d1-lamp, .d1-cloud--back, .d1-sunglow::after { animation: none; }
    .d1-bld img { -webkit-mask-image: none; mask-image: none; }
    .d1-veil, .d1-cloud--front { display: none; }
    .lp-h2.ink::after { transform: scaleX(1); transition: none; }
    .dd-contact-cloud { display: none; }
}
