/*
Theme Name:  FAMILLION
Theme URI:   https://famillion.jp
Author:      FAMILLION
Description: FAMILLIONオフィシャルテーマ。AI × テクノロジー × クリエイティブ。
Version:     1.1.0
Text Domain: famillion
Tags:        dark, gold, ai, business, japanese
*/

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    --color-bg:           #000000;
    --color-bg-alt:       #0a0a0a;
    --color-bg-mid:       #0d0d0d;
    --color-card:         #111111;
    --color-text:         #ffffff;
    --color-text-muted:   #a0a0a0;
    --color-accent:       #d4af37;
    --color-accent-light: #e8c84a;
    --color-border:       rgba(212,175,55,0.15);
    --container-width:    1100px;
    --header-h:           96px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============================================================
   Utility
   ============================================================ */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 20px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: padding .3s ease, background .3s ease;
    display: flex;
    align-items: center;
    min-height: var(--header-h);
}

.site-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
}

/* Logo */
.site-logo { 
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    margin-left: 14px;
    transform: translateY(-2px);
}

.site-logo__img {
    display: block;
    height: 70px;
    width: auto;
    max-width: none;
    object-fit: contain;
    transition: opacity .3s;
}
.site-logo__img:hover { opacity: .8; }

.site-logo .custom-logo-link img {
    height: 70px; width: auto; max-width: none;
    object-fit: contain; display: block;
    transform: translateY(-6px);
}

.site-logo__text {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--color-text);
    transition: opacity .3s;
}
.site-logo__text:hover { opacity: .8; }

.header-cta:hover {
    background: var(--color-accent);
    color: #000;
}

/* Navigation */
.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    display: flex;
    gap: 22px;
    align-items: center;
}

.main-navigation a {
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--color-text);
    transition: color .3s;
}
.main-navigation a:hover { color: var(--color-accent); }

/* CTA button */
.header-cta {
    display: inline-block;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 9px 22px;
    font-size: 13px;
    border-radius: 4px;
    letter-spacing: .05em;
    transition: all .3s;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
}
.menu-toggle__bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   Hero Section (Front Page)
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 20px 80px;
    overflow: hidden;
    background: transparent; /* neural canvas が透けて見えるように */
}

/* Video background */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%,-50%);
    object-fit: cover;
    opacity: var(--hero-video-opacity, 0.30);
    pointer-events: none;
}
.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.15) 50%, rgba(0,0,0,.5) 100%);
}

/* Static image fallback */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .25;
    z-index: 2;
}

/* Particles — neural canvas の上に重ねる */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* VHS scanline */
.vhs-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen;
    opacity: .7;
}
.vhs-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,.02) 0px,
        rgba(255,255,255,.02) 1px,
        transparent 1px,
        transparent 3px
    );
}
.vhs-line {
    position: absolute;
    left: 0; right: 0;
    height: 70px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(212,175,55,.03) 30%,
        rgba(255,255,255,.07) 50%,
        rgba(212,175,55,.03) 70%,
        transparent 100%
    );
    animation: vhs-scroll 9s linear infinite;
    pointer-events: none;
    opacity: .7;
}
.vhs-line:nth-child(2) { animation-delay: -3s; animation-duration: 12s; height: 35px; opacity: .45; }
.vhs-line:nth-child(3) { animation-delay: -6s; animation-duration: 15s; height: 110px; opacity: .3; }
@keyframes vhs-scroll { from { transform: translateY(-100%); } to { transform: translateY(100vh); } }

/* Hero content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.hero-tag {
    display: inline-block;
    color: var(--color-accent);
    font-size: 20px;
    letter-spacing: .3em;
    margin-bottom: 28px;
    padding: 0 28px;
    position: relative;
}
.hero-tag::before, .hero-tag::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
}
.hero-tag::before { left: 0; }
.hero-tag::after  { right: 0; }

.hero-title {
    display: flex;
    flex-direction: column;   /* 縦並び */
    align-items: center;
    justify-content: center;
    gap: 6px;                 /* prefix とタイプライターの間隔 */
    margin-bottom: 28px;
    line-height: 1.2;
}

