/* ═══════════════════════════════════════════
   INDEX PAGE — 固有スタイル
   ※ corporate-common.css を先に読み込むこと
   CORPORATE COLOR PALETTE (4色のみ)
   #1E1B18  --navy   : メインテキスト・背景（暗）
   #B5956A  --gold   : アクセント
   #D4C0A4  --gold-light : ホバー・補助
   #FDFAF7  --white  : 背景（明）・白テキスト
═══════════════════════════════════════════ */

/* ※ index 固有の :root 上書きは PHASE 7 で corporate-common.css に集約 */
html { color-scheme: light only; }
body {
  background: var(--white);
  color: var(--navy);
}

/* ══════════════════════════════
   HEADER override（scroll-reveal）
══════════════════════════════ */
header {
  padding: 14px 16px 14px 12px;
  transition: opacity 0.5s ease, padding 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
header.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  height: 100vh; position: relative;
  display: flex; align-items: center; overflow: hidden;
  background: var(--navy);
}
.hero-bg { background: var(--navy); }
.hero-bg-img {
  position: absolute; inset: 0;
  background: image-set(
    url('images/bg-hero.webp') type('image/webp'),
    url('images/bg-hero.jpg') type('image/jpeg')
  ) center/cover no-repeat;
  background-color: var(--navy);
  animation: kenburns 18s ease-out forwards;
}
@keyframes kenburns {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}
.hero-lines { position: absolute; inset: 0; overflow: hidden; z-index: 2; }
.hero-lines::before {
  content: ''; position: absolute;
  top: -50%; right: -10%; width: 70%; height: 200%;
  border: 1px solid var(--gold-20);
  border-radius: 50%; transform: rotate(-20deg);
}
.hero-lines::after {
  content: ''; position: absolute;
  top: 20%; right: 15%; width: 1px; height: 60%;
  background: linear-gradient(to bottom, transparent, var(--gold-30), transparent);
}
.hero-content {
  position: relative; z-index: 3;
  padding: 0 8%; max-width: 900px;
}
.hero-eyebrow {
  font-family: 'Noto Serif JP', serif;
  font-size: var(--f-label); letter-spacing: var(--ls-label-wide); color: var(--gold);
  margin-bottom: 28px; opacity: 0; animation: fadeInUp 0.8s 0.2s ease forwards;
  text-transform: uppercase;
}
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(36px, 6vw, 68px); font-weight: 700; line-height: 1.35;
  color: var(--white); margin-bottom: 28px;
  text-shadow: 0 2px 12px rgba(181,149,106,0.6), 0 1px 4px rgba(181,149,106,0.45);
  opacity: 0; animation: fadeInUp 0.8s 0.4s ease forwards;
}
.hero-title .hero-title-gold { color: var(--white); }
.hero-title .hero-title-accent { color: var(--white); }
.hero-sub {
  font-size: 20px; line-height: var(--lh-body); color: var(--white);
  margin-bottom: 48px; max-width: 480px; font-weight: 400;
  opacity: 0; animation: fadeInUp 0.8s 0.6s ease forwards;
}
.hero-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 480px;
  opacity: 0; animation: fadeInUp 0.8s 0.8s ease forwards;
}
.btn-primary {
  background: var(--gold); color: var(--white);
  padding: 15px 0; border-radius: 2px;
  font-size: var(--f-btn); letter-spacing: var(--ls-btn);
  text-decoration: none; transition: background 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--gold); text-align: center; display: block;
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-outline {
  background: var(--gold); color: var(--white);
  padding: 15px 0; border-radius: 2px;
  font-size: var(--f-btn); letter-spacing: var(--ls-btn);
  text-decoration: none; border: 1px solid var(--gold);
  transition: background 0.3s ease, border-color 0.3s ease; text-align: center; display: block;
}
.btn-outline:hover { background: var(--gold-light); border-color: var(--gold-light); }

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--white); font-size: var(--f-scroll); letter-spacing: 0.22em;
  z-index: 3; animation: bounce 2s infinite;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--white), transparent);
}

