:root {
  --bg: #020617;
  --accent: #00b5ff;
  --accent-soft: #22d3ee;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

.inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(3,7,18,0.96), rgba(3,7,18,0.15));
  border-bottom: 1px solid var(--border-subtle);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
}
.logo span {
  font-size: 18px;
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
nav a {
  position: relative;
  color: var(--muted);
  transition: color 0.15s ease;
  cursor: pointer;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent), var(--accent-soft));
  transition: width 0.18s ease;
}
nav a:hover {
  color: var(--text);
}
nav a:hover::after {
  width: 100%;
}

main {
  padding-top: 64px;
  position: relative;
  z-index: 1;
}
section {
  padding: 80px 0;
}
#service {
  padding-top: 50px;
}
#about {
  padding-top: 20px;
}
#contact {
  padding-top: 20px;
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  nav ul { gap: 16px; font-size: 13px; }
}

/* ======== HERO 背景 ======== */
.hero {
  position: relative;
  min-height: calc(52vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% -25%,
      rgba(255,255,255,0.16) 0%,
      rgba(148,163,184,0.07) 20%,
      rgba(15,23,42,0.0) 42%
    ),
    linear-gradient(
      to bottom,
      rgba(2,6,23,0) 0%,
      rgba(2,6,23,0.25) 40%,
      rgba(2,6,23,0.55) 65%,
      rgba(2,6,23,0.85) 82%,
      #020617 100%
    ),
    radial-gradient(circle at 0% 0%, rgba(56,189,248,0.14), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(0,181,255,0.12), transparent 55%),
    #020617;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: -4%;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* 星（白?青系）やや多め（5倍ベースの 2/3 密度） */
.hero::before {
  background-image:
    /* 上段 */
    radial-gradient(2.2px 2.2px at 7% 11%,   #e5f2ff 0, transparent 55%),
    radial-gradient(1.6px 1.6px at 19% 32%,  #cbd5ff 0, transparent 55%),
    radial-gradient(2.8px 2.8px at 34% 17%,  #ffffff 0, transparent 55%),
    radial-gradient(1.5px 1.5px at 47% 29%,  #e0f2fe 0, transparent 55%),
    radial-gradient(2.4px 2.4px at 63% 9%,   #f5f3ff 0, transparent 55%),
    radial-gradient(1.9px 1.9px at 81% 25%,  #bae6fd 0, transparent 55%),
    radial-gradient(1.5px 1.5px at 12% 6%,   #ddeafe 0, transparent 55%),

    /* 中段 */
    radial-gradient(1.6px 1.6px at 11% 53%,  #e5f2ff 0, transparent 55%),
    radial-gradient(3.0px 3.0px at 27% 61%,  #ffffff 0, transparent 55%),
    radial-gradient(2.0px 2.0px at 43% 49%,  #e0f2fe 0, transparent 55%),
    radial-gradient(1.7px 1.7px at 59% 57%,  #c4e0ff 0, transparent 55%),
    radial-gradient(2.5px 2.5px at 76% 51%,  #f9fafb 0, transparent 55%),
    radial-gradient(1.5px 1.5px at 90% 63%,  #dbeafe 0, transparent 55%),
    radial-gradient(2.2px 2.2px at 51% 41%,  #e5f2ff 0, transparent 55%),

    /* 下段 */
    radial-gradient(1.8px 1.8px at 15% 82%,  #e0f2fe 0, transparent 55%),
    radial-gradient(2.3px 2.3px at 31% 89%,  #ffffff 0, transparent 55%),
    radial-gradient(1.6px 1.6px at 52% 77%,  #e5e7eb 0, transparent 55%),
    radial-gradient(2.8px 2.8px at 69% 86%,  #f4f4ff 0, transparent 55%),
    radial-gradient(2.1px 2.1px at 88% 79%,  #e5f2ff 0, transparent 55%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.9;
  animation: starsTwinkleA 3.6s ease-in-out infinite;
}

/* 色付きの星（2/3 密度） */
.hero::after {
  background-image:
    radial-gradient(2.6px 2.6px at 12% 18%, #fee2e2 0, transparent 55%),
    radial-gradient(2.9px 2.9px at 29% 7%,  #bfdbfe 0, transparent 55%),
    radial-gradient(2.2px 2.2px at 51% 15%, #fbbf24 0, transparent 55%),
    radial-gradient(2.7px 2.7px at 68% 27%, #a855f7 0, transparent 55%),
    radial-gradient(2.3px 2.3px at 86% 20%, #f97316 0, transparent 55%),

    radial-gradient(1.8px 1.8px at 9% 41%,  #a5b4fc 0, transparent 55%),
    radial-gradient(2.6px 2.6px at 25% 47%, #fefce8 0, transparent 55%),
    radial-gradient(2.1px 2.1px at 44% 37%, #facc15 0, transparent 55%),
    radial-gradient(2.5px 2.5px at 63% 45%, #fde68a 0, transparent 55%),
    radial-gradient(2.0px 2.0px at 79% 39%, #e9d5ff 0, transparent 55%),

    radial-gradient(2.3px 2.3px at 17% 69%, #bfdbfe 0, transparent 55%),
    radial-gradient(2.9px 2.9px at 34% 76%, #f97316 0, transparent 55%),
    radial-gradient(2.1px 2.1px at 53% 65%, #e5f2ff 0, transparent 55%),
    radial-gradient(2.7px 2.7px at 71% 73%, #f9fafb 0, transparent 55%),
    radial-gradient(2.2px 2.2px at 87% 71%, #a5b4fc 0, transparent 55%),

    radial-gradient(1.9px 1.9px at 8% 81%,  #fde68a 0, transparent 55%),
    radial-gradient(2.0px 2.0px at 23% 86%, #facc15 0, transparent 55%),
    radial-gradient(1.7px 1.7px at 40% 79%, #fb7185 0, transparent 55%),
    radial-gradient(2.2px 2.2px at 58% 88%, #bfdbfe 0, transparent 55%),
    radial-gradient(1.8px 1.8px at 76% 82%, #e9d5ff 0, transparent 55%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.8;
  animation: starsTwinkleB 4.4s ease-in-out infinite;
}

@keyframes starsTwinkleA {
  0%   { opacity: 0.95; }
  18%  { opacity: 0.38; }
  45%  { opacity: 1.0; }
  72%  { opacity: 0.32; }
  100% { opacity: 0.95; }
}

@keyframes starsTwinkleB {
  0%   { opacity: 0.88; }
  22%  { opacity: 1.0; }
  50%  { opacity: 0.30; }
  78%  { opacity: 1.0; }
  100% { opacity: 0.88; }
}

/* ======== HERO テキスト ======== */
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.hero-text {
  max-width: 760px;
  position: relative;
  padding-top: 20px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 28px;
  white-space: nowrap;
  position: relative;
}

.hero-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(148,163,184,0.2),
    rgba(0,181,255,0.95),
    rgba(15,23,42,0)
  );
  box-shadow:
    0 0 16px rgba(0,181,255,0.75),
    0 0 34px rgba(15,23,42,0.9);
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: none;
}

/* Section headings */
.section-header {
  margin-bottom: 32px;
}
.section-title {
  font-size: 18px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.section-heading {
  font-size: 22px;
  font-weight: 500;
}
.section-lead {
  font-size: 14px;
  color: var(--muted);
  max-width: none;
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.card {
  position: relative;
  border-radius: 20px;
  padding: 20px;
  background: rgba(15,23,42,0.9);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(0,181,255,0.14), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.card h3 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 8px;
  position: relative;
  padding-left: 14px;
}

.card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(0,181,255,0.85),
    rgba(34,211,238,0.75),
    rgba(148,163,184,0.35)
  );
  opacity: 0.95;
}

.card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* About layout */
.about-layout {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.company-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .company-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  row-gap: 8px;
  column-gap: 16px;
  font-size: 14px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
}

.about-row-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 768px) {
  .about-row-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rep-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.55);
  height: 100%;
  overflow: hidden;
}
.rep-card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 40%;
  top: 0;
  height: 2px;
  background: linear-gradient(to right, rgba(34,211,238,0.9), rgba(0,181,255,0), rgba(129,140,248,0));
}

.rep-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.rep-name {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--text);
}
.rep-body {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  white-space: normal;
}

/* Social contribution card */
.about-social-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.55);
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  height: 100%;
}
.about-social-card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 40%;
  top: 0;
  height: 2px;
  background: linear-gradient(to right, rgba(34,211,238,0.9), rgba(0,181,255,0), rgba(129,140,248,0));
}

.about-social-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.about-social-lead {
  margin: 0 0 8px;
}
.about-social-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.about-social-list li + li {
  margin-top: 4px;
}
.about-social-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(148,163,184,0.4);
  padding-bottom: 1px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

@media (min-width: 769px) {
  .about-social-list {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
  }
  .about-social-list li {
    margin: 0;
  }
  .about-social-list li + li {
    margin-top: 0;
  }
  .about-social-list li + li::before {
    content: "　"; /* 全角スペース */
    white-space: pre;
  }
}

/* Contact */
.contact-box {
  font-size: 14px;
  padding: 0;
  background: none;
  border: none;
  color: var(--muted);
}
.contact-form {
  margin-top: 18px;
  max-width: 100%;
}
.contact-field {
  margin-bottom: 16px;
}
.contact-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-input,
.contact-textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(15,23,42,0.9);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.contact-input:focus,
.contact-textarea:focus {
  border-color: rgba(0,181,255,0.8);
  box-shadow: 0 0 0 1px rgba(0,181,255,0.35);
  background: rgba(15,23,42,1);
}
.contact-textarea {
  min-height: 225px;
  resize: vertical;
}
.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,181,255,0.9);
  background: radial-gradient(circle at 0% 0%, rgba(34,211,238,0.4), rgba(15,23,42,1));
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
}
.contact-submit:hover {
  background: radial-gradient(circle at 100% 0%, rgba(0,181,255,0.55), rgba(15,23,42,1));
  box-shadow: 0 0 20px rgba(0,181,255,0.4);
  transform: translateY(-1px);
}

/* 送信結果メッセージ */
.contact-success {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #bbf7d0;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.5);
}
.contact-errors {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #fecaca;
  background: rgba(185,28,28,0.18);
  border: 1px solid rgba(185,28,28,0.55);
  list-style: none;
}
.contact-errors li + li {
  margin-top: 4px;
}

/* ハニーポット（表示しない） */
.contact-hp {
  display: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0 32px;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .company-cols {
    gap: 12px;
  }
}

.link-underline {
  text-decoration: none;
  border-bottom: 1px solid rgba(148,163,184,0.4);
  padding-bottom: 1px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(18px, 6vw, 26px);
  }
  .hero {
    min-height: 30vh;
  }
}

/* PC用：タイトルアンダーラインを長めに */
@media (min-width: 1040px) {
  .hero-title::after {
    width: 832px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ホバー演出（PCのみ） */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,181,255,0.65);
    box-shadow: 0 16px 40px rgba(15,23,42,0.9);
  }
  .card:hover::before {
    opacity: 1;
  }

  .about-social-list a:hover {
    color: var(--text);
    border-color: rgba(0,181,255,0.8);
  }

  .link-underline:hover {
    color: var(--text);
    border-color: rgba(0,181,255,0.8);
  }
}


/* ========= Shooting Star (realistic, subtle) ========= */
.meteor {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  /* 周囲の星に近い白寄りのコア */
  background: #f9fafb;
  box-shadow:
    0 0 10px rgba(226, 232, 240, 0.9),
    0 0 24px rgba(0, 181, 255, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 0; /* テキストより背面 */
  transform: translate3d(0, 0, 0) rotate(0deg);

  /* 各個体ごとに JS からカスタムプロパティを渡す */
  animation-name: meteorMove;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* 細い尾：セルリアンブルーをアクセントにしたグラデーション */
.meteor::before {
  content: "";
  position: absolute;
  right: 1px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--len, 80px);   /* 尾の長さは JS から渡す */
  height: 1.2px;
  background: linear-gradient(
    to left,
    rgba(0, 181, 255, 0.95),
    rgba(56, 189, 248, 0.65),
    rgba(148, 163, 184, 0.0)
  );
  border-radius: 999px;
  filter: blur(0.35px);
}

/* 開始位置・終了位置・角度・長さは CSS 変数で制御 */
@keyframes meteorMove {
  0% {
    opacity: 0;
    transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0)
               rotate(var(--rot, -24deg));
  }
  /* 少し動き始めてから見え始める */
  12% {
    opacity: 1;
  }
  /* ここまではほぼフルで見えている */
  80% {
    opacity: 1;
  }
  /* 終点に向かって動きながら消えていく */
  100% {
    opacity: 0;
    transform: translate3d(var(--ex, 200px), var(--ey, 140px), 0)
               rotate(var(--rot, -24deg));
  }
}