* { box-sizing: border-box; }

:root {
  /* Type scale — role-based tokens instead of ad-hoc per-element sizes.
     xs/2xs/sm/base are fixed (small text doesn't need fluid scaling);
     lg/xl/2xl are fluid (clamp) since headings benefit from scaling with viewport. */
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: clamp(20px, 17px + 1.1vw, 24px);
  --text-xl: clamp(24px, 19px + 1.6vw, 30px);
  --text-2xl: clamp(32px, 20px + 4vw, 56px);
}

body {
  margin: 0;
  background: #fbfaf8;
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  color: #3f3a45;
  -webkit-font-smoothing: antialiased;
}

a { color: #8b73c6; text-decoration: none; }
a:hover { color: #6f56ad; }
img { display: block; max-width: 100%; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* keep hero line 2 on one line only once the box is wide enough to fit it */
@media (min-width: 600px) {
  .hero-line2 { white-space: nowrap; }
}

.nav-link:hover { color: #8b73c6; }

.icon-btn-dark:hover { background: #8b73c6; color: #fff; }

.hero-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(94,74,140,0.16);
}

.outline-btn:hover { background: #6f56ad; color: #fff; }

.lift-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(94,74,140,0.12);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(94,74,140,0.16);
}

.sns-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(94,74,140,0.12);
}

.biz-btn:hover { transform: translateY(-3px); }

.footer-top-btn:hover { transform: translateY(-4px); }

.sns-tab {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: var(--text-xs);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  color: #6f6878;
  border: 1px solid #e2daf0;
  transition: background 0.2s ease, color 0.2s ease;
}

.sns-tab.active {
  background: #6f56ad;
  color: #fff;
  border: 1px solid #6f56ad;
}

/* ---- Photo gallery lightbox ---- */

.gallery-tile-grid img { cursor: zoom-in; transition: transform 0.25s ease; }
.gallery-tile-grid figure:hover img { transform: scale(1.03); }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 28, 0.9);
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}

.lightbox.open { display: flex; flex-direction: column; }

.lightbox-img {
  max-width: min(90vw, 720px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lightbox-caption {
  margin: 14px 0 0;
  color: #fff;
  font-size: var(--text-sm);
  text-align: center;
  max-width: 600px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.28); }

.lightbox-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 22px; }

.lightbox-prev,
.lightbox-next { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 26px; }

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next { width: 38px; height: 38px; font-size: 20px; }
}

/* ---- Mobile navigation ---- */

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #cbbfe4;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #3f3a45;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none !important;
    width: 100%;
    margin-left: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    order: 5;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #efe9f6;
  }

  .site-nav.open {
    display: flex !important;
  }

  .site-nav .nav-link {
    padding: 10px 4px !important;
  }

  .site-nav > div {
    justify-content: center;
    margin-top: 8px;
  }
}

/* ---- Mobile grid layouts ---- */

@media (max-width: 640px) {
  .about-grid,
  .sns-grid,
  .gallery-grid,
  .blog-grid,
  .goods-grid,
  .biz-grid,
  .footer-grid,
  .footer-nav-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-block-right {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px dashed #e2daf0;
    padding-top: 20px !important;
    margin-top: 4px;
  }

  .footer-grid > div:last-child {
    justify-items: start !important;
  }

  .gallery-mosaic {
    grid-template-columns: 1fr !important;
  }

  .gallery-mosaic .mosaic-tile:not(:first-child) {
    display: none;
  }
}
