:root {
    --home-ink: #233247;
    --home-muted: #61728b;
    --home-panel: rgba(255, 255, 255, 0.9);
    --home-line: rgba(35, 50, 71, 0.12);
    --home-blue: #dceeff;
    --home-pink: #f7e4f4;
    --home-green: #e6f6ee;
    --home-navy: #1f2f47;
    --home-night: #131b2d;
}

.home-page {
    background: #fff;
}

.opening-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(18, 27, 45, 0.34), rgba(18, 27, 45, 0.16)),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.42), rgba(240, 244, 255, 0.16)),
        url("/assets/img/loading/loading-back.webp") center / cover no-repeat;
}

.home-opening-enabled .opening-overlay {
    display: grid;
}

.opening-overlay::before,
.opening-overlay::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(76, 111, 255, 0.12);
    pointer-events: none;
}

.opening-overlay::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -90px;
}

.opening-overlay::after {
    width: 260px;
    height: 260px;
    bottom: -60px;
    left: -40px;
    border-color: rgba(107, 45, 61, 0.12);
}

.opening-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    transform: translateY(8px);
    opacity: 0;
    animation: openingRise 0.9s ease forwards;
}

.opening-loader {
    display: block;
    width: min(220px, 52vw);
    margin: 0 auto 1rem;
    filter:
        drop-shadow(0 0 18px rgba(143, 231, 255, 0.22))
        drop-shadow(0 16px 38px rgba(18, 27, 45, 0.18));
}

.opening-logo {
    font-family: "Zen Kaku Gothic New", "Shippori Gothic B1", "Noto Sans JP", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #f8fafc;
    text-shadow: 0 10px 28px rgba(18, 27, 45, 0.26);
}

.opening-logo span {
    font-family: "Inter", sans-serif;
    color: #8fe7ff;
    margin-left: 0.25em;
    letter-spacing: 0.16em;
}

.opening-line {
    width: 180px;
    height: 2px;
    margin: 18px auto 0;
    background: linear-gradient(90deg, transparent, #8fe7ff, #57ccff, transparent);
    background-size: 200% 100%;
    box-shadow: 0 0 16px rgba(87, 204, 255, 0.24);
    animation: lineFlow 1.2s ease-in-out infinite;
}

.opening-overlay.is-exiting {
    animation: openingFadeOut 0.8s ease forwards;
}

.home-opening-enabled #hero-section {
    opacity: 0;
    transform: translateY(14px);
}

#hero-section.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.home-hero {
    position: relative;
    min-height: calc(100vh - var(--navbar-height, 64px));
    padding: 0;
    background: linear-gradient(135deg, #e7d7ef 0%, #f8e9df 100%);
}

.home-hero .hero-bg-image {
    opacity: 0.98;
    background-position: 66% center;
    background-size: cover;
    filter: saturate(1.03) contrast(1.02);
}

.home-hero-wash {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(19, 27, 45, 0.34) 0%, rgba(19, 27, 45, 0.12) 34%, rgba(19, 27, 45, 0) 66%),
        radial-gradient(circle at left bottom, rgba(255, 226, 171, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(19, 27, 45, 0.06));
}

.home-hero .container {
    z-index: 4;
}

.home-hero-panel {
    position: relative;
    max-width: 560px;
    margin: 2rem 0;
    padding: 2.4rem 2.25rem 2.3rem;
    border-radius: 30px;
    color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.12);
    overflow: hidden;
    animation: homeHeroPanelIn 0.85s ease-out both;
}

.home-opening-enabled .home-hero-panel {
    animation: none;
}

.home-opening-enabled #hero-section.is-visible .home-hero-panel {
    animation: homeHeroPanelIn 0.8s ease 0.08s both;
}

.home-hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.home-hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -10% -25% auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 135, 25, 0.08) 0%, rgba(200, 135, 25, 0) 68%);
    pointer-events: none;
}

.home-hero-logo,
.home-hero-kicker,
.hero-title-main,
.home-hero-lead,
.home-actions {
    position: relative;
    z-index: 1;
}

.home-hero-logo {
    display: block;
    width: min(290px, 76%);
    margin-bottom: 1.35rem;
}

.home-hero-kicker {
    margin-bottom: 0.9rem;
    font-family: "Inter", sans-serif;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: none;
}

