@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=JetBrains+Mono:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap');

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.skip-link {
    position: fixed;
    left: -9999px;
    top: 1rem;
    z-index: 100000;
    padding: 0.65rem 1rem;
    background-color: #0A0A0A;
    color: #F2F2F2;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-radius: 2px;
    border: 1px solid rgba(209, 209, 209, 0.5);
}

.skip-link:focus {
    left: 1rem;
    outline: 2px solid #0035CC;
    outline-offset: 2px;
}

/* スナップコンテナ */
.snap-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 10;
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* ヘッダーとフッターの裏に隠れないための余白 */
    padding-top: 100px;
    padding-bottom: 80px;
}

/* スマホ: 下部固定のセクションナビ＋フッター分の余白（本文と重ならないように） */
@media (max-width: 767px) {
    .snap-section {
        padding-bottom: max(9rem, calc(env(safe-area-inset-bottom, 0px) + 7.5rem));
    }
}

/* iPhone SE 等の低い画面: 下部ナビの占有面積を減らして重なりを回避 */
@media (max-width: 767px) and (max-height: 700px) {
    .snap-section {
        padding-bottom: max(8.5rem, calc(env(safe-area-inset-bottom, 0px) + 7rem));
    }

    .nav-panel {
        display: none !important;
    }
}

body {
    background-color: #F2F2F2;
    color: #0A0A0A;
    height: 100%;
}

/* 背景グリッド */
.blueprint-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(#D1D1D1 1px, transparent 1px),
        linear-gradient(90deg, #D1D1D1 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    animation: fadeInGrid 1.5s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

/* ヘッダー／フッターは背景・ヒーロー描画の後に遅れて表示 */
:root {
    --ui-reveal-duration: 0.8s;
    --ui-reveal-delay: 1.1s;
    --ui-arrow-extra-delay: 0.1s;
}

.ui-late-reveal {
    opacity: 0;
    animation: revealUi var(--ui-reveal-duration) cubic-bezier(0.16, 1, 0.3, 1) var(--ui-reveal-delay) forwards;
}

.ui-late-reveal-top {
    transform: translateY(-10px);
}

.ui-late-reveal-bottom {
    transform: translateY(10px);
}

/* 美しい半透明パネル（グラスモーフィズム） */
.glass-panel {
    background-color: rgba(255, 255, 255, 0.55);
    /* 透過度アップ */
    backdrop-filter: blur(12px);
    /* ぼかし効果 */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(209, 209, 209, 0.8);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* カスタムスクロールバー */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(209, 209, 209, 0.8);
    border-radius: 4px;
}

/* UI（ドットと矢印） */
.dot {
    width: 6px;
    height: 6px;
    background-color: #D1D1D1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background-color: #0035CC;
    transform: scale(2) rotate(45deg);
}

.nav-arrow {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    cursor: pointer;
}

.nav-arrow svg {
    animation: bounceDown 2s infinite;
}

.nav-arrow.is-up {
    transform: rotate(180deg);
}

.nav-arrow.is-up svg {
    animation: none;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes revealText {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes revealUi {
    from {
        opacity: 0;
        transform: translateY(var(--ui-shift, 0));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ui-late-reveal-top {
    --ui-shift: -10px;
}

.ui-late-reveal-bottom {
    --ui-shift: 10px;
}

/* レイアウト用 transform を持つ要素向け: 位置は変えず opacity のみ */
.ui-late-reveal-fade {
    opacity: 0;
    animation: revealOpacity var(--ui-reveal-duration) cubic-bezier(0.16, 1, 0.3, 1) var(--ui-reveal-delay) forwards;
}

.ui-late-reveal-arrow {
    opacity: 0;
    animation: revealOpacity var(--ui-reveal-duration) cubic-bezier(0.16, 1, 0.3, 1) calc(var(--ui-reveal-delay) + var(--ui-arrow-extra-delay)) forwards;
}

@keyframes revealOpacity {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounceDown {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.animate-reveal {
    opacity: 0;
    animation: revealText 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* コンテンツ配置：UIと被らない幅設定 */
.content-container {
    width: 100%;
    max-width: 900px;
    margin: auto;
    /* my-auto により垂直中央寄せ */
    padding: 0 2rem;
}

@media (min-width: 1024px) {
    .content-container {
        padding-right: 6rem;
        /* 右UIを避ける */
    }
}

.text-outline {
    -webkit-text-stroke: 1px #0A0A0A;
    color: transparent;
}

.form-input {
    border: 1px solid rgba(209, 209, 209, 0.8);
    border-left: 4px solid #D1D1D1;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.form-input:focus {
    border-left-width: 8px;
    border-left-color: #FACC15;
    border-color: #0A0A0A;
    background-color: #FFFFFF;
}

.btn-submit {
    background-color: rgba(10, 10, 10, 0.05);
    border: 1px solid #D1D1D1;
    border-left: 4px solid #FACC15;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit:hover {
    background-color: rgba(10, 10, 10, 0.1);
    border-left-width: 12px;
    color: #0035CC;
}

#privacyModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#privacyModal.active {
    display: flex;
}

/* 端末別の初期表示テンポ調整 */
@media (max-width: 767px) {
    :root {
        --ui-reveal-duration: 0.55s;
        --ui-reveal-delay: 0.8s;
        --ui-arrow-extra-delay: 0.08s;
    }
}

@media (min-width: 1024px) {
    :root {
        --ui-reveal-duration: 0.95s;
        --ui-reveal-delay: 1.45s;
        --ui-arrow-extra-delay: 0.16s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-late-reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .ui-late-reveal-fade {
        animation: none;
        opacity: 1;
    }

    .ui-late-reveal-arrow {
        animation: none;
        opacity: 1;
    }
}
