/*
Theme Name: Lightning Child (woiac)
Template: lightning
Version: 1.0.0
Description: woiac corporate site — D案「グリッドの上に、仕組みを置く」
*/

/* ========================================
   1. 定義書の値（CSS変数）
   ======================================== */
:root {
  --w-bg: #FFFFFF;
  --w-grid: #EEF1F5;
  --w-ink: #111318;
  --w-text: #374151;
  --w-muted: #6B7280;
  --w-line: #E5E7EB;
  --w-soft: #F7F8FA;
  --w-ghost: #F3F4F7;
  --w-mask: #DDE3EA;
  --w-accent: #1F8A5B;
  --w-font-jp: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
  --w-font-en: "Inter", system-ui, sans-serif;
  --w-gutter: 60px;
  --w-max: 1440px;
}
@media (max-width: 1024px) { :root { --w-gutter: 32px; } }
@media (max-width: 640px)  { :root { --w-gutter: 20px; } }

/* ========================================
   2. ベース・背景グリッド
   ======================================== */
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  color: var(--w-ink);
  font-family: var(--w-font-jp);
  background-color: var(--w-bg);
  background-image:
    linear-gradient(to right, var(--w-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--w-grid) 1px, transparent 1px);
  background-size: calc(100% / 8) calc(100vw / 8);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--w-ink); text-decoration: none; }
a:hover { color: var(--w-accent); }
img { max-width: 100%; height: auto; display: block; }

/* Lightning の既定要素を隠す（従来の追加CSSと同じ役割。2026-10-24、本番の実際のDOMで確認した正しいクラス名に修正） */
.site-header, .site-footer, .vk_slide, .page-header, #breadcrumb, .site-body-bottom, #vk-mobile-nav-menu-btn, #vk-mobile-nav { display: none !important; }
.site-body { padding: 0 !important; }
.entry-header, .entry-footer { display: none !important; }
.container, .site-body .container { max-width: none; padding: 0; }
.entry-body > p:empty { display: none; }
/* Lightning の見出し装飾（h2上の青線・下線、h3下線と::afterの短線）を本文内で打ち消す。
   :where() でLightningと同じ詳細度にし、後から読み込むことで勝つ。.w-h2--rule などのクラス指定はこれより強いので残る */
:where(.entry-body) :is(h2, h3, h4) { border-top: 0; border-bottom: 0; padding: 0; background: none; }
:where(.entry-body) :is(h2, h3, h4)::before,
:where(.entry-body) :is(h2, h3, h4)::after { content: none; display: none; }

/* ========================================
   3. レイアウト部品
   ======================================== */
.w-wrap { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--w-gutter); box-sizing: border-box; }
.w-section { position: relative; padding: 72px 0 0; }
@media (max-width: 640px) { .w-section { padding-top: 40px; } }

/* 背景の巨大社名 */
.w-ghost {
  position: absolute; left: -40px; top: 320px;
  font-family: var(--w-font-en); font-weight: 700; font-size: 420px; line-height: 1;
  letter-spacing: -0.04em; color: var(--w-ghost); white-space: nowrap;
  pointer-events: none; user-select: none; z-index: 0;
  will-change: transform;
}
@media (max-width: 640px) { .w-ghost { font-size: 150px; top: 250px; left: -10px; } }

/* ========================================
   4. ヘッダー
   ======================================== */
.w-header { position: relative; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; padding: 28px var(--w-gutter) 0; max-width: var(--w-max); margin: 0 auto; box-sizing: border-box; }
.w-brand { display: flex; flex-direction: column; gap: 6px; }
.w-brand img { width: 118px; height: 28px; object-fit: contain; }
.w-brand small { font-size: 11px; letter-spacing: 0.08em; color: var(--w-muted); }
.w-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 48px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.w-header-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
@media (max-width: 1024px) {
  .w-nav { display: none; }
  .w-header-actions { flex-direction: row; }
  .w-brand img { width: 92px; height: 22px; }
  .w-brand small { font-size: 10px; }
}