/* 上段：「AIと一緒に」— 固定テキスト */
.hero-prefix {
    font-size: clamp(22px, 3vw, 40px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.80);
    letter-spacing: .12em;
    line-height: 1.6;
    /* 位置が安定するよう最小幅を固定 */
    display: block;
    white-space: nowrap;
}

/* ×は使わない */
.hero-cross { display: none; }

/* 下段：タイプライターテキスト行 */
.typed-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 高さを固定してレイアウトシフトを防ぐ */
    height: clamp(64px, 8vw, 96px);
    line-height: 1;
    overflow: hidden;
}

.typed-text {
    font-size: clamp(42px, 7.5vw, 92px);
    font-weight: 700;
    color: #ffe9a8;
    text-shadow: 0 0 20px rgba(255,233,168,.45), 0 0 40px rgba(212,175,55,.2);
    letter-spacing: -.01em;
    display: inline-block;
    /* 幅が変わってもセンタリングを維持 */
    text-align: center;
}

.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 3.5em;
    background: var(--color-accent);
    margin-left: 4px;
    border-radius: 1px;
    animation: blink .7s step-end infinite;
    vertical-align: middle;
    flex-shrink: 0;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-description {
    font-size: 14px;
    color: rgba(255,255,255,.7);
    line-height: 1.9;
    margin-bottom: 10px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-hello {
    font-size: 14px;
    color: var(--color-text-muted);
    letter-spacing: .15em;
    font-style: italic;
    margin-bottom: 36px;
}

.hero-buttons { display: flex; justify-content: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 14px;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    transition: all .3s;
    letter-spacing: .05em;
}
.btn-primary {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    background: transparent;
}
.btn-primary:hover {
    background: var(--color-accent);
    color: #000;
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: .35em;
    color: rgba(255,255,255,.3);
    z-index: 10;
    animation: scroll-fade 2s ease-in-out infinite alternate;
}
@keyframes scroll-fade { from { opacity: .3; } to { opacity: .7; } }

/* ============================================================
   Shared Inner Section Styles
   ============================================================ */
.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

.inner-section  { padding: 90px 40px; }
.inner-container { max-width: var(--container-width); margin: 0 auto; }

.inner-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    letter-spacing: .3em;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.inner-section-label::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}

.section-heading-center {
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 56px;
    color: var(--color-text);
}

.img-placeholder {
    background: linear-gradient(135deg, #1c1c1c 0%, #282828 100%);
    border: 1px solid rgba(212,175,55,.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(212,175,55,.15);
    font-size: 10px;
    letter-spacing: .2em;
}
.img-placeholder::after { content: 'IMAGE'; }

/* ============================================================
   Homepage — Service Section
   ============================================================ */
.fam-services-section {
    background: rgba(0, 0, 0, 0.88);
    padding: 90px 40px;
    border-top: 1px solid var(--color-border);
}

.fam-services-header { margin-bottom: 44px; }

.fam-services-subheading {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 700;
    color: var(--color-text);
}

.fam-services-list { display: flex; flex-direction: column; }

.fam-service-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    border-bottom: 1px solid var(--color-border);
    transition: background .3s;
}
.fam-service-row:first-child { border-top: 1px solid var(--color-border); }
.fam-service-row:hover { background: rgba(212,175,55,.025); }

.fam-service-row__image {
    width: 100%; height: 180px;
    object-fit: cover;
}
.fam-service-row__image--placeholder {
    width: 100%; height: 180px;
}

.fam-service-row__body {
    padding: 48px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.fam-service-row__name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text);
}
.fam-service-row__desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.85;
    margin-bottom: 24px;
}
.fam-service-row__link {
    font-size: 12px;
    color: var(--color-accent);
    letter-spacing: .12em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fam-service-row__link::after { content: '→'; }

/* ============================================================
   Homepage — Member Section
   ============================================================ */
.fam-member-section {
    padding: 90px 40px;
    border-top: 1px solid var(--color-border);
}

.fam-member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 44px;
}

.fam-member-card {
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(212,175,55,.1);
    border-radius: 6px;
    overflow: hidden;
    transition: transform .3s, border-color .3s;
    text-align: center;
}
.fam-member-card:hover { transform: translateY(-4px); border-color: rgba(212,175,55,.35); }

.fam-member-card__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top; }
.fam-member-card__photo--placeholder { width: 100%; height: 240px; }

