/* ============================================================
   KS Editorial Theme — 『白い調書』 v2 (2026.06)
   設計思想：グラデ・ガラス・影を捨て、罫線・余白・等幅数字で組む。
   ヒーロー（夜）→ 本文（白い調書）→ フッター（夜）。
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --paper: #fbfbfd;
    --paper-soft: #f4f5f8;
    --ink: #16191f;
    --ink-2: #4b5363;
    --ink-3: #8a93a5;
    --line: #e4e7ed;
    --line-dark: #cdd3dd;
    --blue: #0a4ea0;
    --blue-light: #4d9fff;
    --night: #04070f;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
    --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
    --maxw: 1040px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-jp);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.9;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.015em;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* 旧装飾レイヤーは引退 */
.cursor-dot, .global-wave-bg, .global-noise { display: none !important; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================================
   Header
   ============================================================ */
.kg-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(251, 251, 253, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.kg-header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kg-office-name {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.header-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue);
    display: inline-block;
}
.kg-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}
.kg-nav-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--ink-2);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}
.kg-nav-link:hover { color: var(--ink); }
.kg-nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: var(--ink);
    transition: width 0.3s ease;
}
.kg-nav-link:hover::after { width: 100%; }
.kg-nav-contact {
    border: 1px solid var(--ink);
    padding: 7px 18px;
    color: var(--ink);
    transition: background 0.3s ease, color 0.3s ease;
}
.kg-nav-contact::after { display: none; }
.kg-nav-contact:hover {
    background: var(--ink);
    color: var(--paper);
}
.nav-dot { display: none; }

/* ============================================================
   Hero — 夜（ブランドムービー）
   ============================================================ */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-cinema {
    height: 94vh;
    min-height: 560px;
    background: var(--night);
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 58%, rgba(4,7,15,0) 0%, rgba(4,7,15,0.38) 78%, rgba(4,7,15,0.66) 100%),
        linear-gradient(to bottom, rgba(4,7,15,0.30) 0%, rgba(4,7,15,0.04) 38%, rgba(4,7,15,0) 60%, rgba(4,7,15,0.50) 100%);
    pointer-events: none;
}
.hero-cinema .container { position: relative; z-index: 2; }
.hero-content { text-align: center; }

@keyframes hero-reveal {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-title {
    font-size: clamp(34px, 5.2vw, 60px);
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #f4f7fc;
    text-shadow: 0 2px 40px rgba(2,6,14,0.55), 0 0 80px rgba(77,159,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    animation: hero-reveal 1.1s cubic-bezier(0.16,1,0.3,1) 0.25s forwards;
}
.youth-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--blue-light);
    display: inline-block;
    box-shadow: 0 0 16px rgba(77,159,255,0.7);
}
.hero-sub {
    margin-top: 30px;
    font-size: clamp(14px, 1.6vw, 17px);
    font-weight: 300;
    line-height: 2.3;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    color: #c9d6ea;
    text-shadow: 0 1px 24px rgba(2,6,14,0.6);
    opacity: 0;
    animation: hero-reveal 1.1s cubic-bezier(0.16,1,0.3,1) 0.55s forwards;
}
.hero-concept {
    margin-top: 38px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    text-transform: uppercase;
    color: #8fb4e8;
    text-shadow: 0 1px 20px rgba(2,6,14,0.6);
    opacity: 0;
    animation: hero-reveal 1.1s cubic-bezier(0.16,1,0.3,1) 0.85s forwards;
}
.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 2;
    width: 1px;
    height: 56px;
    overflow: hidden;
    opacity: 0;
    animation: hero-reveal 1.2s ease 1.6s forwards;
}
.hero-scroll-cue span {
    position: absolute;
    left: 0; top: -100%;
    width: 1px; height: 100%;
    background: linear-gradient(to bottom, rgba(244,247,252,0) 0%, rgba(244,247,252,0.85) 50%, rgba(244,247,252,0) 100%);
    animation: scroll-cue-drop 2.6s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes scroll-cue-drop {
    0% { top: -100%; }
    60% { top: 100%; }
    100% { top: 100%; }
}

/* ============================================================
   Sections — 白い調書
   ============================================================ */
body { counter-reset: sec; }
.section {
    padding: 120px 0;
    border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.section-title {
    counter-increment: sec;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--ink-3);
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ink);
    margin-bottom: 64px;
}
.section-title::before {
    content: "0" counter(sec);
    font-size: 13px;
    color: var(--ink);
    letter-spacing: 0.1em;
}