.section-kicker {
    margin-bottom: 0.9rem;
    color: #556b88;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-title-main {
    margin-bottom: 1rem;
    font-family: "Zen Kaku Gothic New", "Shippori Gothic B1", "Noto Sans JP", sans-serif;
    font-size: clamp(2.7rem, 4.35vw, 4.75rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.045em;
    color: #1f2937;
    text-shadow: none;
}

.home-hero-lead,
.hero-description {
    max-width: 34rem;
    margin-bottom: 0;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.8;
    color: #374151;
    text-shadow: none;
}

.word-research {
    color: #4f6bd8;
    font-weight: 700;
}

.word-implementation {
    color: #b7791f;
    font-weight: 700;
}

.word-wall {
    color: #6b2d3d;
    font-weight: 700;
}

.hero-title-tail {
    color: inherit;
}

.typing-cursor {
    display: inline-block;
    width: 0.18em;
    height: 0.94em;
    margin-left: 0.12em;
    vertical-align: -0.08em;
    border-radius: 999px;
    background: linear-gradient(180deg, #8fe7ff 0%, #57ccff 48%, #2ea8ff 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.52),
        0 0 16px rgba(68, 190, 255, 0.42),
        0 0 28px rgba(68, 190, 255, 0.16);
    opacity: 0;
    transform: translateY(-0.03em);
}

.typing-cursor.is-typing {
    opacity: 1;
}

.typing-cursor.is-active {
    opacity: 1;
    animation: blinkCursor 0.9s steps(1) infinite;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.home-actions .btn-modern,
.home-actions .btn-outline-light {
    min-width: 220px;
    padding: 0.95rem 1.6rem;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 999px;
}

.home-hero .btn-modern,
.home-contact-cta .btn-modern,
.home-character .btn-modern {
    background: linear-gradient(135deg, #4a66ff, #36c6ff);
    border: none;
    color: #fff;
}

.btn-primary-hero {
    background: linear-gradient(135deg, #4c6fff, #3b82f6) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(76, 111, 255, 0.24) !important;
}

.btn-primary-hero:hover {
    box-shadow: 0 12px 26px rgba(76, 111, 255, 0.3) !important;
}

.home-hero .btn-outline-light,
.home-character .btn-outline-light {
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-secondary-hero {
    background: rgba(255, 255, 255, 0.58) !important;
    color: #1f2937 !important;
    border: 1px solid rgba(148, 163, 184, 0.45) !important;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary-hero:hover {
    background: rgba(255, 255, 255, 0.74) !important;
    color: #111827 !important;
    border-color: rgba(100, 116, 139, 0.55) !important;
    box-shadow: 0 12px 22px rgba(31, 41, 55, 0.12) !important;
}

.home-hero .btn-outline-light:not(.btn-secondary-hero):hover,
.home-character .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
}

.home-section {
    padding: 88px 0;
}

.home-summary {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
    border-top: 1px solid rgba(35, 50, 71, 0.06);
}

.home-summary-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
    gap: 1.25rem;
    align-items: stretch;
}

.home-proof-card,
.home-signal-card,
.home-domain-card,
.home-link-card,
.home-implementation-box {
    border-radius: 26px;
    border: 1px solid var(--home-line);
    background: var(--home-panel);
    box-shadow: 0 22px 55px rgba(36, 50, 71, 0.08);
}

.home-proof-card {
    padding: 2rem;
}

.home-proof-main {
    background:
        radial-gradient(circle at top right, rgba(74, 102, 255, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
}

.proof-label,
.link-type {
    display: inline-flex;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.74rem;
    border-radius: 999px;
    background: rgba(68, 90, 120, 0.1);
    color: #445a78;
    font-size: 0.8rem;
    font-weight: 700;
}

.home-proof-card h2,
.home-section-heading h2,
.home-domain-card h3,
.home-link-card h3,
.home-implementation-box h3,
.home-character-copy h2,
.home-signal-card strong {
    color: var(--home-ink);
}

.home-proof-card h2 {
    margin-bottom: 0.85rem;
    font-size: 1.72rem;
    line-height: 1.35;
}

.home-proof-text,
.home-signal-card p,
.home-domain-card p,
.home-link-card p,
.home-implementation-box p,
.home-section-heading p,
.home-character-copy p {
    margin-bottom: 0;
    color: var(--home-muted);
    line-height: 1.85;
}

.home-proof-list {
    margin: 1.2rem 0 0;
    padding-left: 1.2rem;
    color: var(--home-muted);
}

.home-proof-list li + li {
    margin-top: 0.6rem;
}

.home-signal-grid {
    display: grid;
    gap: 1rem;
}

.home-signal-card {
    padding: 1.4rem 1.5rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.92));
}

.home-signal-card strong {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
}

.home-section-heading {
    max-width: 760px;
    margin-bottom: 2.25rem;
}

.home-section-heading h2 {
    margin-bottom: 0.9rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.home-domain {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.home-domain-grid,
.home-evidence-grid {
    display: grid;
    gap: 1.25rem;
}

.home-domain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-domain-card {
    padding: 1.9rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
}

.domain-index {
    display: inline-flex;
    margin-bottom: 1rem;
    color: #7891b5;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.home-evidence {
    background: linear-gradient(180deg, #fffaf4 0%, #ffffff 100%);
}

.home-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.home-link-card {
    display: block;
    padding: 1.8rem;
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 58px rgba(36, 50, 71, 0.14);
    color: inherit;
}

.home-link-card:nth-child(1) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92));
}

.home-link-card:nth-child(2) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 241, 255, 0.92));
}

.home-link-card:nth-child(3) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 255, 246, 0.92));
}

