/* ============================================================
   functionHUB Corporate Site — style.css
   カラーパレット:
     --bg-base    : #07080d  (ほぼ黒)
     --bg-card    : #0e1018  (カード背景)
     --bg-section : #12141e  (セクション背景)
     --accent     : #00c8ff  (電気シアン)
     --accent-dim : rgba(0,200,255,.12)
     --text-main  : #e8eaf0
     --text-muted : #7a8494
     --border     : rgba(255,255,255,.07)
============================================================ */

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

:root {
  --bg-base:     #07080d;
  --bg-card:     #0e1018;
  --bg-section:  #12141e;
  --accent:      #00c8ff;
  --accent-dim:  rgba(0, 200, 255, .12);
  --accent-glow: rgba(0, 200, 255, .35);
  --text-main:   #e8eaf0;
  --text-muted:  #7a8494;
  --border:      rgba(255, 255, 255, .07);
  --radius:      12px;
  --transition:  .3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  font-size: .95rem;
}

/* ---------- Layout ---------- */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

section {
  padding: 100px 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 6px 0;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(7, 8, 13, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: .875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.btn-contact {
  background: var(--accent);
  color: #07080d !important;
  padding: .45rem 1.25rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 700;
  transition: box-shadow var(--transition), opacity var(--transition) !important;
}

.btn-contact:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  opacity: .9;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* グリッドライン背景 */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ラジアルグラデーション */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 60% 40%, rgba(0,200,255,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(0,100,200,.06) 0%, transparent 60%);
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--accent);
  position: relative;
}

.hero-catchcopy {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #07080d;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.btn-primary:hover {
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  transition: border-color var(--transition), background var(--transition);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
}

/* ---------- About ---------- */
.about-section {
  padding: 100px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.hub-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -80px;
}

.hub-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

.hub-line {
  stroke: rgba(0, 200, 255, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.hub-center-ring {
  animation: hub-center-pulse 5s ease-in-out infinite;
}

@keyframes hub-center-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* ---------- Services (Terminal UI) ---------- */
.services-section {
  background: var(--bg-section);
}

/* セレクター + ターミナル グリッド */
.svc-layout {
  display: grid;
  grid-template-columns: 5fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
  align-items: start;
}

.svc-selector {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.svc-sel-label {
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.svc-sel-items {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.svc-sel-btn {
  display: flex;
  align-items: stretch;
  gap: .85rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
}

.svc-sel-bar {
  width: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
  transition: background .35s ease, box-shadow .35s ease;
  min-height: 1.2em;
}

.svc-sel-btn.active .svc-sel-bar {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0,200,255,.4);
}

.svc-sel-text {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(122,132,148,.5);
  line-height: 1.4;
  letter-spacing: -.01em;
  transition: font-size .35s ease, color .35s ease, font-weight .35s ease;
}

.svc-sel-btn.active .svc-sel-text {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.svc-sel-btn:not(.active):hover .svc-sel-text {
  color: rgba(232,234,240,.55);
}


.term-win {
  background: #070910;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(0,200,255,.04);
}

/* タイトルバー */
.term-bar {
  display: flex;
  align-items: center;
  padding: .7rem 1.25rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.tdot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.tdot-r { background: #ff5f57; }
.tdot-y { background: #febc2e; }
.tdot-g { background: #28c840; }

.term-win-title {
  flex: 1;
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  letter-spacing: .06em;
  margin-right: 72px;
}

/* コマンド行 */
.term-cmd-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  padding: .9rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
}

.term-ps {
  color: var(--accent);
  font-size: .95rem;
  line-height: 1;
}

.term-cmd-base {
  color: #c8ccd4;
  font-size: .82rem;
}

.term-path {
  color: var(--text-muted);
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: .82rem;
  white-space: nowrap;
}

.term-cmd-current {
  color: #e8eaf0;
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: .82rem;
}

/* 出力エリア */
.term-output-area {
  padding: 1.5rem 1.75rem 2.25rem;
  min-height: 320px;
}

.term-output {
  font-size: 1.00rem;
  line-height: 1.5;
  color: #c8ccd4;
  white-space: pre-wrap;
  word-break: break-word;
}

.t-cmd-echo {
  display: block;
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.t-cmd-echo .t-accent { color: var(--accent); }

.t-cursor {
  display: inline-block;
  color: var(--accent);
  animation: t-blink 1s step-end infinite;
}

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

.t-dots-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: .78rem;
}

.t-dots {
  display: inline-flex;
  gap: 4px;
}

.t-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: t-bounce .9s ease-in-out infinite;
}

.t-dots span:nth-child(2) { animation-delay: .18s; }
.t-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes t-bounce {
  0%, 80%, 100% { transform: scale(.55); opacity: .35; }
  40%           { transform: scale(1);   opacity: 1; }
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.25rem;
  transition: gap var(--transition);
}

.service-link:hover {
  gap: .6rem;
}

/* ---------- Feature / Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.why-item {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.why-item .icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.why-item h4 {
  font-size: 1rem;
  margin-bottom: .5rem;
}

.why-item p {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---------- CTA Banner ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--bg-section) 0%, #0a1628 100%);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: .95rem;
}

/* ---------- Company Page ---------- */
.company-hero {
  padding-top: 160px;
  padding-bottom: 80px;
}

.company-info-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  margin-top: 3rem;
  align-items: start;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table tr {
  border-bottom: 1px solid var(--border);
}

.company-table th,
.company-table td {
  padding: 1rem .5rem;
  text-align: left;
  font-size: .9rem;
}

.company-table th {
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
  white-space: nowrap;
}

.company-table td {
  color: var(--text-main);
}

/* ---------- Services Page Hero ---------- */
.page-hero {
  padding-top: 160px;
  padding-bottom: 80px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
}

.services-detail {
  padding: 80px 0;
}

.service-detail-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border);
}

.service-detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.service-detail-item.reverse {
  direction: rtl;
}

.service-detail-item.reverse > * {
  direction: ltr;
}

.service-detail-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: .5rem;
  font-variant-numeric: tabular-nums;
}

.service-detail-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-detail-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: .925rem;
  line-height: 1.9;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tag {
  display: inline-block;
  padding: .3rem .8rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
}

.service-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.visual-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text-muted);
}

.visual-bar-fill {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(0,200,255,.3));
  flex: 1;
  transform-origin: left;
  animation: barFill 1.5s ease forwards;
}

@keyframes barFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #040507;
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: .75rem;
}

.footer-brand .logo-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}

.footer-brand p {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-nav h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer-nav a {
  font-size: .85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--text-main);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---------- Scroll Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: .1s; }
.fade-up-delay-2 { transition-delay: .2s; }
.fade-up-delay-3 { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  section { padding: 70px 0; }

  .nav-links { display: none; }

  .hero-title { font-size: 2rem; }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .svc-layout {
    grid-template-columns: 1fr;
  }

  .svc-sel-items {
    flex-direction: row;
    gap: 2rem;
  }

  .svc-sel-btn.active .svc-sel-text {
    font-size: 1.15rem;
  }

  .term-output-area {
    padding: 1.25rem 1.25rem 1.75rem;
  }

  .hub-svg {
    max-width: 360px;
  }

  .company-info-grid,
  .service-detail-item,
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-detail-item.reverse {
    direction: ltr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }
}
