@import url("https://fonts.googleapis.com/css2?family=Zen+Antique&display=swap");

:root {
    --box-shadow: 0 8ox 22px black;
}

:root {
    --header-h: 7rem;
}

* {
    transition: all 0.4s ease;
}

body {
    font-family: "Zen Antique", serif;
    color: white;
    /* padding-top: var(--header-h); */
}

html {
    font-size: 62.5%;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    padding: 0 5.4rem;
    /* 横だけパディング */
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: black 1px 3px 6px;
    z-index: 1000;
}

.logo-title {
    cursor: pointer;
}

header img {
    width: 3.5rem;
    cursor: pointer;
}

/* hero section */

.hero {
    position: static;
    min-height: 100vh;
    width: 100%;
    background-image: url("./images/another-world.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    /* 不要なら削ってOK（モバイルは非対応多め） */

    /* タイトル配置：左下に寄せたいならflexで */
    display: flex;
    align-items: flex-end;
    /* 下寄せ */
    justify-content: flex-start;
    /* 左寄せ */
    padding: 40px;
    /* 端からの余白 */
    text-align: left;
}

.hero .title {
    position: static;
    margin: 0;
}

.hero .title h1 {
    font-size: 5rem;
    text-shadow: black 1px 3px 6px;
}

.hero .title h3 {
    font-size: 2.5rem;
    margin-left: 200px;
    text-shadow: black 1px 3px 6px;
}

/* lineup section */
.lineup {
    width: 70%;
    padding: 100px 20px;
    background: #fff;
    /* 任意：境界がわかりやすい */
    color: #111;
    margin: 0 auto;
}

.lineup h2 {
    text-align: center;
    font-size: 40px;
}

.lineup h3 {
    text-align: center;
    font-size: 30px;
    margin: 15px 0;
}

.lineup .lineup-list {
    display: flex;
}

.lineup .lineup-list .lineup-child {
    padding: 10px;
    box-shadow: rgb(110, 110, 110) 1px 3px 6px;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.lineup .lineup-list .lineup-child:hover {
    padding: 10px;
    box-shadow: none;
    margin: 0 8px;
    transform: translateY(4px);
}

.lineup .lineup-list .lineup-child h3 {
    text-align: center;
    padding-top: 10px;
}

.lineup .lineup-list .lineup-child p {
    text-align: center;
    font-size: 17px;
}

.lineup .lineup-list .lineup-child img {
    width: 100%;
}

.lineup .lineup-list .lineup-child button {
    display: block;
    margin: 0 auto;
    background-color: rgb(15, 110, 252);
    color: white;
    border: none;
    width: 40px;
    height: 20px;
}

/* information */
.information {
    min-height: 100vh;
    width: 100%;
    background-image: url(./images/house.jpg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.information h2 {
    position: absolute;
    font-size: 3.5rem;
    text-align: right;
    right: 100px;
    top: 100px;
    margin-bottom: 10px;
}

.information .story-text {
    position: absolute;
    font-size: 3.0rem;
    text-align: right;
    right: 100px;
    top: 160px;
    max-width: 600px;
    line-height: 1.5;
}

.information .this-year {
    position: absolute;
    font-size: 2.5rem;
    left: 150px;
    bottom: 180px;
    max-width: 800px;
    line-height: 1.5;
}

/* device list */
.device-list {
    max-width: 60%;
    margin: 0 auto;
    padding-top: 20px;
    background-color: rgb(255, 254, 254);

}

/* 既存の .device-img-list グリッドは流用（例） */
.device-img-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
    margin: 30px 0;
}

.device-list h2 {
    color: black;
    font-size: 30px;
    text-align: center;
}

/* カードの土台 */
.card {
    position: relative;
    display: block;
    overflow: hidden;
    /* はみ出しを隠す（ズーム時に必須） */
    text-decoration: none;
    color: inherit;
    isolation: isolate;
    /* ::after のブレンドを安定化（任意） */
}

/* 画像：ズームの対象 */
.card img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    /* タイル比（好みで変更） */
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform .6s cubic-bezier(.2, .6, .2, 1);
    will-change: transform;
}

/* 上に被せる薄いグラデーション（視認性UP） */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .45) 100%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
    z-index: 1;
}

/* テキストのオーバーレイ */
.card .overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    padding: 16px 20px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
    font-size: 1.5rem;

    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
    pointer-events: none;
    z-index: 2;
}

.card .overlay h4 {
    margin: 0 0 4px;
    font-size: 2.5rem;
}

.card .overlay p {
    margin: 0;
    font-size: 1.3rem;
    opacity: .9;
}

/* ホバー & キーボードフォーカスで発火（モバイル対応のため focus-within も） */
.card:hover img,
.card:focus img,
.card:focus-within img {
    transform: scale(1.08);
    /* ほんのりズーム */
}

.card:hover::after,
.card:focus::after,
.card:focus-within::after {
    opacity: 1;
    /* 影を強めて文字を読みやすく */
}

.card:hover .overlay,
.card:focus .overlay,
.card:focus-within .overlay {
    opacity: 1;
    /* 文字が浮かぶ */
    transform: translateY(0);
}

/* アクセシビリティ：フォーカスリング */
.card:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .7);
    outline-offset: 2px;
}

/* contact */
.contact {
    min-height: 100vh;
    width: 100%;
    background-image: url(./images/butterfly.jpg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.contact h3 {
    position: absolute;
    font-size: 3.5rem;
    text-align: left;
    left: 100px;
    top: 100px;
    margin-bottom: 10px;
}

.contact form {
    position: absolute;
    font-size: 3.5rem;
    text-align: left;
    left: 130px;
    top: 165px;
    margin-bottom: 10px;
}

.contact form .btn {
    padding: 15px 25px;
    background-color: rgb(46, 46, 242);
    color: white;
    font-size: 25px;
}

form input {
    border-radius: 5px;
}

.contact form .form-text {
    margin: 20px 0;
    
}

/* 動きを苦手とするユーザー配慮（任意） */
@media (prefers-reduced-motion: reduce) {

    .card img,
    .card::after,
    .card .overlay {
        transition: none !important;
    }
}

@media (max-width: 600px) {
    .device-img-list {
        grid-template-columns: 1fr;
        /* ← ここを追加：1列レイアウト */
    }
}