/* トップページの土台: 色と書体の変数、リセット、ページ全体で使う部品（見出し・ボタン・リンクなど）、出現アニメーション。
   生成りの紙色に明朝体。読み物メディアらしい落ち着きと信頼感を前面に出す。
   読み込む順: base.css → sections.css → hero.css → making.css（スマホ版はこのあとに sp.css を重ねる。src/components/layout.tsx） */

:root {
    --paper: #f6f1e7;
    --paper-2: #eee6d6;
    --paper-3: #fbf8f1;
    --ink: #1d1b18;
    --ink-2: #4b463e;
    --muted: #8b8375;
    --line: #d8cfbb;
    --blue: #1a7da6;
    --brand: #2191bc;
    --yellow: #fff45f;
    --red: #b4422d;
    --navy: #0a1730;
    --cyan: #6fd6ff;
    --mincho: "Shippori Mincho B1", "Noto Serif JP", serif;
    --latin: "Cormorant Garamond", "Shippori Mincho B1", serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── リセット ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

/* PC 版は幅 1280px で組む（スマホ版は sp.css で幅の制限を外す） */
body {
    margin: 0;
    min-width: 1280px;
    background: var(--paper);
    color: var(--ink);
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15.5px;
    line-height: 2;
    font-feature-settings: "palt";
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
fieldset {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

fieldset {
    border: 0;
    min-width: 0;
}

img,
svg,
iframe {
    display: block;
    max-width: 100%;
}

iframe {
    border: 0;
}

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

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
    padding: 0;
}

[hidden] {
    /* biome-ignore lint/complexity/noImportantStyles: display を指定した部品でも hidden 属性を必ず効かせる */
    display: none !important;
}

mark {
    background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 94%, transparent 94%);
    color: inherit;
}

/* ── 部品 ── */

/* ロゴ: SVG をマスクにして currentColor で塗る（明るい背景でも暗い背景でも同じファイルを使う） */
.logo-mark {
    display: inline-block;
    width: 1em;
    aspect-ratio: 1352 / 1456;
    background-color: currentColor;
    mask: url("/static/images/logo-mark.svg") center / contain no-repeat;
    -webkit-mask: url("/static/images/logo-mark.svg") center / contain no-repeat;
}

.container {
    width: 1160px;
    margin: 0 auto;
}

.heading__en {
    font: italic 500 22px / 1 var(--latin);
    letter-spacing: 0.04em;
    color: var(--blue);
}

.rule {
    display: block;
    width: 56px;
    height: 1px;
    background: var(--ink);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 20px 40px;
    background: var(--ink);
    color: var(--paper-3);
    font-family: var(--mincho);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.1em;
    line-height: 1;
    transition:
        background-color 0.25s,
        transform 0.25s;
}

.btn::after {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
    transition: width 0.25s;
}

.btn:hover {
    background: var(--blue);
}

.btn:hover::after {
    width: 44px;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ink);
    font-family: var(--mincho);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.06em;
    line-height: 1.4;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.link::after {
    content: "→";
    font-family: var(--latin);
    transition: transform 0.2s;
}

.link:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.link:hover::after {
    transform: translateX(4px);
}

/* ── セクション共通 ── */
.section {
    padding: 120px 0;
    border-top: 1px solid var(--line);
}

.heading {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-bottom: 72px;
    text-align: center;
}

.heading h2,
.lh__text h2 {
    font-family: var(--mincho);
    font-size: 42px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.14em;
}

.heading > p:last-child {
    margin-top: 6px;
    font-family: var(--mincho);
    font-size: 17px;
    line-height: 2;
    color: var(--ink-2);
}

/* ── 動き ── */

/* 画面に入ったら現れる要素（src/client/reveal.ts が is-in を付ける） */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
        transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* 「1 つの記事が生まれるまで」のパネル（src/client/deep-dive.ts が is-open を付ける）。
   中の記事シートを sticky で留めるため、開くときのアニメーション（transform）は付けない */
[data-deepdive-panel] {
    display: none;
}

[data-deepdive-panel].is-open {
    display: block;
}

/* 上から少し下りて現れる（送信完了の表示・スマホ版のメニュー） */
@keyframes drop-in {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        /* biome-ignore lint/complexity/noImportantStyles: 動きを減らす設定では、各部品のアニメーション指定より優先して止める */
        animation-duration: 0.01ms !important;
        /* biome-ignore lint/complexity/noImportantStyles: 同上 */
        animation-iteration-count: 1 !important;
    }
}
