/* GS公式サイト 共通スタイル — トークンの正は ../DESIGN.md */

:root {
  /* 配色（DESIGN.md §3） */
  --c-teal: #0C9B90;
  --c-deep: #0B4B46;
  --c-ink: #1F2A29;
  --c-white: #FFFFFF;
  --c-mist: #EEF6F4;
  --c-lamp: #E7A63C;
  --shadow: 0 4px 20px rgba(11, 75, 70, 0.08);

  /* 書体（DESIGN.md §4） */
  --font-display: "Shippori Mincho B1", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
  --font-latin: "Poppins", sans-serif;

  /* 型スケール */
  --fs-xl: 40px;
  --fs-lg: 28px;
  --fs-md: 22px;
  --fs-sm: 18px;
  --fs-base: 16px;
  --fs-xs: 13px;

  /* 余白 */
  --section-pad: 112px;
  --content-max: 1120px;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  background: var(--c-white);
}

img { max-width: 100%; display: block; }

a { color: var(--c-teal); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--c-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ヘッダー ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
}

.header.is-scrolled { box-shadow: var(--shadow); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-ink);
}

.header__logo { height: 52px; width: 52px; object-fit: cover; }

.header__name { font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.06em; }

.header__name small {
  display: block;
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--c-teal);
}

.nav { display: flex; gap: 28px; }

.nav a {
  text-decoration: none;
  color: var(--c-ink);
  font-size: 15px;
  padding: 8px 0;
}

.nav a:hover { color: var(--c-teal); }

/* ---------- ボタン ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-white);
  background: var(--c-teal);
  border: none;
  border-radius: 999px;
  padding: 14px 40px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--c-deep); }

.btn--ghost {
  background: transparent;
  color: var(--c-teal);
  border: 1.5px solid var(--c-teal);
}

.btn--ghost:hover { background: var(--c-mist); color: var(--c-deep); }

/* ---------- 共通セクション ---------- */

.section { padding: var(--section-pad) 0; }

.section--mist { background: var(--c-mist); }

.section__eyebrow {
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: 0.28em;
  color: var(--c-teal);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 40px;
}

.section__title--display {
  font-family: var(--font-display);
  font-weight: 700;
}

/* 破線モチーフ：使うのは1画面2箇所まで（DESIGN.md §5） */
.dashed-divider {
  border: none;
  border-top: 1.5px dashed var(--c-teal);
  width: 72px;
  margin: 0 0 40px;
}

.link-more {
  display: inline-block;
  color: var(--c-teal);
  text-decoration: none;
  border-bottom: 1.5px dashed var(--c-teal);
  padding-bottom: 2px;
  font-weight: 500;
}

.link-more:hover { color: var(--c-deep); border-bottom-color: var(--c-deep); }

/* ---------- ヒーロー ---------- */

.hero { padding: 72px 0 var(--section-pad); }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero__copy { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; line-height: 1.7; }

.hero__lead { margin-top: 28px; max-width: 34em; }

