/* ==========================================================================
   NEXUS College — クリスマス期間限定デコレーション
   --------------------------------------------------------------------------
   ■ これは「飾りだけ」のCSSです。レイアウト・文章・リンク・ボタン位置は
     一切変更しません。
   ■ 外し方は README.md の「クリスマス装飾の外し方」を参照。
     ・各HTMLの <!-- Christmas start --> 〜 <!-- Christmas end --> を削除
     ・各HTMLの christmas.css を読み込んでいる <link> を削除
     ・このファイルを削除
   ■ 回避した禁止事項: 派手な赤一色 / 点滅 / 音楽 / 大きな画像。
     画像ファイルは一切使っていません（CSSグラデーション＋極小インラインSVGのみ）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. カラーパレット（ゴールド＆ディープグリーン）
   -------------------------------------------------------------------------- */
:root {
    --xmas-green-deep: #0B3D2E;
    --xmas-green: #14532D;
    --xmas-gold: #C9A227;
    --xmas-gold-light: #F7EFC0;
}

/* --------------------------------------------------------------------------
   2. ページ上部の細い帯
      通常フローに置くだけなので、既存のレイアウトを押し下げる以外の影響なし。
   -------------------------------------------------------------------------- */
#christmas-bar {
    position: relative;
    /* 会員ページのパスワード入力画面（#passwordOverlay = z-index:10000）でも
       帯が見えるようにするため、それより前面に置いています。
       帯は高さ約32pxの上部のみなので、中央のログインカードには重なりません。 */
    z-index: 10001;
    margin: 0;
    padding: 7px 14px;
    background: linear-gradient(90deg, var(--xmas-green-deep) 0%, var(--xmas-green) 50%, var(--xmas-green-deep) 100%);
    border-bottom: 1px solid rgba(201, 162, 39, 0.55);
    color: var(--xmas-gold-light);
    font-family: "Noto Sans JP", system-ui, -apple-system, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.5;
    text-align: center;
}

/* --------------------------------------------------------------------------
   3. 雪（ゆっくり降る・控えめ・半透明）
      DOMは空の div 1個だけ。粒はCSSグラデーションで描くので画像なし。
      ループの継ぎ目が出ないよう、移動距離＝タイルサイズにしています。
   -------------------------------------------------------------------------- */
#christmas-snow {
    position: fixed;
    inset: 0;
    /* 各セクションの背景（position:relative + z-index:auto）より前面に出す必要がある。
       ただしヘッダー(1000)・パスワードオーバーレイ(10000)よりは背面に保つ。 */
    z-index: 999;
    overflow: hidden;
    pointer-events: none; /* クリック操作を一切妨げない */
}

#christmas-snow::before,
#christmas-snow::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background-repeat: repeat;
    will-change: transform;
}

/* 手前の雪（やや大きめ・46秒で1タイル）
   ※ 各粒は「白い芯 + ごく淡いブルーグレーの縁」の二重構造。
      白だけだとクリーム色の背景に埋もれ、濃い色だけだとダークな背景で
      沈むため、両方の背景で控えめに見えるようにしています。 */
#christmas-snow::before {
    opacity: 0.62;
    background-size: 260px 260px;
    background-image:
        radial-gradient(circle at 24px 32px, rgba(255,255,255,0.95) 0 0.7px, rgba(108,146,190,0.80) 0.7px 2.5px, transparent 3.0px),
        radial-gradient(circle at 132px 96px, rgba(255,255,255,0.95) 0 0.9px, rgba(108,146,190,0.75) 0.9px 2.9px, transparent 3.4px),
        radial-gradient(circle at 206px 174px, rgba(255,255,255,0.90) 0 0.6px, rgba(108,146,190,0.70) 0.6px 2.1px, transparent 2.6px),
        radial-gradient(circle at 74px 212px, rgba(255,255,255,0.95) 0 0.8px, rgba(108,146,190,0.78) 0.8px 2.7px, transparent 3.2px);
    animation: xmas-fall-260 46s linear infinite !important;
    animation-play-state: running !important;
}

/* 奥の雪（小さめ・78秒＝ゆっくり。奥行きを出す） */
#christmas-snow::after {
    opacity: 0.48;
    background-size: 190px 190px;
    background-image:
        radial-gradient(circle at 18px 46px, rgba(255,255,255,0.90) 0 0.5px, rgba(108,146,190,0.70) 0.5px 1.9px, transparent 2.4px),
        radial-gradient(circle at 96px 128px, rgba(255,255,255,0.90) 0 0.7px, rgba(108,146,190,0.68) 0.7px 2.2px, transparent 2.7px),
        radial-gradient(circle at 158px 24px, rgba(255,255,255,0.90) 0 0.6px, rgba(108,146,190,0.70) 0.6px 2.0px, transparent 2.5px);
    animation: xmas-fall-190 78s linear infinite !important;
    animation-play-state: running !important;
}

