/* 南信AI相談所 — style
   配色は名刺に合わせた 紺・青・若草・砂色 に、夜明けの杏色を差し色として追加 */
:root {
  --night: #0b1b29;
  --navy: #16303f;
  --navy-2: #1f3f54;
  --primary: #245f86;
  --sage: #8aa78c;
  --sage-soft: #e7efe8;
  --sand: #e8d9b8;
  --dawn: #f0a868;
  --dawn-soft: #ffe2c2;
  --paper: #f7f4ee;
  --card: #fffdf9;
  --ink: #1c2a33;
  --muted: #556270;
  --line: rgba(22, 48, 63, .12);
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  --font-en: "Outfit", "Zen Kaku Gothic New", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: var(--navy); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--navy);
  background: rgba(247, 244, 238, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  transition: background .45s, color .45s, box-shadow .45s;
}
.site-header.is-top { color: #fff; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 64px; }
.brand { font-weight: 900; letter-spacing: .06em; text-decoration: none; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand small { font-size: 12px; font-weight: 700; letter-spacing: .02em; opacity: .72; }
.nav { display: flex; gap: 24px; font-size: 14px; font-weight: 700; margin-left: auto; }
.nav a { position: relative; text-decoration: none; opacity: .86; padding: 6px 0; transition: opacity .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--dawn); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .4s var(--ease); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.header-cta {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 900; text-decoration: none; color: #fff; background: var(--navy);
  transition: background .35s, color .35s, transform .35s var(--ease);
}
.header-cta:hover { transform: translateY(-1px); background: var(--primary); }
.is-top .header-cta { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .34); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; background: linear-gradient(90deg, var(--sage), var(--dawn)); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  padding: 104px 0 clamp(120px, 15vw, 190px);
  color: #fff;
  /* WebGLが使えない環境でのフォールバック */
  background: linear-gradient(180deg, #0b1b29 0%, #17364b 42%, #6f6f7f 68%, #e79a66 88%, #f3bd8f 100%);
}
.hero canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(110% 80% at 0% 34%, rgba(7, 18, 28, .62), transparent 62%),
    linear-gradient(180deg, rgba(7, 18, 28, .42), transparent 26%);
}
/* 谷から立ちのぼる朝霧。山並みを紙色のページへなだらかにつなぐ */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0) 0%, rgba(250, 232, 214, .16) 42%, rgba(247, 244, 238, .58) 80%, rgba(247, 244, 238, .92) 100%);
}
.hero-grid { display: grid; gap: 34px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dawn); box-shadow: 0 0 0 0 rgba(240, 168, 104, .6); animation: ping 2.4s ease-out infinite; }
.hero h1 {
  margin: 20px 0 16px; font-weight: 900; letter-spacing: .02em; line-height: 1.22;
  font-size: clamp(30px, 8.4vw, 64px);
  text-shadow: 0 2px 30px rgba(5, 14, 22, .45);
}
.hero h1 .line { display: block; white-space: nowrap; }
.hero h1 .ch { display: inline-block; animation: chIn .95s var(--ease) backwards; animation-delay: calc(var(--i) * 42ms + .25s); }
.hero h1 .hl { color: #ffd2a6; }
.subname { font-size: clamp(18px, 3.4vw, 26px); font-weight: 900; letter-spacing: .04em; color: #cfe3ee; }
.lead { margin-top: 16px; max-width: 34em; font-size: clamp(15.5px, 2.1vw, 18px); color: rgba(255, 255, 255, .88); text-shadow: 0 1px 16px rgba(5, 14, 22, .5); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { margin-top: 14px; font-size: 13.5px; color: rgba(255, 255, 255, .74); }
.hero [data-in] { animation: fadeUp .95s var(--ease) backwards; animation-delay: var(--d, 0s); }

/* Buttons */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 26px; border-radius: 999px; font-weight: 900; letter-spacing: .02em; text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s, background .4s;
  will-change: transform;
}
.btn .arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transition: left .8s var(--ease); pointer-events: none; }
.btn:hover::after { left: 130%; }
.btn-dawn { color: #10222e; background: linear-gradient(135deg, #ffe6cb, #f0a868); box-shadow: 0 12px 34px rgba(240, 168, 104, .36), inset 0 1px 0 rgba(255, 255, 255, .65); }
.btn-dawn:hover { box-shadow: 0 18px 44px rgba(240, 168, 104, .5), inset 0 1px 0 rgba(255, 255, 255, .65); }
.btn-glass { color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .34); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }
.btn-navy { color: #fff; background: linear-gradient(135deg, var(--primary), var(--navy)); box-shadow: 0 12px 30px rgba(22, 48, 63, .24); }
.btn-navy:hover { box-shadow: 0 18px 40px rgba(22, 48, 63, .32); }

/* Checklist card */
.check-card {
  border-radius: 26px; padding: 24px 22px;
  background: linear-gradient(160deg, rgba(20, 46, 63, .66), rgba(11, 28, 41, .52));
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(3, 12, 20, .4), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.check-card h2 { font-size: 18px; line-height: 1.55; font-weight: 900; margin-bottom: 14px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list label {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; cursor: pointer;
  font-weight: 700; font-size: 15.5px; line-height: 1.5;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.check-list label:hover { background: rgba(255, 255, 255, .13); transform: translateX(3px); }
.check-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .66); display: grid; place-items: center; transition: background .3s, border-color .3s, transform .35s var(--ease); }
.box svg { width: 14px; height: 14px; fill: none; stroke: #10222e; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .4s var(--ease) .05s; }
.check-list input:checked + .box { background: var(--dawn); border-color: var(--dawn); transform: scale(1.08); }
.check-list input:checked + .box svg { stroke-dashoffset: 0; }
.check-list input:focus-visible + .box { outline: 2px solid #fff; outline-offset: 3px; }
.check-list label.is-checked { background: rgba(240, 168, 104, .17); border-color: rgba(240, 168, 104, .55); }
.check-go { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ease), opacity .5s; }
.check-go > div { overflow: hidden; }
.check-card.has-checked .check-go { grid-template-rows: 1fr; opacity: 1; }
.check-go a { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 900; color: #ffd9b0; text-decoration: none; border-bottom: 1px solid rgba(255, 217, 176, .5); padding-bottom: 2px; }
.check-go .arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.check-go a:hover .arrow { transform: translateX(4px); }

.hero-ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(64px, 10vw, 140px); z-index: 0; pointer-events: none; }
.hero-ridge .r1 { fill: rgba(247, 244, 238, .42); }
.hero-ridge .r2 { fill: var(--paper); }
.scroll-hint { display: none; }

/* ---------- Sections (shared) ---------- */
section { position: relative; padding: clamp(64px, 9vw, 116px) 0; scroll-margin-top: 64px; }
section.tight { padding: clamp(40px, 6vw, 72px) 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-en); font-weight: 600; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--primary); }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-title { margin: 12px 0 14px; font-size: clamp(25px, 4.2vw, 40px); line-height: 1.38; font-weight: 900; letter-spacing: .02em; color: var(--navy); }
.section-title.sm { font-size: clamp(22px, 3vw, 28px); }
.section-lead { color: var(--muted); max-width: 42em; }
.split { display: grid; gap: 34px; align-items: center; }

/* Images */
.photo { position: relative; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--sand); box-shadow: 0 30px 70px rgba(22, 48, 63, .18); }
.photo picture { position: absolute; inset: -9% 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, var(--py, 0%), 0) scale(1.02); will-change: transform; }

