/* ============================================================
   メイセイH&D コーポレートサイト  styles.css
   AI / FDE らしい先進的ダーク基調テーマ
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-soft: #0f1424;
  --bg-card: #131a2e;
  --bg-card-2: #161e36;
  --border: #233052;
  --border-soft: #1b2440;

  --text: #e8edf7;
  --text-soft: #aab4cc;
  --text-mute: #6f7c9b;

  --cyan: #22d3ee;
  --indigo: #6366f1;
  --violet: #a78bfa;

  --grad: linear-gradient(100deg, #22d3ee 0%, #6366f1 55%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.16), rgba(99,102,241,.16));

  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}

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

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

body {
  font-family: "Noto Sans JP", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- 背景 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; top: -260px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(34,211,238,.18), transparent 70%),
              radial-gradient(closest-side, rgba(99,102,241,.16), transparent 70%);
  background-position: 30% 30%, 70% 40%;
  background-repeat: no-repeat;
  filter: blur(8px);
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10,14,26,.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; letter-spacing: .08em;
  font-size: 1.02rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: .68rem; color: var(--text-mute); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: .9rem; color: var(--text-soft); transition: color .2s; position: relative; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width .25s var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--text); }
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: 9px 18px; border-radius: 999px; color: #051018; font-weight: 700;
  background: var(--grad); font-size: .86rem;
  box-shadow: 0 8px 20px -8px rgba(34,211,238,.5);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(34,211,238,.6); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */
.hero { padding: 168px 0 110px; position: relative; }
.hero-inner { max-width: 920px; }
.eyebrow {
  display: inline-block; font-family: "Space Grotesk", sans-serif; letter-spacing: .22em;
  text-transform: uppercase; font-size: .78rem; color: var(--cyan);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--grad-soft); margin-bottom: 26px;
}
.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 900; line-height: 1.22;
  letter-spacing: -.01em; margin-bottom: 28px;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--text-soft); max-width: 720px; }
.hero-lead strong { color: var(--text); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary { background: var(--grad); color: #051018; box-shadow: 0 14px 30px -12px rgba(34,211,238,.55); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -12px rgba(34,211,238,.7); }
.btn-ghost { background: rgba(255,255,255,.03); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--cyan); background: rgba(34,211,238,.08); }
.btn-block { width: 100%; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 64px; }
.stat {
  padding: 22px; border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
}
.stat-num {
  display: block; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.32rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.stat-label { font-size: .84rem; color: var(--text-mute); }

/* ---------- セクション共通 ---------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border-soft); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.kicker {
  font-family: "Space Grotesk", sans-serif; letter-spacing: .2em; text-transform: uppercase;
  font-size: .76rem; color: var(--cyan); display: block; margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
.section-sub { margin-top: 18px; color: var(--text-soft); font-size: 1.02rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.about-lead p { color: var(--text-soft); margin-bottom: 20px; font-size: 1.05rem; }
.about-lead strong { color: var(--cyan); font-weight: 700; }
.about-cards { list-style: none; display: grid; gap: 14px; }
.about-cards li {
  padding: 22px 24px; border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: var(--bg-card); transition: border-color .25s, transform .25s var(--ease);
}
.about-cards li:hover { border-color: var(--cyan); transform: translateX(4px); }
.about-cards h3 { font-size: 1.05rem; margin-bottom: 6px; }
.about-cards p { font-size: .92rem; color: var(--text-mute); }

/* ---------- 比較 (FDE) ---------- */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.compare-col { padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); }
.compare-old { background: var(--bg-card); }
.compare-new {
  background: linear-gradient(180deg, rgba(34,211,238,.07), rgba(99,102,241,.05));
  border-color: var(--border); box-shadow: var(--shadow);
}
.compare-tag {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.compare-old .compare-tag { background: rgba(255,255,255,.06); color: var(--text-mute); }
.compare-new .compare-tag { background: var(--grad); color: #051018; }
.compare-col ul { list-style: none; display: grid; gap: 12px; }
.compare-col li { position: relative; padding-left: 26px; font-size: .95rem; color: var(--text-soft); }
.compare-old li::before { content: "×"; position: absolute; left: 0; color: var(--text-mute); font-weight: 700; }
.compare-new li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
.compare-arrow { font-size: 2rem; color: var(--indigo); font-weight: 700; }

/* ---------- サービス ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.svc-card {
  padding: 34px 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
  background: var(--bg-card); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.svc-card:hover::before { opacity: 1; }
.svc-icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: var(--grad-soft); border: 1px solid var(--border); font-size: 1.5rem; color: var(--cyan);
  margin-bottom: 20px;
}
.svc-card h3 { font-size: 1.18rem; margin-bottom: 12px; }
.svc-card p { color: var(--text-soft); font-size: .96rem; margin-bottom: 18px; }
.svc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tags li {
  font-size: .76rem; color: var(--text-mute); padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,.02);
}

/* ---------- 進め方 ---------- */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: none; }
.flow-step {
  padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border-soft);
  background: var(--bg-card); position: relative;
}
.flow-no {
  font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 12px;
}
.flow-step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.flow-step p { font-size: .9rem; color: var(--text-mute); }

/* ---------- 会社概要 ---------- */
.company-wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: stretch; }
.company-table {
  width: 100%; border-collapse: collapse; border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-card);
}
.company-table th, .company-table td { text-align: left; padding: 18px 20px; vertical-align: top; font-size: .95rem; border-bottom: 1px solid var(--border-soft); }
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: 0; }
.company-table th { width: 34%; color: var(--text-mute); font-weight: 700; background: rgba(255,255,255,.015); }
.company-table td { color: var(--text-soft); }
.company-table a { color: var(--cyan); }
.tbd { color: var(--text-mute); font-size: .9rem; }
.company-map { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-height: 320px; }
.map-block { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-soft); min-height: 200px; }
.map-label { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--text); background: rgba(11,15,20,.78); border: 1px solid var(--border); backdrop-filter: blur(4px); }
.map-block iframe { width: 100%; height: 100%; min-height: 200px; border: 0; filter: grayscale(.3) contrast(1.05); }

