/* Hallmark · genre: editorial · macrostructure: split-hero long scroll (in-place redesign)
 * theme: custom (brand: warm coral × mincho · paper oklch(97.8% 0.006 60) · accent oklch(68.4% 0.121 37))
 * enrichment: Tier-A CSS art (sound wave) · nav: existing minimal · footer: centered mast
 * Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4
 *
 * 青木みわこ — Narrator Portfolio
 * カラー・フォント・余白トークンは css/tokens.css に分離（index.html で先に読み込む）
 */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    overflow-x: clip;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }

.container {
    width: min(1120px, 100% - var(--page-gutter) * 2);
    margin-inline: auto;
}

.skip-link {
    position: absolute; top: -48px; left: 12px; z-index: 300;
    background: var(--ink); color: var(--surface); padding: 0.6em 1.2em;
    border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

::selection { background: var(--coral); color: var(--surface); text-shadow: none; }

/* ---------- 入場演出はヒーローの初回一度だけ（スクロール連動フェードは廃止） ---------- */
.js .hero-text,
.js .hero-visual {
    animation: hero-rise 0.9s var(--ease) both;
}
.js .hero-visual { animation-delay: 0.12s; }
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    /* iteration-count:1 が重要: これがないと無限ループのアニメーションが超高速で回り続ける */
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
    padding: 0.95em 2.2em;
    font-size: 0.95rem; font-weight: 500; letter-spacing: 0.08em;
    border-radius: 999px;
    white-space: nowrap;
    min-height: 44px;
    max-width: 100%;
    transition: background-color var(--dur-short), color var(--dur-short), border-color var(--dur-short);
}
.btn--primary {
    background: var(--coral-ink); color: var(--surface);
}
.btn--primary:hover { background: color-mix(in oklab, var(--coral-ink) 82%, var(--ink)); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost {
    border: 1px solid var(--ink-faint); color: var(--ink);
    background: transparent;
}
.btn--ghost:hover {
    border-color: var(--coral-strong); color: var(--coral-deep);
}
.btn--wide { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible {
    outline: 2px solid var(--coral-strong); outline-offset: 3px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed; inset: 0 0 auto 0; z-index: 200;
    transition: box-shadow 0.4s;
}
/* blur layer lives on a pseudo-element: backdrop-filter on .header itself
   would turn it into the containing block for the fixed mobile nav overlay */
.header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: color-mix(in oklab, var(--bg) 72%, transparent);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    opacity: 0;
    transition: opacity 0.4s;
}
/* フォールバック: backdrop-filter 非対応では不透明な背景に切り替える */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .header::before { background: var(--bg); }
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 30px oklch(34.2% 0.011 56 / 0.04); }
.header.is-scrolled::before { opacity: 1; }
.header-inner {
    width: min(1240px, 100% - var(--page-gutter) * 2); margin-inline: auto;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name {
    font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.14em;
}
.brand-role {
    font-family: var(--font-latin); font-size: 0.72rem; letter-spacing: 0.32em;
    text-transform: uppercase; color: var(--coral-ink);
}

.nav-list { display: flex; align-items: center; gap: 2.2rem; }
.nav-link {
    position: relative;
    font-family: var(--font-latin); font-size: 1.05rem; letter-spacing: 0.14em;
    color: var(--ink-soft); transition: color 0.3s;
    padding: 0.4em 0;
}
.nav-link::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1px; background: var(--coral-strong);
    transform: scaleX(0); transform-origin: right;
    transition: transform 0.4s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav-link--cta {
    font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500;
    color: var(--surface); background: var(--ink);
    padding: 0.7em 1.6em; border-radius: 999px;
    transition: background-color 0.3s;
}
.nav-link--cta::after { content: none; }
.nav-link--cta, .nav-link--cta.is-active, .nav-link--cta:hover { color: var(--surface); }
.nav-link--cta:hover { background: var(--coral-ink); }

.menu-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex; align-items: center;
    padding: calc(var(--header-h) + 3rem) 0 4rem;
    overflow: hidden;
}
/* 静かな2ストップグラデ + 粒子ノイズ（下の ::after）だけで支える */
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(168deg, var(--surface) 0%, var(--bg-alt) 100%);
}
/* fine grain texture (pure CSS, inline SVG noise) */
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    opacity: 0.045;
}
.hero-inner {
    position: relative; z-index: 1;
    width: min(1240px, 100% - var(--page-gutter) * 2); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center; gap: clamp(2rem, 5vw, 5rem);
}

