/* ==========
   Base / Reset
   ========== */

:root {
    --bg-base: #cfeeff; /* 薄い青（気分が落ちない） */
    --bg-ink: rgba(0, 40, 90, 0.12); /* 青みの影（黒は使わない） */
    --bg-hi: rgba(255, 255, 255, 0.2); /* うっすら光 */

    --ink: #101114;
    --muted: #6b7280;

    --card-bg: #ffffff;
    --card-border: #9aa0a6;
    --card-shadow: #6b6f76;

    --header-bg: #ffffff;
    --header-border: #e5e7eb;

    --focus: #111827;

    --radius: 0px; /* 角ばり固定（添付に寄せる） */
    --maxw: 920px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html:focus-within {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--bg-base);
    background-image:
    /* ① ドットのタイル（“壁紙GIF”っぽさ） */ radial-gradient(
            circle at 1px 1px,
            var(--bg-ink) 1px,
            transparent 1.2px
        ),
        /* ② うっすら斜めのハイライト（紙っぽい安さ） */
            repeating-linear-gradient(
                45deg,
                var(--bg-hi) 0px,
                var(--bg-hi) 1px,
                transparent 1px,
                transparent 8px
            );
    background-size: 16px 16px, 16px 16px;
    background-attachment: fixed;

    min-height: 100svh;

    /* ピクセル風：モノスペ寄せ */
    font-family: "DotGothic16", ui-monospace, "Hiragino Sans", "Noto Sans JP",
        monospace, sans-serif;
    letter-spacing: 0.2px;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid var(--focus);
    z-index: 9999;
    transform: translateY(-160%);
}
.skip-link:focus {
    transform: translateY(0);
}

/* ==========
   Header
   ========== */

.topbar {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.brand {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
    padding: 6px 10px;
}

.brand__mark {
    width: 64px;
    height: 34px;
    color: var(--ink);
}

.brand__word {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.6px;
}

.menu-btn {
    grid-column: 3;
    justify-self: end;

    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    position: relative;
}

.menu-btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.menu-btn__icon,
.menu-btn__icon::before,
.menu-btn__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--ink);
    transform: translateX(-50%);
    border-radius: 2px;
}

.menu-btn__icon {
    top: 50%;
    transform: translate(-50%, -50%);
}

.menu-btn__icon::before {
    top: -7px;
}

.menu-btn__icon::after {
    top: 7px;
}

.menu {
    border-top: 1px solid var(--header-border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

.menu__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 16px 16px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.menu__link {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.16);
}

.menu__link:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ==========
   Main layout
   ========== */

.main {
    position: relative;
    padding: 46px 16px 60px;
}

.stage {
    max-width: var(--maxw);
    margin: 0 auto;
    position: relative;
    min-height: 70svh;
    display: grid;
    place-items: start center;
}

@media (min-width: 860px) {
    .main {
        padding-top: 60px;
    }
    .stage {
        min-height: 72svh;
    }
}

/* ==========
   Card (news)
   ========== */

.card {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius);

    /* 添付の「右下に落ちる」硬い影 */
    box-shadow: 8px 8px 0 var(--card-shadow);

    padding: 18px 18px 16px;
    position: relative;
}

.card__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
}

.card__meta {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.card__text {
    margin: 0 0 12px;
    line-height: 1.8;
    font-size: 13px;
}

/* ==========
   NEW badge (blink)
   ========== */

.badge-new {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 6px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;

    color: #fff;
    background: #111; /* 黒ベタ（黎明期感） */
    border: 2px solid #111;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);

    /* 角は立てる（サイトのトーン維持） */
    border-radius: 0;

    /* 点滅 */
    animation: new-blink 2.4s steps(2, end) infinite;
}

/* 動きが苦手な人向け：OS設定に従って停止 */
@media (prefers-reduced-motion: reduce) {
    .badge-new {
        animation: none;
    }
}

@keyframes new-blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ==========
   Hero slider (retro)
   ========== */

.hero {
    width: min(760px, calc(100% - 24px)); /* News / About と同じ幅 */
    margin: 16px auto 0;
}

.retro-slider {
    background: #fff;
    border: 2px solid var(--card-border);
    box-shadow: 6px 6px 0 var(--card-shadow);
}

.retro-slider__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 8px 10px;
    border-bottom: 2px solid rgba(16, 17, 20, 0.15);

    /* 昔の「窓タイトル」っぽい感じ（簡易） */
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 40, 90, 0.08) 0,
        rgba(0, 40, 90, 0.08) 6px,
        rgba(255, 255, 255, 0.55) 6px,
        rgba(255, 255, 255, 0.55) 12px
    );
}

