/* ==========================================================
   好日不動産株式会社 — LP スタイル
   palette: 白 / グレー / 黒 + ティール差し色
   ========================================================== */

:root {
  --white: #FFFFFF;
  --off: #F4F4F3;
  --ink: #161616;
  --gray: #737373;
  --line: #E3E3E1;
  --teal: #0ABAB5;
  --teal-light: #5FD6D1;
  --font-display: "Shippori Mincho", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
  --font-latin: "Manrope", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.9;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 6vw; }

.pc-only { display: inline; }
.sp-only { display: none; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

::selection { background: var(--teal); color: #fff; }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 4vw;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.header.is-scrolled {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: 13px 4vw;
}

.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { width: 26px; height: 20px; flex-shrink: 0; color: var(--ink); }
.brand-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; letter-spacing: 0.06em;
}
.brand-sub { font-size: 11px; margin-left: 6px; letter-spacing: 0.14em; color: var(--gray); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
.nav a {
  font-size: 13.5px; letter-spacing: 0.08em; position: relative; white-space: nowrap;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 2px; background: var(--teal);
  transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--teal); color: #fff;
  padding: 10px 20px;
  transition: background .3s ease;
}
.nav-cta .ico { width: 15px; height: 15px; }
.nav-cta:hover { background: var(--ink); }

.menu-btn { display: none; }

/* ---------- 線アイコン ---------- */
.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 34px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  letter-spacing: 0.08em;
  transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--ink); background: transparent;
  font-family: var(--font-latin); font-weight: 600; letter-spacing: 0.04em;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { opacity: 0.85; }

/* ---------- eyebrow / title ---------- */
.eyebrow {
  font-family: var(--font-latin); font-weight: 600;
  font-size: 11.5px; letter-spacing: 0.32em; color: var(--teal);
  margin-bottom: 22px;
}
.eyebrow-light { color: var(--teal-light); }

.title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: 0.1em; line-height: 1.6;
  margin-bottom: 34px;
}
.title-light { color: #fff; }

.section-lead { color: var(--gray); margin: -14px 0 48px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px 0 40px;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(244,244,243,0) 55%, rgba(244,244,243,.7) 100%),
    var(--white);
}
.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(400px, 42%) 1fr;
  align-items: center;
  gap: 2vw;
  padding-left: 6vw;
}

.hero-en {
  font-family: var(--font-latin); font-weight: 600;
  font-size: 11px; letter-spacing: 0.34em; color: var(--gray);
  margin-bottom: 26px;
  opacity: 0; animation: fadein .8s ease .2s forwards;
}
.hero-copy {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 3.9vw, 54px);
  letter-spacing: 0.14em; line-height: 1.72;
  margin-bottom: 22px;
}
.hero-copy .accent { color: var(--teal); }
/* 文字分割アニメ用 */
.hero-copy .ch {
  display: inline-block;
  opacity: 0; transform: translateY(0.6em);
}
.hero-copy.play .ch {
  animation: chRise .7s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.055s);
}
@keyframes chRise { to { opacity: 1; transform: none; } }

.hero-sub {
  font-family: var(--font-latin); font-weight: 500;
  font-size: 13px; letter-spacing: 0.26em; color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 30px;
  opacity: 0; animation: fadein .9s ease 1.6s forwards;
}
.hero-lead {
  font-size: 14.5px; color: var(--gray); max-width: 30em; margin-bottom: 40px;
  opacity: 0; animation: fadein .9s ease 1.8s forwards;
}
.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0; animation: fadein .9s ease 2s forwards;
}
@keyframes fadein { to { opacity: 1; } }

.hero-visual { min-width: 0; will-change: transform; }
#kv { width: 100%; height: auto; display: block; color: var(--ink); }
#kv .st0 {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8px;
}

.hero-scroll {
  position: absolute; right: 4vw; bottom: 0;
  font-family: var(--font-latin); font-size: 10px; letter-spacing: 0.3em; color: var(--gray);
  writing-mode: vertical-rl;
  padding-bottom: 62px;
  opacity: 0; animation: fadein 1s ease 2.4s forwards;
}
.hero-scroll::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 1px; height: 50px; background: var(--teal);
  transform-origin: top; animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- statement (背景固定パララックス) ---------- */