/* 旧ガラスパネルの脱装飾 */
.glass-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
}

/* ---------- Mission ---------- */
.mission .section-content p {
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 300;
    line-height: 2.3;
    letter-spacing: 0.04em;
    max-width: 760px;
}
.mission-target {
    margin-top: 36px;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--ink-2);
    padding-left: 18px;
    border-left: 2px solid var(--blue);
    line-height: 2 !important;
}

/* ---------- Services ---------- */
.services-grid {
    display: flex;
    flex-direction: column;
}
.service-card {
    display: grid;
    grid-template-columns: 56px 240px 1fr;
    gap: 28px;
    align-items: center;
    padding: 38px 0;
    border-top: 1px solid var(--line);
}
.service-card:last-of-type { border-bottom: 1px solid var(--line); }
.service-icon {
    width: 40px; height: 40px;
    color: var(--blue);
    opacity: 0.85;
}
.service-icon svg { width: 100%; height: 100%; }
.service-name {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.6;
}
.service-process-flow {
    display: flex;
    align-items: stretch;
    gap: 14px;
}
.process-step {
    flex: 1;
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.8;
}
.process-step p { font-size: 13px; }
.step-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.step-before {
    border: 1px dashed var(--line-dark);
    color: var(--ink-2);
}
.step-before .step-label { color: var(--ink-3); }
.step-after {
    border: 1px solid var(--blue);
    color: var(--ink);
}
.step-after .step-label { color: var(--blue); }
.step-after strong { color: var(--blue); font-weight: 500; }
.process-arrow {
    align-self: center;
    color: var(--ink-3);
    font-size: 14px;
}

/* ---------- よくあるご相談 ---------- */
.consultation-wrapper { margin-top: 96px; }
.consultation-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 36px;
}
.consultation-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.consultation-card {
    padding: 30px 28px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.consultation-problem {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 14px;
}
.consultation-problem::before {
    content: "Q.";
    font-family: var(--font-mono);
    color: var(--blue);
    margin-right: 8px;
}
.consultation-solution { padding-left: 26px; }
.solution-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.26em;
    color: var(--blue);
    margin-bottom: 6px;
}
.consultation-solution p {
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.9;
}

/* ---------- Profile ---------- */
.profile .section-content {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 48px;
    align-items: start;
}
.profile-image-container { grid-row: 1 / span 3; }
.profile-img {
    width: 168px;
    height: 168px;
    object-fit: cover;
    filter: grayscale(18%);
    border: 1px solid var(--line);
}
.profile-name {
    font-size: 21px;
    font-weight: 500;
    letter-spacing: 0.05em;
}
.profile-title {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ink-2);
    margin-top: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.profile-list { margin-top: 20px; }
.profile-list li {
    position: relative;
    padding: 9px 0 9px 22px;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.8;
}
.profile-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 19px;
    width: 10px; height: 1px;
    background: var(--blue);
}

/* ---------- Message ---------- */
.message .section-content {
    max-width: 720px;
}
.message .section-content p {
    font-size: clamp(16px, 1.9vw, 19px);
    font-weight: 300;
    line-height: 2.4;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}
.message .section-content p:last-child { margin-bottom: 0; }

/* ---------- News ---------- */
.news-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 28px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
    padding-top: 2px;
}
.news-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.news-summary {
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--ink-2);
}

