/* assets/css/home.css */

/* =========================================================
  Tokens (home only)
========================================================= */
:root{
  --surface:#eef4ff;
  --surface-soft:#f4f8ff;
}

/* =========================================================
  Hero
========================================================= */
.hero{
  position:relative;
  height:min(68vh, 640px);
  display:flex;
  align-items:stretch;
  overflow:hidden;
  isolation:isolate;
  background:#ffffff;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(90deg, rgba(15,23,42,.56) 0%, rgba(15,23,42,.16) 52%, rgba(15,23,42,0) 74%),
    url("../img/hero.jpg") center/cover no-repeat;
  filter:saturate(1.03) contrast(1.03);
  transform-origin:center;
  animation:heroZoom 14s ease-in-out infinite alternate;
  will-change:transform;
}

/* 下端は白へ自然にフェード */
.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:140px;
  z-index:1;
  background:linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.28) 48%,
    rgba(255,255,255,.78) 78%,
    #ffffff 100%
  );
}

.hero-inner{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  width:100%;
  padding:44px 0 68px;
}

.hero-copy{
  max-width:680px;
  backface-visibility:hidden;
}

.hero-copy h1{
  margin:0 0 14px;
  font-size:clamp(32px, 3.8vw, 52px);
  line-height:1.22;
  color:#fff;
  font-weight:800;
  letter-spacing:.01em;
  text-shadow:
    0 10px 26px rgba(0,0,0,.22),
    0 2px 10px rgba(0,0,0,.18);
}

.hero-copy .company{
  margin:0;
  font-size:clamp(16px, 2vw, 24px);
  color:rgba(255,255,255,.92);
  font-weight:700;
  letter-spacing:.02em;
}

@keyframes heroZoom{
  from{ transform:scale(1); }
  to  { transform:scale(1.06); }
}

@media (prefers-reduced-motion: reduce){
  .hero::before{ animation:none; }
}

/* =========================================================
  Section backgrounds / dividers
========================================================= */

/* hero → service の波は残す */
.section-divider{
  position:relative;
  z-index:2;
  width:100%;
  line-height:0;
  margin-top:-70px;
  margin-bottom:-1px;
}

.section-divider svg{
  display:block;
  width:100%;
  height:88px;
}

.section-divider--soft path{
  fill:var(--surface);
}

/* service → company の斜め帯は消す */
.section-divider--plain.section-divider--tilt{
  display:none;
}

/* company → contact の波は残す */
.section-divider--wave-2 svg{
  height:88px;
}
.section-divider--wave-2 path{
  fill:#eef4ff;
}

/* 事業内容 */
.section-soft{
  position:relative;
  background:var(--surface);
}

.section-soft--service{
  padding-top:10px;
  padding-bottom:56px;
  background:
    linear-gradient(
      to bottom,
      var(--surface) 0%,
      var(--surface) 84%,
      #f7f9fe 95%,
      #ffffff 100%
    );
}

/* 会社情報 */
.section-plain{
  position:relative;
  background:#ffffff;
  padding-top:24px;
  padding-bottom:56px;
}

/* お問い合わせ */
.section-soft--contact{
  padding-top:14px;
  padding-bottom:56px;
  background:var(--surface);
}

.section-soft h2,
.section-plain h2{
  margin-top:0;
  margin-bottom:18px;
}

/* =========================================================
  Service
========================================================= */
.service-wrap{
  padding:34px;
}

.service-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  text-align:center;
  transition:transform .35s cubic-bezier(.2,.8,.2,1);
}

.circle{
  width:var(--circle);
  height:var(--circle);
  border-radius:50%;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  border:6px solid rgba(255,255,255,.92);
  position:relative;
  overflow:hidden;
  box-shadow:
    0 22px 60px rgba(15,23,42,.12),
    inset 0 1px 0 rgba(255,255,255,.72);
  transition:transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease;
}

.circle::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(180px 140px at 35% 28%, rgba(255,255,255,.24), rgba(255,255,255,0) 60%),
    radial-gradient(240px 180px at 70% 72%, rgba(255,255,255,.10), rgba(255,255,255,0) 65%);
  opacity:.85;
}

.circle::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,0) 62%);
}

.circle.c1{
  background-image:url("../img/stand-t.jpg");
  background-position:50% 55%;
}

.circle.c2{
  background-image:url("../img/plant-i.jpg");
  background-position:55% 42%;
}

.circle.c3{
  background-image:url("../img/estate-t.jpg");
  background-position:55% 55%;
}

.service-label{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:600;
  font-size:17px;
  letter-spacing:.02em;
  transition:color .25s ease, transform .25s ease;
}

.service-item:hover{
  transform:translateY(-6px);
}

.service-item:hover .circle{
  transform:scale(1.05);
  box-shadow:
    0 28px 60px rgba(15,23,42,.18),
    inset 0 1px 0 rgba(255,255,255,.78);
}

.service-item:hover .service-label{
  color:var(--brand);
  transform:translateY(-2px);
}