.hero-eyebrow {
    display: flex; align-items: center; gap: 0.9em;
    font-family: var(--font-latin);
    font-size: 1rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--coral-ink);
    margin-bottom: 1.6rem;
}
.eyebrow-line { width: 3.2em; height: 1px; background: var(--coral-strong); }

.hero-title {
    font-family: var(--font-serif); font-weight: 700;
    font-size: clamp(2.8rem, 6.4vw, 5.2rem);
    line-height: 1.24; letter-spacing: 0.04em;
    overflow-wrap: anywhere; min-width: 0;
    margin-bottom: 1.7rem;
}
.hero-lead {
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    color: var(--ink-soft); margin-bottom: 2.2rem;
}
.hero-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4em 1em; margin-bottom: 2.6rem; }
.hero-name-ja {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.2em;
    padding-left: 1.1em; position: relative;
}
.hero-name-ja::before {
    content: ""; position: absolute; left: 0; top: 50%;
    width: 0.5em; height: 1px; background: var(--ink);
}
.hero-name-en {
    font-family: var(--font-latin); letter-spacing: 0.24em;
    color: var(--ink-faint); font-size: 0.95rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* photo in arch frame */
.hero-visual { position: relative; justify-self: center; }
.hero-photo-frame {
    position: relative;
    width: clamp(280px, 32vw, 420px);
    aspect-ratio: 4 / 5;
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.hero-photo-frame::after {
    content: ""; position: absolute; inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--surface) 35%, transparent),
                inset 0 -60px 80px -40px oklch(34.2% 0.011 56 / 0.25);
}
.hero-photo { width: 100%; height: 100%; object-fit: cover; }
/* offset arch outline behind photo */
.hero-visual::before {
    content: ""; position: absolute; z-index: -1;
    inset: -1.5rem auto auto -1.5rem;
    width: 100%; height: 100%;
    border: 1px solid var(--coral-soft);
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
}

/* animated sound wave under photo */
.hero-wave {
    position: absolute; right: -1.8rem; bottom: 2.4rem;
    display: flex; align-items: center; gap: 5px;
    padding: 0.9rem 1.2rem;
    background: color-mix(in oklab, var(--surface) 90%, transparent);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
}
.hero-wave span {
    width: 3px; height: 8px; border-radius: 2px;
    background: var(--coral-strong);
    animation: wave 1.6s ease-in-out infinite;
}
.hero-wave span:nth-child(3n)  { animation-delay: 0.15s; height: 18px; }
.hero-wave span:nth-child(3n+1){ animation-delay: 0.45s; height: 12px; }
.hero-wave span:nth-child(4n)  { animation-delay: 0.6s;  height: 22px; }
.hero-wave span:nth-child(5n)  { animation-delay: 0.3s;  animation-duration: 1.9s; }
.hero-wave span:nth-child(7n)  { animation-delay: 0.75s; height: 14px; animation-duration: 1.3s; }
.hero-wave span:nth-child(8n)  { animation-delay: 0.5s;  height: 20px; }
@keyframes wave {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1.5); }
}

/* コピーに引くコーラルのマーカー線 */
.accent-underline {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M5 14 Q 75 5 150 11 T 295 8' fill='none' stroke='%23F4B3A0' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 96% / 100% 0.32em;
    padding-bottom: 0.14em;
}

/* ==========================================================================
   Clients strip
   ========================================================================== */
.clients {
    border-block: 1px solid var(--line);
    background: var(--surface);
    padding: 2.2rem 0;
}
.clients-label {
    text-align: center;
    font-size: 0.78rem; letter-spacing: 0.22em;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}