.home-link-card:nth-child(4) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 238, 0.94));
}

.home-implementation-box {
    padding: 2rem;
    background: linear-gradient(135deg, #243247 0%, #324a6a 100%);
}

.home-implementation-box h3,
.home-implementation-box p,
.home-implementation-box li {
    color: #fff;
}

.home-implementation-box ul {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
}

.home-character {
    background: linear-gradient(135deg, #20324a 0%, #314868 100%);
}

.home-character-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 2rem;
    align-items: center;
}

.home-character-copy .section-kicker,
.home-character-copy h2,
.home-character-copy p {
    color: #fff;
}

.home-character-visual {
    text-align: center;
}

.home-character-visual img {
    max-width: 320px;
    width: 100%;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.22));
}

.floating-akatsuki {
    animation: homeFloat 3.6s ease-in-out infinite;
}

.home-contact-cta {
    background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
}

.home-contact-cta .section-kicker,
.home-contact-cta h2,
.home-contact-cta p {
    color: var(--home-ink);
}

.home-contact-cta .home-section-heading {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.home-contact-cta .btn-modern {
    min-width: 280px;
}

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

@keyframes openingRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes openingFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes lineFlow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -20% 0;
    }
}

@keyframes homeFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes blinkCursor {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 991.98px) {
    .home-hero .hero-bg-image {
        background-position: 72% center;
    }

    .home-hero-wash {
        background:
            linear-gradient(180deg, rgba(19, 27, 45, 0.3) 0%, rgba(19, 27, 45, 0.16) 42%, rgba(19, 27, 45, 0.12) 100%),
            radial-gradient(circle at left bottom, rgba(255, 226, 171, 0.08), transparent 42%);
    }

    .home-summary-layout,
    .home-domain-grid,
    .home-evidence-grid,
    .home-character-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-panel {
        max-width: 620px;
        margin: 3rem auto;
    }

    .home-character-copy,
    .home-contact-cta .home-actions {
        text-align: center;
    }

    .home-actions {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opening-overlay,
    .opening-inner,
    .opening-line,
    #hero-section,
    .home-hero-panel,
    .typing-cursor {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 767.98px) {
    .home-hero .hero-bg-image {
        background-position: 74% center;
        opacity: 0.95;
    }

    .home-hero-panel {
        padding: 1.8rem 1.3rem 1.9rem;
        border-radius: 24px;
    }

    .home-hero-logo {
        width: min(240px, 78%);
    }

    .home-actions .btn-modern,
    .home-actions .btn-outline-light {
        width: 100%;
        min-width: 0;
    }

    .home-proof-card,
    .home-signal-card,
    .home-domain-card,
    .home-link-card,
    .home-implementation-box {
        padding: 1.5rem;
    }

    .home-character-visual img {
        max-width: 240px;
    }
}
