/*
 * サンプル野外音楽祭 2027（架空）— サンプルサイトのスタイル
 *
 * クラス名だけに当てる（何番目のセクションかには頼らない）。担当者がブロックを並べ替え・追加・
 * 非表示にしても崩れないようにするため。外部のフォント・CDN は使わない（公開側の CSP は font-src 'self'）。
 */

:root {
    --ink: #1b1f3b;
    --sub: #5c6170;
    --line: #e6dfd3;
    --bg: #fffaf3;
    --sand: #f6efe4;
    --white: #ffffff;
    --sea: #1c4e80;
    --sea-deep: #0f2a46;
    --accent: #d6336c;
    /* 文字に使う濃いめのアクセント（--bg の上で 4.5:1 以上） */
    --accent-text: #b8235a;
    --sun: #ff8a3d;
    /* ボタンの地（白い文字で 4.5:1 以上） */
    --button-from: #c2410c;
    --button-to: #be185d;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(27, 31, 59, 0.12);
    --wrap: 1120px;
    --gutter: clamp(1rem, 5vw, 3rem);
    --font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--sea);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--sea);
    outline-offset: 3px;
}

/* 暗い写真の上では白い枠 */
.hero :focus-visible {
    outline-color: var(--white);
}

h1,
h2,
h3 {
    line-height: 1.3;
    letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- ヘッダー */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.6rem var(--gutter);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(27, 31, 59, 0.06);
    backdrop-filter: saturate(1.4) blur(10px);
    transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 6px 20px rgba(27, 31, 59, 0.1);
}

.site-header__brand {
    display: block;
    line-height: 0;
}

.site-header__brand img {
    display: block;
    width: auto;
    height: 48px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.4rem;
}

.site-nav a {
    position: relative;
    padding: 0.35rem 0;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--sun), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current]::after {
    transform: scaleX(1);
}

.site-nav a[aria-current] {
    color: var(--accent-text);
}

/*
 * スマホのメニュー：横に流せる1行。JS で開け閉めしない＝読み込みのたびにヘッダーの高さが変わらず
 * （本文が跳ねない）、JS が読めなくても全部のページへ行ける
 */
@media (max-width: 860px) {
    .site-nav {
        /* 画面の端から端まで流せるように、ヘッダーの左右の余白ぶん広げる（負の margin で左右へ出す） */
        flex: 0 0 calc(100% + var(--gutter) * 2);
        flex-wrap: nowrap;
        gap: 1.2rem;
        margin-inline: calc(var(--gutter) * -1);
        /* 上下はフォーカスの枠（線 3px＋離れ 3px）が切れない分を空ける（横に流せる箱は外にはみ出したものを切る） */
        padding: 0.4rem var(--gutter);
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .site-nav a {
        flex: none;
        white-space: nowrap;
    }
}

/* ---------------------------------------------------------------- 共通の区画 */

main > section,
main > article {
    padding-block: clamp(3.5rem, 8vw, 6rem);
    padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
}

main > section > h2,
.faq > h2 {
    position: relative;
    margin: 0 0 2rem;
    padding-bottom: 0.9rem;
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    font-weight: 900;
}

main > section > h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--sun), var(--accent));
}

main > section > h1,
main > article > h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 5.4vw, 3.4rem);
    font-weight: 900;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.85rem 2rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--button-from), var(--button-to));
    box-shadow: 0 10px 24px rgba(214, 51, 108, 0.35);
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button::after {
    content: "→";
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(214, 51, 108, 0.45);
}

.more {
    display: table;
    margin: 2.5rem auto 0;
    padding: 0.75rem 1.8rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.more:hover {
    background: var(--ink);
    color: var(--white);
}

/* ---------------------------------------------------------------- メインビジュアル */

.hero,
.campaign-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: min(88vh, 820px);
    overflow: hidden;
    color: var(--white);
}

.hero img,
.campaign-hero img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before,
.campaign-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(15, 18, 45, 0.1) 30%, rgba(15, 18, 45, 0.82) 100%);
}

.hero > * {
    margin: 0;
    animation: hero-in 0.8s ease both;
}

.hero > p:first-child {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    backdrop-filter: blur(4px);
}

.hero h1,
.campaign-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 7.5vw, 5.6rem);
    font-weight: 900;
    line-height: 1.08;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
    animation-delay: 0.08s;
}

.hero h1 + p {
    font-size: clamp(1.15rem, 2.6vw, 1.7rem);
    font-weight: 800;
    animation-delay: 0.16s;
}

.hero h1 + p + p {
    margin-bottom: 2rem;
    opacity: 0.9;
    animation-delay: 0.22s;
}

.hero .button {
    animation-delay: 0.3s;
}

