/* 素数を只管眺める / Nothing but Primes
 *
 * アプリ本編と同じ語彙で組む。cleave(暖色の黒・真鍮の線・明朝)とは別物にする。
 *
 *   ・冷たい水。上ほど明るく、下へ行くほど暗い(スクロールが沈む動きになる)
 *   ・横に走る淡い帯。本編の層の光と同じ
 *   ・骨白の文字。枠線はほとんど引かない —— 本編で区画線を廃したのと同じ理由で、
 *     線を引くと文書が「区画に分かれた計器」に見える
 *   ・⚠ **琥珀は素数の色**。本編では素数以外に使わないと決めてある。
 *     ここでも数を絞り、見出しの目盛りとリンクだけに使う。
 *     全部を琥珀にすると、本編で一度やって失敗した「琥珀がUIの色になる」状態に戻る
 *   ・明朝は使わない。本編は Avenir Next + ヒラギノ角ゴで、明朝の「計器」路線は捨てた
 */
:root {
    --bg-deep:   #07090A;   /* 底の方 */
    --bg-shallow:#0E1A1E;   /* 水面に近い方 */
    --panel:     rgba(255, 255, 255, .045);
    --panel-2:   rgba(255, 255, 255, .075);
    --ink:       #E9E7E2;   /* 骨白 */
    --ink-dim:   rgba(233, 231, 226, .62);
    --ink-faint: rgba(233, 231, 226, .30);
    --amber:     #E2A44A;   /* 素数の琥珀。使う場所を絞ること */
    --melt:      #8CD6EB;   /* ほどける帯の光 */
    --sans: "Avenir Next", "Avenir", "Hiragino Sans", "Noto Sans JP",
            "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0 20px 90px;
    color: var(--ink-dim);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: .01em;

    /* 水。横に走る淡い帯を2本重ねて、その上に上下のグラデーションを敷く。
       ⚠ fixed にすること。スクロールで背景が動くと「沈んでいる」感じが消える */
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(120% 34% at 50% 16%, rgba(70, 150, 165, .11), transparent 72%),
        radial-gradient(140% 26% at 50% 46%, rgba(70, 150, 165, .07), transparent 72%),
        linear-gradient(180deg, var(--bg-shallow) 0%, var(--bg-deep) 62%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container { max-width: 720px; margin: 0 auto; }

/* ---- 言語切替・戻る ---- */
/* 本編の「因数」ピルと同じ作り。丸角の低い塗りで、枠線は持たない */
.lang-switch { text-align: right; padding-top: 28px; }
.back-link { padding-top: 20px; }

.lang-switch a, .back-link a {
    display: inline-block;
    padding: 7px 20px;
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: .04em;
    transition: background .2s, color .2s;
}
.lang-switch a:hover, .back-link a:hover { background: rgba(255, 255, 255, .13); color: var(--ink); }

/* ---- 見出し ---- */
header { text-align: center; padding: 60px 0 40px; }

/* ホーム画面のアイコンそのもの。描き起こすと必ずずれるので同じ画像を使う */
.crystal {
    display: block;
    margin: 0 auto 26px;
    width: 96px; height: 96px;
    border-radius: 22%;              /* iOS のホーム画面と同じ角丸 */
}

header h1 {
    margin: 0;
    font-weight: 400;
    font-size: 40px;
    line-height: 1.3;
    color: var(--ink);
    letter-spacing: .04em;
}
header .subtitle, header .last-updated {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--ink-faint);
    letter-spacing: .03em;
}

/* 水面の線。**本編が画面に引くことを許している唯一の横線**と同じ扱いにする */
header::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 36px;
    background: linear-gradient(90deg,
        transparent, rgba(140, 214, 235, .38) 18%, rgba(140, 214, 235, .38) 82%, transparent);
}

/* ---- 面 ---- */
/* 枠線を持たない。本編のパネルと同じ「丸角の低い塗り」だけで面を作る */
.card {
    background: var(--panel);
    border-radius: 16px;
    padding: 32px 30px 36px;
    margin: 28px 0;
}

/* 見出しの左に短い琥珀の目盛り。数直線で素数の位置に立つ印と同じ形。
   ⚠ ここが琥珀を使う数少ない場所。下線を全部に引くと計器に戻る */
.card h2 {
    position: relative;
    margin: 0 0 20px;
    padding-left: 18px;
    font-weight: 500;
    font-size: 23px;
    color: var(--ink);
    letter-spacing: .04em;
}
.card h2::before {
    content: "";
    position: absolute;
    left: 0; top: .32em;
    width: 4px; height: 1.05em;
    border-radius: 2px;
    background: var(--amber);
}
.card h2 + p, .card h2 + ul { margin-top: 0; }

.card h3 {
    margin: 30px 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: .02em;
}

.card p { margin: 0 0 16px; }
.card p:last-child { margin-bottom: 0; }

.card ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.card li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}
/* 箇条書きの印は数直線の短い目盛り。素数ではないので骨白のまま */
.card li::before {
    content: "";
    position: absolute;
    left: 2px; top: .88em;
    width: 10px; height: 2px;
    border-radius: 1px;
    background: var(--ink-faint);
}

.card a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(226, 164, 74, .35); }
.card a:hover { border-bottom-color: var(--amber); }

strong { color: var(--ink); font-weight: 600; }

/* ---- 押し板 ---- */
/* 本編の下端のピルと同じ。塗りは低く、文字は骨白。真鍮の板にはしない */
.contact-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 13px 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .11);
    color: var(--ink) !important;
    font-size: 16px;
    letter-spacing: .06em;
    text-decoration: none;
    border-bottom: none !important;
    transition: background .2s;
}
.contact-btn:hover { background: rgba(255, 255, 255, .18); }

/* ---- 脚 ---- */
footer {
    margin-top: 56px;
    padding-top: 26px;
    border-top: 1px solid rgba(233, 231, 226, .10);
    text-align: center;
}
footer p { margin: 0; font-size: 13px; color: rgba(233, 231, 226, .28); letter-spacing: .04em; }

@media (max-width: 560px) {
    header { padding: 40px 0 30px; }
    header h1 { font-size: 30px; }
    .card { padding: 26px 20px 30px; }
    .card h2 { font-size: 20px; }
}