.fam-member-card__body { padding: 22px 18px 26px; }
.fam-member-card__name { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.fam-member-card__bio  { font-size: 12px; color: var(--color-text-muted); line-height: 1.8; }

/* ============================================================
   Homepage — News Section
   ============================================================ */
.fam-news-section {
    padding: 90px 40px;
    background: rgba(0, 0, 0, 0.88);
    border-top: 1px solid var(--color-border);
}

.fam-news-list { margin-top: 36px; display: flex; flex-direction: column; }

.fam-news-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    transition: background .3s;
    margin-bottom: 24px;
}
.fam-news-item:first-child { border-top: 1px solid var(--color-border); }
.fam-news-item:hover { background: rgba(212,175,55,.025); }

.fam-news-item__image { width: 100%; height: 100px; object-fit: cover; }
.fam-news-item__image--placeholder { width: 100%; height: 100px; }

.fam-news-item__body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.fam-news-item__date  { font-size: 11px; color: var(--color-text-muted); letter-spacing: .08em; margin-bottom: 6px; }
.fam-news-item__title { font-size: 15px; color: var(--color-text); line-height: 1.5; }

/* ============================================================
   Homepage — Contact CTA Marquee
   ============================================================ */
.fam-contact-cta {
    padding: 70px 0;
    border-top: 1px solid rgba(212,175,55,.15);
    overflow: hidden;
}

.fam-contact-cta__track {
    display: flex;
    gap: 40px;
    width: max-content;
    white-space: nowrap;
    animation: marquee-scroll 70s linear infinite;
    will-change: transform;
}

.fam-contact-cta__item {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 0 0 auto;
    text-decoration: none;
}

.fam-contact-cta__text {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: -.02em;
    white-space: nowrap;
}

.fam-contact-cta__arrow {
    width: 52px;
    height: 52px;
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .3s;
    overflow: hidden;
    background: rgba(212,175,55,.04);
}

.fam-contact-cta__arrow img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    transition: transform .3s ease;
}

.fam-contact-cta__item:hover .fam-contact-cta__arrow {
    background: var(--color-accent);
}

.fam-contact-cta__item:hover .fam-contact-cta__arrow img {
    transform: scale(1.08);
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 20px));
    }
}
/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: rgba(0, 0, 0, 0.92);
    border-top: 1px solid var(--color-border);
    padding: 36px 40px;
}
.site-footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-left { display: flex; flex-direction: column; gap: 12px; }

.footer-logo a {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--color-text);
}
.footer-logo img {
    height: 42px;
    width: auto;
    display: block;
    margin-bottom: -2px;
    object-fit: contain;
}

.footer-social { 
    display: flex; 
    gap: 10px; 
    margin-top: 12px;
}

.footer-social-link {
    width: 34px; height: 34px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all .3s;
}
.footer-social-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}
.footer-social-link svg { width: 14px; height: 14px; fill: currentColor; }

.footer-copyright {
    font-size: 11px;
    opacity: .55;
    display: flex;
    align-items: flex-end;
    color: var(--color-text-muted);
    letter-spacing: .08em;
}

/* ============================================================
   Neural Network Canvas — 全ページ・スクロール時も固定表示
   ============================================================ */
#neural-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;          /* 最背面に固定 */
    display: block;
}

/* body は透明に：neural canvas が黒背景を自前で描画する */
body {
    background: #000; /* neural canvas が読み込まれる前のフラッシュ防止 */
}

/* コンテンツはすべてキャンバスの上 */
.site-header { position: relative; z-index: 1000; }
/* site-main/footer に z-index を付けない → neural canvas が半透明背景から透けて見える */
.site-main   { position: relative; }
.site-footer { position: relative; }

/* ============================================================
   Inner Page — Page Hero
   ============================================================ */
.page-hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    padding: 140px 40px 56px;
    overflow: hidden;
    background: rgba(0,0,0,0.72);
    isolation: isolate;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent) 0%, transparent 65%);
    z-index: 2;
}

.page-hero--ai    { background: rgba(5, 5, 18, 0.80); }
.page-hero--video { background: rgba(5, 12, 5, 0.80); }
.page-hero--hp    { background: rgba(12, 5, 5, 0.80); }