.hero__cta { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ロゴの光線：ページ読み込み時に1回だけ描画（DESIGN.md §5-3） */
.hero__rays { width: 180px; margin-bottom: 28px; }

.hero__rays line {
  stroke: var(--c-teal);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 14 10;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .header { transition: box-shadow 0.4s ease-out; }

  .btn { transition: background 0.4s ease-out; }

  .hero__rays line {
    stroke-dashoffset: 120;
    animation: rays-draw 1.2s ease-out forwards;
  }

  @keyframes rays-draw { to { stroke-dashoffset: 0; } }

  /* JSが有効な場合だけ初期状態を隠す。JS無効時は常に表示される。 */
  .motion-enabled .fade-in .section__eyebrow,
  .motion-enabled .fade-in .section__title,
  .motion-enabled .fade-in .section__lead,
  .motion-enabled .fade-in .container:not(.sumai__inner) > :not(.section__eyebrow, .section__title, .card-grid, .constellation),
  .motion-enabled .fade-in .sumai__inner > div > :not(.section__eyebrow, .section__title),
  .motion-enabled .fade-in .sumai__inner > .photo-slot,
  .motion-enabled .fade-in .sumai__inner > .media-img {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .motion-enabled .fade-in .card-grid > .card {
    opacity: 0;
    translate: 0 12px;
    transition: opacity 0.7s ease-out, translate 0.7s ease-out,
      transform 0.4s ease-out, box-shadow 0.4s ease-out;
  }

  .motion-enabled .fade-in.is-visible .section__eyebrow {
    opacity: 1;
    transform: none;
    transition-delay: 0ms;
  }

  .motion-enabled .fade-in.is-visible .section__title {
    opacity: 1;
    transform: none;
    transition-delay: 80ms;
  }

  .motion-enabled .fade-in.is-visible .section__lead,
  .motion-enabled .fade-in.is-visible .container:not(.sumai__inner) > :not(.section__eyebrow, .section__title, .card-grid, .constellation),
  .motion-enabled .fade-in.is-visible .sumai__inner > div > :not(.section__eyebrow, .section__title),
  .motion-enabled .fade-in.is-visible .sumai__inner > .photo-slot,
  .motion-enabled .fade-in.is-visible .sumai__inner > .media-img {
    opacity: 1;
    transform: none;
    transition-delay: 160ms;
  }

  .motion-enabled .fade-in.is-visible .card-grid > .card {
    opacity: 1;
    translate: none;
  }

  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(1) { transition-delay: 160ms, 160ms, 0ms, 0ms; }
  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(2) { transition-delay: 230ms, 230ms, 0ms, 0ms; }
  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(3) { transition-delay: 300ms, 300ms, 0ms, 0ms; }
  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(4) { transition-delay: 370ms, 370ms, 0ms, 0ms; }
  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(5) { transition-delay: 440ms, 440ms, 0ms, 0ms; }
  .motion-enabled .fade-in.is-visible .card-grid > .card:nth-child(6) { transition-delay: 510ms, 510ms, 0ms, 0ms; }

  .motion-enabled .constellation .const-line {
    stroke-dashoffset: var(--const-line-length);
    transition: stroke-dashoffset 1.1s ease-out;
  }

  .motion-enabled .constellation.is-visible .const-line { stroke-dashoffset: 0; }

  .motion-enabled .constellation g {
    opacity: 0;
    transform: scale(0.96);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.6s ease-out 200ms, transform 0.6s ease-out 200ms;
  }

  .motion-enabled .constellation.is-visible g {
    opacity: 1;
    transform: scale(1);
  }

  .constellation .const-star { transition: opacity 0.4s ease-out; }

  .card { transition: transform 0.4s ease-out, box-shadow 0.4s ease-out; }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(11, 75, 70, 0.14);
  }

  .card img { transition: transform 0.4s ease-out; }

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

  @media (min-width: 801px) {
    .motion-enabled .hero__inner > .photo-slot--hero,
    .motion-enabled .hero__inner > .media-img { will-change: transform; }
  }
}

/* ---------- 写真差し替え枠（ドラフト専用。実写が入ったら消す） ---------- */

.photo-slot {
  background: var(--c-mist);
  border: 1.5px dashed var(--c-teal);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--c-deep);
  font-size: var(--fs-xs);
  line-height: 1.8;
  padding: 16px;
}

.photo-slot--hero { aspect-ratio: 4 / 3; }
.photo-slot--card { aspect-ratio: 16 / 10; border-radius: 12px 12px 0 0; }

.card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.card__img--wide { aspect-ratio: 16 / 10; }

.media-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }

/* ---------- 事業の星座 ---------- */

.constellation { display: block; margin: 0 auto 64px; max-width: 720px; }

.constellation text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  fill: var(--c-ink);
}

.constellation .const-line {
  stroke: var(--c-teal);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  fill: none;
}

.constellation .const-star { fill: var(--c-teal); }

.constellation .const-star--lamp { fill: var(--c-lamp); }

.constellation a:hover .const-star { opacity: 0.65; }

.townscape { position: relative; max-width: 880px; margin: 0 auto 56px; }
.townscape__img {
  display: block;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  object-fit: cover;
  object-position: 50% 92%;
  border-radius: 16px;
}
.townscape__star {
  position: absolute;
  left: var(--townscape-star-x, 50%);
  top: var(--townscape-star-y, 12%);
  transform: translateX(-50%);
  width: 76px;
}

.townscape__spot {
  position: absolute;
  left: var(--spot-x);
  top: var(--spot-y);
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--c-teal);
  box-shadow: 0 2px 8px rgba(11, 75, 70, 0.2);
}

.townscape__spot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--c-teal);
}

.townscape__spot-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--c-white);
  color: var(--c-deep);
  font-size: 13px;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.townscape__spot-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--c-white);
}

.townscape__spot--edge-right .townscape__spot-label {
  left: auto;
  right: -14px;
  transform: none;
}

.townscape__spot--edge-right .townscape__spot-label::after {
  left: auto;
  right: 22px;
  transform: none;
}

.townscape__spot:hover .townscape__spot-label,
.townscape__spot:focus-visible .townscape__spot-label {
  opacity: 1;
  visibility: visible;
}

.townscape__spot:hover,
.townscape__spot:focus-visible {
  background: var(--c-white);
  border-width: 3px;
}

/* ホバーが無い端末では地図ピンを出さず、下のカードに任せる */
@media (max-width: 800px) {
  .townscape__spots { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .townscape__spot-label { transition: opacity 0.25s ease-out; }

  .townscape__spot::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px solid var(--c-teal);
    opacity: 0;
    animation: spot-ping 2.8s ease-out infinite;
  }

  .townscape__spot:hover::before { animation: none; }

  @keyframes spot-ping {
    0% { transform: scale(0.7); opacity: 0.45; }
    70% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.12); opacity: 0; }
  }
}
@media (prefers-reduced-motion: no-preference) {
  .townscape__star { animation: star-pulse 4s ease-in-out infinite alternate; }
}
@keyframes star-pulse {
  from { opacity: 0.78; }
  to { opacity: 1; }
}

