/* ==========================================================================
   株式会社オカモト 共通スタイル（site.css）
   - 色・文字・余白などの共通ルールはここだけで管理します。
   - ページ専用の見た目は css/pages/*.css に分けています。
   - ヘッダー（赤いバー）は js/site-components.js 内で管理しており、ここでは触れません。
   ========================================================================== */

/* ---------- 1. デザイントークン ---------- */
:root {
  --red: #cc0033;
  --red-dark: #a80029;
  --red-soft: #fdeef1;
  --ink: #1b1f24;
  --text: #333a41;
  --muted: #5b636b;
  --line: #e3e5e8;
  --surface: #f6f5f3;
  --white: #fff;
  --navy: #16222f;
  --navy-2: #223446;
  --orange: #c4540a;
  --orange-soft: #fff1e4;
  --green: #1f6b45;
  --green-soft: #e8f4ed;
  --focus: #0b57d0;

  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;

  --header-h: 68px;
  --container: 1120px;
  --container-narrow: 800px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(60px, 9vw, 104px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(20, 30, 40, .06);
  --shadow: 0 10px 32px rgba(20, 30, 40, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. リセット・基本 ---------- */
*, *::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) + 24px);
}
body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
address { font-style: normal; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:target { scroll-margin-top: calc(var(--header-h) + 24px); }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  font-feature-settings: "palt";
  letter-spacing: .02em;
}
h1 { font-size: clamp(28px, 4.2vw, 42px); }
h2 { font-size: clamp(23px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 21px); }
h4 { font-size: 16px; }
strong, b { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible, .section--dark :focus-visible, .section--red :focus-visible {
  outline-color: #fff;
}
::selection { background: rgba(204, 0, 51, .18); }

/* スクロールバー（細く・ブランドカラー） */
* { scrollbar-width: thin; scrollbar-color: var(--red) #eee; }

.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 3000;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 10px;
  font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
main:focus { outline: none; }
.noscript-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #cc0033; padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.noscript-nav a { color: #fff; font-weight: 700; font-size: 13px; text-decoration: underline; padding: 6px 0; }

/* ---------- 3. レイアウト ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - var(--gutter) * 2, var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--soft { background: var(--surface); }
.section--dark { background: var(--navy); color: #e6ecf1; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--red { background: var(--red); color: #fff; }
.section--red h2, .section--red h3 { color: #fff; }

.stack > * + * { margin-top: var(--stack, 1.1em); }
.prose p + p { margin-top: 1.1em; }
.prose { max-width: 40em; }
.lead { font-size: clamp(16px, 1.6vw, 18px); line-height: 2; color: var(--text); max-width: 42em; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.8; }
.center { text-align: center; }
.center .lead, .center.prose { margin-inline: auto; }
.nowrap { white-space: nowrap; }
.nobr { display: inline-block; }
h1, h2, h3 { text-wrap: balance; }

.grid { display: grid; gap: var(--gap, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr)); }
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.split--top { align-items: start; }

/* 見出しブロック */
.section-head { margin-bottom: clamp(28px, 4.5vw, 52px); }
.section-head.center { text-align: center; }
.section-head h2 { margin-top: 10px; }
.section-head .lead { margin-top: 18px; }
.section-head.center .lead { margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); line-height: 1.4;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; flex: none; }
.section--dark .eyebrow { color: #ff8da6; }
.section--red .eyebrow { color: #fff; }

/* ページ先頭（下層ページ共通） */
.page-head {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(32px, 5vw, 56px)) 0 clamp(36px, 5vw, 60px);
  background: linear-gradient(180deg, var(--surface) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-top: 12px; }
.page-head .lead { margin-top: 18px; }
.page-head > .container { position: relative; z-index: 1; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #b6bbc0; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c6cacf; }
.breadcrumb a:hover { color: var(--red); text-decoration-color: currentColor; }
/* ページ先頭のゆるやかな飾り（装飾のみ・動きは停止可能） */
.page-head::before, .page-head::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
}
.page-head::before {
  width: clamp(220px, 34vw, 420px); aspect-ratio: 1; right: -6%; top: -18%;
  background: radial-gradient(circle at 35% 35%, rgba(204, 0, 51, .13), rgba(204, 0, 51, 0) 70%);
}
.page-head::after {
  width: clamp(120px, 18vw, 220px); aspect-ratio: 1; right: 14%; bottom: -30%;
  border: 2px solid rgba(204, 0, 51, .14);
}

/* ---------- 4. ボタン・リンク・タグ ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px; border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: .04em; line-height: 1.3; text-align: center;
  border: 2px solid transparent; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(204, 0, 51, .28); }
.btn--outline { border-color: var(--red); color: var(--red); background: transparent; }
.btn--outline:hover { background: var(--red); color: #fff; transform: translateY(-2px); }
.btn--white { background: #fff; color: var(--red-dark); }
.btn--white:hover { background: var(--red-soft); transform: translateY(-2px); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--red-dark); transform: translateY(-2px); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--arrow::after { content: "→"; font-weight: 400; transition: transform .25s var(--ease); }
.btn--arrow:hover::after { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link {
  color: var(--red-dark); font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.link:hover { color: var(--red); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--red-dark); min-height: 44px; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }
.prose a:not(.btn) { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1.4;
  padding: 3px 12px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark);
}
.tag--dark { background: var(--ink); color: #fff; }
.tag--now { background: var(--green-soft); color: var(--green); }
.tag--future { background: #fff; color: #4a5258; border: 1px solid #b9bec4; }
.tag--orange { background: var(--orange-soft); color: var(--orange); }
.tag--gray { background: #eceef0; color: #444c53; }

/* ---------- 5. カード・表 ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px); position: relative;
}
.card--hover { transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3d6da; }
.card--soft { background: var(--surface); border-color: transparent; }
.card--future { background: var(--surface); border-color: var(--line); }
.card h3 { margin-bottom: .6em; }

/* 項目名と内容の表（定義リスト）。狭い画面では縦並び */
.spec { border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(7em, 11em) 1fr; gap: 6px 24px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.spec dt { font-weight: 700; color: var(--ink); font-size: 15px; }
.spec dd { color: var(--text); }
.spec dd + dd { margin-top: .4em; }
@media (max-width: 640px) {
  .spec > div { grid-template-columns: 1fr; gap: 2px; padding: 14px 2px; }
  .spec dt { font-size: 13px; color: var(--red-dark); letter-spacing: .06em; }
}

.figure img { width: 100%; border-radius: var(--radius); }
.figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.photo { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-32 { aspect-ratio: 3 / 2; }

.check-list li { position: relative; padding-left: 1.7em; }
.check-list li + li { margin-top: .5em; }
.check-list li::before {
  content: ""; position: absolute; left: .15em; top: .7em; width: .8em; height: .45em;
  border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg) translateY(-50%);
}
.dot-list li { position: relative; padding-left: 1.2em; }
.dot-list li + li { margin-top: .4em; }
.dot-list li::before { content: ""; position: absolute; left: .2em; top: .85em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }


/* 他ページへの案内カード */
.grid > li { display: flex; flex-direction: column; }
.grid > li > a, .grid > li > article { flex: 1; }
.next-card { display: grid; gap: 4px; padding: 22px 24px; height: 100%; width: 100%; align-content: start; }
.next-card__label { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--red); }
.next-card strong { font-size: 18px; color: var(--ink); line-height: 1.5; }
.next-card span:last-child { font-size: 14px; color: var(--muted); line-height: 1.8; }

/* ---------- 6. フォーム ---------- */
.form-card { max-width: 780px; margin-inline: auto; }
.field { margin-bottom: 26px; }
.field > label, .field > .label, .field legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 8px; line-height: 1.5;
}
.field fieldset { border: 0; }
.req, .opt {
  font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 4px; line-height: 1.6; letter-spacing: .04em;
}
.req { background: var(--red); color: #fff; }
.opt { background: #e9ebed; color: #4a5258; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"],
.field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; font-size: 16px; line-height: 1.6;
  background: #fff; border: 1.5px solid #b9bec4; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.field select { appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23cc0033' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(11, 87, 208, .22);
}
.field [aria-invalid="true"] { border-color: #c0182f; background: #fff7f8; }
.field-hint { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.field-error { font-size: 14px; font-weight: 700; color: #b0102a; margin-top: 6px; display: flex; gap: 6px; line-height: 1.6; }
.field-error::before { content: "!"; flex: none; width: 1.3em; height: 1.3em; margin-top: .15em; border-radius: 50%; background: #b0102a; color: #fff; font-size: 12px; display: grid; place-items: center; }
.field-error:empty { display: none; }
.form-summary { border: 2px solid #c0182f; background: #fff7f8; border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 28px; color: #7d0c1f; }
.form-summary h2 { font-size: 16px; color: #7d0c1f; margin-bottom: 6px; }
.form-summary a { text-decoration: underline; font-weight: 700; }
.notice {
  border: 1px solid #f1c9d1; background: var(--red-soft); border-radius: var(--radius-sm);
  padding: 16px 20px; font-size: 15px; line-height: 1.85;
}
.notice--info { border-color: #cddcf4; background: #f0f5fd; }
.notice strong { color: var(--ink); }

/* ---------- 7. モーダル（<dialog>） ---------- */
html.is-modal-open { overflow: hidden; }
dialog.modal {
  border: 0; padding: 0; margin: auto; color: var(--text); background: #fff;
  width: min(760px, calc(100% - 24px)); max-height: min(90vh, 900px); max-height: min(90dvh, 900px);
  border-radius: 20px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modalIn .32s var(--ease); }
dialog.modal::backdrop { background: rgba(14, 22, 31, .74); animation: fadeIn .25s ease; }
dialog.modal--wide { width: min(980px, calc(100% - 24px)); }
dialog.modal[data-fallback] { position: fixed; inset: 0; z-index: 2500; height: fit-content; }
.modal__head { position: relative; flex: none; padding: 26px 70px 22px 30px; background: var(--navy); color: #fff; }
.modal__head h2, .modal__head h3 { color: #fff; font-size: clamp(18px, 2.4vw, 22px); }
.modal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.modal__body { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 28px 30px 34px; -webkit-overflow-scrolling: touch; }
.modal__close {
  position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); transition: background .2s;
}
.modal__close:hover { background: rgba(255, 255, 255, .3); }
.modal__close::before, .modal__close::after { content: ""; position: absolute; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.modal__close::before { transform: rotate(45deg); }
.modal__close::after { transform: rotate(-45deg); }
.modal__close:focus-visible { outline-color: #fff; }
.modal__foot { flex: none; padding: 14px 30px; border-top: 1px solid var(--line); background: var(--surface); display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  dialog.modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .modal__head { padding: 22px 64px 18px 20px; }
  .modal__body { padding: 22px 20px 30px; }
  .modal__foot { padding: 12px 20px; }
}

/* ---------- 8. 動き（出現・常時） ---------- */
/* 本文は初期状態で必ず表示。JS が準備できた場合のみ、画面外の要素を一時的に隠して出現させる */
.js-reveal .reveal:not(.is-visible) { opacity: 0; transform: translateY(22px); }
.js-reveal .reveal {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.js-reveal .reveal--left:not(.is-visible) { transform: translateX(-26px); }
.js-reveal .reveal--zoom:not(.is-visible) { transform: scale(.96); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-18px, 12px) rotate(6deg); } }
@keyframes pulseRing { 0% { transform: scale(.9); opacity: .55; } 70%, 100% { transform: scale(1.25); opacity: 0; } }
@keyframes shine { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dashFlow { to { stroke-dashoffset: -24; } }
@keyframes slowZoom { from { transform: scale(1.0); } to { transform: scale(1.08); } }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .page-head::before { animation: floatY 9s ease-in-out infinite; }
  html:not([data-motion="off"]) .page-head::after { animation: drift 12s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js-reveal .reveal:not(.is-visible) { opacity: 1 !important; transform: none !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; }
html[data-motion="off"] .js-reveal .reveal:not(.is-visible) { opacity: 1; transform: none; }
@media print { .js-reveal .reveal:not(.is-visible) { opacity: 1 !important; transform: none !important; } .entry-fab, .motion-toggle { display: none !important; } }

/* 動きの停止ボタン */
.motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .92); color: var(--ink); border: 1.5px solid rgba(0, 0, 0, .16);
  transition: background .2s, border-color .2s;
}
.motion-toggle:hover { background: #fff; border-color: var(--red); }
.motion-toggle::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.motion-toggle[data-state="off"]::before { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.motion-toggle--dark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); }
.motion-toggle--dark:hover { background: rgba(255, 255, 255, .25); border-color: #fff; }

/* 固定の応募ボタン（スクロール後に表示、フッター付近では隠す） */
.entry-fab {
  position: fixed; z-index: 900; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .04em;
  box-shadow: 0 8px 26px rgba(204, 0, 51, .38);
  transition: transform .3s var(--ease), opacity .3s, background-color .25s;
}
.entry-fab:hover { background: var(--red-dark); transform: translateY(-3px); }
.entry-fab.is-hidden { opacity: 0; transform: translateY(24px); pointer-events: none; visibility: hidden; }
@media (max-width: 640px) { .entry-fab { min-height: 48px; padding: 0 20px; font-size: 13px; } }

/* メディアクエリ共通 */
@media (max-width: 640px) {
  body { font-size: 15.5px; line-height: 1.9; }
  .btn { width: 100%; }
  .btn-row .btn { width: 100%; }
}
@media (min-width: 641px) { .btn-row .btn { min-width: 220px; } }