.page-hero-content { position: relative; z-index: 5; max-width: var(--container-width); width: 100%; margin: 0 auto; }
.page-hero-title   { font-size: clamp(40px, 6vw, 68px); font-weight: 700; color: var(--color-text); margin-bottom: 10px; line-height: 1.1; }
.page-hero-subtitle { font-size: 13px; color: var(--color-text-muted); letter-spacing: .2em; }

/* ============================================================
   Inner Page — Section Helpers
   ============================================================ */
.bg-dark   { background: rgba(0,   0,   0,   0.86); }
.bg-mid    { background: rgba(11,  11,  11,  0.88); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.bg-card   { background: rgba(17,  17,  17,  0.90); }
.bg-accent { background: rgba(8,   8,   0,   0.88); border-top: 1px solid rgba(212,175,55,.12); }

/* ============================================================
   About Page
   ============================================================ */
.about-intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-intro__name { font-size: clamp(32px, 4.5vw, 52px); font-weight: 700; margin-bottom: 18px; color: var(--color-text); }
.about-intro__tagline { font-size: 15px; color: var(--color-text-muted); line-height: 2; }
.about-intro__image { width: 100%; height: 400px; object-fit: cover; border-radius: 6px; }
.about-intro__image--placeholder { width: 100%; height: 400px; border-radius: 6px; }

.mvv-section__heading { font-size: clamp(26px, 4vw, 44px); font-weight: 700; line-height: 1.35; margin-bottom: 56px; color: var(--color-text); }
.mvv-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: start; }
.mvv-card { padding: 28px; background: var(--color-card); border: 1px solid rgba(212,175,55,.1); border-radius: 6px; transition: border-color .3s; }
.mvv-card:hover { border-color: rgba(212,175,55,.4); }
.mvv-card--center { margin-top: 28px; }
.mvv-card__image { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; margin-bottom: 18px; }
.mvv-card__image--placeholder { width: 100%; height: 150px; border-radius: 4px; margin-bottom: 18px; }
.mvv-card__label { font-size: 10px; font-weight: 700; color: var(--color-accent); letter-spacing: .3em; margin-bottom: 10px; text-transform: uppercase; }
.mvv-card__text  { font-size: 13px; color: var(--color-text-muted); line-height: 1.9; }

.spirit-section { text-align: center; }
.spirit-section__heading { font-size: clamp(20px, 2.8vw, 34px); font-weight: 700; margin-bottom: 20px; color: var(--color-text); }
.spirit-section__text { font-size: 15px; color: var(--color-text-muted); line-height: 2; margin-bottom: 48px; max-width: 680px; margin-left: auto; margin-right: auto; }
.spirit-section__image { width: 100%; max-height: 460px; object-fit: cover; border-radius: 6px; }
.spirit-section__image--placeholder { width: 100%; height: 320px; border-radius: 6px; }

.overview-heading { font-size: clamp(20px, 2.5vw, 32px); font-weight: 700; text-align: center; margin-bottom: 40px; color: var(--color-text); }
.overview-table { width: 100%; border-collapse: collapse; }
.overview-table th, .overview-table td { padding: 20px 0; border-bottom: 1px solid var(--color-border); text-align: left; font-size: 14px; }
.overview-table th { width: 180px; color: var(--color-text-muted); font-weight: 400; }
.overview-table td { color: var(--color-text); font-weight: 500; }

