/* ============================================
   シノビズ — 黒基調 × 和
   ============================================ */
:root {
  /* ベース（墨） */
  --sumi: #0e0e10;
  --sumi-2: #151518;
  --surface: #1a1a1e;
  --line: #2c2b2f;
  --text: #ece6da;      /* 生成り */
  --muted: #9b958b;

  /* サブカラー（暗い背景で映えるよう少し明るめ） */
  --ai: #2f86b3;        /* クナイの藍 */
  --enji: #c8383f;      /* 刀の臙脂 */
  --cha: #a8693c;       /* 手裏剣の茶 */
  --midori: #3f7a5c;    /* 撒菱の深緑 */

  /* ロゴ原色（帯などに使用） */
  --ai-deep: #165f83;
  --enji-deep: #9e2a2e;
  --cha-deep: #7a492a;
  --midori-deep: #1c3b2e;

  /* ヒラギノ丸ゴ（Mac・iPhone）／Zen Maru Gothic（Windows・Android） */
  --maru: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Zen Maru Gothic", sans-serif;
  --serif: var(--maru);
  --sans: var(--maru);
  --radius: 6px;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--sumi);
  /* 和紙のようなざらつき */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  line-height: 1.95;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--enji); color: var(--text); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.sp { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(14, 14, 16, .88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.header-logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important; border: 1px solid var(--enji);
  padding: 6px 18px; border-radius: 2px;
}
.nav-cta:hover { background: var(--enji); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden; padding: 100px 0 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(200, 56, 63, .10), transparent 70%),
    radial-gradient(ellipse 40% 40% at 15% 80%, rgba(47, 134, 179, .08), transparent 70%);
}
.hero-kanji {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800;
  font-size: min(78vw, 720px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(236, 230, 218, .06);
  user-select: none; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-logo {
  width: min(560px, 88vw); margin: 0 auto;
  animation: fadeUp 1.2s .1s both;
}
.hero-copy {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 5vw, 50px); line-height: 1.45; letter-spacing: .08em;
  margin: 40px 0 12px;
  animation: fadeUp 1.2s .4s both;
}
.hero-sub { color: var(--muted); margin: 0 0 40px; animation: fadeUp 1.2s .6s both; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fadeUp 1.2s .8s both; }

.hero-vertical {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; margin: 0;
  font-family: var(--serif); font-size: 15px; letter-spacing: .6em;
  color: var(--muted);
  padding-top: 64px;
}
.hero-vertical::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 48px;
  background: var(--enji);
}

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  width: 1px; height: 56px; background: var(--line); overflow: hidden;
}
.scroll-hint span {
  position: absolute; inset: 0; background: var(--text);
  animation: scrollLine 2.2s ease-in-out infinite;
}

/* 手裏剣・撒菱の装飾 */
.deco { position: absolute; pointer-events: none; }
.deco-1 { width: 54px; height: 54px; top: 18%; left: 9%; fill: var(--cha); opacity: .7; animation: spin 18s linear infinite; }
.deco-2 { width: 30px; height: 30px; top: 30%; left: 15%; fill: var(--cha); opacity: .45; animation: spin 12s linear infinite reverse; }
.deco-3 { width: 44px; height: 44px; bottom: 18%; right: 12%; fill: var(--midori); opacity: .8; animation: float 7s ease-in-out infinite; }
.deco-4 { width: 22px; height: 22px; bottom: 26%; left: 20%; fill: var(--ai); opacity: .5; animation: spin 10s linear infinite; }
.deco-contact { width: 260px; height: 260px; right: -60px; top: -40px; fill: rgba(236,230,218,.035); animation: spin 60s linear infinite; }

.color-band { display: flex; height: 4px; }
.color-band span { flex: 1; }
.c-ai { background: var(--ai-deep); } .c-enji { background: var(--enji-deep); }
.c-cha { background: var(--cha-deep); } .c-midori { background: var(--midori-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 32px; border-radius: 2px;
  font-weight: 700; font-size: 15px; letter-spacing: .1em;
  text-decoration: none; transition: .25s; border: 1px solid transparent;
}
.btn-primary { background: var(--enji); color: var(--text); }
.btn-primary:hover { background: #db4a51; box-shadow: 0 0 24px rgba(200, 56, 63, .45); }
.btn-ghost { border-color: rgba(236, 230, 218, .35); }
.btn-ghost:hover { border-color: var(--text); background: rgba(236, 230, 218, .06); }
.btn-lg { padding: 16px 44px; margin-top: 24px; }

/* ---------- Sections ---------- */
.section { position: relative; padding: 120px 0; overflow: hidden; }
.section-alt { background: rgba(255, 255, 255, .025); border-block: 1px solid var(--line); }

.sec-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 40px; }
.sec-head.center { align-items: center; }
.sec-no {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 14px; color: var(--enji); letter-spacing: .3em;
}
.sec-no::before { content: ""; width: 10px; height: 10px; background: var(--enji); transform: rotate(45deg); }
.section-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 4.2vw, 42px); letter-spacing: .1em; line-height: 1.4; margin: 0;
}
.sec-en { font-size: 11px; letter-spacing: .4em; color: var(--muted); }
.section-desc { color: var(--muted); margin: -16px 0 0; }
.lead {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(19px, 2.5vw, 24px); line-height: 1.8;
  border-left: 2px solid var(--enji); padding-left: 20px;
}
#about p:not(.lead) { color: #cfc8bb; }

