@charset "UTF-8";
/* ============================================================================
   うえだ住まいポータル｜共通スタイル
   ----------------------------------------------------------------------------
   ■ 構成
     1. デザイントークン（CSSカスタムプロパティ）
     2. ベーススタイル
     3. コンポーネント（ボタン / 見出しラベル / CTAピル）
     4. 背景テクスチャ
     5. アニメーション（リビール / パララックス / お気に入り / ラインアート）
     6. モーション軽減（prefers-reduced-motion）

   ■ 注意
     - カラー・フォントのトークンは index.html の tailwind.config と対になっています。
       値を変更する場合は両方を必ず合わせてください。
     - Tailwindのユーティリティクラス（px-4 / text-sm 等）は本ファイルより後に
       生成・適用されるため、HTML側のユーティリティが常に優先されます。
     - WordPress化の際は本ファイルをテーマの style.css として
       wp_enqueue_style() で読み込む想定です。
   ========================================================================== */

/* ============================================================
   1. デザイントークン
   ============================================================ */
:root {
  --color-ai: #4A6B82;
  --color-ai-dark: #3A5568;
  --color-sage: #7FA892;
  --color-sage-dark: #6B937D;
  --color-terra: #D8A06A;
  --color-terra-dark: #C68A50;
  --color-base: #F8F9FA;
  --color-ink: #1E293B;
  --color-line: rgba(30, 41, 59, 0.16);

  --font-sans: "Noto Sans JP", system-ui, sans-serif;
  --font-serif: "Noto Serif JP", serif;

  --shadow-soft: 0 2px 8px -2px rgba(15, 23, 42, 0.16);
  --shadow-soft-lg: 0 8px 24px -8px rgba(15, 23, 42, 0.30);
}

/* ============================================================
   2. ベーススタイル
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   3. コンポーネント
   ============================================================ */

/* セクションの英字ラベル（Pick up properties 等） */
.editorial-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-sage);
}

/* セクション見出し（明朝） */
.editorial-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-ai);
}

@media (min-width: 640px) {
  .editorial-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

/* 主要ボタン（緑） */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--color-sage);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.btn-primary:hover {
  background-color: var(--color-terra);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-terra);
  outline-offset: 2px;
}

/* 副次ボタン（テラコッタ） */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--color-terra);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.btn-secondary:hover {
  background-color: var(--color-terra-dark);
}

/* カード内の送客CTAピル（共通） */
.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.375rem;
  background-color: var(--color-terra);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.35);
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* ============================================================
   4. 背景テクスチャ / 5. アニメーション
   ============================================================ */

/* 1) 背景の柄：上質な紙・ファブリック風の繊細なドット方眼（CSSのみ） */
.bg-paper {
  background-color: #F8F9FA;
}

/* 白セクション用：さらに淡い方眼ストライプ */
.bg-paper-soft {
  background-color: #ffffff;
}

/* 2) スクロールリビール（傾きなしの落ち着いた動き） */
[data-reveal] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.22, .7, .25, 1), transform .8s cubic-bezier(.22, .7, .25, 1);
  will-change: opacity, transform;
}

[data-reveal="up"] {
  transform: translateY(34px);
}

[data-reveal="left"] {
  transform: translateX(-36px);
}

[data-reveal="right"] {
  transform: translateX(36px);
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* 4) お気に入りボタン：波紋＋パルス */
.fav-btn {
  position: relative;
}

.fav-btn .ripple {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(216, 160, 106, .45);
  transform: scale(.3);
  opacity: 0;
  pointer-events: none;
}

.fav-btn.is-fav .ripple {
  animation: fav-ripple .65s ease-out;
}

.fav-btn .heart {
  transition: transform .25s ease, color .25s ease;
}

.fav-btn.is-fav .heart {
  animation: fav-pop .5s ease;
  color: #D8A06A;
  fill: #D8A06A;
}

@keyframes fav-pop {
  0% {
    transform: scale(1)
  }

  35% {
    transform: scale(1.4)
  }

  60% {
    transform: scale(.9)
  }

  100% {
    transform: scale(1)
  }
}

@keyframes fav-ripple {
  0% {
    transform: scale(.4);
    opacity: .55
  }

  100% {
    transform: scale(2.8);
    opacity: 0
  }
}

/* 5) SVGラインアート：線が描かれるアニメ＋風のゆらぎ */
.sl-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sl-draw 2.8s ease forwards;
}

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

.sl-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: sl-rotate 60s linear infinite;
}

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

.sl-wind {
  animation: sl-wind 7s ease-in-out infinite;
}

.sl-wind.d2 {
  animation-duration: 9s;
  animation-delay: .6s;
}

.sl-wind.d3 {
  animation-duration: 8s;
  animation-delay: 1.2s;
}

@keyframes sl-wind {

  0%,
  100% {
    transform: translateX(0);
    opacity: .5
  }

  50% {
    transform: translateX(14px);
    opacity: 1
  }
}

/* 6) ヒーロー下端のゆるやかなカーブ（案1のデザイン仕様を継承） */
.hero-curve {
  clip-path: ellipse(150% 100% at 50% 0%);
}

@media (min-width: 1024px) {
  .hero-curve {
    clip-path: ellipse(125% 100% at 50% 0%);
  }
}

/* 7) コピーの可読性を確保する白ベール
      モバイル：全面をやわらかく覆う／PC：左から右へ抜けるグラデーション */
.hero-veil {
  background: linear-gradient(180deg,
      rgba(15, 23, 42, .62) 0%,
      rgba(15, 23, 42, .54) 45%,
      rgba(15, 23, 42, .46) 100%);
}