/* ══════════════════════════════
   SECTION BASE（全セクション共通クラス）
══════════════════════════════ */
section { padding: 120px 8%; }
#services > .reveal,
#vision > .reveal,
#news > .reveal,
#contact > .reveal,
#news > .news-list,
#services > .services-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.section-label {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px; letter-spacing: var(--ls-label); color: var(--navy);
  margin-bottom: 18px; text-transform: uppercase;
  font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.5;
  color: var(--gold); margin-bottom: 16px; letter-spacing: 0.06em;
}
.section-divider { width: 40px; height: 2px; background: var(--gold); margin-bottom: 60px; }

/* PHASE 14a: section-lead（services セクションの自然文リード／Google本文自動description対策） */
.section-lead {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: var(--f-body);
  line-height: var(--lh-body);
  max-width: 760px;
  margin: -32px auto 60px;
  color: var(--navy);
}

/* ══════════════════════════════
   ABOUT
══════════════════════════════ */
#about {
  background: var(--white);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.about-visual { position: relative; height: 480px; }

.about-box-main {
  position: absolute; inset: 0; border-radius: 2px; overflow: hidden;
  background: image-set(
    url('images/bg-about.webp') type('image/webp'),
    url('images/bg-about.jpg') type('image/jpeg')
  ) center/cover no-repeat;
}
.about-box-main img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block; transition: transform 0.6s ease;
}
.about-visual:hover .about-box-main img { transform: scale(1.04); }
.about-icon-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.about-icon-wrap svg {
  width: 160px; height: 160px; opacity: 0.22;
}
.about-accent {
  position: absolute; bottom: -20px; right: -20px;
  width: 120px; height: 120px;
  border: none; opacity: 1;
  pointer-events: none;
  background: var(--gold-light);
  padding: 10px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}
.about-accent img { width: 100%; height: 100%; object-fit: cover; }
.about-text p.section-label { font-weight: 700; }
.about-text p {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px; line-height: var(--lh-body);
  color: var(--navy); margin-bottom: 24px; font-weight: 400;
}
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 44px; }
.stat {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px 10px 0;
  background: var(--white);
}
.stat-line {
  width: 2px; height: 36px; flex-shrink: 0;
  background: var(--gold);
}
.stat-label {
  font-size: 13px; color: var(--navy);
  letter-spacing: 0.06em; font-family: 'Noto Serif JP', serif;
  line-height: 1.9;
}
.stat-label a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--gold); }

/* ══════════════════════════════
   SERVICES
══════════════════════════════ */
#services { background: rgba(30,27,24,0.04); text-align: center; }
#services .section-divider { margin: 0 auto 60px; }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 16px;
}
.service-card {
  background: var(--white); border-radius: 2px; text-align: left;
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 2px solid transparent; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px var(--navy-12);
  border-bottom-color: var(--gold);
}
.service-img { width: 100%; aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--navy); border-bottom: 1px solid var(--gold-light); }
.service-img-inner {
  width: 100%; height: 100%; background-size: cover; background-position: center;
  background-color: var(--gold-light);
  transition: transform 0.5s ease;
}
.service-card:hover .service-img-inner { transform: scale(1.05); }