/* 移動距離をタイルサイズと一致させ、ループの継ぎ目を消す */
@keyframes xmas-fall-260 {
    from { transform: translateY(-260px); }
    to   { transform: translateY(0); }
}

@keyframes xmas-fall-190 {
    from { transform: translateY(-190px); }
    to   { transform: translateY(0); }
}

@keyframes xmas-fall-380 {
    from { transform: translateY(-380px); }
    to   { transform: translateY(0); }
}

/* スマホ：粒を減らし、奥の層を省いて軽くする */
@media (max-width: 768px) {
    #christmas-snow::before {
        opacity: 0.55;
        background-size: 380px 380px;
        animation: xmas-fall-380 60s linear infinite !important;
        animation-play-state: running !important;
    }

    #christmas-snow::after {
        display: none; /* 奥の層はスマホでは描画しない */
    }

    #christmas-bar {
        font-size: 0.74rem;
        padding: 6px 10px;
        letter-spacing: 0.03em;
    }
}

/* 動きを減らす設定のユーザーには雪を止める（アクセシビリティ配慮・点滅なし） */
@media (prefers-reduced-motion: reduce) {
    #christmas-snow::before,
    #christmas-snow::after {
        animation: none !important;
    }

    #christmas-snow {
        opacity: 0.14;
    }
}

/* --------------------------------------------------------------------------
   4. 見出しのアクセント（ゴールド＆ディープグリーン・ほんの少しだけ）
      既存の見出し色（ピンク〜ブルーのグラデーション）は変更しません。
   -------------------------------------------------------------------------- */
.section-title::after {
    box-shadow:
        0 0 0 1px rgba(201, 162, 39, 0.50),
        0 2px 10px rgba(11, 61, 46, 0.30);
}

/* ページ見出し（h1）に細い金の下線を添える */
.page-header h1 {
    text-decoration: underline;
    text-decoration-color: rgba(201, 162, 39, 0.45);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

/* --------------------------------------------------------------------------
   5. ボタンのアクセント
      box-shadow は各ボタンが個別に持っているため干渉しない filter を使用。
      メインカラー・サイズ・位置は変更しません。
      ヘッダーのナビゲーションは触らず、主要CTAのみに限定しています。
   -------------------------------------------------------------------------- */
.btn-hero,
.btn-cta,
.btn-signup-main,
.btn-plan,
.btn-upgrade-large {
    filter: drop-shadow(0 0 1.5px rgba(201, 162, 39, 0.55));
}

.btn-hero:hover,
.btn-cta:hover,
.btn-signup-main:hover,
.btn-plan:hover {
    filter: drop-shadow(0 0 3px rgba(201, 162, 39, 0.75));
}

/* --------------------------------------------------------------------------
   6. フッター付近のヒイラギ＆オーナメント（極小インラインSVG）
      画像ファイルを使わないので読み込みは増えません。
      HTMLは追加せず .footer::before だけで描画します。
   -------------------------------------------------------------------------- */
.footer::before {
    content: "";
    display: block;
    width: 220px;
    height: 44px;
    max-width: 80%;
    margin: 0 auto 16px;
    background-image: url("data:image/svg+xml;charset=utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='44' viewBox='0 0 220 44'><g fill='%2314532D'><path d='M28 26c-7-2-11-8-10-15 7 0 13 4 15 11z'/><path d='M28 26c7-2 11-8 10-15-7 0-13 4-15 11z'/></g><g fill='%23C9A227'><circle cx='28' cy='28' r='2.6'/><circle cx='23' cy='32' r='2.2'/><circle cx='33' cy='32' r='2.2'/></g><g stroke='%23C9A227' stroke-width='1' fill='none' opacity='0.75'><path d='M96 4v8'/><path d='M110 2v8'/><path d='M124 4v8'/></g><circle cx='96' cy='18' r='6' fill='%23C9A227'/><circle cx='110' cy='16' r='7' fill='%2314532D' stroke='%23C9A227' stroke-width='1.2'/><circle cx='124' cy='18' r='6' fill='%23C9A227'/><g fill='%2314532D'><path d='M192 26c-7-2-11-8-10-15 7 0 13 4 15 11z'/><path d='M192 26c7-2 11-8 10-15-7 0-13 4-15 11z'/></g><g fill='%23C9A227'><circle cx='192' cy='28' r='2.6'/><circle cx='187' cy='32' r='2.2'/><circle cx='197' cy='32' r='2.2'/></g></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .footer::before {
        width: 180px;
        height: 36px;
        margin-bottom: 12px;
    }
}