/* ---------- Business ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.biz-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 36px; border-top: 2px solid var(--accent);
}
.biz-kanji {
  position: absolute; right: -10px; bottom: -40px;
  font-family: var(--serif); font-weight: 800; font-size: 200px; line-height: 1;
  color: var(--accent); opacity: .08; pointer-events: none;
}
.biz-num { font-family: var(--serif); font-weight: 800; font-size: 18px; color: var(--accent); letter-spacing: .2em; }
.biz-card h3 { font-family: var(--serif); font-size: 23px; margin: 4px 0 12px; letter-spacing: .08em; }
.biz-card p { margin: 0; color: #c2bbae; position: relative; font-size: 14.5px; }
.biz-card .biz-items {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-family: var(--serif); font-size: 14px; color: var(--accent); letter-spacing: .08em;
}

/* ---------- Products ---------- */
.product-group { margin-top: 48px; }
.group-title {
  display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px;
  font-family: var(--serif); font-weight: 800; font-size: 22px; letter-spacing: .2em;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }
.group-title small { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.product-link {
  display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700;
  color: var(--accent); text-decoration: none; letter-spacing: .08em;
}
.product-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-link span { display: inline-block; transition: transform .2s; }
.product-link:hover span { transform: translateX(3px); }
.product-card {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.product-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; background: var(--accent);
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 50%, transparent);
}
/* 家紋風アイコン */
.mon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 21px; line-height: 1;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent);
}
.product-body { min-width: 0; }
.product-card p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.product-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
.product-head h3 { margin: 0; font-family: var(--serif); font-size: 19px; letter-spacing: .06em; }
.product-head .yomi {
  display: block; font-size: 10.5px; font-weight: 500; line-height: 1.4;
  letter-spacing: .2em; color: var(--muted); margin-bottom: 2px;
}
.product-head small { font-size: 11px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.tag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 2px;
  color: var(--accent); border: 1px solid currentColor; white-space: nowrap; letter-spacing: .08em;
}
.tag-muted { color: var(--muted); }
.tag-live { background: var(--accent); color: var(--text); border-color: var(--accent); }
.accent-ai { --accent: var(--ai); }
.accent-enji { --accent: var(--enji); }
.accent-cha { --accent: var(--cha); }
.accent-midori { --accent: #4f9a73; }
.is-paused { opacity: .5; }
.is-paused:hover { opacity: .75; }

/* ---------- Company ---------- */
.info-table { margin: 0; border-top: 1px solid var(--line); }
.info-table > div { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid var(--line); padding: 20px 4px; }
.info-table dt { font-family: var(--serif); font-weight: 600; color: var(--muted); letter-spacing: .2em; }
.info-table dd { margin: 0; }

/* ---------- Contact ---------- */
.contact {
  background: radial-gradient(ellipse 50% 70% at 50% 100%, rgba(200, 56, 63, .14), transparent 70%);
}
.contact p { color: #cfc8bb; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-logo { height: 28px; width: auto; opacity: .85; }
.site-footer small { color: var(--muted); letter-spacing: .1em; }

/* ---------- Animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.product-grid .reveal:nth-child(2) { transition-delay: .08s; }
.product-grid .reveal:nth-child(3) { transition-delay: .16s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-14px) rotate(12deg); } }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

.anim-done .hero-logo, .anim-done .hero-copy, .anim-done .hero-sub, .anim-done .hero-actions { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-vertical { display: none; }
  .biz-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
  .header-logo img { height: 28px; }
  .sp { display: inline; }
  .pc { display: none; }
  .section { padding: 80px 0; }
  .biz-card { padding: 32px 24px; }
  .info-table > div { grid-template-columns: 96px 1fr; }
  .deco-1 { top: 12%; left: 6%; width: 40px; height: 40px; }
  .deco-2 { top: 20%; left: 18%; }
  .deco-3 { bottom: 14%; right: 8%; width: 34px; height: 34px; }
  .deco-contact { width: 180px; height: 180px; }
}