.clients-list {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: center;
    column-gap: 0; row-gap: 0.7rem;
}
.clients-list li {
    font-family: var(--font-serif); font-size: 0.95rem; letter-spacing: 0.16em;
    color: var(--ink-soft); white-space: nowrap;
    padding: 0 1.6rem; position: relative;
}
.clients-list li::after {
    content: ""; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--coral-soft);
}
.clients-list li:last-child::after { content: none; }

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }

.section-head {
    max-width: 640px;
    margin-bottom: clamp(2.8rem, 5vw, 4rem);
}
.section-title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    letter-spacing: 0.07em; line-height: 1.45;
    overflow-wrap: anywhere;
}
.title-phrase { display: inline-block; max-width: 100%; }
/* 見出しの下に短いコーラルの手引き線（アイブロウの代わりの控えめなアンカー） */
.section-title::after {
    content: ""; display: block;
    width: 2.6em; height: 1px;
    margin-top: 0.7em;
    background: var(--coral-strong);
}
.section-lead { color: var(--ink-soft); margin-top: 1.1rem; font-size: 0.95rem; }

/* ==========================================================================
   Voice Samples
   ========================================================================== */
/* 収録スタジオを思わせるダークセクション */
.section--voice {
    position: relative;
    background: var(--studio);
    color: var(--cream-soft);
}
.section--voice .section-title { color: var(--cream); }
.section--voice .section-lead { color: color-mix(in oklab, var(--cream-soft) 72%, transparent); }

.samples { display: grid; gap: 1.1rem; max-width: 780px; }

.sample-card {
    display: flex; align-items: center; gap: 1.4rem;
    background: color-mix(in oklab, var(--cream) 5%, transparent);
    border: 1px solid color-mix(in oklab, var(--cream) 11%, transparent);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.8rem;
    transition: border-color var(--dur-mid), background-color var(--dur-mid);
}
/* ダーク面での持ち上げは影ではなく明度で表現する */
.sample-card:hover {
    background: color-mix(in oklab, var(--cream) 10%, transparent);
    border-color: color-mix(in oklab, var(--coral-soft) 50%, transparent);
}
.sample-card.is-current {
    border-color: var(--coral);
    background: color-mix(in oklab, var(--coral) 10%, transparent);
    box-shadow: inset 3px 0 0 var(--coral);
}

.sample-play {
    flex: 0 0 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--coral-deep); color: var(--surface);
    font-size: 1.3rem;
    transition: background-color var(--dur-short);
}
.sample-play:hover { background: var(--coral-ink); }
.sample-card.is-playing .sample-play { background: var(--coral-deep); }

/* play/pause icon swap */
.icon-pause { display: none; }
.is-playing .icon-pause { display: block; }
.is-playing .icon-play { display: none; }

.sample-body { flex: 1; min-width: 0; }
.sample-tag {
    display: inline-block;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
    color: var(--coral-soft); background: color-mix(in oklab, var(--coral) 16%, transparent);
    border-radius: 999px; padding: 0.15em 1em; margin-bottom: 0.4rem;
}
.sample-title {
    font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600;
    letter-spacing: 0.06em; line-height: 1.5;
    color: var(--cream);
}
.sample-meta { font-size: 0.82rem; color: color-mix(in oklab, var(--cream-soft) 60%, transparent); margin-top: 0.15rem; }

