/*
 * LEGENTA WORKS 共通スタイル
 * 色はメイン画像の配色（グリーン・白・羽のオレンジ）に合わせています。
 * 色を変えるときは :root の値だけを変更してください。
 */
:root {
  --green: #0d8a73;
  --green-dark: #0a5f50;
  --green-light: #e6f4f0;
  --orange: #f2a65a;
  --text: #24312e;
  --muted: #6b7a76;
  --bg: #ffffff;
  --bg-soft: #f6faf9;
  --line: #d6e4e0;
  --missing: #b2541a;
  --radius: 12px;
  --max: 1120px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- ヘッダー ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 3px solid var(--green);
}
.header-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 16px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { text-decoration: none; display: flex; align-items: center; }
.brand img { height: 40px; width: auto; max-width: calc(100vw - 96px); object-fit: contain; }
@media (max-width: 1599px) { .brand img { height: 46px; } }
@media (max-width: 559px) { .brand img { height: auto; width: 190px; } }
@media (max-width: 389px) { .brand img { width: 150px; } }
.brand-text { white-space: nowrap; font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; color: var(--green-dark); }
.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.global-nav a {
  text-decoration: none; color: var(--text); font-size: .82rem; font-weight: 600;
  padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.global-nav a:hover, .global-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.menu-toggle { display: none; }

/* 受講者ログイン（ヘッダー）：広い画面は右端、狭い画面はメニューボタンの左 */
.header-login {
  order: 2; flex: none; white-space: nowrap; text-decoration: none;
  background: var(--green); color: #fff; font-weight: 700; font-size: .85rem;
  padding: 8px 18px; border-radius: 999px;
}
.header-login:hover { background: var(--green-dark); }
.header-login.is-disabled { background: #c9d3d1; color: #5d6967; cursor: not-allowed; }
.header-login .unset-note { display: none; }
.global-nav { order: 1; }
@media (max-width: 1599px) {
  .header-login { margin-left: auto; }
  .menu-toggle { order: 3; flex: none; }
}
@media (max-width: 559px) {
  .header-login { padding: 7px 12px; font-size: .78rem; }
  .header-inner { gap: 8px; }
}
@media (max-width: 389px) {
  .header-login { padding: 6px 10px; font-size: .72rem; }
}

@media (max-width: 1599px) {
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .menu-toggle span:not(.sr-only) { display: block; height: 3px; background: var(--green-dark); border-radius: 2px; transition: .2s; }
  .nav-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .global-nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(var(--header-h) + 3px);
    background: #fff; border-bottom: 3px solid var(--green); box-shadow: 0 8px 16px rgba(0,0,0,.08);
  }
  .nav-open .global-nav { display: block; }
  .global-nav ul { flex-direction: column; padding: 8px 16px 16px; gap: 0; }
  .global-nav li { border-bottom: 1px solid var(--line); }
  .global-nav a { display: block; padding: 12px 4px; font-size: 1rem; border-bottom: 0; }
}

/* ---------- 共通レイアウト ---------- */
main { display: block; }
.section { padding: 56px 16px; }
.section.soft { background: var(--bg-soft); }
.container { max-width: var(--max); margin: 0 auto; }
.page-title {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; padding: 40px 16px;
}
.page-title h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); letter-spacing: .04em; }
.section h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 0 0 24px;
  padding-left: 14px; border-left: 6px solid var(--orange);
}
.section h3 { font-size: 1.1rem; margin: 0 0 12px; color: var(--green-dark); }