/* ピルボタン */
.w-pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 18px 0 14px; border-radius: 18px;
  background: var(--w-ink); color: #FFFFFF; font-size: 13px; font-weight: 700;
  border: 1px solid var(--w-ink); cursor: pointer; font-family: inherit; line-height: 1;
}
.w-pill::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 2px; background: var(--w-accent); }
.w-pill:hover { background: #000; color: #FFF; }
.w-pill:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
.w-pill--ghost { background: #FFFFFF; color: var(--w-ink); }
.w-pill--ghost::before { background: var(--w-ink); }
.w-pill--ghost:hover { background: var(--w-soft); color: var(--w-ink); }
.w-pill--lg { height: 52px; padding: 0 28px 0 20px; border-radius: 26px; font-size: 15px; }
.w-pill--lg::before { width: 5px; height: 5px; border-radius: 3px; }
@media (max-width: 640px) { .w-pill--lg { width: 100%; justify-content: center; } }

/* Menu（スマホ） */
.w-menu { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,0.98); display: none; flex-direction: column; padding: 28px var(--w-gutter); box-sizing: border-box; }
.w-menu[data-open="true"] { display: flex; }
.w-menu__close { align-self: flex-end; }
.w-menu__list { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.w-menu__list a { display: block; padding: 18px 0; font-size: 22px; font-weight: 700; letter-spacing: 0.08em; border-bottom: 1px solid var(--w-line); }

/* ========================================
   5. ヒーロー
   ======================================== */
.w-hero { position: relative; z-index: 1; padding: 40px var(--w-gutter) 36px; max-width: var(--w-max); margin: 0 auto; box-sizing: border-box; }
.w-mask {
  width: 920px; max-width: 100%; height: 420px; margin: 0 auto; border-radius: 999px; overflow: hidden;
  background: var(--w-mask); position: relative;
}
.w-mask img, .w-mask video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s ease; }
.w-mask.is-loaded img, .w-mask.is-loaded video { transform: scale(1); }
.w-mask__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 60px; font-size: 14px; color: var(--w-text); }
@media (max-width: 640px) { .w-mask { height: 200px; } }

.w-hero__title {
  margin: 44px 0 0; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  font-size: 44px; font-weight: 700; letter-spacing: 0.3em; line-height: 1.2; color: var(--w-ink);
}
.w-hero__lead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 28px; }
.w-hero__lead p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--w-text); max-width: 640px; }
.w-scroll { font-size: 12px; letter-spacing: 0.3em; color: var(--w-muted); white-space: nowrap; }
@media (max-width: 1024px) {
  .w-hero__title { font-size: 32px; letter-spacing: 0.2em; line-height: 1.5; display: block; }
}
@media (max-width: 640px) {
  .w-hero__title { font-size: 26px; letter-spacing: 0.18em; line-height: 1.6; margin-top: 24px; }
  .w-hero__lead { flex-direction: column; align-items: stretch; }
  .w-hero__lead p { font-size: 14px; }
  .w-scroll { display: none; }
  .w-hero__cta { margin-top: 20px; }
}

/* ========================================
   6. 見出し・カード
   ======================================== */
.w-label { font-family: var(--w-font-en); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--w-muted); }
.w-label--accent { color: var(--w-accent); letter-spacing: 0.12em; }
.w-h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.08em; line-height: 1.4; }
.w-h2--rule { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--w-ink); padding-bottom: 14px; }
.w-h2--rule small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--w-muted); }
@media (max-width: 640px) { .w-h2 { font-size: 22px; } .w-h2--rule small { font-size: 11px; } }

.w-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; }
.w-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.w-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.w-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 1024px) { .w-grid-4, .w-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .w-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .w-grid-4, .w-grid-5, .w-grid-3, .w-grid-2 { grid-template-columns: 1fr; gap: 10px; } }

.w-card { display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 32px; background: #FFFFFF; border: 1px solid var(--w-line); border-radius: 16px; min-height: 230px; box-sizing: border-box; }
.w-card h3 { margin: 0; font-size: 20px; font-weight: 700; }
.w-card p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--w-text); }
@media (max-width: 640px) { .w-card { padding: 18px 20px; min-height: 0; gap: 6px; } .w-card h3 { font-size: 16px; } .w-card p { font-size: 12px; } }