/* ---------- Contact ---------- */
.contact { text-align: left; }
.contact-intro {
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 400;
    line-height: 2.1;
}
.contact-intro strong { font-weight: 500; }
.contact-tool-note {
    display: block;
    font-size: 13px;
    font-weight: 300;
    color: var(--ink-2);
    margin-top: 6px;
}
.contact-email-lead {
    margin-top: 34px;
    font-size: 14px;
    color: var(--ink-2);
}
.contact-email-pill {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    background: var(--night);
    color: #f4f7fc;
    padding: 18px 30px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    user-select: none;
}
.contact-email-pill:hover { background: #101a2e; }
.contact-email-pill:active { transform: scale(0.99); }
.email-main {
    font-family: var(--font-mono);
    font-size: clamp(15px, 2.2vw, 19px);
    letter-spacing: 0.04em;
}
.email-sub {
    font-size: 11px;
    color: #8fb4e8;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.copy-result {
    margin-top: 12px;
    font-size: 12px;
    color: var(--blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.copy-result.show { opacity: 1; }

/* 文面例システム */
.contact-draft-system {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    padding-top: 44px;
}
.contact-draft-label {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.draft-note-small {
    display: block;
    font-size: 12px;
    font-weight: 300;
    color: var(--ink-3);
    margin-top: 4px;
}
.draft-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.draft-btn {
    font-family: var(--font-jp);
    font-size: 12.5px;
    letter-spacing: 0.04em;
    padding: 9px 18px;
    background: transparent;
    border: 1px solid var(--line-dark);
    color: var(--ink-2);
    transition: all 0.25s ease;
}
.draft-btn:hover { border-color: var(--ink); color: var(--ink); }
.draft-btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}
.draft-display-box {
    margin-top: 22px;
    border: 1px solid var(--line);
    background: #fff;
}
.draft-subject-row {
    display: flex;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}
.draft-body-row { padding: 18px 22px; }
.draft-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ink-3);
    flex-shrink: 0;
}
.draft-content {
    font-size: 13.5px;
    line-height: 2;
    color: var(--ink);
    white-space: pre-wrap;
}
#copy-draft-btn {
    margin: 0 22px 20px;
    font-size: 12.5px;
    letter-spacing: 0.06em;
    padding: 10px 22px;
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    transition: all 0.25s ease;
}
#copy-draft-btn:hover { background: var(--ink); color: var(--paper); }
.draft-copy-msg {
    font-size: 12px;
    color: var(--blue);
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.draft-copy-msg.show { opacity: 1; }
.contact-note {
    margin-top: 44px;
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 2.1;
}
.contact-privacy {
    font-size: 12px;
    color: var(--ink-3);
}

/* ============================================================
   Footer — 夜に還る
   ============================================================ */
.footer {
    background: var(--night);
    color: #c9d6ea;
    padding: 88px 0 56px;
}
.footer-ks {
    font-family: var(--font-mono);
    font-weight: 200;
    font-size: 30px;
    letter-spacing: 0.55em;
    color: #f4f7fc;
    margin-bottom: 10px;
}
.footer-ks-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #5c7090;
    margin-bottom: 56px;
}
.footer-ks-sub .fcheck { color: var(--blue-light); margin-left: 8px; }
.office-info h3 {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #8fa3c4;
    margin-bottom: 16px;
}
.office-info p {
    font-size: 13px;
    line-height: 2.1;
    color: #9fb0cc;
}
.copyright {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(143, 163, 196, 0.18);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #5c7090;
}

/* ---------- 戻るボタン ---------- */
.floating-back-btn {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 90;
    width: 44px; height: 44px;
    background: var(--paper);
    border: 1px solid var(--line-dark);
    color: var(--ink-2);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.92;
}
.floating-back-btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

/* ============================================================
   Scroll Animation（JS: .is-visible 付与）
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.section-title {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.section-title.is-visible,
.section-visible .section-title {
    opacity: 1;
    transform: translateY(0);
}
.stagger-text span { opacity: 1; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .service-card {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
        gap: 14px 20px;
        padding: 30px 0;
    }
    .service-process-flow {
        grid-column: 1 / -1;
        flex-direction: column;
        gap: 8px;
    }
    .process-arrow { transform: rotate(90deg); align-self: center; }
    .consultation-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .kg-header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 20px 10px;
        gap: 8px;
    }
    .kg-nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .kg-nav-link { font-size: 11px; }
    .kg-nav-contact { padding: 5px 12px; }
    .hero-cinema { height: 88vh; min-height: 480px; }
    .section { padding: 84px 0; }
    .section-title { margin-bottom: 44px; }
    .profile .section-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .profile-img { width: 128px; height: 128px; }
    .news-item { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
    .contact-email-pill {
        width: 100%;
        justify-content: space-between;
        padding: 16px 20px;
    }
    .consultation-card { padding: 24px 20px; }
    .footer { padding: 64px 0 44px; }
}

/* ---------- アクセシビリティ ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
    .hero-cinema { background: var(--night) url('../video/hero_poster.jpg') center / cover no-repeat; }
    .hero-scroll-cue span { animation: none; top: 0; }
    .fade-up, .section-title { opacity: 1; transform: none; transition: none; }
    .hero-title, .hero-sub, .hero-concept { animation: none; opacity: 1; }
}