/* 不動産（円の縦分割） */
.circle-split{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.circle-img{
  flex:2;
  background-image:url("../img/estate-t.jpg");
  background-size:cover;
  background-position:center;
}

.circle-message{
  flex:1;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:14px 16px 8px;
  text-align:center;
  font-weight:500;
  font-size:15px;
  line-height:1.6;
  background:#ffffff;
  color:var(--muted);
}

/* =========================================================
  Company banner（トップの会社情報：以前デザイン）
========================================================= */
.info-banners{
  padding:20px;
  margin-bottom:15px;
}

.banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  border:1px solid rgba(226,232,240,.92);
  transition:transform .15s ease, outline-color .15s ease;
  min-height:96px;
}

.banner:hover{
  outline:3px solid rgba(59,130,246,.10);
  transform:translateY(-1px);
}

.banner-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:220px;
}

.badge{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(59,130,246,.10);
  border:1px solid rgba(59,130,246,.16);
  font-weight:700;
  color:#1f3a66;
  flex:0 0 auto;
}

.banner-title{
  font-weight:700;
  font-size:18px;
  letter-spacing:.02em;
}

.banner-sub{
  margin-top:4px;
  font-size:14px;
  color:var(--muted);
}

.banner-photo{
  flex:0 0 42%;
  width:42%;
  min-width:280px;
  height:74px;
  border-radius:10px;
  background:url("../img/company-banner.png") center/cover no-repeat;
}

.chev{
  font-size:20px;
  color:#1f3a66;
  opacity:.6;
  flex:0 0 auto;
}

/* =========================================================
  Contact
========================================================= */
.contact-wrap{
  padding:22px;
  overflow:visible;
}

.contact-wrap .grid-3{
  align-items:start;
}

.contact-card{
  overflow:hidden;
  align-self:start;
}

.thumb{
  height:var(--thumb);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.thumb.t1{
  background-image:url("../img/estate-b.jpg");
  background-position:55% 55%;
}

.thumb.t2{
  background-image:url("../img/stand-b.jpg");
  background-position:50% 55%;
}

.thumb.t3{
  background-image:url("../img/plant-b.jpg");
  background-position:55% 40%;
}

.contact-body{
  padding:14px 14px 16px;
}

.contact-title{
  font-weight:600;
  font-size:17px;
  margin:0 0 8px;
  letter-spacing:.01em;
  transition:transform .18s ease, font-weight .18s ease;
  transform-origin:left center;
}

.contact-meta{
  margin:0;
  color:var(--muted);
  line-height:1.8;
  font-size:14px;
  font-weight:400;
}

.contact-meta b{
  font-weight:700;
  color:#0f172a;
  letter-spacing:.03em;
}

.contact-line{
  display:inline-block;
  transition:transform .18s ease, font-weight .18s ease;
  transform-origin:left center;
}

.contact-card:hover .contact-line{
  transform:scale(1.5);
  font-weight:700;
}

.contact-card:hover .contact-title{
  transform:scale(1.15);
  font-weight:700;
}

/* =========================================================
  Scroll reveal / motion
========================================================= */
.js .reveal{
  opacity:0;
  transform:translateY(34px);
  transition:
    opacity .8s ease,
    transform .8s cubic-bezier(.22,.8,.22,1);
  will-change:opacity, transform;
}

.js .reveal.is-visible{
  opacity:1;
  transform:none;
}

.js .reveal-up{
  transform:translateY(34px);
}

.js .reveal-left{
  transform:translateX(-34px);
}

.js .reveal-hero{
  opacity:0;
  transform:translateY(20px);
  transition:
    opacity .9s ease .15s,
    transform .9s cubic-bezier(.22,.8,.22,1) .15s;
}

.js .reveal-hero.is-visible{
  opacity:1;
  transform:none;
}

.js .reveal-item{
  opacity:0;
  transform:translateY(24px);
  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.22,.8,.22,1);
  will-change:opacity, transform;
}

.js .reveal-item.is-visible{
  opacity:1;
  transform:none;
}

.service-wrap .reveal-item{
  transition-duration:.75s;
}

.contact-wrap .reveal-item{
  transform:translateY(12px);
  transition-duration:.55s;
}

.info-banners.reveal{
  transition-duration:.9s;
}

.service-item.reveal-item.is-visible:hover{
  transform:translateY(-6px);
}

.contact-card.reveal-item.is-visible:hover{
  transform:translateY(-2px);
}

/* =========================================================
  Hero opening animation（演出版）
========================================================= */

/* 背景は少し強めに寄って止まる */
.hero::before{
  animation:heroZoom 9s ease-out both;
}

@keyframes heroZoom{
  from{
    transform:scale(1.12);
  }
  to{
    transform:scale(1);
  }
}

/* hero全体を少しだけ立ち上げる */
.hero{
  animation:heroFadeIn 1s ease both;
}

@keyframes heroFadeIn{
  from{
    opacity:.72;
  }
  to{
    opacity:1;
  }
}

