@charset "UTF-8";

/* =========================================================
   玄関ページ（osekkai-rooms.jp）
   居住用サイト（apps/home/public/css/style.css）の色・書体・帯見出し・すりガラスヘッダーを踏襲し、
   「住まい」「店舗・事務所」の2面を選ぶ1画面に仕立てる。その下にファミリー・メディアへの小さな入口（2026-11-01〜）。
   動きは CSS のみ（JS は件数の数え上げだけ）。
   ========================================================= */

/* ---- variables（居住用と同値。値を変えるときは両方そろえる） ---- */
:root {
  --font-base: "Gen Interface JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-logo: "Outfit", var(--font-base);

  --c-navy: #2c537e;
  --c-navy-strong: #2a62a1;
  --c-ink: #27272a;
  --c-gray: #666666;
  --c-gray-light: #acabaf;
  --c-line: #e2e2e2;
  --c-beige: #f7f6f2;
  --c-blue-pale: #eef2f7;
  --c-green: #2ea36a;
  --c-green-pale: #eaf7f0;

  --side: 20px;
  --header-h: 56px;
  /* 2択の下の入口の帯（FAMILY・MEDIA）の高さの見込み。2択をこの分だけ縮めて、最初の画面に4つとも収める */
  --more-h: 140px;

  /* 入口のカードの色（行き先のサイトの色。apps/family の --cream・--wood・--ink・--sub の写し）。
     ファミリー側の値と一致するかは src/lib/family-colors.test.ts が見張る */
  --c-family-cream: #f3eee7;
  --c-family-wood: #7a5638;
  --c-family-ink: #221e1b;
  --c-family-sub: #5e554d;

  /* 面の伸縮。触れた面が 1.6、もう片方が 1 → 約 62 : 38 */
  --grow: 1.6;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---- base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-navy);
  color: var(--c-ink);
  font-family: var(--font-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  border: none;
  vertical-align: bottom;
}

a:focus {
  outline: none;
}

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =========================================================
   layout
   ========================================================= */
/* dvh を知らない古いブラウザ（iOS 15.3 以前など）では 2 行目が捨てられ vh が残る。
   両方無いと面の高さが 0 になり、絶対配置の文言ごと消えて真っ白に近い画面になる */
.g-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
}

/* ---- header（居住用と同じ すりガラス） ---- */
.g-header {
  position: fixed;
  top: 4px;
  right: 4px;
  left: 4px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.g-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-header__mark {
  display: block;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 2px;
}

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

.g-header__name {
  font-family: var(--font-logo);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--c-navy);
}

/* 「東京・大阪 掲載中 386件」— 居住用の緑バッジ */
.g-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--c-green-pale);
  white-space: nowrap;
}

.g-live__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  animation: g-pulse 2s ease-in-out infinite;
}

.g-live__text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--c-green);
}

.g-live__num {
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   2面（split）
   ========================================================= */
.g-split {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: calc(100vh - 64px - var(--more-h));
  min-height: calc(100dvh - 64px - var(--more-h));
  overflow: hidden;
}

.g-panel {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  transition:
    flex .7s var(--ease-out),
    filter .7s var(--ease-out);
}

/* 触れた面が伸び、もう片方が少し沈む（:has が無い環境は伸縮なし＝そのまま使える） */
.g-split:has(.g-panel:hover) .g-panel:hover,
.g-split:has(.g-panel:focus-visible) .g-panel:focus-visible {
  flex-grow: var(--grow);
}

.g-split:has(.g-panel:hover) .g-panel:not(:hover),
.g-split:has(.g-panel:focus-visible) .g-panel:not(:focus-visible) {
  filter: brightness(.82);
}

/* ---- 背景 ---- */
.g-panel__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 写真面（住まい）。読み込み直後にゆっくり寄っていき、触れるとさらに一段寄る */
.g-panel__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  transform: scale(1.02);
  transition: transform 1.4s var(--ease-out);
  animation: g-kenburns 14s ease-in-out both;
}

.g-panel:hover .g-panel__bg-img {
  transform: scale(1.08);
}