.sample-side {
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem;
}
.sample-duration {
    /* 数字の高さが揃うようサンセリフを使用（Cormorantはオールドスタイル数字のため不揃いに見える） */
    font-family: var(--font-sans); font-weight: 300;
    font-size: 0.88rem; letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: color-mix(in oklab, var(--cream-soft) 55%, transparent);
}
.sample-eq { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.sample-eq span {
    width: 3px; border-radius: 2px; background: var(--coral-soft);
    height: 100%;
    transform: scaleY(0.3); transform-origin: bottom;
    transition: background-color 0.3s;
}
.sample-card.is-playing .sample-eq span {
    background: var(--coral-strong);
    animation: eq 0.9s ease-in-out infinite;
}
.sample-card.is-playing .sample-eq span:nth-child(2) { animation-delay: 0.2s; }
.sample-card.is-playing .sample-eq span:nth-child(3) { animation-delay: 0.4s; }
.sample-card.is-playing .sample-eq span:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* ==========================================================================
   Profile
   ========================================================================== */
.section--profile { background: var(--surface); }

.profile-grid {
    display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: start;
}
.profile-photo {
    position: sticky; top: calc(var(--header-h) + 2rem);
}
.profile-photo img {
    aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
/* 写真の背後にずらしたコーラルの色面 */
.profile-photo::before {
    content: ""; position: absolute; z-index: -1;
    inset: 1.8rem -1.8rem -1.8rem 1.8rem;
    background: linear-gradient(150deg, var(--coral-tint), var(--coral-soft));
    border-radius: var(--radius-lg);
}

.profile-name {
    font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600;
    letter-spacing: 0.14em; margin-bottom: 1.4rem;
}
.profile-name-en {
    display: inline-block;
    font-family: var(--font-latin); font-weight: 400;
    font-size: 0.95rem; letter-spacing: 0.24em; color: var(--ink-faint);
    margin-left: 0.8em;
}
.profile-bio { color: var(--ink-soft); margin-bottom: 2.4rem; }

.stats {
    display: flex; gap: clamp(2rem, 5vw, 4rem);
    padding: 1.8rem 0; margin-bottom: 2.4rem;
    border-block: 1px solid var(--line);
}
.stat-number {
    font-family: var(--font-latin); font-size: clamp(2.4rem, 4vw, 3.2rem);
    line-height: 1.1; color: var(--coral-deep); letter-spacing: 0.04em;
}
.stat-number small { font-size: 0.55em; margin-left: 0.06em; }
.stat-label { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.1em; margin-top: 0.3rem; }

.profile-detail { margin-bottom: 1.9rem; }
.profile-detail-title {
    font-size: 0.9rem; font-weight: 500; letter-spacing: 0.14em;
    margin-bottom: 0.8rem;
    display: flex; align-items: center; gap: 0.7em;
}
.profile-detail-title::before {
    content: ""; width: 1.4em; height: 1px; background: var(--coral-strong);
    flex-shrink: 0;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
/* 非インタラクティブ要素なのでホバー演出は付けない */
.tag-list li {
    font-size: 0.85rem; letter-spacing: 0.06em;
    padding: 0.45em 1.3em;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 999px; color: var(--ink-soft);
}

/* Services */
.section--service { background: var(--bg); }
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.service-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 1.7rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: border-color var(--dur-mid);
}
/* ホバー時に天辺から伸びるアクセントライン */
.service-card::after {
    content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem;
    height: 3px; border-radius: 0 0 3px 3px;
    background: var(--coral-strong);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.45s var(--ease);
}
.service-card:hover { border-color: var(--coral-soft); }
.service-card:hover::after { transform: scaleX(1); }
/* 巨大なセリフ数字を背景のデザイン要素に */
.service-number {
    position: absolute; top: 0.7rem; right: 1.1rem;
    font-family: var(--font-latin);
    font-size: clamp(3.8rem, 5vw, 4.8rem);
    line-height: 1;
    color: var(--coral-strong);
    opacity: 0.25;
    pointer-events: none;
}
.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.7;
    margin: auto 0 0.7rem;
    padding-top: 3.2rem;
}
.service-card p:last-child {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--ink-soft);
}

/* ==========================================================================
   Works
   ========================================================================== */
.section--works { background: var(--bg-alt); }

.works-filter {
    display: flex; flex-wrap: wrap; gap: 0.6rem;
    margin-bottom: 2.4rem;
}
.filter-btn {
    min-height: 44px;
    font-size: 0.85rem; letter-spacing: 0.08em;
    padding: 0.5em 1.5em; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
    white-space: nowrap;
    transition: border-color var(--dur-short), color var(--dur-short), background-color var(--dur-short);
}
.filter-btn:hover { border-color: var(--coral-soft); color: var(--coral-deep); }
.filter-btn.is-active {
    background: var(--ink); border-color: var(--ink); color: var(--surface);
}