.w-cat { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: 12px; background: var(--w-soft); color: var(--w-ink); }
.w-cat:hover { color: var(--w-ink); background: #EEF1F5; }
.w-cat__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--w-soft); margin-bottom: 4px; }
.w-cat--dark .w-cat__img { background: #FFFFFF; }
.w-cat h3 { margin: 0; font-size: 17px; font-weight: 700; }
.w-cat p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--w-text); }
.w-cat--dark { background: var(--w-ink); color: #FFFFFF; }
.w-cat--dark:hover { background: #000; color: #FFFFFF; }
.w-cat--dark h3 { color: #FFFFFF; }
.w-cat--dark p { color: #C7CCD4; }
.w-cat--dark .w-label { color: var(--w-accent); }
@media (max-width: 640px) { .w-cat { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 16px; } .w-cat p, .w-cat__img { display: none; } .w-cat h3 { font-size: 15px; } }

/* 支援の流れ（円環の静止版） */
.w-cycle { position: relative; width: 520px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.w-cycle__ring { position: absolute; inset: 11.5%; border-radius: 50%; border: 2px dashed #D1D5DB; }
.w-cycle__core { position: absolute; inset: 29%; border-radius: 50%; background: #FFF; border: 1px solid var(--w-line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; font-weight: 700; font-size: 16px; line-height: 1.5; }
.w-cycle__step { position: absolute; width: 148px; height: 76px; box-sizing: border-box; border-radius: 8px; background: var(--w-ink); color: #FFF; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: 16px; }
.w-cycle__step small { font-family: var(--w-font-en); font-size: 11px; letter-spacing: 0.1em; color: #9FB3C8; font-weight: 500; }
.w-cycle__step--1 { left: 50%; top: 0; transform: translateX(-50%); }
.w-cycle__step--2 { right: 0; top: 50%; transform: translateY(-50%); }
.w-cycle__step--3 { left: 50%; bottom: 0; transform: translateX(-50%); }
.w-cycle__step--4 { left: 0; top: 50%; transform: translateY(-50%); background: var(--w-accent); }
.w-cycle__step--4 small { color: #DFF5E9; }
@media (max-width: 640px) {
  .w-cycle { width: auto; aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .w-cycle__ring { display: none; }
  .w-cycle__core { position: static; inset: auto; grid-column: 1 / -1; order: 5; border-radius: 12px; padding: 14px; font-size: 14px; }
  .w-cycle__step { position: static; transform: none; width: auto; height: 64px; }
}

/* 最終案内 */
.w-cta { margin: 72px 0 0; padding: 48px var(--w-gutter); background: var(--w-ink); color: #FFF; }
.w-cta__inner { max-width: var(--w-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.w-cta h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.08em; }
.w-cta p { margin: 8px 0 0; font-size: 14px; color: #C7CCD4; }
.w-cta .w-pill { background: #FFF; color: var(--w-ink); border-color: #FFF; }
.w-cta .w-pill:hover { background: var(--w-soft); }

/* フッター */
.w-footer { padding: 40px var(--w-gutter) 48px; max-width: var(--w-max); margin: 0 auto; box-sizing: border-box; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--w-muted); border-top: 1px solid var(--w-line); }
.w-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.w-footer nav a { color: var(--w-ink); }

/* ========================================
   7. 動き（JSが付けるクラス）
   ======================================== */
.w-reveal { opacity: 0; transform: translateY(16px); transition: opacity 400ms ease, transform 400ms ease; }
.w-reveal.is-in { opacity: 1; transform: none; }

/* カード・カテゴリカードは出現時にわずかに傾ける（perspectiveは親グリッドに） */
.w-grid-4, .w-grid-5, .w-grid-3, .w-grid-2 { perspective: 1000px; }
.w-reveal.w-card, .w-reveal.w-cat {
  transform: translateY(16px) rotateX(8deg);
  transition: opacity 400ms ease, transform 600ms ease;
}
.w-reveal.w-card.is-in, .w-reveal.w-cat.is-in { transform: none; }

/* リード文・メッセージ文：スクロールに応じて行ごとに --w-muted → --w-ink */
.w-lead-color { color: var(--w-ink); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .w-lead-color {
    --reveal: 100%;
    background-image: linear-gradient(to bottom, var(--w-ink) var(--reveal), var(--w-muted) var(--reveal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* マスク図版：スクロールで高さ・角丸・位置を補間（JSがtransform/border-radiusを設定） */
.w-mask { will-change: transform, border-radius; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .w-reveal, .w-reveal.w-card, .w-reveal.w-cat { opacity: 1; transform: none; transition: none; }
  .w-mask img, .w-mask video { transform: none; transition: none; }
  .w-mask { transform: none !important; border-radius: 999px !important; }
  .w-ghost { transform: none !important; }
  .w-lead-color {
    background-image: none !important; -webkit-background-clip: initial !important;
    background-clip: initial !important; color: var(--w-ink) !important;
  }
}

/* ========================================
   8. 事業紹介・会社紹介・お問い合わせ 専用パーツ
   ======================================== */
.w-intro { padding-top: 4px; } /* 左右は .w-wrap の余白を使う（shorthandで0に上書きしない） */
.w-intro p { margin: 18px 0 0; font-size: 15px; line-height: 1.9; color: var(--w-text); max-width: 640px; }

.w-service-block { padding: 56px 0; border-top: 1px solid var(--w-line); }
.w-service-block:first-of-type { border-top: none; }
.w-service-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.w-service-block__head h3 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: 0.04em; }
.w-service-block__sub { margin: 10px 0 28px; font-size: 14px; color: var(--w-text); line-height: 1.8; max-width: 720px; }
@media (max-width: 640px) { .w-service-block { padding: 36px 0; } .w-service-block__head h3 { font-size: 19px; } }

.w-note { margin: 40px 0 0; padding: 20px 24px; background: var(--w-soft); border-radius: 12px; font-size: 13px; line-height: 1.8; color: var(--w-text); }

.w-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.w-steps li { position: relative; padding: 32px 18px 20px; background: #FFF; border: 1px solid var(--w-line); border-radius: 14px; }
.w-steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: -14px; left: 18px; font-family: var(--w-font-en); font-size: 13px; font-weight: 700; color: #FFF; background: var(--w-ink); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.w-steps h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.w-steps p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--w-text); }
@media (max-width: 1024px) { .w-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .w-steps { grid-template-columns: 1fr; gap: 12px; } .w-steps li { padding: 28px 16px 16px; } }

.w-quote { margin: 0; padding: 24px 28px; border-left: 2px solid var(--w-accent); background: var(--w-soft); border-radius: 0 12px 12px 0; font-size: 14px; line-height: 1.9; color: var(--w-text); }

.w-info-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.w-info-table th, .w-info-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--w-line); font-size: 13px; line-height: 1.8; vertical-align: top; }
.w-info-table th { width: 140px; font-weight: 700; color: var(--w-muted); white-space: nowrap; }
.w-info-table td { color: var(--w-text); }
@media (max-width: 640px) { .w-info-table th { width: 96px; font-size: 12px; } }

.w-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.w-menu-grid li { padding: 16px 18px; background: var(--w-soft); border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--w-ink); }
@media (max-width: 1024px) { .w-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .w-menu-grid { grid-template-columns: 1fr; } }

.w-contact-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding: 32px; background: var(--w-ink); border-radius: 16px; color: #FFF; }
.w-contact-box p { margin: 6px 0 0; font-size: 13px; color: #C7CCD4; }
.w-contact-box .w-pill { background: #FFF; color: var(--w-ink); border-color: #FFF; }
.w-contact-box .w-pill:hover { background: var(--w-soft); }

.w-faq { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.w-faq details { padding: 18px 22px; background: #FFF; border: 1px solid var(--w-line); border-radius: 12px; }
.w-faq summary { cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.w-faq summary::-webkit-details-marker { display: none; }
.w-faq summary::after { content: "+"; color: var(--w-muted); font-weight: 400; }
.w-faq details[open] summary::after { content: "–"; }
.w-faq p { margin: 12px 0 0; font-size: 13px; line-height: 1.8; color: var(--w-text); }
