@charset "UTF-8";

/* ============================================
   合同会社chaos — トップページ用スタイル
   ============================================ */

:root {
  --bg: #07080c;
  --bg-alt: #0c0e15;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f2f3f7;
  --text-dim: #9aa0b0;
  --accent: #ffffff;
  --accent-2: #c7ccd6;
  --accent-3: #9aa0b0;
  --gradient: linear-gradient(
    120deg,
    #ffffff 0%,
    #8b919e 45%,
    #ffffff 100%
  );
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-en: "Space Grotesk", var(--font-jp);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.accent {
  color: var(--accent-3);
}

.gradient-text {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============ ローディング ============ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-en);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: loader-pulse 1.2s ease-in-out infinite;
}

@keyframes loader-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.97);
  }
}

/* ============ カーソルグロー ============ */

.cursor-glow {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 65%
  );
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  opacity: 0;
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }
}

/* ============ ヘッダー ============ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, box-shadow 0.4s ease,
    backdrop-filter 0.4s ease;
}

.header.is-scrolled {
  background: rgba(7, 8, 12, 0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 7px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* ============ ボタン ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 999px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  will-change: transform;
}

.btn svg {
  transition: transform 0.3s var(--ease-out);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn-primary {
  background: #fff;
  color: #0a0b10;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-small {
  padding: 9px 22px;
  font-size: 13px;
  background: #fff;
  color: #0a0b10;
}

.btn-small:hover {
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 44px;
  font-size: 17px;
}

/* ============ ヒーロー ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  top: -10%;
  left: -10%;
  opacity: 0.5;
  animation: float-1 14s ease-in-out infinite;
}

.orb-2 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(199, 204, 214, 0.18), transparent 70%);
  bottom: -15%;
  right: -5%;
  opacity: 0.5;
  animation: float-2 18s ease-in-out infinite;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  top: 40%;
  left: 55%;
  opacity: 0.35;
  animation: float-3 16s ease-in-out infinite;
}

@keyframes float-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(80px, 60px) scale(1.1);
  }
}

@keyframes float-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-90px, -50px) scale(1.15);
  }
}

@keyframes float-3 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(-60px, 40px);
  }
  66% {
    transform: translate(40px, -60px);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 30%,
    transparent 75%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 140px 24px 100px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--accent-2);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(34px, 6.4vw, 76px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.line-wrap {
  display: block;
  overflow: hidden;
}

.line {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
}

.is-loaded .line {
  animation: line-in 0.9s var(--ease-out) forwards;
}

.is-loaded .hero-eyebrow .line {
  animation-delay: 0.1s;
}

.is-loaded .hero-title .line-wrap:nth-child(1) .line {
  animation-delay: 0.25s;
}

.is-loaded .hero-title .line-wrap:nth-child(2) .line {
  animation-delay: 0.37s;
}

.is-loaded .hero-title .line-wrap:nth-child(3) .line {
  animation-delay: 0.49s;
}

.is-loaded .hero-title .line-wrap:nth-child(4) .line {
  animation-delay: 0.61s;
}

@keyframes line-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero-sub {
  margin-top: 28px;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  opacity: 0;
}

.is-loaded .hero-sub {
  animation: fade-up 0.9s var(--ease-out) 0.85s forwards;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  opacity: 0;
}

.is-loaded .hero-actions {
  animation: fade-up 0.9s var(--ease-out) 1s forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  opacity: 0;
}

.is-loaded .scroll-indicator {
  animation: fade-up 1s ease 1.4s forwards;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  animation: scroll-drop 2s var(--ease-out) infinite;
}

@keyframes scroll-drop {
  0% {
    top: -100%;
  }
  60%,
  100% {
    top: 100%;
  }
}

/* ============ マーキー ============ */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--bg-alt);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-en);
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ============ セクション共通 ============ */

.section {
  padding: 120px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient);
}

.section-lead {
  color: var(--text-dim);
  max-width: 640px;
}

/* スクロールリビール */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 事業紹介カード ============ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.45s ease,
    box-shadow 0.45s ease, opacity 0.9s var(--ease-out);
  will-change: transform;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.card-img {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.card:hover .card-img img {
  transform: scale(1.07);
}

.card-body {
  padding: 28px;
  position: relative;
}

.card-num {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent-2);
}

.card-body h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 8px 0 12px;
}

.card-body p {
  font-size: 14.5px;
  color: var(--text-dim);
}

/* ============ お客様の声 ============ */

.voices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 56px;
}

.voice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.45s var(--ease-out), border-color 0.45s ease,
    opacity 0.9s var(--ease-out);
}

.voice:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.35);
}

.voice-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.voice-head img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.voice-head h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
}

.voice > p {
  font-size: 14.5px;
  color: var(--text-dim);
}

/* ============ 会社概要 ============ */

.company-table {
  margin-top: 56px;
  max-width: 760px;
}

.company-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--border);
}

.company-row:first-child {
  border-top: 1px solid var(--border);
}

.company-row dt {
  font-weight: 700;
  color: var(--text-dim);
}

.company-row dd {
  font-weight: 500;
}

/* ============ CTA ============ */

.cta {
  padding: 140px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 120%,
    rgba(255, 255, 255, 0.1),
    transparent 60%
  );
}

.cta-title {
  font-family: var(--font-en);
  font-size: clamp(44px, 9vw, 110px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.cta p {
  margin: 24px auto 40px;
  color: var(--text-dim);
  max-width: 560px;
}

/* ============ フッター ============ */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.copyright {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ============ 下層ページ ============ */

.page-main {
  position: relative;
  padding: 170px 24px 110px;
  min-height: 80svh;
  overflow: hidden;
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.page-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.page-title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient);
}

.page-lead {
  color: var(--text-dim);
  font-size: 15px;
}

/* ============ フォーム ============ */

.form {
  margin-top: 56px;
}

.field {
  margin-bottom: 32px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.field-req {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0a0b10;
  background: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.6;
}

.field-input,
.field-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 20px;
  font-family: var(--font-jp);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease,
    background 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: rgba(154, 160, 176, 0.5);
}

.field-input:focus,
.field-textarea:focus {
  outline: 0;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.field-textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.9;
}

/* 選択チップ（ラジオ） */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.chip span {
  display: inline-block;
  padding: 11px 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.chip:hover span {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.chip input:checked + span {
  background: #fff;
  border-color: #fff;
  color: #0a0b10;
  font-weight: 700;
}

.chip input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.form-submit {
  margin-top: 48px;
  text-align: center;
}

.form-submit .btn {
  min-width: 280px;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-jp);
}

/* ============ サンクスページ ============ */

.thanks {
  text-align: center;
  padding-top: 40px;
}

.thanks-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thanks-icon svg {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: check-draw 0.8s var(--ease-out) 0.6s forwards;
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.thanks-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.thanks-text {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 48px;
}

/* ============ レスポンシブ ============ */

@media (max-width: 768px) {
  .nav {
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 12, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 80px 0;
  }

  .company-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============ モーション軽減 ============ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .line,
  .hero-sub,
  .hero-actions,
  .scroll-indicator,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
