/* index.html — トップページ固有スタイル */

/* —— Hero —— */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
  padding: calc(var(--header-height) + 3rem) 0 4rem;
  color: var(--color-white);
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero__headline {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.hero__sub {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  opacity: 0.95;
}

.hero__lead {
  max-width: 540px;
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  line-height: 1.9;
  opacity: 0.9;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-white));
  z-index: 1;
  pointer-events: none;
}

/* —— Middle banner —— */
.middle-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  overflow: hidden;
}

.middle-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

/* —— Banpeiyu highlight —— */
.section-banpeiyu {
  padding: 5rem 0;
  background: var(--color-white);
}

.section-heading__lead {
  margin: 0.5rem 0 0;
  width: 100%;
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.section-banpeiyu .section-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.banpeiyu-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.banpeiyu-home__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.banpeiyu-home__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.banpeiyu-home__content p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--color-text-light);
}

.banpeiyu-home__content .btn {
  margin-top: 0.75rem;
}

/* —— What We Do —— */
.what-we-do {
  background: var(--color-orange);
  color: var(--color-white);
  padding: 5rem 0;
  text-align: center;
}

.what-we-do__title {
  margin: 0 0 2rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.what-we-do__text {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 2;
  opacity: 0.95;
}

/* —— News section —— */
.section-news {
  padding: 5rem 0;
  background: var(--color-white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* —— Service section —— */
.section-service {
  padding: 5rem 0;
  background: var(--color-bg);
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.service-item--reverse {
  direction: rtl;
}

.service-item--reverse > * {
  direction: ltr;
}

.service-item__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.service-item__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.service-item__label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-orange);
}

.service-item__title {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.service-item__text {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--color-text-light);
}

/* —— Promo modal（氷川の梨） —— */
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.promo-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.promo-modal[hidden] {
  display: none;
}

.promo-modal.is-open[hidden] {
  display: flex;
}

.promo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  cursor: pointer;
}

.promo-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(90vh, 90svh);
  overflow: auto;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.4s var(--ease);
  -webkit-overflow-scrolling: touch;
}

.promo-modal.is-open .promo-modal__card {
  transform: translateY(0) scale(1);
}

.promo-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.promo-modal__close:hover,
.promo-modal__close:focus-visible {
  background: rgba(0, 0, 0, 0.7);
  outline: none;
}

.promo-modal__link {
  display: block;
  color: inherit;
}

.promo-modal__image {
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--color-bg);
}

.promo-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-modal__body {
  padding: 1.35rem 1.5rem 1.6rem;
}

.promo-modal__tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-white);
  background: var(--color-blue);
  border-radius: 4px;
}

.promo-modal__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 3.5vw, 1.2rem);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.promo-modal__text {
  margin: 0 0 1.15rem;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--color-text-light);
}

.promo-modal__cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-orange-dark);
  letter-spacing: 0.04em;
}

.promo-modal__link:hover .promo-modal__cta {
  text-decoration: underline;
}

/* —— Floating promo（氷川の梨） —— */
.promo-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  background: var(--color-white);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.3s var(--ease);
}

.promo-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.promo-float__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg);
}

.promo-float__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-float__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding-right: 0.25rem;
}

.promo-float__label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
}

.promo-float__cta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-orange-dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body:has(.promo-modal.is-open) .promo-float {
  opacity: 0;
  pointer-events: none;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banpeiyu-home,
  .service-item,
  .service-item--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .service-item--reverse .service-item__image {
    order: -1;
  }
}

@media (max-width: 600px) {
  .news-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .middle-banner {
    grid-template-columns: 1fr;
  }

  .middle-banner img {
    aspect-ratio: 16 / 9;
  }

  .what-we-do {
    padding: 3.5rem 0;
  }

  .section-news,
  .section-service,
  .section-banpeiyu {
    padding: 3.5rem 0;
  }

  .promo-modal {
    padding: 1rem;
    align-items: flex-end;
  }

  .promo-modal__card {
    width: 100%;
    max-height: min(85vh, 85svh);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(24px);
  }

  .promo-modal.is-open .promo-modal__card {
    transform: translateY(0);
  }

  .promo-modal__body {
    padding: 1.15rem 1.25rem 1.4rem;
  }

  .promo-float {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.4rem 0.75rem 0.4rem 0.4rem;
    gap: 0.6rem;
  }

  .promo-float__thumb {
    width: 44px;
    height: 44px;
  }

  .promo-float__label {
    font-size: 0.78rem;
  }

  .promo-float__cta {
    font-size: 0.68rem;
  }
}