/* ---------- お問い合わせ ---------- */
.section-contact { background: var(--bg-soft); border-top: 1px solid var(--border-soft); }
.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 36px; align-items: start; }
.contact-form {
  padding: 34px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); background: var(--bg-card);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .9rem; margin-bottom: 8px; font-weight: 500; }
.req { font-size: .68rem; color: var(--cyan); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; margin-left: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: .96rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.15);
}
.field textarea { resize: vertical; }
.error { color: #fb7185; font-size: .8rem; margin-top: 6px; min-height: 1em; }
.field.invalid input, .field.invalid textarea { border-color: #fb7185; }
.form-note { font-size: .78rem; color: var(--text-mute); margin-top: 14px; }
.form-success { margin-top: 16px; padding: 14px; border-radius: 12px; background: rgba(34,211,238,.1); border: 1px solid var(--border); color: var(--cyan); font-size: .92rem; }
.form-error { margin-top: 16px; padding: 14px; border-radius: 12px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: #fca5a5; font-size: .92rem; }

.contact-info {
  padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(34,211,238,.05), transparent);
}
.contact-info h3 { font-size: 1.1rem; margin-bottom: 18px; }
.contact-info dl { display: grid; gap: 6px; }
.contact-info dt { font-size: .78rem; color: var(--text-mute); letter-spacing: .04em; margin-top: 12px; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { color: var(--text-soft); font-size: .95rem; }
.contact-info a { color: var(--cyan); }
.tbd-link { color: var(--text-mute) !important; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg); padding-top: 56px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; }
.footer-brand .brand-name { font-size: 1.1rem; }
.footer-brand p { color: var(--text-mute); font-size: .9rem; margin-top: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px 28px; align-content: start; }
.footer-nav a { color: var(--text-soft); font-size: .9rem; transition: color .2s; }
.footer-nav a:hover { color: var(--cyan); }
.footer-bottom { padding: 22px 0; border-top: 1px solid var(--border-soft); }
.footer-bottom small { color: var(--text-mute); font-size: .82rem; }

/* ---------- スクロール演出 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 920px) {
  .about-grid, .company-wrap, .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
}

@media (max-width: 720px) {
  .nav, .nav-toggle { }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,14,26,.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft); padding: 8px 24px 20px;
    transform: translateY(-130%); transition: transform .35s var(--ease); pointer-events: none;
  }
  .nav.open { transform: translateY(0); pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 12px; border-bottom: 0 !important; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 130px; }
  .hero-stats { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 24px; }
}

@media (max-width: 460px) {
  .container { padding-inline: 18px; }
  .flow { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