/* ===== C-14: インラインstyle CSS化 — service-img 修飾子 ===== */
.service-img--transparent { background: transparent; }
.service-img-inner--01 {
  background-image: url('images/service-01-racs.svg');
  background-size: contain;
  background-color: transparent;
}
.service-img-inner--02 { background-image: url('images/service-02-server.jpg'); }
.service-img-inner--03 { background-image: url('images/service-03-webdesign.jpg'); }
.service-img-inner--04 { background-image: url('images/service-04-system.jpg'); }
.service-num {
  font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 600;
  color: var(--gold); line-height: 1;
}
.service-body { padding: 22px 20px 26px; flex: 1; display: flex; flex-direction: column; }
.service-icon-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.service-icon {
  width: 38px; height: 38px;
  background: var(--gold-light);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg {
  width: 32px; height: 32px; stroke: var(--white); fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.service-title {
  font-family: 'Noto Serif JP', serif; font-size: 15px; font-weight: 600;
  color: var(--navy); margin-bottom: 10px; line-height: var(--lh-body);
}
.service-desc {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px; line-height: var(--lh-body);
  color: var(--navy); font-weight: 400;
}

/* ══════════════════════════════
   VISION
══════════════════════════════ */
#vision {
  background: image-set(
    url("images/bg-vision.webp") type("image/webp"),
    url("images/bg-vision.jpg") type("image/jpeg")
  ) center 65%/cover no-repeat;
  color: var(--navy); text-align: center; position: relative; overflow: hidden;
  border-top: 1px solid var(--navy-08);
  border-bottom: 1px solid var(--navy-08);
}
#vision .section-title { color: var(--gold); }
#vision .section-divider { margin: 0 auto 60px; }
.vision-text {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: var(--lh-body);
  color: var(--white); max-width: 700px; margin: 0 auto 56px;
}
.vision-text strong { color: var(--white); font-weight: 600; }
.vision-sub {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px; line-height: 1.5; color: var(--white);
  max-width: 680px; margin: 0 auto 56px; font-weight: 400;
}
.vision-sub-line {
  display: inline;
  background-image: linear-gradient(transparent 0%, transparent 28%, rgba(181,149,106,0.25) 28%, rgba(181,149,106,0.60) 35%, rgba(181,149,106,0.45) 45%, rgba(181,149,106,0.65) 52%, rgba(181,149,106,0.38) 60%, rgba(181,149,106,0.55) 68%, rgba(181,149,106,0.30) 76%, rgba(181,149,106,0.10) 88%, transparent 100%);
  padding: 0 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.vision-pillars { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; }
.pillar { text-align: center; }
.pillar-icon {
  width: 140px; height: 140px; border: 1px solid var(--white);
  background: var(--gold);
  border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  margin: 0 auto;
}
.pillar-icon svg {
  width: 67px; height: 67px; stroke: var(--white); fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.pillar-label {
  font-weight: 400;
  font-family: 'Noto Serif JP', serif; font-size: clamp(18px, 2.5vw, 24px);
  color: var(--white); letter-spacing: 0.1em; text-align: center;
}

/* ══════════════════════════════
   NEWS
══════════════════════════════ */
#news { background: var(--white); }
.news-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--navy-08);
}
.news-item {
  display: grid;
  grid-template-columns: 100px 96px 1fr;
  align-items: center; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--navy-08);
  text-decoration: none; color: inherit; transition: opacity 0.2s ease;
}
.news-item:hover { opacity: 0.55; }
.news-date {
  font-family: 'Cormorant Garamond', serif; font-size: 15px;
  color: var(--navy); white-space: nowrap;
}
.news-tag {
  font-size: 11px; background: var(--gold); color: var(--white);
  padding: 4px 10px; border-radius: 1px; letter-spacing: 0.06em;
  white-space: nowrap; text-align: center;
}
.news-title-text {
  font-family: 'Noto Serif JP', serif; font-size: 15px; line-height: var(--lh-body); font-weight: 400; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
#contact {
  background: image-set(
    url("images/bg-contact.webp") type("image/webp"),
    url("images/bg-contact.jpg") type("image/jpeg")
  ) center/cover no-repeat;
  color: var(--navy); text-align: center;
}
#contact .section-title { color: var(--gold); }
#contact .section-label { color: var(--navy); }
#contact .section-divider { margin: 0 auto 28px; }
.contact-sub {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px; color: var(--white);
  margin-bottom: 44px; font-weight: 400; line-height: var(--lh-body);
}
.contact-btn {
  display: inline-block; background: var(--gold); color: var(--white);
  padding: 16px 52px; font-family: 'Noto Serif JP', serif;
  font-size: var(--f-btn); font-weight: 600; letter-spacing: var(--ls-btn);
  text-decoration: none; border-radius: 2px;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; border: 1px solid var(--gold);
}
.contact-btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--white); }