.works-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    counter-reset: work;
}
.work-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem 1.4rem;
    border-top: 3px solid transparent;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--dur-mid);
    display: flex; flex-direction: column; gap: 0.45rem;
}
/* 通し番号（フィルター時は表示中のカードだけで自動的に振り直される） */
.work-card::before {
    counter-increment: work;
    content: counter(work, decimal-leading-zero);
    position: absolute; top: 1.3rem; right: 1.3rem;
    font-family: var(--font-latin);
    font-size: 1.05rem; line-height: 1;
    color: var(--coral-soft);
    transition: color var(--dur-short);
}
.work-card:hover { border-top-color: var(--coral-strong); }
.work-card:hover::before { color: var(--coral-deep); }
.work-tag {
    align-self: flex-start;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em;
    color: var(--coral-ink);
}
.work-title {
    font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600;
    letter-spacing: 0.04em; line-height: 1.6;
    flex: 1;
}
.work-client { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.7; }
.service-card, .work-card, .profile-body, .contact-info, .contact-form {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* show-more / filter states (driven by JS) */
.work-card.is-extra { display: none; }
.works-grid.show-all .work-card.is-extra { display: flex; }
.work-card.is-filtered-out { display: none !important; }

.works-more { text-align: center; margin-top: 2.6rem; }
.works-more .btn { min-width: 220px; }
.works-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.4rem; }

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact {
    background: linear-gradient(180deg, var(--bg) 0%, var(--coral-tint) 100%);
}

.contact-grid {
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}
.contact-info {
    background: var(--ink);
    color: var(--cream-soft);
    border-radius: var(--radius-lg);
    padding: 2.6rem 2.4rem;
    box-shadow: var(--shadow-md);
}
.contact-guide {
    margin: 0 0 1.8rem;
}
.contact-guide-title {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--coral-soft);
    margin-bottom: 0.55rem;
}
.contact-guide li {
    position: relative;
    padding-left: 1em;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--cream-muted);
}
.contact-guide li::before {
    content: "";
    position: absolute;
    top: 0.82em;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--coral-soft);
}
.contact-sns {
    display: inline-flex; align-items: center; gap: 0.6em;
    min-height: 44px;
    font-size: 0.9rem; color: var(--cream-faint);
    transition: color var(--dur-short);
}
.contact-sns .icon { font-size: 1.25em; }
.contact-sns:hover { color: var(--coral-soft); }

.contact-form {
    display: grid; gap: 1.6rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2.4rem) clamp(1.25rem, 3vw, 2.2rem);
    box-shadow: var(--shadow-md);
}
.form-field label {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em 0.7em;
    font-size: 0.88rem; font-weight: 500; letter-spacing: 0.08em;
    margin-bottom: 0.65rem;
}
.required {
    flex-shrink: 0;
    font-size: 0.68rem; font-weight: 500; color: var(--surface);
    background: var(--coral-ink);
    border-radius: 4px; padding: 0.1em 0.7em; letter-spacing: 0.12em;
}
.form-field input,
.form-field textarea {
    width: 100%;
    min-width: 0;
    font: inherit; color: var(--ink);
    font-size: 1rem;
    line-height: 1.7;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.85em 1.1em;
    /* フォーカスリング（box-shadow）は瞬時に表示するため transition に含めない */
    transition: border-color var(--dur-short);
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--coral-strong);
    box-shadow: var(--ring-coral);
}
.form-field.has-error input,
.form-field.has-error textarea { border-color: var(--error); }
textarea { resize: vertical; min-height: 140px; }

