/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0e0e;
  --panel: #161616;
  --panel-2: #1a1a1a;
  --line: #262626;
  --text: #ededed;
  --text-soft: #9a9a9a;
  --text-faint: #5a5a5a;
  --accent: #D97757;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: 'Noto Sans JP', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 60px;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.nav-logo em { font-style: normal; color: var(--accent); }

.dot-mark {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(217, 119, 87, 0.7);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 1.9rem);
}

.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(7rem, 15vh, 10rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -25% -10% auto -10%;
  height: 720px;
  z-index: 0;
  background:
    radial-gradient(42% 55% at 18% 0%, rgba(217, 119, 87, 0.22), transparent 70%),
    radial-gradient(40% 55% at 82% 8%, rgba(53, 181, 196, 0.14), transparent 70%),
    radial-gradient(45% 60% at 60% -10%, rgba(155, 135, 224, 0.10), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}

.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.28;
  mask-image: radial-gradient(72% 62% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 30%, #000 0%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-left { min-width: 0; animation: fadeUp 0.7s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  background: rgba(217, 119, 87, 0.08);
  border: 1px solid rgba(217, 119, 87, 0.25);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.4rem;
}

.hero-eyebrow svg { width: 14px; height: 14px; }

.hero-title {
  font-size: clamp(2rem, 5.2vw, 3.7rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.01em;
  margin-bottom: 1.3rem;
}

.hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 34px rgba(217, 119, 87, 0.4);
}

.hero-sub {
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  color: var(--text-soft);
  max-width: 34em;
  line-height: 2;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  color: #16110f;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(217, 119, 87, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); background: #e88a6c; box-shadow: 0 12px 30px rgba(217, 119, 87, 0.32); }

.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ===== Stats ===== */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 2.4rem;
}

.stat {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
}

.stat-icon {
  grid-row: 1 / 3;
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 0.5rem;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(217,119,87,0.16), rgba(217,119,87,0.04));
  border: 1px solid rgba(217,119,87,0.28);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 16px rgba(217,119,87,0.1);
  transition: transform 0.18s, box-shadow 0.2s;
}

.stat:hover .stat-icon {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(217,119,87,0.22);
}

.stat b {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.stat span {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-top: 0.3rem;
  text-transform: uppercase;
}

/* ===== Hero SNS ===== */
.hero-sns {
  display: flex;
  gap: 0.7rem;
  margin-top: 2.2rem;
}

.hero-sns a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  color: var(--text-soft);
  overflow: hidden;
  transition: color 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}

.hero-sns a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 120%, var(--sc, var(--accent)) 0%, transparent 62%);
  opacity: 0;
  transition: opacity 0.22s;
}

.hero-sns svg { position: relative; z-index: 1; }

.hero-sns a:hover {
  color: #fff;
  border-color: var(--sc, var(--accent));
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -6px var(--sc, var(--accent));
}

.hero-sns a:hover::before { opacity: 0.35; }

