/* ===========================
   先生のためのAIパーク — みろんイラストベース
   =========================== */

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

:root {
  /* イラストから抽出した色 */
  --cream:        #F5EDD8;
  --cream-dark:   #EDE0C4;
  --pink-muted:   #D4A0A0;
  --pink-light:   #F2DDD9;
  --sage:         #8FAF8A;
  --sage-light:   #C8DCC5;
  --sky:          #A8C8E0;
  --sky-light:    #D4E8F4;
  --brown:        #8B6555;
  --brown-light:  #C4A882;
  --navy:         #2C3E6B;

  /* テキスト */
  --text-dark:    #2A2218;
  --text-mid:     #5A4A38;
  --text-muted:   #8A7A6A;
  --white:        #FFFFFF;

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

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(44,30,20,.10);
  --shadow-md: 0 4px 20px rgba(44,30,20,.14);
  --shadow-lg: 0 8px 40px rgba(44,30,20,.18);

  --nav-h: 64px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brown); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== ナビゲーション ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(245,237,216,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139,101,85,.12);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(139,101,85,.18);
}

.logo-copy {
  font-family: var(--font-serif);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.logo-copy small {
  display: block;
  font-family: var(--font-sans);
  font-size: .6rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 6px 13px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  color: var(--text-mid);
  transition: background .15s, color .15s;
}

.site-nav a:hover {
  background: var(--cream-dark);
  color: var(--text-dark);
}

.nav-cta {
  background: var(--sage) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
  padding: 7px 18px !important;
  border-radius: var(--r-sm) !important;
  box-shadow: 0 2px 8px rgba(143,175,138,.3);
  transition: background .15s, transform .15s !important;
}

.nav-cta:hover {
  background: #7A9E75 !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
}

/* ===== ヒーロー：イラストマップ ===== */
.hero {
  position: relative;
  width: 100%;
}

/* カテゴリボタン行 */
.room-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--cream-dark);
  border-top: 1px solid rgba(139,101,85,.12);
}

.room-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  text-decoration: none;
  color: var(--text-mid);
  border-right: 1px solid rgba(139,101,85,.12);
  transition: background .18s, color .18s;
  text-align: center;
}
.room-nav-btn:last-child { border-right: none; }
.room-nav-btn:hover {
  background: rgba(139,101,85,.10);
  color: var(--brown);
}
.room-nav-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.room-nav-label {
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
}

.hero-illust-wrap {
  position: relative;
  width: 100%;
  /* 16:9 より少し縦長 */
  aspect-ratio: 16 / 9;
  max-height: 90vh;
}

.hero-illust-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* タイトルオーバーレイ */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(245,237,216,.82) 0%,
    rgba(245,237,216,.65) 38%,
    rgba(245,237,216,.0) 62%
  );
  display: flex;
  align-items: center;
  padding: 0 5%;
}

.hero-text {
  max-width: 480px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.75);
  border: 1.5px solid rgba(139,101,85,.2);
  border-radius: var(--r-full);
  padding: 5px 14px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.hero-title .accent {
  color: var(--brown);
  position: relative;
  display: inline-block;
}

.hero-sub {
  font-size: clamp(.85rem, 1.5vw, 1rem);
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  line-height: 1;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--brown);
  color: var(--white);
  box-shadow: 0 3px 12px rgba(139,101,85,.3);
}
.btn-primary:hover { background: #7A5545; }

.btn-ghost {
  background: rgba(255,255,255,.75);
  color: var(--text-dark);
  border: 1.5px solid rgba(139,101,85,.25);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,.95); }

/* 部屋ホバーエリア */
.room-map {
  position: absolute;
  inset: 0;
}

.room-hotspot {
  position: absolute;
  cursor: pointer;
  border-radius: var(--r-lg);
  transition: background .25s;
}

.room-hotspot:hover {
  background: rgba(255,255,255,.18);
}

/* 部屋の位置（イラストに合わせた %） */
.room-classroom  { top: 2%;  left: 2%;  width: 40%; height: 46%; }
.room-staffroom  { top: 46%; left: 2%;  width: 44%; height: 52%; }
.room-library    { top: 2%;  right: 2%; width: 38%; height: 46%; }
.room-sciencelab { top: 46%; right: 2%; width: 44%; height: 52%; }

/* ホバー時にイラスト下部に表示する固定ラベルエリア */
.room-hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to top, rgba(30,22,14,.72) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.room-hint.visible { opacity: 1; }
.room-hint-arrow {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}
.room-hint-text {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.room-hint-sub {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  margin-left: auto;
}

/* 旧 .room-label は非表示（削除のかわり） */
.room-label {
  display: none;
  pointer-events: none;
  letter-spacing: .02em;
  backdrop-filter: blur(4px);
}

/* ===== バッジ ===== */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid rgba(139,101,85,.10);
  padding: 14px 0;
}

.trust-inner {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--text-mid);
  font-weight: 600;
}

.trust-item .t-icon { font-size: 1rem; }

/* ===== セクション共通 ===== */
.section { padding: 80px 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-light);
  border-radius: var(--r-full);
  padding: 4px 12px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 10px;
}

.section-desc {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 44px;
  max-width: 560px;
}

/* ===== セクション区切り ===== */
.section-divider {
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--white) 100%);
}

/* 波形SVG区切り（ヒーロー→アプリ間） */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: var(--white);
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}

/* ===== アプリカード ===== */
.apps-section {
  background: var(--white);
  padding: 80px 0;
  position: relative;
}

/* 上部に薄い装飾ライン */
.apps-section::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,101,85,.15), transparent);
}