/* 居住用ヒーローと同じ ネイビーの薄い膜 */
.g-panel__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44, 83, 126, .10) 0%, rgba(44, 83, 126, .22) 55%, rgba(44, 83, 126, .58) 100%);
}

/* 図面面（店舗・事務所）。写真の代わりにネイビーのグラデ＋薄い方眼（間取り図のイメージ） */
.g-panel--business .g-panel__bg {
  background:
    linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-strong) 100%);
}

.g-panel__grid {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: translate3d(0, 0, 0);
  transition: transform 1.4s var(--ease-out);
  animation: g-drift 18s linear infinite alternate;
}

.g-panel:hover .g-panel__grid {
  transform: translate3d(-10px, -10px, 0) scale(1.04);
}

/* ---- 線画イラスト（居住用と同じ素材） ---- */
.g-panel__illust {
  position: absolute;
  right: var(--side);
  bottom: 150px;
  width: 104px;
  height: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: g-rise .9s var(--ease-out) .45s forwards;
}

.g-panel--business .g-panel__illust {
  width: 124px;
}

/* ---- 文言 ---- */
.g-panel__body {
  position: absolute;
  right: var(--side);
  bottom: 24px;
  left: var(--side);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-panel__en {
  font-family: var(--font-logo);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.4px;
  color: rgba(255, 255, 255, .85);
  opacity: 0;
  animation: g-fade .6s ease .15s forwards;
}

.g-panel__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 帯見出し（居住用 .p-hero__line と同じ作り）。帯が左から伸び、文字がその後に現れる */
.g-line {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  padding: 0 6px 0 3px;
}

.g-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: calc(100% + 3px);
  height: 35px;
  border-radius: 4px;
  background: var(--c-navy-strong);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  animation: g-bar .6s var(--ease-out) forwards;
}

.g-line--01::before { animation-delay: .25s; }
.g-line--02::before { animation-delay: .4s; }

.g-line__text {
  position: relative;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1.92px;
  color: #fff;
  opacity: 0;
  animation: g-fade .4s ease forwards;
}

.g-line--01 .g-line__text { animation-delay: .55s; }
.g-line--02 .g-line__text { animation-delay: .7s; }

/* 店舗・事務所の帯は面の地色と同化するので、少し明るいネイビーで浮かす */
.g-panel--business .g-line::before {
  background: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.g-panel__lead {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .96px;
  color: #fff;
  opacity: 0;
  animation: g-fade .6s ease .85s forwards;
}

/* ---- 行き先（丸ボタン。居住用 .c-btn と同じ形） ---- */
.g-panel__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 18px 12px 20px;
  border-radius: 40px;
  background: #fff;
  color: var(--c-navy);
  opacity: 0;
  animation: g-rise .6s var(--ease-out) 1s forwards;
  transition: transform .1s ease, filter .1s ease;
}

.g-panel__cta:active {
  transform: scale(.98);
  filter: brightness(.94);
}

.g-panel__cta-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1.12px;
  white-space: nowrap;
}

.g-panel__cta-arrow {
  width: 20px;
  height: 20px;
  transition: transform .35s var(--ease-out);
}

.g-panel:hover .g-panel__cta-arrow {
  transform: translateX(4px);
}

/* 準備中（押せない）。輪郭だけの白ピル */
.g-panel__soon {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 40px;
  color: #fff;
  opacity: 0;
  animation: g-rise .6s var(--ease-out) 1s forwards;
}

.g-panel__soon-text {
  font-family: var(--font-logo);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.4px;
  white-space: nowrap;
}

.g-panel__soon-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .8);
}

/* 準備中の面は「押しても飛ばない」ことをカーソルでも伝える */
.g-panel--soon {
  cursor: default;
}

/* ---- 中央の「or」 ---- */
.g-or {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px rgba(44, 83, 126, .32);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* 破線のリングだけがゆっくり回る（文字は回さない） */
.g-or::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px dashed rgba(255, 255, 255, .7);
  border-radius: 50%;
  animation: g-spin 14s linear infinite;
}

.g-or__text {
  font-family: var(--font-logo);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--c-navy);
}