.hero-sns a:nth-child(1) { --sc: #41C9B4; }
.hero-sns a:nth-child(2) { --sc: #E1306C; }
.hero-sns a:nth-child(3) { --sc: #b8b8b8; }
.hero-sns a:nth-child(4) { --sc: #D97757; }
.hero-sns svg { width: 18px; height: 18px; }

/* ===== Hero terminal ===== */
.hero-term {
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(217, 119, 87, 0.04);
  backdrop-filter: blur(8px);
  animation: fadeUp 0.7s ease 0.15s both;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }

.term-title {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-left: 0.5rem;
}

.term-body {
  padding: 1.2rem 1.3rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
}

.term-body .tl { opacity: 0; animation: termLine 0.01s forwards; }
.term-body .t1 { animation-delay: 0.4s; }
.term-body .t2 { animation-delay: 0.7s; }
.term-body .t3 { animation-delay: 1.0s; }
.term-body .t4 { animation-delay: 1.3s; }
.term-body .t5 { animation-delay: 1.8s; }
.term-body .t6 { animation-delay: 2.1s; }
.term-body .t7 { animation-delay: 2.4s; }

@keyframes termLine { to { opacity: 1; } }

.term-body .p { color: var(--accent); margin-right: 0.5rem; }
.term-body .out { color: var(--text-soft); }
.term-body .ok { color: #27c93f; margin-right: 0.4rem; }

.term-list {
  list-style: none;
  margin: 0.1rem 0 0.3rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem 1.2rem;
}

.term-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text);
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
}

.term-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.term-list li em {
  font-style: normal;
  color: var(--text-faint);
  font-size: 0.7rem;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  vertical-align: -0.12em;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== Section scaffolding ===== */
.page { padding-bottom: 4rem; }

.section {
  padding: clamp(3rem, 6vw, 4.8rem) 0;
  scroll-margin-top: 76px;
}

.section + .section { border-top: 1px solid var(--line); }

.sec-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.sec-label .n {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.sec-label h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 500;
  white-space: nowrap;
}

.sec-label .rule { flex: 1; height: 1px; background: var(--line); }

.sec-lead {
  color: var(--text-soft);
  font-size: 0.88rem;
  max-width: 42em;
  margin-bottom: 2.2rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.about-lede {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 2;
  color: var(--text);
}

.about-lede b { color: var(--accent); font-weight: 500; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.fact { background: var(--panel); padding: 1.1rem 1.2rem; }

.fact .fk {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.fact .fv {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 600;
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ===== Business cards ===== */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 2vw, 1.3rem);
}

.biz-card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.4rem 1.3rem;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.biz-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.biz-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--panel-2);
}

.b-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.b-name {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.5rem 0 0.2rem;
}

.b-short {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.b-desc {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 0.8rem;
  line-height: 1.8;
}

.b-more {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  opacity: 0.8;
}

.tag-new {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.05rem 0.45rem;
  vertical-align: middle;
}

/* ===== Org tree ===== */
.tree { display: flex; flex-direction: column; align-items: center; }

.owner-node {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 1.3rem 2.4rem;
  text-align: center;
  box-shadow: 0 0 40px rgba(217, 119, 87, 0.12);
}

.owner-node .k {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.owner-node .name {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  margin-top: 0.3rem;
}

.owner-node .who { font-size: 0.78rem; color: var(--text-soft); }

.stem { width: 1px; height: 30px; background: var(--line); }
.branch-bar { width: min(92%, 960px); height: 1px; background: var(--line); }

.divisions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
}

.div-col { display: flex; flex-direction: column; align-items: center; }
.div-col .drop { width: 1px; height: 24px; background: var(--line); }

.div-node {
  width: 100%;
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 0.9rem 0.8rem;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s;
}

.div-node:hover { transform: translateY(-3px); border-color: var(--accent); }

.div-node .num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.div-node .dn {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0.35rem 0 0.2rem;
}

.div-node .dd { font-size: 0.66rem; color: var(--text-soft); line-height: 1.6; }

.div-node .cnt {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 0.1rem 0.6rem;
}

/* ===== Member cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  scroll-margin-top: 84px;
}

.card-head {
  padding: 1.3rem 1.4rem 1rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}

.card-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}

.card-head .top {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.card-head .biz {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.card-head .cname {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 600;
}

.card-head .desc {
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  line-height: 1.8;
}

.member-list { padding: 0.5rem 0.8rem 0.9rem; }

.member {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.6rem 0.7rem;
  border-radius: 9px;
  transition: background 0.15s;
}

.member:hover { background: rgba(255, 255, 255, 0.03); }
.member + .member { border-top: 1px solid rgba(255, 255, 255, 0.04); }

.member .badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  text-align: right;
  padding-top: 0.15rem;
}

.member .role { font-size: 0.85rem; font-weight: 400; }
.member .role .en { font-family: var(--mono); font-weight: 600; }
.member .task { color: var(--text-soft); font-size: 0.74rem; line-height: 1.6; }

.member.lead { background: rgba(255, 255, 255, 0.03); }
.member.lead .badge { color: var(--accent); }

.member.lead .role::after {
  content: '司令塔';
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-left: 0.5rem;
  border: 1px solid rgba(217, 119, 87, 0.45);
  border-radius: 20px;
  padding: 0.05rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  background: #0a0a0a;
  padding: 2.5rem 0;
  text-align: center;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.footer-logo em { font-style: normal; color: var(--accent); }

.footer-sns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-bottom: 1.2rem;
}

.footer-sns a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-soft);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-sns a:hover { color: var(--accent); }

.footer-copy {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .biz-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .divisions { grid-template-columns: repeat(3, 1fr); row-gap: 1.4rem; }
  .branch-bar, .div-col .drop { display: none; }
  .stem { height: 18px; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-term { order: 2; max-width: 520px; }
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .term-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .biz-grid { grid-template-columns: 1fr; }
  .divisions { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .stats { gap: 1rem; }
  .stat span { font-size: 0.56rem; letter-spacing: 0.08em; }
}

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