@charset "UTF-8";

/* ============================================================
   Deploy Corporate — Base (v2)
   reset / typography / link / focus / form control
   layer: base
   ============================================================ */

@layer base {

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* sticky ヘッダーの下にアンカー先が隠れないようにする */
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink-700);
    font-family: var(--font-base);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    /* 日本語の詰め組み。約物のアキが詰まって和欧混植が締まる */
    font-feature-settings: "palt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------
   見出し
   旧実装は h1..h6 に無条件で色を当てていたため、bg-primary や
   bg-dark のセクションで暗い見出しが暗い地に乗って潰れていた。
   ここでは --bs-heading-color 経由にして、反転面（tokens.css の
   .bg-primary / .bg-dark / .on-dark）が色を差し替えられるようにする。
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-top: 0;
    margin-bottom: var(--sp-4);
    color: var(--bs-heading-color, var(--ink-900));
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    /* 最終行の孤立を防ぐ。
       balance ではなく pretty を使う。balance は行を組み直すため、
       日本語では語の途中で改行してしまう（実測でトップの見出しが
       「DevOps・デプロイ / イメント自動化で」と分断された）。
       pretty は孤立行だけを解消し、改行位置は日本語の禁則に委ねる。 */
    text-wrap: pretty;
    /* 日本語の厳格な禁則処理。行頭に小書きの仮名・句読点が来ない */
    line-break: strict;
    word-break: normal;
    overflow-wrap: break-word;
}

h1, .h1 {
    font-size: var(--fs-display);
    font-weight: var(--fw-bold);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-display);
}
h2, .h2 { font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.25rem); font-weight: var(--fw-bold); }
h3, .h3 { font-size: clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem); }
h4, .h4 { font-size: var(--fs-xl); }
h5, .h5 { font-size: var(--fs-lg); }
h6, .h6 {
    font-size: var(--fs-sm);
    font-family: var(--font-mono);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
}

/* ------------------------------------------------------------
   本文
   ------------------------------------------------------------ */
p {
    margin-top: 0;
    margin-bottom: var(--sp-5);
    line-height: var(--lh-body);
    /* 端物・孤立行の抑制 */
    text-wrap: pretty;
    line-break: strict;
    word-break: normal;
    overflow-wrap: break-word;
}
p:last-child { margin-bottom: 0; }

.lead {
    font-size: var(--fs-lg);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: var(--ink-600);
}

small, .small { font-size: var(--fs-sm); }
.x-small { font-size: var(--fs-xs); }

strong, b { font-weight: var(--fw-semibold); }

/* 数値は必ず等幅数字にする。桁が揺れて表が波打つのを防ぐ */
table, .metric, .metric-value, .stat-number, .achievement-number,
.benefit-number, .price, .price-amount, .amount, .number,
[class$="-number"], [class$="-value"], [class$="-metric"] {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   リンク
   ------------------------------------------------------------ */
a {
    color: var(--bs-link-color, var(--accent));
    text-decoration: none;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: color var(--dur-fast) var(--ease-out),
                text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover {
    color: var(--bs-link-hover-color, var(--accent-700));
    text-decoration: underline;
}

/* 本文中のリンクは常に下線を持たせる（色だけの区別に頼らない）。
   ナビ・フッター・カード内のリンク一覧は導線であって本文ではないので
   対象から外す。 */
:is(p, li, .article-body, .entry-content, .blog-content, .privacy-content)
  > a:not([class]),
.article-body :is(p, li) > a:not([class]),
.entry-content :is(p, li) > a:not([class]) {
    text-decoration: underline;
    text-decoration-color: var(--accent-300);
}
:is(.footer, .header, .navbar, .page-breadcrumb, .quick-links, .entry-toc, .js-toc)
  a:not([class]) {
    text-decoration: none;
}
:is(p, li, .article-body, .entry-content) > a:not([class]):hover {
    text-decoration-color: currentColor;
}

/* ------------------------------------------------------------
   フォーカス — キーボード操作の可視性はアクセシビリティ要件
   ------------------------------------------------------------ */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

::selection {
    background: var(--accent-100);
    color: var(--ink-900);
}

/* ------------------------------------------------------------
   本文カラム幅。和文で約40字（欧文65字相当）
   ------------------------------------------------------------ */
.article-body > p,
.entry-content > p,
.page-lead,
.section-subtitle,
.hero-lead,
.hero-description {
    max-width: var(--measure);
}
/* 中央寄せされている箇所では measure も中央に置く */
.text-center > .section-subtitle,
.text-center .page-lead,
.section-header.text-center .section-subtitle {
    margin-inline: auto;
}

/* ------------------------------------------------------------
   メディア
   ------------------------------------------------------------ */
img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}
img { border-style: none; }
.object-cover { object-fit: cover; }

/* ------------------------------------------------------------
   リスト
   ------------------------------------------------------------ */
ul, ol { margin-top: 0; margin-bottom: var(--sp-5); padding-left: 1.35em; }
li { margin-bottom: var(--sp-2); line-height: var(--lh-body); }
li:last-child { margin-bottom: 0; }
ul.list-unstyled, ol.list-unstyled { padding-left: 0; }

/* ------------------------------------------------------------
   区切り
   ------------------------------------------------------------ */
hr {
    margin: var(--sp-10) 0;
    border: 0;
    border-top: 1px solid var(--line);
    opacity: 1;
}

/* ------------------------------------------------------------
   表
   ------------------------------------------------------------ */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
th, td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
thead th {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--ink-500);
    border-bottom: 1px solid var(--line-strong);
}