.message-section__grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 64px; align-items: start; }
.message-section__image { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.message-section__image--placeholder { width: 100%; aspect-ratio: 3/4; border-radius: 6px; }
.message-section__tag  { display: block; font-size: 10px; letter-spacing: .35em; color: var(--color-text-muted); margin-bottom: 10px; }
.message-section__label { font-size: clamp(24px, 3.5vw, 40px); font-weight: 700; margin-bottom: 30px; color: var(--color-text); }
.message-section__text { font-size: 14px; color: var(--color-text-muted); line-height: 2.1; margin-bottom: 30px; white-space: pre-line; }
.message-section__name { font-size: 14px; color: var(--color-text); font-weight: 500; padding-top: 20px; border-top: 1px solid var(--color-border); }

/* ============================================================
   Service Pages — Shared
   ============================================================ */
.service-lead__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.service-lead__grid--reverse .service-lead__text        { order: 1; }
.service-lead__grid--reverse .service-lead__image-wrap  { order: -1; }
.service-lead__heading { font-size: clamp(22px, 3.2vw, 38px); font-weight: 700; line-height: 1.4; margin-bottom: 24px; color: var(--color-text); }
.service-lead__body    { font-size: 14px; color: var(--color-text-muted); line-height: 1.95; margin-bottom: 16px; }
.service-lead__image   { width: 100%; height: 370px; object-fit: cover; border-radius: 6px; }
.service-lead__image--placeholder { width: 100%; height: 370px; border-radius: 6px; }

.ai-works__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ai-works__heading { font-size: clamp(18px, 2.4vw, 28px); font-weight: 700; margin-bottom: 18px; color: var(--color-text); }
.ai-works__intro { font-size: 14px; color: var(--color-text-muted); margin-bottom: 20px; line-height: 1.85; }
.ai-works__list { margin-bottom: 20px; }
.ai-works__list li { font-size: 13px; color: var(--color-text-muted); padding: 8px 0 8px 18px; border-bottom: 1px solid rgba(212,175,55,.07); position: relative; }
.ai-works__list li::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 1px; background: var(--color-accent); }
.ai-works__note { font-size: 13px; color: var(--color-text-muted); line-height: 1.8; }
.ai-works__image { width: 100%; height: 370px; object-fit: cover; border-radius: 6px; }
.ai-works__image--placeholder { width: 100%; height: 370px; border-radius: 6px; background: linear-gradient(135deg,#0a0a20,#111133) !important; border: none !important; }

.chosen-grid { display: flex; flex-direction: column; }
.chosen-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 240px; overflow: hidden; border-bottom: 1px solid var(--color-border); }
.chosen-card:first-child { border-top: 1px solid var(--color-border); }
.chosen-card--reverse .chosen-card__image { order: 2; }
.chosen-card--reverse .chosen-card__body  { order: 1; }
.chosen-card__image { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.chosen-card__image--placeholder { width: 100%; min-height: 240px; background: linear-gradient(135deg,#111,#1a1a1a) !important; border: none !important; }
.chosen-card__body { display: flex; flex-direction: column; justify-content: center; padding: 44px; background: #0b0b0b; }
.chosen-card__num  { font-size: 10px; font-weight: 700; color: var(--color-accent); letter-spacing: .3em; margin-bottom: 14px; display: block; }
.chosen-card__text { font-size: clamp(15px, 1.8vw, 21px); font-weight: 700; color: var(--color-text); line-height: 1.5; }

.purpose-section { text-align: center; padding: 96px 40px; background: #000; }
.purpose-section__text { font-size: clamp(18px, 2.5vw, 30px); font-weight: 700; color: var(--color-text); line-height: 2; }

.video-section { padding-bottom: 96px; }
.video-section__inner { max-width: 780px; }
.video-section__embed { position: relative; aspect-ratio: 16/9; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.video-section__embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-section__placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--color-text-muted); }
.video-section__play { font-size: 48px; color: var(--color-accent); }
.video-section__caption { text-align: center; font-size: 12px; color: var(--color-text-muted); letter-spacing: .12em; }

.achievements-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 40px; }
.achievements-section__heading { font-size: clamp(20px, 2.8vw, 34px); font-weight: 700; color: var(--color-text); }
.achievements-section__sub { font-size: 12px; color: var(--color-text-muted); letter-spacing: .18em; }
.achievements-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.achievements-item { background: var(--color-card); border: 1px solid rgba(212,175,55,.1); border-radius: 6px; overflow: hidden; transition: border-color .3s; }
.achievements-item:hover { border-color: rgba(212,175,55,.35); }
.achievements-item__image { width: 100%; height: 200px; object-fit: cover; display: block; }
.achievements-item__image--placeholder { width: 100%; height: 200px; background: linear-gradient(135deg,#1a1a1a,#222) !important; border: none !important; }
.achievements-item__caption { padding: 12px 14px; font-size: 12px; color: var(--color-text-muted); line-height: 1.65; }
.achievements-item__link { display: block; position: relative; cursor: pointer; text-decoration: none; z-index: 10; }
.achievements-item__link img { display: block; }
.achievements-item__link::before,
.achievements-item__link::after { pointer-events: none; }
.achievements-item__link * { pointer-events: none; }

/* ============================================================
   Contact Page
   ============================================================ */
.contact-page-header {
  padding: 160px 40px 64px;
  background: rgba(0,0,0,0.86);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.contact-page-header__inner {
  max-width: 680px;
  margin: 0 auto;
}

.contact-page-header__tag {
  display: block;
  font-size: 10px;
  letter-spacing: .4em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.contact-page-header__title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--color-text);
}

.contact-page-header__intro {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.9;
}

.contact-form-section {
  background: rgba(11,11,11,0.88);
}

.contact-form-wrap {
  max-width: 720px;
}

/* =========================
   Form Layout
========================= */

.fam-contact-form {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.fam-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ラベルと必須・任意タグを横並びで揃える */
.fam-label-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px;
  margin-bottom: 10px;
}

.fam-label-row .fam-form-label {
  margin: 0;
  line-height: 1;
}

.fam-label-row .fam-required,
.fam-label-row .fam-optional {
  margin: 0;
  line-height: 1;
}

/* 必須・任意タグ */
.fam-required,
.fam-optional {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.fam-required {
  background: #c0392b;
  color: #fff;
}

.fam-optional {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid rgba(255,255,255,.18);
}

/* =========================
   Input
========================= */

.fam-form-control,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-card);
  border: 1px solid rgba(212,175,55,.18);
  color: var(--color-text);
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .3s, background .3s;
}

.fam-form-control:focus,
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #161616;
}

.fam-form-control::placeholder,
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: rgba(160,160,160,.45);
}

textarea.fam-form-control,
.wpcf7 textarea {
  resize: vertical;
  min-height: 150px;
}

/* =========================
   Radio / Checkbox 横並び
========================= */

.fam-radio-group,
.fam-checkbox-group,
.wpcf7-form-control.wpcf7-radio,
.wpcf7-form-control.wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 8px 0;
}

.fam-radio-label,
.fam-checkbox-label,
.wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
}

.wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.fam-radio-label input,
.fam-checkbox-label input,
.wpcf7 input[type="radio"],
.wpcf7 input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================
   File
========================= */

.fam-file-wrap {
  position: relative;
}

.fam-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.fam-file-label {
  display: block;
  background: var(--color-card);
  border: 1px dashed rgba(212,175,55,.22);
  color: var(--color-text-muted);
  padding: 15px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .3s;
}

.fam-file-label:hover {
  border-color: var(--color-accent);
}

.wpcf7 input[type="file"] {
  color: var(--color-text);
}

/* =========================
   Privacy
========================= */

.fam-privacy-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fam-privacy-link {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   Button
========================= */

.fam-submit-btn,
.wpcf7-submit {
  width: 100%;
  background: var(--color-accent);
  color: #000;
  border: none;
  padding: 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: .1em;
  transition: all .3s;
}

.fam-submit-btn:hover,
.wpcf7-submit:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
}

/* =========================
   Error / Message
========================= */

.wpcf7-not-valid-tip {
  color: #ff4d4d;
  font-size: 13px;
  margin-top: 8px;
}

.wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 16px !important;
  border: 1px solid var(--color-accent) !important;
  color: var(--color-text) !important;
}