/* 本文 + レジェ子 の2カラム */
.with-legeko { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
@media (max-width: 767px) {
  .with-legeko { grid-template-columns: 1fr; }
  .with-legeko .legeko { margin: 0 auto; width: 180px; }
}

/* ---------- レジェ子画像枠 ---------- */
.legeko { width: 100%; max-width: 240px; }
.legeko.is-set img { width: 100%; border-radius: var(--radius); }
.legeko.is-missing {
  aspect-ratio: 3 / 4;
  border: 2px dashed var(--orange); border-radius: var(--radius);
  background: #fff8f0;
  display: flex; align-items: center; justify-content: center; text-align: center;
}

/* ---------- 未提供の空枠 ---------- */
.placeholder {
  border: 2px dashed var(--missing); border-radius: var(--radius);
  background: #fff7f2; color: var(--missing);
  padding: 20px; margin: 0 0 16px; font-size: .95rem;
}
.placeholder::before { content: "【未提供】"; font-weight: 700; }
.placeholder-label { color: var(--missing); font-weight: 700; font-size: .9rem; line-height: 1.6; }
.placeholder-img {
  aspect-ratio: 16 / 9; border: 2px dashed var(--missing); border-radius: var(--radius);
  background: #fff7f2; display: flex; align-items: center; justify-content: center;
  color: var(--missing); font-weight: 700; margin-bottom: 16px;
}

/* ---------- トップ：メイン画像 ---------- */
.hero { background: #fff; }
.hero-visual { position: relative; max-width: 1920px; margin: 0 auto; }
.hero-visual img { width: 100%; }
.hotspots { position: absolute; inset: 0; }
.hotspot { position: absolute; display: block; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 8px; }
.hotspot:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* PC：トップ画像の中にヘッダーが描かれているため、共通ヘッダーはスクロール後に表示 */
@media (min-width: 768px) {
  body[data-page="index"] #site-header {
    position: fixed; left: 0; right: 0;
    transform: translateY(-110%); transition: transform .25s;
  }
  body[data-page="index"] #site-header.is-scrolled,
  body[data-page="index"] #site-header.nav-open { transform: none; }
}
/* スマートフォン：スマホ用画像を表示し、PC画像用の押せる範囲は使わない */
@media (max-width: 767px) {
  .hotspots { display: none; }
}

/* ---------- 事業カード ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1023px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 559px)  { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--green);
  border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(10,95,80,.14); }
.card h3 { margin-bottom: 12px; }
.card .placeholder { padding: 12px; font-size: .85rem; flex: 1; }
.card .more { margin-top: auto; font-weight: 700; color: var(--green); }
.card .more::after { content: " →"; }

.links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 767px) { .links-grid { grid-template-columns: 1fr; } }
.link-tile {
  display: block; padding: 18px 20px; border-radius: var(--radius);
  background: var(--green-light); color: var(--green-dark); font-weight: 700; text-decoration: none;
}
.link-tile::after { content: " →"; }

/* ---------- ボタン ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 240px; padding: 14px 28px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; text-decoration: none; text-align: center;
  border: 0; font-size: 1rem; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--green-dark); }
.btn.secondary { background: var(--orange); color: #3a2410; }
.btn.is-disabled, .btn:disabled { background: #c9d3d1; color: #5d6967; cursor: not-allowed; }
.unset-note { display: block; font-size: .75rem; font-weight: 600; }
@media (max-width: 559px) { .btn { width: 100%; min-width: 0; } }

/* ---------- 料金表・概要表 ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; vertical-align: top; }
.table th { background: var(--green-light); width: 30%; color: var(--green-dark); }
.table td.missing { color: var(--missing); font-weight: 700; }
@media (max-width: 559px) {
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table th { border-bottom: 0; }
}

/* ---------- システム入口 ---------- */
.system-entry { border: 2px solid var(--green); border-radius: var(--radius); padding: 24px; background: #fff; }
.system-entry .note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 18px; max-width: 720px; }
.form label { font-weight: 700; display: block; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.form textarea { min-height: 160px; }
.form-status {
  border: 2px solid var(--missing); background: #fff7f2; color: var(--missing);
  border-radius: var(--radius); padding: 14px 18px; font-weight: 700;
}

/* ---------- フッター ---------- */
#site-footer { background: var(--green-dark); color: #fff; padding: 40px 16px 24px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: #fff; text-decoration: none; font-size: .9rem; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { margin: 24px 0 0; font-size: .8rem; opacity: .8; }

/* ---------- オープニング動画 ---------- */
.opening { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; }
.opening video { width: 100%; height: 100%; object-fit: contain; }
.opening-skip {
  position: absolute; right: 16px; bottom: 16px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid #fff; background: rgba(0,0,0,.4); color: #fff; cursor: pointer;
}

/* ---------- 本文まわりの補助スタイル ---------- */
.lead { font-weight: 700; color: var(--green-dark); margin: 0 0 12px; }
.section p { margin: 0 0 14px; }
.section .table { margin: 16px 0; }
.notes { margin: 12px 0 0; padding-left: 1.4em; }
.notes li { margin-bottom: 6px; }
.steps { margin: 0 0 16px; padding-left: 1.6em; }
.steps li { margin-bottom: 8px; }
.unset-box {
  border: 2px dashed var(--missing); background: #fff7f2; color: var(--missing);
  border-radius: var(--radius); padding: 12px 16px; font-weight: 600; font-size: .92rem;
}
.philosophy {
  margin: 0 0 16px; padding: 20px 24px; background: var(--green-light);
  border-left: 6px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.1rem; font-weight: 600;
}
.brand-copy { font-weight: 800; color: var(--green-dark); letter-spacing: .06em; }
.profile { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.profile-photo { max-width: 260px; }
.profile-name { text-align: center; font-weight: 700; margin: 12px 0 0; }
.profile-body h3 { font-size: 1.2rem; margin-bottom: 16px; }
@media (max-width: 767px) {
  .profile { grid-template-columns: 1fr; }
  .profile-photo { margin: 0 auto; width: 220px; }
}
.table thead th { width: auto; }
.card p:not(.placeholder) { font-size: .9rem; margin: 0 0 12px; flex: 1; }

/* ---------- トップ：受講者ログインの帯 ---------- */
.login-strip { background: var(--green-light); padding: 20px 16px; }
.login-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.login-strip p { margin: 0; font-weight: 700; color: var(--green-dark); }

.profile-img { width: 100%; height: auto; border-radius: var(--radius); }

/* ---------- トップ：事業案内（メインは1段ずつ、サブは2つ並べ） ---------- */
.cards.cards-main { grid-template-columns: 1fr; margin-bottom: 20px; }
.cards.cards-sub { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 559px) { .cards.cards-sub { grid-template-columns: 1fr; } }
@media (min-width: 768px) {
  .cards-main .card {
    display: grid; grid-template-columns: 280px 1fr auto; align-items: center; gap: 8px 32px; padding: 28px 32px;
  }
  .cards-main .card h3 { margin: 0; font-size: 1.35rem; }
  .cards-main .card p:not(.placeholder) { margin: 0; font-size: 1rem; }
  .cards-main .card .more { margin: 0; white-space: nowrap; }
}
@media (max-width: 767px) {
  .cards-main .card h3 { font-size: 1.25rem; }
}

/* ---------- 写真ギャラリー ---------- */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery figure:nth-child(2) img { object-position: 50% 58%; }
.gallery figure:nth-child(3) img { object-position: 50% 45%; }
.gallery figure:nth-child(4) img { object-position: 50% 52%; }
@media (max-width: 559px) { .gallery { grid-template-columns: 1fr; } }

/* ボタンの文字が1文字だけ折り返さないように */
.btn { text-wrap: balance; line-height: 1.5; }
@media (max-width: 559px) { .btn { font-size: .95rem; padding: 14px 18px; } }
.system-entry .btn-row { margin-top: 16px; }

/* お問い合わせフォーム：スパム対策の隠し欄と注意書き */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