.apps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}

.view-all {
  font-size: .85rem;
  font-weight: 700;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: gap .15s;
}
.view-all:hover { gap: 8px; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.app-card {
  background: var(--cream);
  border: 1px solid rgba(139,101,85,.12);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-dark);
  transition: box-shadow .2s, transform .2s;
}

.app-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.app-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.app-thumb.bg-sky    { background: linear-gradient(135deg, var(--sky-light), var(--sky)); }
.app-thumb.bg-pink   { background: linear-gradient(135deg, var(--pink-light), #E8B8B8); }
.app-thumb.bg-sage   { background: linear-gradient(135deg, var(--sage-light), var(--sage)); }
.app-thumb.bg-cream  { background: linear-gradient(135deg, var(--cream), var(--cream-dark)); }
.app-thumb.bg-brown  { background: linear-gradient(135deg, #E8D5C0, var(--brown-light)); }

.app-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.tag {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
}

.tag-student  { background: var(--sky-light);  color: #2A5A8A; }
.tag-teacher  { background: var(--sage-light);  color: #3A6A35; }
.tag-material { background: var(--pink-light);  color: #8A3A3A; }
.tag-english  { background: #EDE0F5;            color: #6A3A8A; }
.tag-science  { background: var(--sky-light);   color: #1A5A6A; }
.tag-japanese { background: var(--pink-light);  color: #8A2A4A; }

.app-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 7px;
  color: var(--text-dark);
}

.app-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.app-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(139,101,85,.10);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-btn-open {
  font-size: .8rem;
  font-weight: 700;
  color: var(--brown);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--brown);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.app-btn-open:hover {
  background: var(--brown);
  color: var(--white);
}

.app-btn-dl {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(139,101,85,.25);
  background: rgba(139,101,85,.06);
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.app-btn-dl:hover {
  background: rgba(139,101,85,.14);
  color: var(--text-dark);
  border-color: rgba(139,101,85,.4);
}

.app-platform {
  font-size: .7rem;
  color: var(--text-muted);
  background: rgba(139,101,85,.08);
  padding: 3px 8px;
  border-radius: var(--r-full);
  margin-left: auto;
}

.section-more { text-align: center; margin-top: 44px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid rgba(139,101,85,.3);
  color: var(--brown);
  padding: 12px 32px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}

.btn-outline:hover {
  background: var(--cream);
  border-color: var(--brown);
  transform: translateY(-2px);
}

/* ===== 作者について ===== */
.about-section {
  padding: 80px 0;
  background: var(--cream-dark);
  position: relative;
  overflow: hidden;
}

/* 水彩風の背景装飾（右下に薄いにじみ） */
.about-section::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,136,.18) 0%, transparent 70%);
  pointer-events: none;
}
.about-section::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 10%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143,175,138,.12) 0%, transparent 70%);
  pointer-events: none;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text {
  font-size: .95rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 28px;
}

.about-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(139,101,85,.10);
  position: relative;
  z-index: 1;
}

.about-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(139,101,85,.10);
}

.profile-ava {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.profile-name { font-weight: 700; font-size: .95rem; color: var(--text-dark); }
.profile-role { font-size: .8rem; color: var(--sage); font-weight: 600; margin-top: 2px; }

.about-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  background: var(--cream);
  border: 1px solid rgba(139,101,85,.15);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
}

/* ===== お知らせ ===== */
.news-section {
  background: var(--cream);
  padding: 72px 0;
  position: relative;
}

/* 上部の区切りライン */
.news-section::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,101,85,.15), transparent);
}

.news-list {
  border-top: 1px solid rgba(139,101,85,.12);
  margin-top: 32px;
}

.news-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(139,101,85,.08);
  text-decoration: none;
  color: var(--text-dark);
}

.news-row:hover .news-title { color: var(--brown); }

.news-date {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 88px;
}

.news-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.badge-new    { background: var(--sage-light);  color: #3A6A35; }
.badge-update { background: var(--sky-light);   color: #2A5A8A; }
.badge-info   { background: var(--cream-dark);  color: var(--text-muted); }

.news-title { font-size: .9rem; transition: color .15s; }

/* ===== フッター ===== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.65);
  padding: 56px 0 28px;
}

.footer-body {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo .logo-copy { color: var(--white); }
.footer-logo .logo-copy small { color: rgba(255,255,255,.35); }

.footer-tagline {
  font-size: .82rem;
  line-height: 1.7;
  color: rgba(255,255,255,.45);
  margin-top: 10px;
}

.footer-col-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 14px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }

.footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  transition: color .15s;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: rgba(255,255,255,.3);
}

/* ===== モバイル ===== */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 12px 16px 20px;
    border-bottom: 1px solid rgba(139,101,85,.12);
    box-shadow: var(--shadow-md);
    z-index: 100;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 16px; width: 100%; }
  .hamburger { display: flex; }

  .hero-illust-wrap { aspect-ratio: 4/3; max-height: none; }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(245,237,216,.9) 0%,
      rgba(245,237,216,.75) 50%,
      rgba(245,237,216,.0) 100%
    );
    align-items: flex-start;
    padding: 24px 20px;
  }
  .hero-title { font-size: 1.7rem; }

  .room-hotspot { display: none; }
  .room-nav { grid-template-columns: repeat(2, 1fr); }
  .room-nav-btn:nth-child(2) { border-right: none; }
  .room-nav-btn { padding: 14px 8px; }
  .room-nav-icon { font-size: 1.3rem; }
  .room-nav-label { font-size: .7rem; }

  .apps-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-body { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .trust-inner { gap: 20px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