.retro-slider__title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.retro-slider__blink {
    font-size: 12px;
    opacity: 0.9;
    animation: blink 1s steps(2, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .retro-slider__blink {
        animation: none;
    }
}

@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.retro-slider__viewport {
    /* 「古い枠」っぽく inset */
    border: 2px inset #c9c9c9;
    background: #eaf7ff;
    overflow: hidden;

    /* 16:9 を維持 */
    aspect-ratio: 16 / 9;
}

.retro-slider__track {
    list-style: none;
    padding: 0;
    margin: 0;
}

.retro-slider__slide[hidden] {
    display: none;
}

.retro-slider__slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    /* ピクセル寄せ（写真なら好みで外してください） */
    image-rendering: pixelated;
}

.retro-slider__controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;

    padding: 10px;
    border-top: 2px solid rgba(16, 17, 20, 0.12);
}

.retro-slider__status {
    font-size: 12px;
    color: rgba(16, 17, 20, 0.75);
    text-align: center;
    min-height: 1em;
}

.retro-slider__btn {
    padding: 8px 10px;
    border: 2px outset #d1d5db; /* 昔のボタン感 */
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.retro-slider__btn:active {
    border-style: inset;
}

.retro-slider__btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.retro-slider__dots {
    display: flex;
    gap: 8px;
    padding: 0 10px 10px;
}

.retro-slider__dot {
    padding: 6px 9px;
    border: 2px outset #d1d5db;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.retro-slider__dot[aria-selected="true"] {
    border-style: inset;
    background: rgba(0, 40, 90, 0.06);
}

.retro-slider__dot:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ==========
   LINE CTA (retro)
   ========== */

.cta {
    width: min(760px, calc(100% - 24px)); /* Hero / News / About と揃える */
    margin: 14px auto 0; /* WELCOMEの下に自然に入る */
}

.cta__panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;

    background: #fff;
    border: 2px solid var(--card-border);
    box-shadow: 6px 6px 0 var(--card-shadow);
    padding: 12px 12px;
}

@media (max-width: 560px) {
    .cta__panel {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
}

.cta__kicker {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.cta__text {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(16, 17, 20, 0.78);
}

.cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 12px;
    border: 2px outset #0a9f3f; /* ← 枠を濃い緑に */
    background: #06c755; /* ← ここをLINEの緑に */
    color: #fff; /* ← 白文字に */
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.16);

    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;

    text-decoration: none;
}

.cta__btn:hover {
    text-decoration: underline;
}

.cta__btn:active {
    border-style: inset;
    transform: translate(1px, 1px); /* 押し込む感じ */
}

.cta__btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ==========
   Below section
   ========== */

.news {
    width: min(760px, calc(100% - 24px));
    margin: 26px auto 0; /* About と揃えるなら 26px */
}

.below {
    width: min(760px, calc(100% - 24px));
    margin: 26px auto 0;
    text-align: left;
}

.below__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
}

.below__text {
    margin: 0;
    font-size: 12px;
    line-height: 1.9;
    color: rgba(16, 17, 20, 0.85);
}

/* ==========
   Pixel sprites (CSS pixel art)
   - 1マス=1px を scale で拡大（image不要）
   ========== */

.sprite {
    position: absolute;
    width: 1px;
    height: 1px;
    transform-origin: top left;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 3;
    opacity: 0.95;

    animation: floaty 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .sprite {
        animation: none;
    }
}

/* 黒い縦スプライト（添付の黒いピクセル形状のイメージ） */
.sprite--black {
    /* 大きさ調整 */
    transform: translate(-50%, 0) scale(10);
    left: 50%;
    top: 180px;

    /* ピクセル配置（box-shadowでドット配置） */
    background: transparent;
    box-shadow:
    /* 頭 */ 0 0 0 1px #111, 1 0 0 1px #111, 2 0 0 1px #111,
        3 0 0 1px #111, 4 0 0 1px #111, 1 1 0 1px #111, 3 1 0 1px #111,
        1 2 0 1px #111, 2 2 0 1px #111, 3 2 0 1px #111, /* 胴 */ 2 3 0 1px #111,
        2 4 0 1px #111, 2 5 0 1px #111, 2 6 0 1px #111, /* 尾 */ 1 7 0 1px #111,
        3 7 0 1px #111, 2 8 0 1px #111, 2 9 0 1px #111;
}