/* reveal本体は潰して、行ごとの演出に任せる */
.js .reveal-hero{
  opacity:1;
  transform:none;
  transition:none;
}

/* 行ラッパー */
.hero-title{
  margin:0 0 14px;
}

.hero-line{
  display:block;
  overflow:hidden;
  line-height:1.22;
}

.hero-line > span{
  display:inline-block;
  position:relative;
  opacity:0;
  transform:translateY(72px) scale(.96);
  filter:blur(10px);
  will-change:transform, opacity, filter;
}

/* 3行を順番に表示 */
.js .hero-copy.reveal-hero.is-visible .hero-line:nth-child(1) > span{
  animation:heroLineIn 1s cubic-bezier(.22,.8,.22,1) .05s forwards,
            heroShine 1.6s ease .95s 1;
}

.js .hero-copy.reveal-hero.is-visible .hero-line:nth-child(2) > span{
  animation:heroLineIn 1s cubic-bezier(.22,.8,.22,1) .25s forwards,
            heroShine 1.6s ease 1.15s 1;
}

.js .hero-copy.reveal-hero.is-visible .hero-line:nth-child(3) > span{
  animation:heroLineIn 1s cubic-bezier(.22,.8,.22,1) .45s forwards,
            heroShine 1.6s ease 1.35s 1;
}

/* 会社名は最後に静かに */
.hero-company{
  opacity:0;
  transform:translateY(20px);
  filter:blur(6px);
}

.js .hero-copy.reveal-hero.is-visible .hero-company{
  animation:heroCompanyIn 1.85s cubic-bezier(.22,.8,.22,1) 1.1s forwards;
}

@keyframes heroLineIn{
  0%{
    opacity:0;
    transform:translateY(72px) scale(.96);
    filter:blur(10px);
  }
  60%{
    opacity:1;
    transform:translateY(-4px) scale(1.01);
    filter:blur(0);
  }
  100%{
    opacity:1;
    transform:translateY(0) scale(1);
    filter:blur(0);
  }
}

@keyframes heroCompanyIn{
  0%{
    opacity:0;
    transform:translateY(20px);
    filter:blur(6px);
  }
  100%{
    opacity:1;
    transform:none;
    filter:none;
  }
}

/* 文字の上を一度だけ光が流れる */
@keyframes heroShine{
  0%{
    text-shadow:
      0 10px 26px rgba(0,0,0,.22),
      0 2px 10px rgba(0,0,0,.18),
      -120px 0 24px rgba(255,255,255,0);
  }
  45%{
    text-shadow:
      0 10px 26px rgba(0,0,0,.22),
      0 2px 10px rgba(0,0,0,.18),
      0 0 22px rgba(255,255,255,.28);
  }
  100%{
    text-shadow:
      0 10px 26px rgba(0,0,0,.22),
      0 2px 10px rgba(0,0,0,.18),
      120px 0 24px rgba(255,255,255,0);
  }
}

/* =========================================================
  Reduced motion
========================================================= */
@media (prefers-reduced-motion: reduce){
  .js .reveal,
  .js .reveal-hero,
  .js .reveal-item{
    opacity:1 !important;
    transform:none !important;
    transition:none !important;
  }

  .hero::before{
    animation:none !important;
  }
}

/* =========================================================
  Responsive（トップのみ）
========================================================= */
@media (max-width:980px){
  .hero{
    height:min(62vh, 560px);
  }
}

@media (max-width:768px){
  .banner-left{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .banner-photo{
    width:100%;
    min-width:0;
    flex-basis:auto;
    height:120px;
    background-size:cover;
    background-position:center;
  }
}

@media (max-width:560px){
  .hero{
    height:360px;
  }

  .hero-inner{
    align-items:center;
    justify-content:center;
    padding:22px 0 36px;
    text-align:left;
  }

.hero-copy{
  max-width:680px;
  backface-visibility:hidden;
}

.hero-copy h1{
  margin:0 0 14px;
  font-size:clamp(32px, 3.8vw, 52px);
  line-height:1.22;
  color:#fff;
  font-weight:800;
  letter-spacing:.01em;
  text-shadow:
    0 10px 26px rgba(0,0,0,.22),
    0 2px 10px rgba(0,0,0,.18);
}

.hero-copy .company{
  margin:0;
  font-size:clamp(16px, 2vw, 24px);
  color:rgba(255,255,255,.92);
  font-weight:700;
  letter-spacing:.02em;
}

  .banner{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    min-height:auto;
  }

  .banner-left{
    flex-direction:row;
    align-items:flex-start;
    gap:12px;
    min-width:0;
  }

  .banner-photo{
    width:100%;
    min-width:0;
    height:120px;
    border-radius:12px;
    order:3;
    background-size:contain;
    background-color:rgba(255,255,255,.65);
  }

  .chev{
    display:none;
  }
}

/* company → contact の波 */
.section-divider--wave-2{
  background:#ffffff;
}

.section-divider--wave-2 svg{
  height:88px;
  display:block;
  width:100%;
}

.section-divider--wave-2 path{
  fill:var(--surface);
}