/* =========================================================
   ほかのサイトへの入口（FAMILY・MEDIA）
   2択の下に小さなカードを2枚。主役は2択のまま、色と線画は行き先のサイトに合わせる。
   スマホは横長のカードを縦に2段、PC は左右2枚（ファミリーが「住まい」、メディアが「店舗・事務所」の下）
   ========================================================= */
.g-more {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px 8px 0;
  background: #fff;
  opacity: 0;
  transform: translateY(10px);
  animation: g-rise .6s var(--ease-out) 1.15s forwards;
}

.g-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 10px 14px;
  overflow: hidden;
  border-radius: 4px;
  transition:
    transform .35s var(--ease-out),
    box-shadow .35s var(--ease-out);
}

.g-card--family {
  --card-accent: var(--c-family-wood);
  background: var(--c-family-cream);
  color: var(--c-family-ink);
}

.g-card--media {
  --card-accent: var(--c-navy);
  background: var(--c-blue-pale);
  color: var(--c-ink);
}

/* 白い帯の上なので、全体の白いフォーカス枠では見えない */
.g-card:focus-visible {
  outline-color: var(--c-navy);
}

/* 浮く動きはマウスのある端末だけ（スマホは押したあと :hover が残り、カードが浮いたままに見えるため） */
@media (hover: hover) {
  .g-card:hover {
    box-shadow: 0 8px 20px rgba(44, 83, 126, .14);
    transform: translateY(-2px);
  }

  .g-card:hover .g-card__arrow {
    transform: translateX(3px);
  }

  .g-card:hover .g-card__illust {
    transform: translateY(-3px);
  }
}

.g-card:active {
  transform: scale(.99);
}

/* スマホは「FAMILY ファミリー賃貸 ›」を1行に、説明をその下に */
.g-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  max-width: calc(100% - 72px);
}

.g-card__en {
  font-family: var(--font-logo);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--card-accent);
}

.g-card__title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .5px;
  white-space: nowrap;
}

.g-card__arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--card-accent);
  transition: transform .35s var(--ease-out);
}

.g-card__lead {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .4px;
  color: var(--c-gray);
}

.g-card--family .g-card__lead {
  color: var(--c-family-sub);
}

/* 線画はカードの右下に置き、足元を下端で切る */
.g-card__illust {
  position: absolute;
  right: 14px;
  bottom: -8px;
  height: auto;
  transition: transform .6s var(--ease-out);
}

.g-card--family .g-card__illust {
  width: 62px;
}

.g-card--media .g-card__illust {
  width: 40px;
}

/* スマホで帯のぶん2択が低くなっても、文言がヘッダーの下に潜らないように面の高さの下限を持つ。
   画面の低い機種（iPhone SE 等）では入口の帯が少し下にはみ出す（スクロールで見える）。
   ⚠ 下限は2面で同じ値にする。「or」は2択全体の真ん中に置いているので、違うと面の境目からずれてボタンに重なる */
@media (max-width: 767px) {
  .g-panel {
    min-height: 300px;
  }

  /* 住まいの線画は下からでなく上から置く（面が低いとヘッダーに頭が隠れるため） */
  .g-panel--home .g-panel__illust {
    top: 72px;
    bottom: auto;
    width: 96px;
  }
}

/* ---- footer ---- */
.g-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px var(--side) 14px;
  background: #fff;
  text-align: center;
}

.g-footer__company {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--c-gray);
}

.g-footer__row {
  font-size: 10px;
  letter-spacing: .3px;
  color: var(--c-gray-light);
}