/* ══════════════════════════════
   FOOTER override
══════════════════════════════ */
footer { gap: 10px; }
.footer-logo-link { text-decoration: none; display: block; }
.footer-logo { display: flex; flex-direction: column; align-items: center; }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1024px) {
  header { padding: 14px 16px 14px 8px; }
  .logo-kaisha { display: none; }
  section { padding: 80px 6%; }
  #about { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { height: 280px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .vision-pillars { gap: 36px; }
  .news-item {
    grid-template-columns: 80px 80px 1fr;
    gap: 12px;
  }
  .news-title-text { white-space: normal; }
}
@media (max-width: 768px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .news-date, .news-tag { font-size: 13px; }
  .hero-buttons { grid-template-columns: 1fr; }
  .hero-bg-img { background-position: 30% center; }
  .section-lead { margin: -24px auto 40px; padding: 0 4px; }
  .services-grid {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding: 0 6% 16px;
    margin: 0 -6%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .services-grid::-webkit-scrollbar { display: none; }
  .service-card {
    flex: 0 0 78vw;
    min-width: 0;
  }
  .service-card:last-child { margin-right: 6%; }
}

.news-more {
  text-align: right; padding: 24px 0 8px;
  max-width: 860px; margin: 0 auto;
}
.news-more-btn {
  font-family: 'Noto Serif JP', serif;
  font-size: var(--f-sub); color: var(--gold);
  text-decoration: none; letter-spacing: 0.08em;
  transition: opacity 0.2s ease;
}
.news-more-btn:hover { opacity: 0.6; }

/* ── stat badge アニメーション ── */
@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.about-stats .stat {
  opacity: 0;
  animation: badgeFadeIn 0.5s ease forwards;
  animation-play-state: paused;
}
.about-text.visible .about-stats .stat {
  animation-play-state: running;
}
.about-stats .stat:nth-child(1) { animation-delay: 0.1s; }
.about-stats .stat:nth-child(2) { animation-delay: 0.2s; }
.about-stats .stat:nth-child(3) { animation-delay: 0.3s; }
.about-stats .stat:nth-child(4) { animation-delay: 0.4s; }
.about-stats .stat:nth-child(5) { animation-delay: 0.5s; }
.about-stats .stat:nth-child(6) { animation-delay: 0.6s; }
.about-stats .stat:nth-child(7) { animation-delay: 0.7s; }
.about-stats .stat:nth-child(8) { animation-delay: 0.8s; }

/* ── vision-text 行アニメーション ── */
@keyframes visionLineIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vision-line {
  display: inline-block;
  opacity: 0;
}
.reveal.visible .vision-line {
  animation: visionLineIn 0.7s ease forwards;
}
.reveal.visible .vision-line:nth-child(1) { animation-delay: 0.1s; }
.reveal.visible .vision-line:nth-child(3) { animation-delay: 0.4s; }
.reveal.visible .vision-line:nth-child(5) { animation-delay: 0.7s; }

/* ── pillar アニメーション ── */
@keyframes pillarFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pillar {
  opacity: 0;
}
.reveal.visible .pillar {
  animation: pillarFadeIn 0.6s ease forwards;
}
.reveal.visible .pillar:nth-child(1) { animation-delay: 0.1s; }
.reveal.visible .pillar:nth-child(2) { animation-delay: 0.25s; }
.reveal.visible .pillar:nth-child(3) { animation-delay: 0.4s; }
.reveal.visible .pillar:nth-child(4) { animation-delay: 0.55s; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ══ ロゴ レスポンシブ ══
   デスクトップ : マーク + RACSystem + 株式会社  34px
   タブレット   : マーク + RACSystem             30px
   スマホ       : マーク + RACSystem             26px
   ※ PHASE 7: :root 再宣言を回避するため html セレクタで上書き
══════════════════════════ */
@media (max-width: 1024px) {
  html { --logo-h: 30px; }
}
@media (max-width: 768px) {
  html { --logo-h: 26px; }
}

/* ── ゴールドかすれマーカー ── */
.marker {
  display: inline;
  background-image: linear-gradient(
    transparent 0%,
    transparent 28%,
    rgba(181,149,106,0.25) 28%,
    rgba(181,149,106,0.60) 35%,
    rgba(181,149,106,0.45) 45%,
    rgba(181,149,106,0.65) 52%,
    rgba(181,149,106,0.38) 60%,
    rgba(181,149,106,0.55) 68%,
    rgba(181,149,106,0.30) 76%,
    rgba(181,149,106,0.10) 88%,
    transparent 100%
  );
  padding: 0 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