/* シアンのスプライト（カード右側に被せる想定） */
.sprite--cyan {
    transform: translate(0, 0) scale(10);
    right: calc(50% - 380px);
    top: 210px;

    box-shadow: 1 0 0 1px #7ee7ff, 2 0 0 1px #7ee7ff, 0 1 0 1px #7ee7ff,
        1 1 0 1px #7ee7ff, 2 1 0 1px #7ee7ff, 3 1 0 1px #7ee7ff,
        0 2 0 1px #7ee7ff, 1 2 0 1px #ffffff, 2 2 0 1px #ffffff,
        3 2 0 1px #7ee7ff, 1 3 0 1px #7ee7ff, 2 3 0 1px #7ee7ff,
        1 4 0 1px #7ee7ff, 2 4 0 1px #7ee7ff, 1 5 0 1px #7ee7ff,
        2 5 0 1px #7ee7ff;
}

/* 画面が狭い時の位置崩れ抑制 */
@media (max-width: 860px) {
    .sprite--cyan {
        right: 10%;
        top: 170px;
        transform: translate(0, 0) scale(9);
    }
    .sprite--black {
        top: 150px;
        transform: translate(-50%, 0) scale(9);
    }
}

@keyframes floaty {
    0% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--s, 10));
    }
    50% {
        transform: translate(var(--tx, 0), calc(var(--ty, 0) - 10px))
            scale(var(--s, 10));
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--s, 10));
    }
}

/* floaty用の個別パラメータ（transform上書きの代わりに変数で管理） */
.sprite--black {
    --s: 10;
    --tx: -50%;
    --ty: 0px;
}
.sprite--cyan {
    --s: 10;
    --tx: 0px;
    --ty: 0px;
}

/* ==========
   Selection / Focus cosmetics
   ========== */

::selection {
    background: rgba(17, 24, 39, 0.14);
}

/* ==========
   Visitor counter (old web)
   ========== */

.visitor__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.visitor__digits {
    display: inline-block;
    padding: 2px 8px;
    border: 2px inset #c9c9c9; /* 昔のフォームっぽい凹み */
    background: #0b1020;
    color: #cfeeff;
    font-size: 14px;
    line-height: 1.6;
    min-width: 8ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ==========
   Footer
   ========== */

/* ==========
   Visitor counter (old web)
   ========== */
.footer {
    width: min(760px, calc(100% - 24px));
    margin: 34px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(16, 17, 20, 0.15);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 18px; /* ← Visitors と © の距離 */
}

.footer__copy {
    margin: 0;
    font-size: 12px;
    color: rgba(16, 17, 20, 0.75);
}

.visitor {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin: 10px 0 0; /* ← auto不要。footerが中央揃えしている */
    padding: 8px 10px;
    border: 2px solid var(--card-border);
    background: #fff;
    box-shadow: 4px 4px 0 var(--card-shadow);
}

/* ==========
   Retro Form (Contact)
   ========== */

.retro-form {
    margin-top: 10px;
}

.retro-form__grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    .retro-form__grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 14px;
    }
    .retro-form__field--full {
        grid-column: 1 / -1;
    }
}

.retro-form__field {
    display: grid;
    gap: 6px;
}

.retro-form__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.req {
    display: inline-block;
    margin-left: 4px;
    font-weight: 900;
}

.retro-form__input,
.retro-form__textarea {
    width: 100%;
    font: inherit;

    padding: 10px 10px;
    background: #fff;

    /* 昔のフォームっぽい凹み */
    border: 2px inset #c9c9c9;

    /* 黎明期の読みやすさ */
    font-size: 13px;
    line-height: 1.6;
}

.retro-form__textarea {
    resize: vertical;
    min-height: 140px;
}

.retro-form__input:focus-visible,
.retro-form__textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.retro-form__actions {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    align-items: center;
}

@media (min-width: 560px) {
    .retro-form__actions {
        grid-template-columns: auto 1fr;
    }
}

.retro-form__submit {
    padding: 10px 14px;
    border: 2px outset #d1d5db;
    background: #fff;
    cursor: pointer;
    font: inherit;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;

    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.16);
}

.retro-form__submit:active {
    border-style: inset;
    transform: translate(1px, 1px);
}

.retro-form__submit:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.retro-form__note {
    margin: 0;
    font-size: 12px;
    color: rgba(16, 17, 20, 0.78);
}

/* honeypot は画面に出さない（アクセシビリティ的に aria-hidden 前提） */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