.campaign-hero p {
    max-width: 40rem;
    font-size: 1.15rem;
}

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ---------------------------------------------------------------- 出演者 */

.lineup,
.artists {
    background: var(--white);
}

.lineup__list,
.artists__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lineup__item,
.artists__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lineup__item:hover,
.artists__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(27, 31, 59, 0.18);
}

.lineup__item img,
.artists__item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--sand);
}

.lineup__item p,
.artists__item p {
    margin: 0;
    padding: 0 1.1rem;
}

.lineup__item p:first-of-type,
.artists__item p:first-of-type {
    padding-top: 1rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.lineup__item p + p,
.artists__item p + p {
    color: var(--accent-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* カード全体を押せるように、プロフィールへのリンクを広げる */
.lineup__item a,
.artists__item a {
    display: inline-block;
    margin: 0.4rem 1.1rem 1.1rem;
    color: var(--sea);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.lineup__item a::before,
.artists__item a::before {
    content: "";
    position: absolute;
    inset: 0;
}

.lineup__item a::after,
.artists__item a::after {
    content: " →";
}

/* ---------------------------------------------------------------- タイムテーブル・チケット */

.timetable {
    background: var(--sand);
}

.timetable dl,
.tickets dl {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    margin: 0 0 1.5rem;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.timetable dt,
.timetable dd,
.tickets dt,
.tickets dd {
    margin: 0;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--line);
}

.timetable dt:last-of-type,
.timetable dd:last-of-type,
.tickets dt:last-of-type,
.tickets dd:last-of-type {
    border-bottom: 0;
}

.timetable dt,
.tickets dt {
    background: rgba(28, 78, 128, 0.06);
    color: var(--sea);
    font-weight: 800;
}

.timetable dd {
    font-size: 1.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.tickets dd {
    font-size: 1.15rem;
    font-weight: 800;
}

.timetable > p,
.tickets > p {
    color: var(--sub);
    font-size: 0.95rem;
}

.tickets .button {
    margin-top: 1rem;
}

/* ---------------------------------------------------------------- お知らせ */

.news {
    background: var(--white);
}

.news ul {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.news li {
    position: relative;
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 1.2rem 0.5rem;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}

.news li:hover {
    background: var(--bg);
}

.news time,
.news-index time {
    color: var(--accent-text);
    font-size: 0.9rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
}

.news li p {
    margin: 0;
    font-weight: 700;
}

.news li a {
    color: var(--sea);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.news li a::before {
    content: "";
    position: absolute;
    inset: 0;
}

@media (max-width: 640px) {
    .news li {
        grid-template-columns: 1fr;
    }
}

.news-index__list {
    display: grid;
    gap: 1.2rem;
}

.news-index__item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.news-index__item h2 {
    order: 2;
    margin: 0.3rem 0 0.6rem;
    font-size: 1.25rem;
}

.news-index__item time {
    order: 1;
}

.news-index__more {
    order: 3;
    color: var(--sea);
    font-weight: 700;
    text-decoration: none;
}

.news-index__more::before {
    content: "";
    position: absolute;
    inset: 0;
}

.news-index__more::after {
    content: " →";
}

/* ---------------------------------------------------------------- 会場・アクセス */

.access-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: center;
    gap: 0 3rem;
    background: linear-gradient(180deg, #eaf4fb, var(--bg));
}

.access-summary > h2,
.access-summary > p,
.access-summary > a {
    grid-column: 1;
}

.access-summary > img {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.access-summary > p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.access-summary > .more {
    margin: 1.8rem 0 0;
}

@media (max-width: 860px) {
    .access-summary {
        grid-template-columns: 1fr;
    }

    .access-summary > img {
        grid-column: 1;
        grid-row: auto;
        margin-top: 1.5rem;
    }
}

.access > p:first-of-type {
    font-size: 1.15rem;
    font-weight: 700;
}

.access > img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0 2.5rem;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.access > h2,
.guidelines > h2 {
    margin: 2.5rem 0 0.8rem;
    padding-left: 0.9rem;
    border-left: 6px solid var(--sun);
    font-size: 1.35rem;
}

.access > h2::after,
.guidelines > h2::after {
    display: none;
}

.access > p,
.guidelines > p {
    max-width: 46rem;
}

/* ---------------------------------------------------------------- 協賛 */

.partners {
    background: var(--white);
    text-align: center;
}

.partners > h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.partners ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.partners li {
    padding: 0.6rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.partners img {
    display: block;
    width: auto;
    height: 64px;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.partners li:hover img {
    filter: none;
    opacity: 1;
}

/* ---------------------------------------------------------------- 注意事項・よくある質問 */

.guidelines > p:first-of-type {
    color: var(--sub);
    font-size: 1.05rem;
}

.faq {
    background: var(--sand);
}

.faq dl {
    margin: 0;
}

.faq dt {
    margin-top: 1rem;
    padding: 1.1rem 1.4rem;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
    font-weight: 800;
}

.faq dt::before {
    content: "Q";
    margin-right: 0.7rem;
    color: var(--accent);
    font-weight: 900;
}

.faq dd {
    margin: 0;
    padding: 1rem 1.4rem 0.4rem 3.2rem;
    color: var(--sub);
}

/* ---------------------------------------------------------------- 出演者・お知らせの詳細 */

.artist {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    align-content: start;
    gap: 0 3rem;
}

.artist > img {
    grid-row: 1 / span 4;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.artist > h1 {
    margin-bottom: 0.3rem;
}

.artist > p {
    margin: 0 0 1.5rem;
    color: var(--accent-text);
    font-weight: 800;
    letter-spacing: 0.08em;
}

@media (max-width: 760px) {
    .artist {
        grid-template-columns: 1fr;
    }

    .artist > img {
        grid-row: auto;
        margin-bottom: 1.5rem;
    }
}

.news-article {
    max-width: calc(46rem + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.artist > div,
.news-article > div {
    font-size: 1.05rem;
}

.artist > div img,
.news-article > div img {
    border-radius: 12px;
}

.artist > div h2,
.news-article > div h2 {
    margin-top: 2rem;
    font-size: 1.35rem;
}

/* ---------------------------------------------------------------- お問い合わせ */

.contact {
    max-width: calc(44rem + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.contact > p {
    color: var(--sub);
}

.contact form {
    margin-top: 2rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

/* 入力を包む fieldset の既定の枠と余白を打ち消す（docs/92 §1.0.1） */
fieldset[data-form-gate] {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/*
 * 項目1つ分の外枠（data-form-field・docs/92 §1.0.2）。CMS が管理画面の並びで外枠ごと並べ替え、まだ受け付けていない項目は
 * 外枠ごと出さないので、間隔は外枠どうしの間で空ける（何番目の項目かには頼らない）
 */
.contact .field + .field {
    margin-top: 1.2rem;
}

.contact label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 800;
}

/* 必須の印（data-form-required-mark）。項目が必須のときだけ CMS が出す */
.contact .field__required {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-text);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: 0.1em;
}

/* 補足（data-form-help）。中の文字は管理画面で直せ、空なら CMS が要素ごと出さない */
.contact .field__help {
    margin: 0.4rem 0 0;
    color: var(--sub);
    font-size: 0.875rem;
}

.contact input[type="text"],
.contact input[type="email"],
.contact input[type="tel"],
.contact select,
.contact textarea {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact textarea {
    min-height: 10rem;
    resize: vertical;
}

/* チェックボックスは既定のフォーカスの枠を残す（影だけだと見えない） */
.contact input:not([type="checkbox"]):focus,
.contact select:focus,
.contact textarea:focus {
    border-color: var(--sea);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(28, 78, 128, 0.15);
}

.contact label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
    font-weight: 600;
}

.contact input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent);
}

.contact [data-form-controls] {
    margin-top: 1.5rem;
}

/*
 * Bot よけの罠の欄（CMS が data-form-controls に差し込む `.anti-bot-field`）。人には見せず、読み上げもしない
 * （aria-hidden は CMS が付ける）。display: none にすると Bot が入力しなくなるので、画面の外へ逃がす
 */
.contact .anti-bot-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.contact button[type="submit"] {
    display: block;
    width: 100%;
    min-height: 56px;
    margin-top: 1.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--button-from), var(--button-to));
    box-shadow: 0 10px 24px rgba(214, 51, 108, 0.35);
    color: var(--white);
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.contact button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------- キャンペーン */

.campaign-cta {
    background: var(--sand);
    text-align: center;
}

/* ---------------------------------------------------------------- フッター */

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 3.5rem var(--gutter) 2.5rem;
    background: var(--sea-deep);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.site-footer p:first-child {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 800;
}

.site-footer p:last-child {
    margin-top: 1.2rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ページの先頭へ（app.js が差し込む） */
.to-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: var(--shadow);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    /* 見えないあいだは Tab で選べない・読み上げない（opacity だけだと見えないボタンにフォーカスが移る） */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.to-top.is-shown {
    visibility: visible;
    opacity: 1;
}

/* 暗いフッターの上にも載るので、内側を白・外側を --sea の二色の枠にする（どちらの地でも 3:1 以上） */
.to-top:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 0;
    box-shadow: 0 0 0 6px var(--sea), var(--shadow);
}

/* 先頭へ戻ったあとにフォーカスを置く先（app.js が tabindex="-1" を付け、離れたら外す）。枠は出さない */
main[tabindex]:focus,
main[tabindex]:focus-visible {
    outline: none;
}
