/* ───────── 共通スタイル ───────── */
:root {
  --colorText: #FFFFFF;
  --colorContrast: #212121;
  --colorAccent: #2979FF;
  --ease: cubic-bezier(0.83, 0, 0.17, 1);
  --durationXS: .3s;
  --durationS: .5s;
  --durationM: 1.3s;
  --durationL: 1.5s;
  --durationXL: 1.75s;
  --durationXXL: 2s;
  --translateAmount: 3rem;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --durationXS: .001s;
    --durationS: .001s;
    --durationM: .001s;
    --durationL: .001s;
    --durationXL: .001s;
    --durationXXL: .001s;
  }
}
html, body, h1, h2, h3, h4, h5, h6, p, div, span, a, li, ul, table, td, th {
  font-family: "Montserrat", sans-serif;
}
html, body {
  height: 100%;
  margin: 0;
}
body {
  color: var(--colorText);
  font: 300 100%/1.5 "Montserrat", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }

/* ───────── Hero Section ───────── */
.hero {
  height: 100vh;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 4rem;
}
.hero__content {
  max-width: 75ch;
  z-index: 1;
  position: relative;
  text-align: center;
}
.hero__info-box {
  background: rgba(33,33,33,.6);
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 1em;
  max-width: 90rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(var(--translateAmount));
  transition:
    opacity var(--ease) var(--durationM) var(--durationL),
    transform var(--ease) var(--durationM) var(--durationL);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero--animated .hero__info-box {
  opacity: 1;
  transform: translateY(0);
}
.hero__info-box table {
  width: 100%;
  border-collapse: collapse;
  color: var(--colorText);
}
.hero__info-box caption {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: .75em;
  text-align: left;
}
.hero__info-box th,
.hero__info-box td {
  padding: .6em;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.hero__info-box th { white-space: nowrap; }
.hero__info-box td.email div,
.hero__info-box td.related div {
  white-space: nowrap;
  font-size: 1rem;
}
a[href^="tel"] {
  color: var(--colorText);
  text-decoration: none;
}
@media(max-width:600px) {
  .hero { padding: .5rem; }
  .hero__content { max-width: 100%; }
  .hero__info-box {
    padding: .5em;
    margin-bottom: .5em;
    font-size: .7rem;
  }
  .hero__info-box th,
  .hero__info-box td { padding: .3em; }
  .hero__info-box td.email div,
  .hero__info-box td.related div { font-size: .5rem; }
  .hero__info-box tbody tr:nth-child(7) td div {
    white-space: nowrap;
    font-size: .5rem;
  }
}
.hero__portal {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
  overflow: hidden;
}
.hero__portal img {
  object-fit: cover;
  width: 100%;
  min-height: 100%;
  height: auto;
  opacity: 0;
  transition:
    transform var(--ease) var(--durationM),
    opacity var(--ease) var(--durationS);
}
.hero--animated .hero__portal img { opacity: 1; }
.hero__portal--bg { transform: scale(1.2); }
.hero--animated .hero__portal--bg { transform: scale(1); }
.hero__portal--fg {
  clip-path: polygon(7.5% 7.5%,92.5% 7.5%,92.5% 92.5%,7.5% 92.5%);
  transform: scale(.85);
}
.hero--animated .hero__portal--fg { transform: scale(1); }
.hero__portal--fg img { transform: scale(1.35); }
.hero--animated .hero__portal--fg img { transform: scale(1); }
@media(max-width:768px) {
  .hero { padding: 2rem; }
  .hero__content { max-width: 90%; }
}

/* ───────── Chart Section ───────── */
.chart-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.chart-buttons.visible {
  opacity: 1;
  transform: translateY(0);
}
.chart-buttons button {
  background: #f5f5f5;
  color: var(--colorAccent);
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, color 0.3s, box-shadow 0.3s;
}
.chart-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.chart-buttons button.active {
  background: var(--colorAccent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.chart-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.chart-container.visible {
  opacity: 1;
  transform: translateY(0);
}
#chartCanvas {
  width: 100% !important;
  height: 500px !important;
  background-color: #fff !important;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
@media (max-width:768px) {
  #chartCanvas { height: 350px !important; }
  .chart-buttons button { flex: 1 1 45%; font-size: 0.9rem; padding: 0.5rem 1rem; }
}
@media (max-width:480px) {
  #chartCanvas { height: 280px !important; }
  .chart-buttons button { flex: 1 1 100%; font-size: 0.8rem; padding: 0.4rem 0.8rem; }
}

/* ───────── Map Section ───────── */
.map-title {
  max-width: 900px;
  margin: 60px auto 8px auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--colorContrast);
  letter-spacing: .05em;
}
.map-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--colorAccent);
}
.company-map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 60px auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg,#e8eaf6 0%,#f5f5f5 100%);
  box-shadow: 0 10px 32px rgba(0,0,0,.15);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.company-map-container.visible {
  opacity: 1;
  transform: translateY(0);
}
.map-frame { overflow: hidden; }
.company-map-container iframe {
  width: 100%;
  height: 450px;
  border: 0;
}
@media(max-width:768px) {
  .map-title { margin: 40px auto 8px auto; font-size: 1.1rem; }
  .company-map-container { margin-bottom: 40px; }
  .company-map-container iframe { height: 350px; }
}
@media(max-width:480px) {
  .map-title { margin: 30px auto 6px auto; font-size: 1rem; }
  .company-map-container { margin-bottom: 30px; }
  .company-map-container iframe { height: 300px; }
}