.form-status { font-size: 0.88rem; min-height: 1.5em; }
.form-status.is-error { color: var(--error); }
.form-honeypot { display: none; }
.contact-form .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--ink); color: var(--cream-soft);
    padding: 3.2rem 0 6.5rem; /* extra bottom room for player bar */
}
.footer-inner { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.footer-brand { display: flex; flex-direction: column; gap: 0.2rem; }
.footer-name { font-family: var(--font-serif); font-size: 1.2rem; letter-spacing: 0.2em; }
.footer-role {
    font-family: var(--font-latin);
    font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--coral-soft);
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; }
.footer-nav a {
    display: inline-flex; align-items: center; min-height: 44px;
    font-family: var(--font-latin); font-size: 0.95rem; letter-spacing: 0.16em;
    white-space: nowrap;
    color: var(--cream-faint); transition: color var(--dur-short);
}
.footer-nav a:hover { color: var(--coral-soft); }
/* コピーライトの上に淡い区切り線（暗色背景なので --line ではなく明るい半透明を使う） */
.footer-copy {
    width: min(360px, 100%);
    padding-top: 1.25rem;
    border-top: 1px solid color-mix(in oklab, var(--cream-soft) 14%, transparent);
    font-size: 0.8125rem; color: var(--cream-faint); letter-spacing: 0.06em;
}

/* ==========================================================================
   Sticky player bar
   ========================================================================== */
.player-bar {
    position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 190;
    transform: translate(-50%, calc(100% + 1.5rem + env(safe-area-inset-bottom, 0px)));
    width: min(720px, 100% - 2rem);
    display: flex; align-items: center; gap: 1.1rem;
    background: color-mix(in oklab, var(--ink) 82%, transparent);
    color: var(--cream-soft);
    border-radius: 999px;
    padding: 0.8rem 1.4rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    /* visibility も切り替え: 非表示中に中のボタンへ Tab フォーカスが当たるのを防ぐ */
    visibility: hidden;
    transition: transform 0.5s var(--ease), visibility 0.5s;
}
.player-bar.is-active { transform: translate(-50%, 0); visibility: visible; }
/* フォールバック: backdrop-filter 非対応では不透明な背景に切り替える */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .player-bar { background: color-mix(in oklab, var(--ink) 96%, transparent); }
}

.player-play {
    flex: 0 0 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--coral-deep); color: var(--surface); font-size: 1.05rem;
    transition: background-color var(--dur-short);
}
.player-play:hover { background: var(--coral-ink); }

.player-main { flex: 1; min-width: 0; }
.player-top {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1rem; margin-bottom: 0.35rem;
}
.player-title {
    min-width: 0;
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-time {
    flex-shrink: 0;
    font-family: var(--font-sans); font-weight: 300;
    font-size: 0.78rem; letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    color: var(--cream-faint); white-space: nowrap;
}
.player-progress {
    position: relative; height: 24px; border-radius: 999px;
    cursor: pointer;
}
.player-progress::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%;
    height: 5px; border-radius: inherit; transform: translateY(-50%);
    background: color-mix(in oklab, var(--cream) 18%, transparent);
}
.player-progress:focus-visible { outline: 2px solid var(--coral-soft); outline-offset: 4px; }
.player-progress-fill {
    position: absolute; left: 0; top: 50%; width: 0%; height: 5px;
    transform: translateY(-50%);
    border-radius: inherit;
    background: var(--coral-strong);
}
.player-progress-fill::after {
    content: ""; position: absolute; right: -5px; top: 50%;
    transform: translateY(-50%);
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--surface); box-shadow: 0 1px 4px oklch(0% 0 0 / 0.4);
    opacity: 0; transition: opacity 0.25s;
}
/* ホバー時だけでなく、キーボード操作（スライダーへのフォーカス）中もつまみを表示する */
.player-bar:hover .player-progress-fill::after,
.player-bar:focus-within .player-progress-fill::after { opacity: 1; }

.player-volume { display: flex; align-items: center; gap: 0.5rem; color: var(--cream-faint); }
.player-volume input[type="range"] {
    width: 76px; height: 4px;
    -webkit-appearance: none; appearance: none;
    background: color-mix(in oklab, var(--cream) 18%, transparent); border-radius: 999px;
    cursor: pointer;
}
.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--coral-soft);
}
.player-volume input[type="range"]::-moz-range-thumb {
    width: 12px; height: 12px; border: none; border-radius: 50%;
    background: var(--coral-soft);
}
.player-close {
    flex: 0 0 44px; height: 44px; display: grid; place-items: center;
    color: var(--cream-faint); font-size: 1.1rem;
    transition: color var(--dur-short);
}
.player-close:hover { color: var(--cream); }

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
    position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 180;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    font-size: 1.2rem;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity 0.4s, visibility 0.4s, transform 0.4s var(--ease),
                background-color 0.3s, color 0.3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--coral-deep); color: var(--surface); border-color: var(--coral-deep); }