/* プライバシーポリシーへのリンク（会社名・免許番号と並ぶ控えめな文字のまま、押せると分かる下線だけ添える） */
.g-footer__link {
  color: var(--c-gray);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.g-footer__link:hover {
  color: inherit;
  opacity: .7;
}

/* 全体の a:focus-visible は白い枠線（暗い面向け）。下部は白い面なので、キーボードで選んだ枠が見えるよう文字色にする */
.g-footer__link:focus-visible {
  outline-color: currentColor;
}

/* =========================================================
   PC（768px〜）: 左右2面。玄関はPCからも来る前提
   ========================================================= */
@media (min-width: 768px) {
  :root {
    --side: 40px;
    --more-h: 108px;
  }

  .g-header {
    top: 12px;
    right: 12px;
    left: 12px;
    padding: 10px 16px;
  }

  .g-split {
    flex-direction: row;
    min-height: calc(100vh - 60px - var(--more-h));
    min-height: calc(100dvh - 60px - var(--more-h));
  }

  .g-more {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 12px 0;
  }

  .g-card {
    min-height: 96px;
    padding: 16px 28px;
  }

  .g-card__body {
    grid-template-columns: 1fr;
    row-gap: 2px;
    max-width: calc(100% - 96px);
  }

  .g-card__en {
    font-size: 11px;
    letter-spacing: 2.4px;
  }

  .g-card__title {
    font-size: 18px;
    letter-spacing: .8px;
  }

  .g-card__arrow {
    width: 18px;
    height: 18px;
  }

  .g-card__lead {
    font-size: 12px;
  }

  /* タブレット幅（〜1023px）はカードが狭いので、説明文が折り返さない大きさに抑える */
  .g-card__illust {
    right: 24px;
  }

  .g-card--family .g-card__illust {
    width: 84px;
  }

  .g-card--media .g-card__illust {
    width: 54px;
  }

  .g-panel__illust {
    right: 12%;
    bottom: 34%;
    width: 160px;
  }

  .g-panel--business .g-panel__illust {
    width: 190px;
  }

  .g-panel__body {
    right: var(--side);
    bottom: 64px;
    left: var(--side);
    gap: 12px;
  }

  .g-panel__en {
    font-size: 14px;
  }

  .g-line::before {
    height: 48px;
  }

  .g-line__text {
    font-size: 36px;
  }

  .g-panel__lead {
    font-size: 14px;
  }

  .g-panel__cta {
    padding: 14px 22px 14px 26px;
  }

  .g-panel__cta-text {
    font-size: 15px;
  }

  .g-or {
    width: 72px;
    height: 72px;
  }

  .g-or__text {
    font-size: 18px;
  }

  .g-footer {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    padding: 14px var(--side);
  }
}

/* PC（1024px〜）: カードに余裕があるので、線画を大きくして行き先の顔をはっきりさせる */
@media (min-width: 1024px) {
  :root {
    --more-h: 120px;
  }

  .g-card {
    min-height: 108px;
  }

  .g-card__body {
    max-width: calc(100% - 140px);
  }

  .g-card__illust {
    right: 32px;
    bottom: -6px;
  }

  .g-card--family .g-card__illust {
    width: 116px;
  }

  .g-card--media .g-card__illust {
    width: 72px;
  }
}

/* =========================================================
   keyframes
   ========================================================= */
@keyframes g-bar {
  to { transform: translateY(-50%) scaleX(1); }
}

@keyframes g-fade {
  to { opacity: 1; }
}

@keyframes g-rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes g-kenburns {
  from { transform: scale(1.12) translate3d(1.5%, 0, 0); }
  to   { transform: scale(1.02) translate3d(0, 0, 0); }
}

@keyframes g-drift {
  from { background-position: 0 0; }
  to   { background-position: 28px 28px; }
}

@keyframes g-spin {
  to { transform: rotate(360deg); }
}

@keyframes g-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .45; }
}

/* 動きを抑える設定の人には、最初から全部出しておく */
@media (prefers-reduced-motion: reduce) {
  .g-panel,
  .g-panel__bg-img,
  .g-panel__grid,
  .g-panel__cta,
  .g-panel__cta-arrow,
  .g-card,
  .g-card__arrow,
  .g-card__illust {
    transition: none;
  }

  .g-panel__bg-img,
  .g-panel__grid,
  .g-or::before,
  .g-live__dot {
    animation: none;
  }

  .g-panel__illust,
  .g-panel__en,
  .g-line__text,
  .g-panel__lead,
  .g-panel__cta,
  .g-panel__soon,
  .g-more {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .g-line::before {
    animation: none;
    transform: translateY(-50%) scaleX(1);
  }
}