/* Service cards */
.cards { display: grid; gap: 16px; margin-top: clamp(34px, 5vw, 56px); }
.card {
  position: relative; overflow: hidden; padding: 28px 26px 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 30px rgba(22, 48, 63, .06);
  transition: transform .5s var(--ease), box-shadow .5s;
}
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(240, 168, 104, .24), transparent 65%); }
.card:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 26px 54px rgba(22, 48, 63, .14); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card .num { position: absolute; top: 22px; right: 24px; font-family: var(--font-en); font-weight: 600; font-size: 13px; letter-spacing: .2em; color: var(--sage); }
.card .icon { width: 56px; height: 56px; margin-bottom: 18px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(140deg, var(--navy-2), var(--primary)); box-shadow: 0 10px 22px rgba(36, 95, 134, .28); }
.card .icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- Examples (dark stage + demo) ---------- */
.stage {
  margin-inline: clamp(8px, 1.6vw, 22px); border-radius: clamp(26px, 4vw, 48px); overflow: hidden; overflow: clip;
  color: #e6edf2; background: var(--night);
}
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 88% 0%, rgba(36, 95, 134, .5), transparent 70%),
    radial-gradient(48% 42% at 0% 100%, rgba(138, 167, 140, .24), transparent 70%),
    radial-gradient(30% 30% at 60% 100%, rgba(240, 168, 104, .12), transparent 70%);
}
.stage .wrap { position: relative; }
.stage .kicker { color: var(--dawn); }
.stage .section-title { color: #fff; }
.stage .section-lead { color: #b5c4ce; }
.demo { display: grid; gap: 22px; margin-top: clamp(30px, 5vw, 48px); align-items: start; }
.demo-tabs { display: grid; gap: 10px; }
.demo-tab {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  padding: 16px 18px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .09);
  transition: background .4s, border-color .4s, transform .4s var(--ease);
}
.demo-tab:hover { background: rgba(255, 255, 255, .07); }
.demo-tab[aria-selected="true"] { background: rgba(255, 255, 255, .09); border-color: rgba(240, 168, 104, .6); }
.demo-tab .tag { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #cfe3ee; background: rgba(36, 95, 134, .5); transition: background .4s, color .4s; }
.demo-tab[aria-selected="true"] .tag { background: var(--dawn); color: #10222e; }
.demo-tab .ttl { display: block; margin-top: 8px; font-size: 17.5px; font-weight: 900; color: #fff; line-height: 1.5; }
.demo-tab .desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.demo-tab .desc > span { overflow: hidden; font-size: 14.5px; font-weight: 500; color: #b5c4ce; }
.demo-tab[aria-selected="true"] .desc { grid-template-rows: 1fr; }
.demo-tab[aria-selected="true"] .desc > span { padding-top: 6px; }
.tbar { position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .1); opacity: 0; }
.tbar i { display: block; width: 100%; height: 100%; background: var(--dawn); transform: scaleX(0); transform-origin: 0 50%; }
.demo-tab.is-waiting .tbar { opacity: 1; }
.demo-tab.is-waiting .tbar i { animation: fill var(--wait, 5s) linear forwards; }

.demo-window {
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #15303f, #0f2532);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.win-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2f4c5c; }
.win-bar i:first-child { background: var(--dawn); }
.win-bar span { margin-left: auto; font-family: var(--font-en); font-size: 11px; font-weight: 600; letter-spacing: .22em; color: #7f95a3; }
.pane { padding: 18px 20px; }
.pane-label { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: #8fa5b2; }
.pane-in p { padding: 13px 16px; border-radius: 14px; font-size: 15px; color: #d5e0e7; background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .2); min-height: 4.6em; }
.pane-mid { display: flex; align-items: center; gap: 14px; padding: 0 20px; }
.pane-mid::before, .pane-mid::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(240, 168, 104, .55), transparent); }
.spark { width: 22px; height: 22px; fill: var(--dawn); filter: drop-shadow(0 0 8px rgba(240, 168, 104, .7)); animation: twinkle 2.6s ease-in-out infinite; }
.is-typing .spark { animation: spinPulse 1.1s linear infinite; }
.out { display: grid; }
.out pre { grid-area: 1 / 1; margin: 0; font: inherit; font-size: 15.5px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; color: #fff; }
.out .ghost { visibility: hidden; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -.2em; background: var(--dawn); animation: blink 1s steps(2, start) infinite; }
.demo-note { padding: 0 20px 18px; font-size: 12.5px; color: #7f95a3; }

/* ---------- Memo ---------- */
.memo-visual { position: relative; padding-bottom: 46px; }
.memo-card {
  position: relative; z-index: 1; width: min(360px, 88%); margin: -64px 0 0 auto; padding: 20px 22px; border-radius: 20px;
  background: rgba(255, 253, 249, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 24px 54px rgba(22, 48, 63, .2);
}
.memo-card strong { display: block; color: var(--navy); font-weight: 900; margin-bottom: 8px; }
.inline-cta { margin-top: 26px; }

/* tick list */
.tick { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tick li { position: relative; padding-left: 30px; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 19px; height: 19px; border-radius: 50%;
  background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.tick.dawn li::before { background-color: var(--dawn); }

/* ---------- Fit ---------- */
.fit { display: grid; gap: 16px; }
.fit-box { padding: clamp(24px, 4vw, 38px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(22, 48, 63, .05); }
.fit-box.soft { background: linear-gradient(160deg, #eaf2ec, #dfeae3); border-color: #d6e4da; }
.fit-box .section-title { margin-bottom: 16px; }

/* ---------- Flow ---------- */
.flow { position: relative; display: grid; gap: 0; margin-top: clamp(28px, 4vw, 44px); counter-reset: step; }
.flow-line { display: none; }
.step { position: relative; padding: 4px 0 30px 78px; counter-increment: step; }
.step::before {
  content: "0" counter(step); position: absolute; left: 0; top: 0; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--muted);
  background: var(--paper); border: 2px solid var(--line);
  transition: background .6s var(--ease), color .6s, border-color .6s, transform .6s var(--ease), box-shadow .6s;
  transition-delay: calc(var(--i) * .42s + .15s);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px;
  background: linear-gradient(var(--dawn), var(--sage)) no-repeat top / 100% 0%, var(--line);
  transition: background-size .5s linear; transition-delay: calc(var(--i) * .42s + .4s);
}
.step h3 { font-size: 18px; font-weight: 900; color: var(--navy); }
.step p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.flow.is-in .step::before, html:not(.anim) .step::before { background: var(--navy); color: #fff; border-color: var(--dawn); transform: scale(1.04); box-shadow: 0 10px 24px rgba(22, 48, 63, .22); }
.flow.is-in .step:not(:last-child)::after, html:not(.anim) .step:not(:last-child)::after { background-size: 100% 100%, auto; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin-top: 10px; }
details { border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .4s, border-color .4s; }
details[open] { border-color: rgba(36, 95, 134, .3); box-shadow: 0 16px 36px rgba(22, 48, 63, .08); }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; font-weight: 900; color: var(--navy); }
summary::-webkit-details-marker { display: none; }
.pm { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sage-soft); transition: background .4s, transform .5s var(--ease); }
.pm::before, .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--navy); transition: transform .5s var(--ease), background .4s; }
.pm::after { transform: rotate(90deg); }
details[open]:not(.is-closing) .pm { background: var(--navy); transform: rotate(180deg); }
details[open]:not(.is-closing) .pm::before, details[open]:not(.is-closing) .pm::after { background: #fff; }
details[open]:not(.is-closing) .pm::after { transform: rotate(0deg); }
.ans { overflow: hidden; }
.ans p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- Tech ---------- */
.tech { display: grid; border-radius: clamp(24px, 3.4vw, 34px); overflow: hidden; color: #e6edf2; background: var(--night); box-shadow: 0 40px 90px rgba(11, 27, 41, .26); }
.tech-canvas { position: relative; min-height: 300px; background: linear-gradient(180deg, #0b1b29, #17364b 55%, #e79a66); }
.tech-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tech-ctrl { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 8px; padding: 12px 16px 14px; border-radius: 16px; font-size: 12px; color: #d5e0e7; background: rgba(7, 18, 28, .58); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tech-ctrl .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tech-ctrl b { font-weight: 700; color: #fff; letter-spacing: .06em; }
.tech-ctrl input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; }
.tech-ctrl input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #2a4f66, var(--dawn), #cfe3ee); }
.tech-ctrl input::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #2a4f66, var(--dawn), #cfe3ee); }
.tech-ctrl input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #fff; border: 4px solid var(--dawn); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.tech-ctrl input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--dawn); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.tech-body { padding: clamp(26px, 4vw, 46px); }
.tech-body .kicker { color: var(--dawn); }
.tech-body .section-title { color: #fff; }
.tech-body p { color: #b5c4ce; font-size: 15.5px; }
.chips { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #cfe0ea; border: 1px solid rgba(255, 255, 255, .17); background: rgba(255, 255, 255, .04); }

/* ---------- Profile ---------- */
.profile-band { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(460px, 52vw, 560px); padding: clamp(14px, 3.4vw, 40px); border-radius: clamp(24px, 3.4vw, 34px); background: var(--navy-2); box-shadow: 0 30px 70px rgba(22, 48, 63, .18); }
.profile-band picture { position: absolute; inset: -9% 0; z-index: -2; }
.profile-band img { width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, var(--py, 0%), 0) scale(1.02); will-change: transform; }
.profile-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 27, 41, 0) 35%, rgba(11, 27, 41, .5)); }
.profile-card { max-width: 660px; padding: clamp(20px, 3vw, 30px); border-radius: 22px; background: rgba(255, 253, 249, .93); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 24px 54px rgba(11, 27, 41, .28); }
.profile-card .section-title { margin-bottom: 6px; }
.profile-card strong { color: var(--navy); font-weight: 900; }
.profile-card p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* ---------- CTA ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 26px; align-items: center; padding: clamp(32px, 6vw, 72px); border-radius: clamp(26px, 4vw, 40px); color: #fff; background: var(--navy); box-shadow: 0 40px 90px rgba(11, 27, 41, .28); }
.cta::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(from 0deg, rgba(240, 168, 104, 0), rgba(240, 168, 104, .5), rgba(138, 167, 140, .34), rgba(36, 95, 134, .7), rgba(240, 168, 104, 0));
  filter: blur(70px); opacity: .8; animation: rot 22s linear infinite;
}
.cta .section-title { color: #fff; margin-top: 0; }
.cta p { color: rgba(255, 255, 255, .86); }
.cta .btn { justify-self: start; min-height: 60px; padding-inline: 34px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { padding: 34px 0 48px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.site-footer strong { color: var(--navy); }

/* ---------- Scroll reveal（JS有効時のみ） ---------- */
.anim [data-reveal] { opacity: 0; }
.anim [data-reveal].is-in { opacity: 1; animation: revealUp 1s var(--ease) backwards; animation-delay: var(--d, 0s); }
.anim [data-reveal="clip"].is-in { animation-name: revealClip; animation-duration: 1.3s; }
.anim [data-reveal="flow"] { opacity: 1; }
.anim [data-reveal="flow"].is-in { animation: none; }
.anim .card .icon svg * { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim .card.is-in .icon svg * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--ease); transition-delay: calc(var(--d, 0s) + .35s); }
.anim .memo-card .tick li { opacity: 0; transform: translateX(-10px); }
.anim .memo-card.is-in .tick li { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.anim .memo-card.is-in .tick li:nth-child(1) { transition-delay: .55s; }
.anim .memo-card.is-in .tick li:nth-child(2) { transition-delay: .7s; }
.anim .memo-card.is-in .tick li:nth-child(3) { transition-delay: .85s; }
.anim .memo-card.is-in .tick li:nth-child(4) { transition-delay: 1s; }

@keyframes chIn { from { opacity: 0; transform: translateY(.55em) rotate(5deg); filter: blur(8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }
@keyframes revealUp { from { opacity: 0; transform: translateY(30px); } }
@keyframes revealClip { from { opacity: 0; clip-path: inset(10% 8% 10% 8% round 28px); transform: translateY(24px); } to { clip-path: inset(0 0 0 0 round 28px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(240, 168, 104, .6); } 80%, 100% { box-shadow: 0 0 0 9px rgba(240, 168, 104, 0); } }
@keyframes blink { to { visibility: hidden; } }
@keyframes fill { to { transform: scaleX(1); } }
@keyframes rot { to { rotate: 360deg; } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes spinPulse { from { transform: rotate(0deg) scale(1.1); } to { transform: rotate(360deg) scale(1.1); } }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: 50% 0; } 45% { transform: scaleY(1); transform-origin: 50% 0; } 55% { transform: scaleY(1); transform-origin: 50% 100%; } 100% { transform: scaleY(0); transform-origin: 50% 100%; } }

/* ============================================================
   追加のモーション
   ============================================================ */

/* 見出し：下から幕が上がるように現れる／ラベルの線が伸びる */
.anim [data-reveal] .kicker::before { width: 0; transition: width .9s var(--ease) .3s; }
.anim [data-reveal].is-in .kicker::before { width: 28px; }
.anim [data-reveal].is-in .section-title { animation: titleUp 1.15s var(--ease) backwards; animation-delay: calc(var(--d, 0s) + .14s); }
@keyframes titleUp { from { clip-path: inset(0 0 100% 0); transform: translateY(.55em); } to { clip-path: inset(-12% -6% -12% -6%); } }

/* 流れる帯 */
.marquee {
  display: grid; gap: clamp(6px, 1.2vw, 14px); overflow: hidden; padding: 0 0 clamp(44px, 6vw, 76px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-row { overflow: hidden; }
.marquee-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee-track > * { flex: none; margin-right: clamp(18px, 3vw, 38px); }
.marquee-track span { font-weight: 900; font-size: clamp(26px, 5.6vw, 62px); line-height: 1.35; letter-spacing: .04em; white-space: nowrap; color: var(--navy); }
.marquee-track span.ol { color: transparent; -webkit-text-stroke: 1.2px rgba(22, 48, 63, .42); }
.marquee-track i { width: clamp(12px, 1.7vw, 20px); aspect-ratio: 1; background: var(--dawn); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: slowspin 9s linear infinite; }

/* 「使い方の例」の背景を漂う点と線 */
.net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* 等高線の飾り（ヒーローの山肌の線と同じモチーフ） */
section > .wrap { position: relative; z-index: 1; }
.deco { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.contour { position: absolute; width: clamp(340px, 46vw, 640px); aspect-ratio: 1; color: var(--sage); opacity: .5; }
.contour svg { display: block; width: 100%; height: 100%; overflow: visible; animation: slowspin 140s linear infinite; }
.contour path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s var(--ease); transition-delay: calc(var(--n) * .13s); }
.contour.is-in path { stroke-dashoffset: 0; }
.contour path:nth-child(3n) { stroke: var(--dawn); }
.c-a { right: -9%; top: -7%; }
.c-b { left: -15%; bottom: -20%; color: #cdb98a; opacity: .55; }
.c-c { right: -13%; top: 6%; color: var(--primary); opacity: .2; }

/* イラスト：ゆっくり寄っていく */
.photo img, .profile-band img { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { scale: 1; } to { scale: 1.09; } }

/* チェックリストのカード：ふわりと浮く */
.hero .check-card[data-in] { animation: fadeUp .95s var(--ease) var(--d, 0s) backwards, floaty 7s ease-in-out 2.6s infinite; }
@keyframes floaty { 50% { translate: 0 -8px; } }

/* ボタン：押した場所から広がる波紋 */
.header-cta { position: relative; overflow: hidden; }
.demo-tab { overflow: hidden; }
.ripple { position: absolute; left: var(--rx); top: var(--ry); width: var(--rs); height: var(--rs); margin: calc(var(--rs) / -2) 0 0 calc(var(--rs) / -2); border-radius: 50%; background: currentColor; opacity: .26; transform: scale(0); pointer-events: none; animation: ripple .75s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes slowspin { to { rotate: 360deg; } }

/* タッチ端末：スクロールに合わせてカードの上を光が通る */
@media (hover: none) { .card::before { opacity: .9; } }

/* ---------- ≥ 700px ---------- */
@media (min-width: 700px) {
  .wrap { width: min(1160px, 100% - 56px); }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .fit { grid-template-columns: 1fr 1fr; gap: 18px; }
  .cta { grid-template-columns: 1fr auto; }
  .cta .btn { justify-self: end; }
  .check-card { padding: 28px 26px; }
}

/* ---------- ≥ 900px ---------- */
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px); }
  .split-rev > :first-child { order: 0; }
  .demo { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 26px; }
  .demo-window { position: sticky; top: 92px; }
  .tech { grid-template-columns: 1.05fr .95fr; }
  .tech-canvas { min-height: 380px; }

  /* 進め方：横並びのタイムライン */
  .flow { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .flow-line { display: block; position: absolute; left: 28px; right: calc((100% - 66px) / 4 - 28px); top: 27px; height: 2px; background: var(--line); }
  .flow-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--dawn)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.7s var(--ease) .2s; }
  .flow.is-in .flow-line i, html:not(.anim) .flow-line i { transform: scaleX(1); }
  .step { padding: 76px 0 0; }
  .step:not(:last-child)::after { display: none; }
}

/* ---------- ≥ 1040px ---------- */
@media (min-width: 1040px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; }
  .hero h1 { font-size: clamp(44px, 4.9vw, 68px); }
  .scroll-hint { position: absolute; left: 50%; bottom: clamp(96px, 11vw, 150px); z-index: 1; translate: -50% 0; display: grid; justify-items: center; gap: 8px; font-family: var(--font-en); font-size: 10px; letter-spacing: .34em; color: rgba(255, 255, 255, .7); animation: fadeUp 1s var(--ease) 1.8s backwards; }
  .scroll-hint i { width: 1px; height: 34px; background: rgba(255, 255, 255, .7); animation: hint 2.2s var(--ease) infinite; }
}

/* ---------- < 900px ---------- */
@media (max-width: 899px) {
  .nav { display: none; }
  .brand small { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .memo-card { margin-top: -48px; }
}

/* ---------- 動きの切り替えボタン ---------- */
.motion-note:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.motion-note button { font: inherit; font-weight: 700; color: #fff; cursor: pointer; min-height: 44px; padding: 8px 18px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.motion-note button:hover { background: rgba(255, 255, 255, .22); }
.motion-link { margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- 動きを控えめにするモード（html.calm） ----------
   端末が「動きを減らす」設定のとき、または見る人が「控えめ」を選んだときに有効。
   位置が動く演出（流れる・寄る・傾く・浮く・回る）は止め、ふわっと現れる・色が変わる、だけを残す。 */
html.calm { scroll-behavior: auto; }
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
html.calm .photo img, html.calm .profile-band img { transform: none; }
html.calm.anim [data-reveal] { transition: opacity .9s ease !important; }
html.calm.anim [data-reveal].is-in, html.calm.anim [data-reveal].is-in .section-title { animation: none !important; }
html.calm .hero h1 .ch, html.calm .hero [data-in] { animation: fadeOnly 1.1s ease .1s backwards !important; }
@keyframes fadeOnly { from { opacity: 0; } }

/* JSが動かない環境では切り替えができないので、端末の「動きを減らす」設定にそのまま従う */
@media (prefers-reduced-motion: reduce) {
  html:not(.mo) { scroll-behavior: auto; }
  html:not(.mo) *, html:not(.mo) *::before, html:not(.mo) *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