.statement {
  position: relative; overflow: hidden;
  padding: 150px 0;
  color: #fff;
  background-color: #141414;
  /* 3層: 暗幕 / グレー(彩度を抜く) / 写真(スクロールで固定) */
  background-image:
    linear-gradient(rgba(20,20,20,.55), rgba(20,20,20,.55)),
    linear-gradient(#7a7a7a, #7a7a7a),
    url(../assets/bg-statement.jpg);
  background-attachment: fixed, fixed, fixed;
  background-position: center, center, center;
  background-size: cover, cover, cover;
  background-blend-mode: normal, saturation, normal;
}
.contact-bg {
  position: absolute; inset: -18% 0;
  background-size: cover; background-position: center;
  filter: grayscale(100%) brightness(0.22);
  will-change: transform;
  z-index: 0;
}
.statement-inner { position: relative; z-index: 1; }
.statement-copy {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.12em; line-height: 1.9;
  margin-bottom: 30px;
}
.statement-body { color: rgba(255,255,255,0.82); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding: 120px 0; }
.section-alt { background: var(--off); }

/* ---------- service ---------- */
.service-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--white);
  padding: 40px 28px 44px;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px; background: var(--teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.service-card:hover::after { transform: scaleX(1); }
/* カードの時間差スライドイン */
.service-card.reveal { transform: translateY(34px); }
.service-card.reveal:nth-child(1) { transition-delay: 0s; }
.service-card.reveal:nth-child(2) { transition-delay: .12s; }
.service-card.reveal:nth-child(3) { transition-delay: .24s; }
.service-card.reveal:nth-child(4) { transition-delay: .36s; }

.service-icon {
  width: 92px; height: 92px;
  margin: 0 0 24px -8px;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.service-card:hover .service-icon { transform: translateY(-4px); }
.service-card h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 19px; letter-spacing: 0.12em; margin-bottom: 14px;
}
.service-card p { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- area (2カラム・右にカラー写真) ---------- */
.area-grid {
  display: grid; grid-template-columns: 1fr minmax(300px, 46%);
  gap: 64px; align-items: center;
}
.area-body { color: var(--ink-soft); margin-bottom: 30px; max-width: 34em; }
.area-cities { font-size: 14px; letter-spacing: 0.06em; color: var(--gray); line-height: 2.2; }
.area-cities strong { color: var(--teal); font-weight: 700; }
.area-cities .area-etc { color: #6d6d6b; }
.area-photo { overflow: hidden; }
.area-photo img {
  width: 100%; aspect-ratio: 4 / 5; max-height: 520px; object-fit: cover;
}

/* ---------- company (1カラム・マップは下) ---------- */
.company-table { border-top: 1px solid var(--line); max-width: 760px; }
.company-table > div {
  display: grid; grid-template-columns: 150px 1fr;
  padding: 16px 6px;
  border-bottom: 1px solid var(--line);
}
.company-table dt { font-size: 13px; letter-spacing: 0.14em; color: var(--gray); padding-top: 2px; }
.company-table dd { font-size: 14.5px; }

.company-map { margin-top: 48px; }
.company-map iframe {
  width: 100%; height: 420px; border: 0; display: block;
}

/* ---------- contact ---------- */
.contact {
  position: relative; overflow: hidden;
  padding: 130px 0 140px;
  color: rgba(255,255,255,0.92);
}
.contact-inner { position: relative; z-index: 1; }
.contact-lead { margin: -10px 0 48px; color: rgba(255,255,255,0.7); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-note { font-size: 12.5px; color: rgba(255,255,255,0.72); margin-top: 14px; }
.btn-line { width: 100%; max-width: 340px; padding: 18px 30px; font-size: 16px; }
.tel-number {
  font-family: var(--font-latin); font-weight: 700;
  font-size: clamp(30px, 3.4vw, 40px); letter-spacing: 0.04em;
  color: #fff; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 12px;
  transition: color .3s ease;
}
.tel-number .ico { width: 0.72em; height: 0.72em; }
.tel-number:hover { color: var(--teal-light); }
.mail-link { text-decoration: underline; text-underline-offset: 3px; }
.mail-link:hover { color: var(--teal-light); }

/* ---------- footer ---------- */
.footer { background: var(--white); border-top: 1px solid var(--line); color: var(--gray); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); color: var(--ink); letter-spacing: 0.1em;
}
.footer-brand .brand-mark { width: 22px; height: 17px; }
.footer-license { font-size: 12px; line-height: 1.8; }
.footer-copy { font-family: var(--font-latin); font-size: 11px; letter-spacing: 0.08em; }

/* ==========================================================
   mobile / tablet
   ========================================================== */
@media (max-width: 960px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .pc-only { display: none; }
  .sp-only { display: inline; }

  /* nav → ドロワー */
  .nav {
    position: fixed; inset: 0; z-index: 90;
    background: var(--white);
    flex-direction: column; justify-content: center; gap: 34px;
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
  }
  .nav a { font-size: 17px; }
  body.menu-open .nav { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }

  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; padding: 10px;
    background: transparent; border: 0; cursor: pointer;
    position: relative; z-index: 110;
  }
  .menu-btn span { display: block; height: 1.5px; background: var(--ink); transition: transform .3s ease; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(4.5px) rotate(22deg); }
  body.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4.5px) rotate(-22deg); }

  .hero { padding: 100px 0 90px; min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; padding: 0 6vw; gap: 40px; }
  .hero-copy { font-size: clamp(30px, 8vw, 40px); }
  .hero-visual { margin: 0 -6vw 0 -2vw; }
  .hero-scroll { display: none; }

  .section { padding: 80px 0; }
  /* 実機モバイルでの固定背景の不具合を避け通常スクロールに */
  .statement { padding: 100px 0; background-attachment: scroll, scroll, scroll; }

  .service-grid { grid-template-columns: 1fr; }
  .service-card { padding: 34px 26px 38px; }
  .service-card .service-icon { width: 76px; height: 76px; }

  .area-grid { grid-template-columns: 1fr; gap: 40px; }
  .area-photo { order: -1; }
  .area-photo img { aspect-ratio: 4 / 3; }

  .company-map { margin-top: 32px; }
  .company-map iframe { height: 320px; }
  .company-table > div { grid-template-columns: 1fr; gap: 2px; padding: 13px 4px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-en, .hero-sub, .hero-lead, .hero-cta, .hero-scroll { animation: none; opacity: 1; }
  .hero-copy .ch { opacity: 1; transform: none; animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #kv .st0 { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; transition: none !important; }
  .contact-bg, .hero-visual { transform: none !important; }
}