@media (min-width: 1024px) {
  .hero-veil {
    background: linear-gradient(100deg,
        rgba(15, 23, 42, .80) 0%,
        rgba(15, 23, 42, .66) 38%,
        rgba(15, 23, 42, .38) 62%,
        rgba(15, 23, 42, .12) 84%,
        rgba(15, 23, 42, 0) 100%);
  }
}

/* 8) ヒーロー背景の微パララックス（少し拡大して余白が出ないように） */
.parallax-hero {
  transform: scale(1.06);
  transition: transform .15s linear;
  will-change: transform;
}

/* 10) 実績エンブレム：ポップインしてから、ゆっくり上下に浮遊 */
.hero-badge {
  animation:
    badge-pop .85s cubic-bezier(.2, .85, .3, 1.35) .45s both,
    badge-float 5.5s ease-in-out 1.3s infinite;
}

@keyframes badge-pop {
  from {
    opacity: 0;
    transform: scale(.65) translateY(14px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes badge-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* 9) ファーストビューの読み込み時フェードイン（本文のリビールと同じイージング） */
[data-hero] {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-in .9s cubic-bezier(.22, .7, .25, 1) forwards;
}

[data-hero="1"] { animation-delay: .05s; }
[data-hero="2"] { animation-delay: .18s; }
[data-hero="3"] { animation-delay: .32s; }
[data-hero="4"] { animation-delay: .46s; }

@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .parallax-hero {
    transform: none !important;
  }

  [data-hero],
  .hero-badge {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

.vertical-jp {
  writing-mode: vertical-rl;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .sl-sun,
  .sl-wind {
    animation: none !important;
    transform: none !important;
  }

  .sl-draw {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
}

/* ============================================================
   7. フォーム（contact.html）
      和モダン・ミニマル：枠線は下線一本、フォーカスで
      アクセントカラー（sage）が静かに灯る。余白は広めに。
   ============================================================ */
.form-row + .form-row {
  margin-top: 2rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-ai);
}

/* 必須 / 任意 バッジ */
.form-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.form-badge-required {
  background-color: var(--color-terra);
  color: #ffffff;
}

.form-badge-optional {
  border: 1px solid rgba(30, 41, 59, 0.35);
  color: rgba(30, 41, 59, 0.85);
}

/* 入力欄：下線のみのミニマルUI */
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.7rem 0.25rem;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.30);
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-ai);
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(30, 41, 59, 0.45);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-bottom-color: rgba(30, 41, 59, 0.55);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--color-sage);
  box-shadow: 0 1px 0 0 var(--color-sage);
  background-color: rgba(127, 168, 146, 0.05);
}

/* 未入力のまま送信を試みたときだけ、テラコッタで知らせる */
.form-input:user-invalid,
.form-select:user-invalid,
.form-textarea:user-invalid {
  border-bottom-color: var(--color-terra);
  box-shadow: 0 1px 0 0 var(--color-terra);
}

/* サーバーサイド（PHP）のバリデーションエラー表示 */
.form-error {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  font-weight: 700;
  color: var(--color-terra-dark, #C68A50);
}

.form-input-error {
  border-bottom-color: var(--color-terra);
  box-shadow: 0 1px 0 0 var(--color-terra);
  background-color: rgba(216, 160, 106, 0.06);
}

.form-textarea {
  resize: vertical;
  min-height: 9rem;
}

/* セレクト：矢印は自前のSVGを重ねる */
.form-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  cursor: pointer;
}

/* 同意チェックボックス */
.form-check {
  accent-color: var(--color-sage);
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  cursor: pointer;
}

.form-check:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

/* ============================================================
   8. 物件カテゴリタブ（#properties）
      アクティブ表示はテラコッタのアンダーライン
   ============================================================ */
.property-tab {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.75rem 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(30, 41, 59, 0.65);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}

@media (min-width: 640px) {
  .property-tab {
    padding: 0.75rem 1.15rem;
  }
}

.property-tab:hover {
  color: var(--color-ai);
}

.property-tab:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: -2px;
}

.property-tab.is-active {
  color: var(--color-ai);
  border-bottom-color: var(--color-terra);
}

.property-tab-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(30, 41, 59, 0.45);
  transition: color .2s ease;
}

.property-tab.is-active .property-tab-count {
  color: var(--color-terra);
}

/* 絞り込みで非表示になったカード */
.property-card.is-filtered-out {
  display: none;
}

/* 表示されるときのフェードイン */
.property-card.is-entering {
  animation: card-in .38s cubic-bezier(.22, .7, .25, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .property-card.is-entering {
    animation: none !important;
  }
}

/* ------------------------------------------------------------------
   .prose … the_content() で出力される本文の基本タイポグラフィ
   ※ Tailwind のリセットで p / h2 / ul の余白が消えるため、ここで補う。
     （Tailwind Typography プラグインは Play CDN に含まれないため自前定義）
------------------------------------------------------------------- */
.prose > * + * {
  margin-top: 1.25em;
}

.prose p {
  line-height: 2;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-ai);
  margin-top: 2em;
}

.prose h2 {
  font-size: 1.25rem;
  padding-bottom: 0.4em;
  border-bottom: 1px solid rgba(30, 41, 59, 0.15);
}

.prose h3 {
  font-size: 1.0625rem;
}

.prose h4 {
  font-size: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose a {
  color: var(--color-sage);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose a:hover {
  color: var(--color-terra);
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  padding-left: 1em;
  border-left: 3px solid var(--color-sage);
  color: rgba(30, 41, 59, 0.8);
}

.prose img,
.prose figure img {
  border-radius: 0.5rem;
}

.prose figcaption {
  margin-top: 0.5em;
  font-size: 0.75rem;
  color: rgba(30, 41, 59, 0.7);
}

/* WordPress のギャラリーブロック（追加写真の並べ替え用） */
.prose .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .prose .wp-block-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