.player-bar.is-active ~ .back-to-top { bottom: calc(7rem + env(safe-area-inset-bottom, 0px)); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .works-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
}

@media (max-width: 860px) {
    /* --- Mobile nav --- */
    .menu-toggle {
        display: grid; place-items: center; gap: 0;
        width: 46px; height: 46px; z-index: 250;
        position: relative;
    }
    .menu-toggle span {
        position: absolute; left: 50%; top: 50%;
        width: 24px; height: 2px; border-radius: 2px;
        background: var(--ink);
        transition: transform 0.35s var(--ease);
    }
    .menu-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
    .menu-toggle span:nth-child(2) { transform: translate(-50%, calc(-50% + 4px)); }
    .menu-toggle.is-open span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
    .menu-toggle.is-open span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

    .nav-list {
        position: fixed; inset: 0; z-index: 240;
        flex-direction: column; justify-content: flex-start; gap: clamp(0.75rem, 4vh, 2.4rem);
        padding: calc(var(--header-h) + 1rem) var(--page-gutter) max(1.5rem, env(safe-area-inset-bottom, 0px));
        overflow-y: auto; overscroll-behavior: contain;
        background: color-mix(in oklab, var(--bg) 97%, transparent);
        backdrop-filter: blur(16px);
        opacity: 0; visibility: hidden;
        transition: opacity 0.4s, visibility 0.4s;
    }
    .nav-list > li { flex-shrink: 0; }
    .nav-list > li:first-child { margin-top: auto; }
    .nav-list > li:last-child { margin-bottom: auto; }
    .nav-list.is-open { opacity: 1; visibility: visible; }
    /* メニュー開放中は背景のスクロールを止める */
    body.menu-open { overflow: hidden; }
    .nav-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.5rem; }
    .nav-link--cta { font-size: 1rem; padding: 0.85em 2.4em; }

    /* --- Hero --- */
    .hero { min-height: auto; padding-bottom: 5.5rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero-text { order: 2; text-align: center; }
    .hero-eyebrow, .hero-name { justify-content: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { order: 1; }
    .hero-photo-frame { width: min(300px, 72vw); }
    .hero-wave { right: -0.6rem; }

    /* --- Sections --- */
    .profile-grid, .contact-grid { grid-template-columns: 1fr; }
    .profile-photo {
        position: relative;
        top: auto;
        width: min(360px, 100%);
        max-width: 100%;
        margin-inline: auto;
    }
    /* モバイルでは色面のずらし量を抑えて横はみ出しを防ぐ */
    .profile-photo::before { inset: 0.8rem -0.8rem -0.8rem 0.8rem; }
    .works-grid { grid-template-columns: repeat(2, 1fr); }
    .pc-only { display: none; }
}

@media (max-width: 560px) {
    :root { --header-h: 68px; }

    .section { padding: 4rem 0; }
    .section-head { margin-bottom: 2.2rem; }
    .section-title {
        font-size: clamp(1.35rem, 6.5vw, 1.55rem);
        letter-spacing: 0.04em;
    }

    .brand-name {
        font-size: 1.08rem;
        letter-spacing: 0.1em;
    }
    .brand-role {
        font-size: 0.66rem;
        letter-spacing: 0.18em;
    }
    .btn {
        padding: 0.9em 1.4em;
        letter-spacing: 0.04em;
    }

    .hero {
        padding-top: calc(var(--header-h) + 2rem);
        padding-bottom: 4rem;
    }
    .hero-inner { gap: 2rem; }
    .hero-photo-frame { width: min(240px, 74vw); }
    .hero-wave { display: none; }
    .hero-eyebrow {
        font-size: 0.86rem;
        letter-spacing: 0.16em;
        margin-bottom: 1rem;
    }
    .eyebrow-line { width: 2rem; }
    .hero-title {
        font-size: 2.3rem;
        letter-spacing: 0.03em;
        margin-bottom: 1.2rem;
    }
    .hero-lead { margin-bottom: 1.6rem; }
    .hero-name {
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        margin-bottom: 1.8rem;
    }
    .hero-name-ja { padding-left: 0; }
    .hero-name-ja::before { content: none; }
    .hero-name-en {
        font-size: 0.8rem;
        letter-spacing: 0.18em;
    }

    .clients {
        padding: 1.4rem 0;
    }
    .clients-label {
        font-size: 0.7rem;
        letter-spacing: 0.14em;
        line-height: 1.6;
        margin-bottom: 0.8rem;
    }
    .clients-list { row-gap: 0.45rem; }
    .clients-list li {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
        padding: 0 0.65rem;
    }
    .clients-list li:nth-child(n+7) { display: none; }

    .works-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .service-card { min-height: 0; padding: 1.35rem; }
    .service-card h3 { margin-top: 0; padding-top: 3rem; }
    .service-number { font-size: 3.1rem; top: 0.5rem; right: 0.9rem; }

    .sample-card {
        align-items: flex-start;
        border-radius: var(--radius);
        padding: 1rem;
        gap: 0.85rem;
    }
    .sample-play { flex-basis: 46px; height: 46px; }
    .sample-title { font-size: 1rem; }
    .sample-meta,
    .sample-side { display: none; }

    .profile-name { font-size: 1.45rem; }
    .profile-name-en {
        display: block;
        margin: 0.25rem 0 0;
    }

    .profile-photo {
        width: min(300px, 88vw);
    }
    .profile-photo::before { inset: 0.6rem -0.6rem -0.6rem 0.6rem; }
    .profile-bio {
        line-height: 1.85;
        margin-bottom: 1.6rem;
    }
    .profile-grid { gap: 2rem; }
    .profile-body { min-width: 0; }
    .stats {
        justify-content: space-between;
        gap: 1rem;
        padding: 1.2rem 0;
        margin-bottom: 1.8rem;
    }
    .stat-number { font-size: 2.1rem; }
    .stat-label { font-size: 0.78rem; }
    .tag-list li {
        font-size: 0.8rem;
        padding: 0.4em 1em;
    }

    .works-filter {
        gap: 0.45rem;
        margin-bottom: 1.6rem;
    }
    .filter-btn {
        flex: 1 1 calc(50% - 0.45rem);
        padding: 0.55em 0.7em;
    }
    .work-card { padding: 1.3rem 1.2rem 1.2rem; }
    .work-card::before { top: 1rem; right: 1rem; }
    .works-grid:not(.show-all) .work-card:nth-of-type(n+5) { display: none; }
    .works-note { display: none; }

    .contact-info,
    .contact-form {
        border-radius: var(--radius);
        padding: clamp(1.25rem, 5vw, 1.5rem);
    }
    .section--contact .section-title {
        font-size: 1.38rem;
        letter-spacing: 0;
        line-height: 1.6;
    }
    textarea { min-height: 120px; }

    .hero-actions .btn { width: 100%; }

    .player-bar {
        width: calc(100% - 1rem);
        border-radius: 20px;
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
        bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }
    .player-play { flex-basis: 44px; height: 44px; }
    .player-volume,
    .player-time { display: none; }

    .footer { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
    .footer-nav { gap: 0.4rem 1.4rem; }
    .back-to-top { display: none; }
}

@media (max-width: 420px) {
    .hero-photo-frame { width: min(210px, 72vw); }
    .hero-title { font-size: 2.1rem; }
    .hero-name-en { display: none; }
    .clients-list li:nth-child(n+5) { display: none; }
}

/* 横向きのスマホではリンク間隔を詰め、さらに低い画面ではスクロールで補う。 */
@media (max-width: 860px) and (max-height: 560px) {
    .nav-list { gap: 0.5rem; }
    .nav-link { font-size: 1.15rem; padding-block: 0.2em; }
    .nav-link--cta { font-size: 0.95rem; padding: 0.4em 2rem; }
}