/* ------------------------------------------------------------
   コード
   ------------------------------------------------------------ */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}
code {
    padding: 0.15em 0.4em;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    color: var(--ink-800);
}
pre {
    margin: 0 0 var(--sp-5);
    padding: var(--sp-5);
    overflow-x: auto;
    background: var(--ink-900);
    color: #E8E5E0;
    border-radius: var(--radius-lg);
    line-height: 1.65;
}
pre code {
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
}

blockquote {
    margin: var(--sp-8) 0;
    padding-left: var(--sp-6);
    border-left: 2px solid var(--accent);
    color: var(--ink-600);
}

/* ------------------------------------------------------------
   フォームコントロール
   ------------------------------------------------------------ */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

input[type="text"], input[type="email"], input[type="tel"],
input[type="url"], input[type="search"], input[type="number"],
input[type="password"], input[type="date"], select, textarea,
.form-control, .form-select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--surface);
    color: var(--ink-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
input:hover, select:hover, textarea:hover,
.form-control:hover, .form-select:hover {
    border-color: var(--ink-400);
}
input:focus, select:focus, textarea:focus,
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-focus);
}
textarea { min-height: 9rem; resize: vertical; }

::placeholder { color: var(--ink-400); opacity: 1; }

label, .form-label {
    display: block;
    margin-bottom: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--ink-800);
}

/* 必須・エラー表示。alert() には頼らずインラインで出す */
.form-required { color: var(--state-danger); font-weight: var(--fw-medium); }
.is-invalid, input:user-invalid, textarea:user-invalid {
    border-color: var(--state-danger);
}
.invalid-feedback, .form-error {
    display: block;
    margin-top: var(--sp-2);
    font-size: var(--fs-sm);
    color: var(--state-danger);
}

/* ------------------------------------------------------------
   グラデーション文字の無効化
   旧実装の .text-gradient は背景クリップで文字を透明にしており、
   背景色が別ファイルで差し替わると文字が読めなくなっていた
   （本番のヒーロー「開発効率を革新する」が実測 1.3:1）。
   グラデーションは廃止したので、単色に落として必ず読めるようにする。
   マークアップ側の掃除は後続 PR で行う。
   ------------------------------------------------------------ */
.text-gradient,
.hero-section h1 span,
.hero-title span,
h1 .accent, h2 .accent, .accent {
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: currentColor;
}
.text-gradient { color: var(--accent); }
.hero-section h1 span,
.hero-title span,
h1 .accent {
    color: var(--accent);
}

/* ------------------------------------------------------------
   スキップリンク — キーボード利用者向け
   ------------------------------------------------------------ */
.skip-to-content {
    position: absolute;
    left: var(--sp-4);
    top: var(--sp-4);
    z-index: var(--z-toast);
    padding: var(--sp-3) var(--sp-5);
    background: var(--ink-900);
    color: #fff;
    border-radius: var(--radius-md);
    transform: translateY(-200%);
    transition: transform var(--dur-base) var(--ease-out);
}
.skip-to-content:focus {
    transform: translateY(0);
    color: #fff;
}

/* ------------------------------------------------------------
   モーション
   MOTION_INTENSITY 4。入場は 1 回だけ、無限ループは持たない。
   ------------------------------------------------------------ */
.fade-in-up {
    animation: dp-rise var(--dur-slow) var(--ease-out) both;
}
@keyframes dp-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------
   印刷
   ------------------------------------------------------------ */
@media print {
    body { background: #fff; color: #000; }
    .header, .footer, .skip-to-content, .cta-band, .cta-section { display: none; }
    a { text-decoration: underline; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

}