/* ---------- カード ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  background: var(--c-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.card__title { font-size: var(--fs-sm); font-weight: 700; line-height: 1.6; }

.card__text { font-size: 15px; flex: 1; }

.card__note { font-size: 13px; color: var(--c-ink); opacity: 0.7; margin-top: 0.5rem; }

.card .link-more { align-self: flex-start; }

.badge-lamp {
  display: inline-block;
  align-self: flex-start;
  background: var(--c-lamp);
  color: var(--c-white);
  font-size: var(--fs-xs);
  font-weight: 500;
  border-radius: 999px;
  padding: 2px 14px;
}

/* ---------- 住まい支援（前面セクション） ---------- */

.sumai__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.sumai__list { list-style: none; margin-top: 8px; }

.sumai__list li { padding-left: 1.4em; position: relative; margin-bottom: 8px; }

.sumai__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 9px;
  height: 9px;
  background: var(--c-teal);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ---------- 会社概要 ---------- */

.company-table { width: 100%; max-width: 720px; border-collapse: collapse; }

.company-table th,
.company-table td {
  text-align: left;
  padding: 16px 8px;
  border-bottom: 1px solid rgba(12, 155, 144, 0.25);
  font-weight: 400;
  vertical-align: top;
}

.company-table th { width: 9em; color: var(--c-deep); font-weight: 700; }

.pending { color: var(--c-deep); background: var(--c-mist); border-radius: 6px; padding: 2px 10px; font-size: var(--fs-xs); }

/* ---------- お問い合わせ ---------- */

.contact-box {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-note { font-size: var(--fs-xs); color: var(--c-deep); margin-top: 16px; }

/* ---------- フッター ---------- */

.footer { background: var(--c-deep); color: var(--c-white); padding: 64px 0 40px; }

.footer__brand { font-family: var(--font-latin); font-weight: 600; letter-spacing: 0.22em; font-size: var(--fs-sm); }

.footer__name { margin-top: 4px; font-size: var(--fs-xs); }

.footer__nav { display: flex; gap: 24px; flex-wrap: wrap; margin: 28px 0 36px; }

.footer__nav a { color: var(--c-white); text-decoration: none; font-size: 14px; }

.footer__nav a:hover { text-decoration: underline; }

.footer__copy { font-family: var(--font-latin); font-size: var(--fs-xs); opacity: 0.7; }

/* ---------- レスポンシブ ---------- */

@media (max-width: 800px) {
  :root { --section-pad: 64px; --fs-xl: 28px; --fs-lg: 24px; }

  body { font-size: 15px; }

  .nav { display: none; }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    background: var(--c-white);
    padding: 16px 24px 24px;
    box-shadow: var(--shadow);
    gap: 4px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
  }

  .nav-toggle span { height: 2px; background: var(--c-ink); border-radius: 2px; }

  .hero__inner, .sumai__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (min-width: 801px) {
  .nav-toggle { display: none; }
}

/* ---------- 下層ページ共通（DESIGN.md §7 下層ページの型） ---------- */

.page-hero { background: var(--c-mist); padding: 40px 0 64px; }

.page-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.6;
  margin: 8px 0 16px;
}

.page-hero__lead { max-width: 36em; }

.breadcrumb { font-size: var(--fs-xs); margin-bottom: 36px; }

.breadcrumb a { color: var(--c-teal); text-decoration: none; }

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span { color: var(--c-deep); margin: 0 10px; }

.breadcrumb [aria-current] { margin: 0; }

/* 利用開始までの流れ（番号付きステップ） */
.flow { list-style: none; counter-reset: flow; max-width: 640px; }

.flow li {
  counter-increment: flow;
  position: relative;
  padding: 0 0 24px 56px;
}

.flow li::before {
  content: counter(flow);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-teal);
  color: var(--c-white);
  display: grid;
  place-items: center;
  font-family: var(--font-latin);
  font-weight: 600;
}

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(12, 155, 144, 0.25); }

.faq-item summary { font-weight: 700; cursor: pointer; padding: 16px 0; }

.faq-item p { padding: 0 0 16px 1.2em; }

/* 外部サイトへのリンク注記・情報の更新日 */
.update-note { font-size: var(--fs-xs); color: var(--c-deep); margin-top: 24px; }

/* お問い合わせフォーム */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 20px;
}

.contact-form label { font-weight: 500; font-size: 15px; display: grid; gap: 8px; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--c-ink);
  border: 1px solid rgba(12, 155, 144, 0.45);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--c-white);
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--c-teal);
  outline-offset: 2px;
}
