/* ============================================
   DX簡易診断ツール トップページ
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
  line-height: 1.8;
  background-color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* --- Layout --- */
.page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Main content area with diagonal split background --- */
.main-bg {
  position: relative;
  overflow: hidden;
}

.main-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom right,
    #00B2E9 50%,
    #E60012 50%
  );
  z-index: 0;
}

/* --- Body fixed when drawer open --- */
body.drawer-open {
  overflow: hidden;
}

/* --- Hamburger Menu Button --- */
.nav-menu {
  position: absolute;
  top: 18px;
  right: 23px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hamburger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 19px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  position: absolute;
  display: block;
  width: 27px;
  height: 1px;
  background-color: #fff;
  border-radius: 1px;
  transition: transform 0.3s, background-color 0.3s, top 0.3s;
}

.hamburger-line::before,
.hamburger-line::after {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: 1px;
  transition: inherit;
}

.hamburger-line::before {
  top: -8px;
}

.hamburger-line::after {
  top: 8px;
}

/* ハンバーガー → ×アニメーション */
.hamburger[aria-expanded="true"] .hamburger-line {
  background-color: transparent;
}

.hamburger[aria-expanded="true"] .hamburger-line::before,
.hamburger[aria-expanded="true"] .hamburger-line::after {
  top: 0;
  background-color: #fff;
}

.hamburger[aria-expanded="true"] .hamburger-line::before {
  transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line::after {
  transform: rotate(-45deg);
}

.hamburger-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.55rem;
  font-weight: 500;
  color: #fff;
}

/* --- Drawer Menu Overlay --- */
.drawer-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  background-color: #696969;
  padding: 80px 20px 60px;
  transition: opacity 0.3s, visibility 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drawer-menu::before {
  content: "MENU";
  display: block;
  text-align: center;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 16px;
}

.drawer-menu[data-expanded="true"] {
  visibility: visible;
  opacity: 1;
  overflow-y: auto;
}

.drawer-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 335px;
  margin: 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 3rem 0;
}

.drawer-menu-list li a {
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}

.drawer-menu-list li a:hover {
  opacity: 0.7;
}

/* --- Header Area --- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 20px 16px;
  color: #fff;
}

.hero-logo {
  display: block;
  margin: 0 auto 6px;
  width: 180px;
}

.hero-subtitle {
  display: block;
  margin: 0 auto;
  width: 180px;
}

.hero-description {
  margin-top: 34px;
  font-size: 0.9rem;
  line-height: 2;
  color: #fff;
  letter-spacing: 0.04em;
}

/* --- Cards Section --- */
.cards {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px 40px 28px;
  max-width: 920px;
  margin: 0 auto;
}

.card {
  flex: 1;
  max-width: 240px;
  background: #fff;
  border-radius: 24px;
  padding: 16px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 72px;
  height: 90px;
  margin-bottom: 10px;
  object-fit: contain;
}

.card-icon.card-icon--wide {
  width: 96px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #0083c9;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  padding-top: 10px;
  border-top: 1px solid #00B2E9;
  width: 100%;
}

.card-text {
  font-size: 0.85rem;
  color: #0083c9;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 18px;
  text-align: left;
}

.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 34px;
  background: linear-gradient(135deg, #00B2E9, #00C9F2);
  color: #fff;
  border-radius: 17px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.card-button img {
  width: 22px;
  height: auto;
  position: relative;
  top: -1px;
}

.card-button:hover {
  background: linear-gradient(135deg, #00B2E9, #00C9F2);
}

/* --- Community Banner --- */
.community-banner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 40px 32px;
  max-width: 430px;
  margin: 0 auto;
}

.community-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: transparent;
  line-height: 1.4;
  color: #fff;
  border-radius: 40px;
  padding: 6px 40px 6px 40px;
  border: 2px solid #fff;
  transition: background 0.2s ease, transform 0.1s ease;
}

.community-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.community-label {
  font-size: 0.56rem;
  opacity: 0.9;
  display: block;
  margin-bottom: 0;
}

.community-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.community-arrow {
  position: absolute;
  right: 28px;
  top: 48%;
  transform: translateY(-50%);
  width: 14px;
  height: auto;
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 20px 24px;
  background-color: #fff;
  color: #00B2E9;
}

.footer-contact {
  font-size: 0.7rem;
  line-height: 2;
  margin-bottom: 4px;
}

.footer-contact a {
  color: #00B2E9;
  text-decoration: underline;
}

.footer-contact a:hover {
  opacity: 0.7;
}

.footer-copy {
  font-size: 0.6rem;
  color: #00B2E9;
}

.sp-only {
  display: none;
}

/* ============================================
   Responsive
   ============================================ */

/* --- Tablet --- */
@media (max-width: 900px) {
  .hero-logo {
    width: 130px;
  }

  .hero-subtitle {
    width: 150px;
  }

  .hero-description {
    font-size: 0.75rem;
  }

  .cards {
    gap: 18px;
    padding: 12px 24px 24px;
  }

  .card {
    padding: 24px 16px 20px;
  }

  .card-icon {
    width: 64px;
  }

  .card-title {
    font-size: 1.15rem;
  }
}

/* --- SP --- */
@media (max-width: 640px) {
  .nav-menu {
    top: 12px;
    right: 14px;
  }

  .hero {
    padding: 14px 20px 16px;
    text-align: left;
  }

  .hero-logo {
    width: 100px;
    margin: 0 0 6px;
  }

  .hero-subtitle {
    width: 102px;
    margin: 0;
  }

  .hero-description {
    font-size: 0.82rem;
    margin-top: 24px;
    text-align: left;
    line-height: 1.7;
  }

  .hero-description br {
    display: none;
  }

  .cards {
    flex-direction: column;
    align-items: center;
    padding: 2px 20px 18px;
    gap: 14px;
  }

  .card {
    max-width: 100%;
    width: 100%;
    padding: 12px 18px;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 0;
    text-align: left;
    align-items: start;
    position: relative;
  }

  .card-icon {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 64px;
    align-self: center;
    justify-self: center;
    position: relative;
    top: 3px;
  }

  .card-icon.card-icon--wide {
    width: 80px;
  }

  .card-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.1rem;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    border-bottom: none;
    width: auto;
  }

  .card-text {
    grid-column: 2 / -1;
    grid-row: 2;
    font-size: 0.82rem;
    margin-bottom: 0;
    padding-top: 6px;
    border-top: 1px solid #00B2E9;
    color: #0083c9;
    margin-top: 4px;
    line-height: 1.5;
  }

  .card-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 34px;
    height: 20px;
    background: linear-gradient(135deg, #00B2E9, #00C9F2);
    border-radius: 12px;
    padding: 0;
  }

  .card-button img {
    width: 14px;
  }

  .community-banner {
    padding: 4px 20px 26px;
    max-width: 100%;
  }

  .community-name {
    font-size: 0.95rem;
  }

  .footer-contact {
    font-size: 0.72rem;
  }

  .sp-only {
    display: inline;
  }
}
