@charset "UTF-8";

/* =================================================================
   home.css - トップページ固有スタイル（F+ ナチュラル）
   ================================================================= */

/* ----- 浮遊する葉（装飾・温かみ） ----- */
.leafdeco {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.leafdeco--hero { left: 3%; top: 56px; }
.leafdeco--right { right: 3%; top: 72px; }
.leafdeco--left { left: 4%; bottom: 90px; }

@media (prefers-reduced-motion: no-preference) {
  .leafdeco {
    animation: leaf-float 8s ease-in-out infinite;
  }
}

@keyframes leaf-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(4deg); }
}

/* ----- Hero Section ----- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}

.hero__blob--1 {
  width: 340px;
  height: 340px;
  background: var(--color-decor-cream);
  right: -90px;
  top: -60px;
}

.hero__blob--2 {
  width: 200px;
  height: 200px;
  background: var(--color-decor-moss);
  left: 42%;
  bottom: -60px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
  min-height: 420px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-ajisai-deep);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--color-heading);
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.hero__lead {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 460px;
}

.hero__cta {
  margin-top: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__photo img {
  width: 100%;
  height: clamp(300px, 38vw, 430px);
  object-fit: cover;
  object-position: center 40%;
  border-radius: 96px 96px 24px 24px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 840px) {
  .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__photo img {
    height: clamp(260px, 60vw, 340px);
    border-radius: 72px 72px 20px 20px;
  }
}

/* ----- Philosophy Cards ----- */
.home-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: #fff;
  background-color: var(--color-primary-dark);
  padding: 0.45em 1.4em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

/* 理念は葉の3カード（温かみのある表現） */
.philosophy-cards {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.philosophy-card {
  text-align: center;
}

.philosophy-card .card__body {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.philosophy-card__leaf {
  width: 82px;
  height: 82px;
  margin: 0 auto var(--space-md);
  border-radius: 50% 0 50% 50%;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.philosophy-card:nth-child(1) .philosophy-card__leaf { background: var(--color-decor-moss); }
.philosophy-card:nth-child(2) .philosophy-card__leaf { background: var(--color-decor-terra); }
.philosophy-card:nth-child(3) .philosophy-card__leaf { background: var(--color-decor-cream); }

.philosophy-card__leaf span {
  transform: rotate(-45deg);
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-wood-dark);
}

.philosophy-card__yomi {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-primary-dark);
  letter-spacing: 0.3em;
  margin-bottom: var(--space-sm);
}

.philosophy-card p:last-child {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: left;
}

@media (min-width: 768px) {
  .philosophy-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- Service Cards ----- */
.service-cards {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.service-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.service-card__photo {
  overflow: hidden;
}

.service-card__photo img {
  width: 100%;
  aspect-ratio: 5 / 4;
  height: auto;
  object-fit: cover;
  object-position: center 38%;
  transition: transform 0.5s var(--ease-out);
}

.service-card:hover .service-card__photo img {
  transform: scale(1.04);
}

.service-card .card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.service-card .card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-wood-dark);
}

.service-card__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-primary-dark);
}

.service-card p {
  flex: 1 1 auto;
}

.service-card__more {
  display: inline-block;
  margin-top: var(--space-md);
  font-family: var(--font-round);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary-dark);
}

.service-card__more-arrow {
  display: inline-block;
  transition: transform var(--transition-base);
}

.service-card:hover .service-card__more-arrow,
.service-card:focus-visible .service-card__more-arrow {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .service-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- News Section（濃い苔の帯） ----- */
.section--news {
  background-color: var(--color-news-bg);
}

.section--news .section-title {
  color: #fff;
}

.news-area {
  max-width: 780px;
  margin: var(--space-lg) auto 0;
}

.news-list {
  color: var(--color-news-text);
  /* 約5件分の高さに収め、超えた分はスクロールで全件見せる */
  max-height: 21rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.news-list::-webkit-scrollbar {
  width: 6px;
}

.news-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 3px;
}

.news-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xs);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  align-items: baseline;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-family: var(--font-round);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-news-date);
  white-space: nowrap;
}

.news-content {
  font-size: var(--text-sm);
  min-width: 0;
}

.news-content a {
  color: #fff;
}

@media (max-width: 600px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ----- Gallery Section ----- */
.section--gallery {
  background-color: var(--color-bg);
}

/* ----- Marquee Gallery（JSフックは変更しない） ----- */
.marquee-gallery {
  position: relative;
  overflow: hidden;
  padding: var(--space-md) 0;
}

/* Edge fade */
.marquee-gallery::before,
.marquee-gallery::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.marquee-gallery::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.marquee-gallery::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent);
}

.marquee-gallery__track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  padding: 16px 0;
  /* アニメーションは gallery.ts の requestAnimationFrame で制御 */
}

.marquee-gallery__item {
  position: relative;
  flex-shrink: 0;
  width: 380px;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--color-wood-dark-rgb), 0.12);
  cursor: pointer;
}

.marquee-gallery__item picture {
  width: 100%;
  height: 100%;
}

.marquee-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transition: transform var(--transition-base);
}

/* News帯（暗い緑面）上のリンク: 緑の輪郭は沈むため明色に上書き */
.section--news a:focus-visible {
  outline-color: var(--color-news-text);
}

/* マーキー（可変な写真背景）: 明色outline＋深緑box-shadowの二重リングで常時視認 */
.marquee-gallery__item:focus-visible {
  outline: 3px solid #fffdf8;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(69, 86, 58, 0.9), var(--shadow-lg);
}

.marquee-gallery__item:hover img {
  transform: scale(1.05);
}

/* Navigation arrows */
.marquee-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(255, 253, 248, 0.92);
  color: var(--color-wood-dark);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base), background var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.marquee-gallery:hover .marquee-gallery__nav,
.marquee-gallery__nav:focus-visible {
  opacity: 1;
}

.marquee-gallery__nav:hover {
  background: #fff;
}

.marquee-gallery__nav--prev { left: 16px; }
.marquee-gallery__nav--next { right: 16px; }

@media (hover: none) {
  .marquee-gallery__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-gallery {
    overflow-x: auto;
  }

  .service-card:hover .service-card__photo img,
  .marquee-gallery__item:hover img {
    transform: none;
  }

  .service-card__more-arrow {
    transition: none;
  }
}

/* ----- Gallery Lightbox (JS動的生成) ----- */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-scrim);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.gallery-lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__caption {
  color: #fff;
  font-size: var(--text-sm);
  margin-top: var(--space-md);
  text-align: center;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  padding: 20px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
  opacity: 1;
}

.gallery-lightbox__prev { left: 10px; }
.gallery-lightbox__next { right: 10px; }

.gallery-lightbox__close {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.gallery-lightbox__close:hover { opacity: 1; }

.gallery-lightbox button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  opacity: 1;
}

/* =================================================================
   Responsive: Phone (max-width: 767px)
   ================================================================= */
@media (max-width: 767px) {
  .marquee-gallery__item {
    width: 260px;
    height: 190px;
  }

  .marquee-gallery::before,
  .marquee-gallery::after {
    width: 50px;
  }
}