/* =========================
   SP
========================= */

@media (max-width: 768px) {
  .contact-page-header {
    padding: 120px 24px 56px;
  }

  .fam-form-label {
    font-size: 13px;
  }

  .fam-required,
  .fam-optional {
    height: 17px;
    font-size: 10px;
  }

  .wpcf7-form-control.wpcf7-radio,
  .wpcf7-form-control.wpcf7-checkbox {
    gap: 12px 18px;
  }
}

/* ============================================================
   Responsive — Mobile First
   ============================================================ */
@media (max-width: 768px) {

    /* Header */
    .site-header { padding: 14px 18px !important; }
    .header-cta  { display: none; }
    .menu-toggle { display: flex; }

    .main-navigation {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,.97);
        z-index: 999;
        padding: 80px 32px 40px;
        overflow-y: auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .main-navigation.is-open { display: flex; }
    .main-navigation ul { flex-direction: column; gap: 0; align-items: center; width: 100%; }
    .main-navigation li { width: 100%; text-align: center; border-bottom: 1px solid rgba(212,175,55,.1); }
    .main-navigation li:first-child { border-top: 1px solid rgba(212,175,55,.1); }
    .main-navigation a { display: block; padding: 20px; font-size: 18px; letter-spacing: .12em; }
    body.menu-open { overflow: hidden; }

    /* Hero */
    .hero { padding: 120px 20px 60px; min-height: 100svh; }
    .hero-title   { gap: 4px; margin-bottom: 20px; }
    .hero-prefix  { font-size: clamp(22px, 3vw, 40px); }
    .typed-line   { min-height: clamp(44px, 10vw, 64px); }
    .typed-text   { font-size: clamp(32px, 9vw, 52px); }
    .hero-tag   { font-size: 10px; letter-spacing: .18em; margin-bottom: 18px; }
    .hero-description { font-size: 13px; }
    .hero-hello { font-size: 12px; }

    /* Homepage sections */
    .fam-services-section, .fam-member-section,
    .fam-news-section     { padding: 56px 20px; }
    .fam-service-row      { grid-template-columns: 1fr; }
    .fam-service-row__image, .fam-service-row__image--placeholder { height: 200px; }
    .fam-service-row__body { padding: 22px 20px; }
    .fam-member-grid  { grid-template-columns: 1fr; gap: 16px; }
    .fam-news-item    { grid-template-columns: 100px 1fr; }
    .fam-news-item__image { height: 74px; }
    .fam-contact-cta  { padding: 56px 0; }
    .fam-contact-cta__text  { font-size: clamp(26px, 8vw, 44px); }
    .fam-contact-cta__arrow { width: 40px; height: 40px; font-size: 14px; }

    /* Inner pages */
    .inner-section { padding: 52px 20px; }
    .page-hero { padding: 110px 20px 42px; min-height: 200px; }
    .page-hero-title { font-size: clamp(30px, 9vw, 44px); }

    /* About */
    .about-intro__grid, .mvv-grid, .message-section__grid { grid-template-columns: 1fr; gap: 28px; }
    .about-intro__image, .about-intro__image--placeholder { height: 240px; }
    .mvv-card--center { margin-top: 0; }
    .mvv-card { padding: 20px; }
    .overview-table th { width: 110px; font-size: 12px; }

    /* Service pages */
    .service-lead__grid, .service-lead__grid--reverse, .ai-works__grid { grid-template-columns: 1fr; gap: 28px; }
    .service-lead__grid--reverse .service-lead__text,
    .service-lead__grid--reverse .service-lead__image-wrap { order: unset; }
    .service-lead__image, .service-lead__image--placeholder { height: 240px; }
    .chosen-card { grid-template-columns: 1fr; min-height: auto; }
    .chosen-card--reverse .chosen-card__image,
    .chosen-card--reverse .chosen-card__body { order: unset; }
    .chosen-card__image, .chosen-card__image--placeholder { min-height: 180px; height: 180px; }
    .chosen-card__body { padding: 24px 20px; }
    .achievements-grid { grid-template-columns: 1fr; }
    .purpose-section { padding: 64px 20px; }

    /* Contact */
    .contact-page-header { padding: 120px 20px 44px; }
    .contact-form-wrap   { max-width: 100%; }

    /* Footer */
    .site-footer { padding: 28px 20px; }
    .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 420px) {
    .hero-prefix  { font-size: 20px; }
    .typed-text   { font-size: clamp(26px, 9vw, 36px); }
    .fam-news-item { grid-template-columns: 1fr; }
    .fam-news-item__image { height: 130px; }
    .mvv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Member Card — 役職
   ============================================================ */
.fam-member-card__role {
    font-size: 11px;
    color: var(--color-accent);
    letter-spacing: .15em;
    margin-bottom: 6px;
    font-weight: 500;
}

.fam-member-card__name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

/* ============================================================
   WordPress 管理バー対応
   管理バー表示時にヘッダーが押し下げられる問題を修正
   ============================================================ */
.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}
/* ========================================
   Header Fixed
======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);

  transition:
    background .3s ease,
    border-color .3s ease,
    transform .3s ease;
}

/* スクロール時 */
.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(212,175,55,.12);
}

/* ヘッダー分コンテンツを下げる */
body {
  padding-top: 90px;
}

@media (max-width: 768px) {

  .header-cta {
    display: none;
  }

}