@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;600;700&display=swap');

/* ============================================================
   SOLTERRA REALTY ｜ 全ページ共通のデザイン指定
   全5ページ（index / company / service / message / contact）が読み込みます。
   ここを直すと全ページに反映されます。

   【目次】
     1. 読み込むフォント
     2. 配色の設定（--navy などの色をここで一括管理）
     3. 全体の初期設定
     4. ヘッダー
     5. フッター
     6. 下層ページのヘッダー（sub-hero）
     7. 共通パーツ（ボタン・見出しラベル・Instagramアイコン）
     8. スクロールアニメーション
     9. ハンバーガーメニュー
    10. 画面幅ごとの調整（1100 / 1023 / 900 / 600px）

   【画面幅の考え方】
     1024px以上 … PC・iPad横向き（この指定が基本）
     1023px以下 … ハンバーガーメニューに切り替え
      900px以下 … 縦積みレイアウト・フッター2列
      600px以下 … スマホ（文字を縮小・カード2列）
     ※「900px以下」の指定は600pxの端末にも適用されます（狭いほうが後から上書き）
   ============================================================ */

:root {
  --navy: #38536a;
  --navy-mid: #162540;
  --navy-light: #1e3358;
  --gold: #c9a048;
  --gold-light: #e0c472;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --cream: #f3efe8;
  --gray-light: #e8e5e0;
  --gray: #999999;
  --gray-dark: #555555;
  --text: #2a2a2a;
  --text-light: #666666;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Serif JP', serif; color: var(--text); background: var(--white); overflow-x: hidden; }
/* 画像の寸法はCSS側で決める。
   HTMLのwidth/height属性は「縦横比をブラウザに先に教える」ためだけのもので、
   ここでautoに戻さないと aspect-ratio が無視されて画像が縦に伸びます。
   個別に高さを決めたい画像は .header-logo img のようにクラス側で上書きしてください。 */
img { max-width: 100%; width: auto; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--white); height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  border-bottom: 1px solid var(--gray-light);
}
.header-logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-logo img { height: 46px; width: auto; }
.header-logo-text { color: var(--navy); font-family: 'Cormorant Garamond', serif; font-size: 13px; letter-spacing: 3px; line-height: 1.5; }
.header-nav { display: flex; align-items: center; }
.header-nav a {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px; color: rgba(56,83,106,0.75); font-size: 12px; letter-spacing: 1px;
  transition: color 0.3s; border-right: 1px solid rgba(56,83,106,0.1); height: 76px; justify-content: center;
}
.header-nav a:first-child { border-left: 1px solid rgba(56,83,106,0.1); }
.header-nav a:hover { color: var(--gold); background: rgba(201,160,72,0.04); }
.nav-en { font-family: 'Cormorant Garamond', serif; font-size: 14px; letter-spacing: 2px; }
.nav-ja { font-size: 9px; color: rgba(56,83,106,0.4); margin-top: 3px; }
.header-nav a:hover .nav-ja { color: rgba(201,160,72,0.7); }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-header-contact {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(56,83,106,0.4); color: var(--navy);
  padding: 10px 22px; font-size: 11px; letter-spacing: 1px; transition: all 0.3s;
}
.btn-header-contact:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-header-times {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--gold); border: 1px solid var(--gold);
  padding: 10px 22px; font-size: 11px; font-weight: 700; letter-spacing: 1px; transition: all 0.3s;
}
.btn-header-times:hover { background: var(--gold); color: var(--navy); }

/* ===== FOOTER ===== */
#footer { background: #38536a; color: rgba(255,255,255,0.6); padding: 52px 80px 22px; }
.footer-top {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  gap: 60px; margin-bottom: 38px; padding-bottom: 38px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo-text { font-family: 'Cormorant Garamond', serif; font-size: 22px; letter-spacing: 4px; color: var(--gold); display: block; margin-bottom: 20px; }
.footer-brand p { font-size: 12px; line-height: 2.4; }
.footer-col h2 { font-family: 'Cormorant Garamond', serif; font-size: 11px; letter-spacing: 4px; color: var(--gold); margin-bottom: 20px; }
.footer-col p, .footer-col a { font-size: 12px; line-height: 2.4; color: rgba(255,255,255,0.55); display: block; }
.footer-col a:hover { color: var(--gold); }
.footer-nav-links { list-style: none; }
.footer-nav-links li a { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 2.8; display: block; transition: color 0.3s; }
.footer-nav-links li a::before { content: '— '; color: var(--gold); opacity: 0.5; }
.footer-nav-links li a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,0.3); }

/* ===== SUBPAGE HEADER ===== */
.sub-hero {
  background: var(--cream); padding: 93px 80px 47px;
  position: relative; overflow: hidden; text-align: left;
  border-bottom: 1px solid var(--gray-light);
}
.sub-hero::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,72,0.12) 0%, transparent 70%);
}
.sub-hero .eyebrow { font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 5px; color: var(--gold); margin-bottom: 12px; }
.sub-hero h1 { font-family: 'Noto Serif JP', serif; font-size: 42px; color: var(--navy); font-weight: 600; }
.sub-hero .sub-desc { font-size: 14px; color: var(--text-light); margin-top: 16px; line-height: 2; }
.breadcrumb { font-size: 11px; color: var(--gray); margin-top: 24px; display: flex; gap: 8px; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* 下層ページのヘッダー背景（写真の上に白を35%重ねて文字を読みやすくする）
   ページごとに <div class="sub-hero hero-○○"> と書いて画像を切り替えます。

   「center 22%」などの数値は、写真の"どの高さ"を表示するかの指定です。
   PC・iPad横向きでは写真が横長に切り抜かれ、縦は40〜60%しか写らないため、
   何を見せるかをページごとに決めています。
     会社概要 38% … かすみ草（花）を全部見せつつ、花瓶も半分ほど見せる
     事業内容 39% … 花束を全部見せる（花瓶は切れてよい）
     代表    75% … ノートとペンを全部見せる
     問合せ  90% … 手紙・封筒を全部見せる（グリーンと花瓶は切れてよい）
   ※ iPad縦向き・スマホでは縦方向の切り抜きが起きないため、この数値は影響しません */
.sub-hero[class*="hero-"] { border-bottom: none; }
.sub-hero[class*="hero-"] .eyebrow { color: var(--gold); }
.sub-hero[class*="hero-"] h1 { color: var(--navy); }
.sub-hero[class*="hero-"] .sub-desc { color: var(--text-light); }
.hero-company { background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('../assets/header-company.jpg') center 38%/cover no-repeat; }
.hero-service { background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('../assets/header-service.jpg') center 39%/cover no-repeat; }
.hero-message { background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('../assets/header-message.jpg') center 75%/cover no-repeat; }
.hero-contact { background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('../assets/header-contact.jpg') center 90%/cover no-repeat; }

/* 営業時間の2列表示（曜日 ／ 時間）。フッターと問い合わせページで共用 */
.hours-row { display: grid; grid-template-columns: 3.5em 1fr; }
.hours-list { display: grid; grid-template-columns: 3.5em 1fr; line-height: 2.2; }

/* ===== SHARED COMPONENTS ===== */
.section-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.section-label span { font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 4px; color: var(--gold); }

.btn-gold {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: var(--navy);
  padding: 16px 40px; font-size: 13px; font-weight: 700; letter-spacing: 2px; transition: background 0.3s;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline-navy {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--navy); color: var(--navy);
  padding: 15px 36px; font-size: 12px; letter-spacing: 2px; transition: all 0.3s;
  align-self: flex-start;
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

.link-more { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gold); letter-spacing: 1px; transition: opacity 0.3s; }
.link-more:hover { opacity: 0.75; }

/* ===== Instagramアイコン =====
   「SOLTERRA TIMES」と書かれたリンクの前に、線画のInstagramアイコンを表示する。
   画像ファイルではなく mask で描いているため、
   ・文字色に自動で追従する（ホバーで色が変わる箇所もそのまま馴染む）
   ・拡大しても輪郭がぼやけない
   ・読み込むファイルが増えない
   対象：ヘッダー／スマホメニュー／フッター／トップのTIMESボタン（計16箇所）
   ※「記事一覧へ →」と記事カードには付けていません */
.btn-header-times::before,
.mm-btn-times::before,
.btn-times-link::before,
.footer-nav-links li a[href*="instagram"]::before {
  content: '';
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -0.2em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='2.5' width='19' height='19' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.6'/%3E%3Cline x1='17.6' y1='6.4' x2='17.6' y2='6.4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='2.5' width='19' height='19' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.6'/%3E%3Cline x1='17.6' y1='6.4' x2='17.6' y2='6.4'/%3E%3C/svg%3E") center/contain no-repeat;
}
/* ヘッダーとTIMESボタンは横並び指定（gap）で間隔が付くため、余白の追加は不要。
   下の2箇所は通常の行なので、文字との間隔を足す */
.mm-btn-times::before,
.footer-nav-links li a[href*="instagram"]::before { margin-right: 6px; }
/* フッターは他の項目と同じ「— 」が付くため、Instagramだけアイコンに置き換える */
.footer-nav-links li a[href*="instagram"]::before { opacity: 1; }

/* ===== SCROLL ANIMATION ===== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.revealed { opacity: 1; transform: translateY(0); }

/* 安全装置が働いたとき（js/main.js が読み込めなかったとき）は、
   アニメーションを一切使わずそのまま表示する。
   transition を残すと表示が途中で止まることがあるため、ここで無効化しています。 */
.no-anim .reveal { opacity: 1; transform: none; transition: none; }

/* 端末側で「視差効果を減らす」「動きを減らす」をONにしている人への配慮。
   乗り物酔いしやすい方などが対象で、アニメーションを止めて即表示します。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== ハンバーガーメニュー（PCでは非表示） ===== */
.nav-toggle { display: none; }
.mobile-menu { display: none; }

/* ===== 画面幅で改行を出し分けるための指定 =====
   <br class="br-sp"> … スマホ（600px以下）でのみ改行する
   <br class="br-pc"> … PC・iPad横（901px以上）でのみ改行する
   対象外の画面幅では非表示になるため、そこでの見た目は変わりません */
.br-sp { display: none; }
.br-pc { display: inline; }

/* この中だけ途中で改行させない（免許番号など、分かれると読みにくい語に使う） */
.nowrap { white-space: nowrap; }

/* ===== RESPONSIVE ===== */
/* PC幅が狭いとき：ナビの左右余白を詰める */
@media (max-width: 1100px) {
  .header-nav a { padding: 0 14px; }
}

/* iPad縦・スマホ：横並びナビ → ハンバーガーメニューに切り替え */
@media (max-width: 1023px) {
  .header-nav { display: none; }
  .header-actions { margin-left: auto; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-left: 14px; padding: 0 9px;
    background: none; border: none; cursor: pointer; flex-shrink: 0;
  }
  .nav-toggle span {
    display: block; height: 1.5px; background: var(--navy);
    transition: transform 0.3s, opacity 0.3s;
  }
  /* 開いているときは「×」の形に変形させる */
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .mobile-menu {
    display: block; position: fixed; top: 76px; left: 0; right: 0; z-index: 998;
    background: var(--white); border-bottom: 1px solid var(--gray-light);
    box-shadow: 0 14px 34px rgba(0,0,0,0.10);
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  }
  .mobile-menu.open { max-height: 560px; overflow-y: auto; }
  .mobile-menu a {
    display: block; padding: 16px 24px; color: var(--navy);
    font-family: 'Cormorant Garamond', serif; font-size: 15px; letter-spacing: 2px;
    border-bottom: 1px solid var(--gray-light); transition: background 0.3s;
  }
  .mobile-menu a:active { background: rgba(201,160,72,0.06); }
  .mobile-menu .mm-ja {
    display: block; font-family: 'Noto Serif JP', serif; font-size: 10px;
    color: var(--gray); letter-spacing: 1px; margin-top: 4px;
  }
  /* メニュー下部の2つはPCと同じ「四角い枠のボタン」にする。
     上のリンク一覧用に付けている下線をいったん全部消してから、
     枠線を4辺に付け直す（打ち消されないよう .mm-actions を頭に付けて優先度を上げている） */
  .mm-actions { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; }
  .mm-actions a {
    border: none; text-align: center; padding: 14px;
    font-family: 'Noto Serif JP', serif; font-size: 12px; letter-spacing: 1px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
  }
  .mm-actions .mm-btn-contact { border: 1px solid rgba(56,83,106,0.4); color: var(--navy); }
  .mm-actions .mm-btn-times   { border: 1px solid var(--gold); color: var(--gold); font-weight: 700; }
  /* タップした瞬間の反応（スマホにはマウスオーバーがないため :active で表現） */
  .mm-actions .mm-btn-contact:active { background: var(--navy); border-color: var(--navy); color: var(--white); }
  .mm-actions .mm-btn-times:active   { background: var(--gold); border-color: var(--gold); color: var(--navy); }
}

/* iPad縦・大きめスマホ */
@media (max-width: 900px) {
  #footer { padding: 60px 24px 24px; }
  /* 縦に長くなりすぎるため、営業時間とナビゲーションを横並びにする */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .sub-hero { padding: 120px 32px 60px; }
  .sub-hero h1 { font-size: 30px; }
  /* 1カラム表示になり幅が広がるため、PC用の改行を消す */
  .br-pc { display: none; }
}

/* スマホ：幅が足りないため、ヘッダーのボタン2つはメニュー内に集約する */
@media (max-width: 600px) {
  #header { padding: 0 20px; }
  .header-actions { display: none; }
  .nav-toggle { margin-left: auto; }
  /* 見出しを画面幅に合わせて縮小 */
  .sub-hero h1 { font-size: 26px; }
  /* バナーの縦幅を詰める。
     上の余白96pxのうち76pxは固定ヘッダーに隠れる分なので、実際の空白は20px。
     背景写真は枠の高さに合わせて拡大されるため、枠を低くすると写真も小さく写り、
     花瓶などの被写体が文字に重なりにくくなる */
  .sub-hero { padding: 96px 20px 32px; }
  .sub-hero .eyebrow { margin-bottom: 8px; }
  .sub-hero .sub-desc { font-size: 13px; margin-top: 10px; }
  .sub-hero .breadcrumb { margin-top: 16px; }
  /* 横並びだと2つの文が収まらないため縦に積む */
  .footer-bottom { flex-direction: column; gap: 8px; }
  /* 幅が狭いため、フッター2列の間隔だけ詰める */
  .footer-top { gap: 32px 18px; }
  /* スマホ専用の改行を有効にする */
  .br-sp { display: inline; }
  /* 下層ページのヘッダー写真は被写体が右側にあるため、
     幅が狭いスマホでは切り抜きの基準を右端に寄せて、被写体が切れないようにする。
     ただし「被写体の右にどれだけ空白があるか」は写真ごとに違うので、
     右へずらす量をページ別に調整している（数値が大きいほど被写体が右に寄る）。 */
  .sub-hero[class*="hero-"] { background-position: right center; }
  .sub-hero.hero-company { background-position: right -110px top 50%; }
  .sub-hero.hero-message { background-position: right  -65px top 50%; }
  .sub-hero.hero-service { background-position: right  -45px top 50%; }
  .sub-hero.hero-contact { background-position: right  -40px top 50%; }
  /* ※ この数値は上の「バナーの高さ（padding: 96px/32px）」とセットで調整しています。
     枠の高さを変えると背景写真の拡大率も変わるため、高さを変更したときは
     この4つの数値も見直してください。 */
}

/* フッターの電話番号・メールのタップ領域を広げる（スマホで押しやすくするため）。
   リンク自身の行の高さを1にしてから上下に余白を足すことで、
   親の行の高さ(12px × 2.4 = 28.8px)の中に収め、住所の行間が崩れないようにしています。 */
.footer-brand p a { display: inline-block; line-height: 1; padding: 7px 0; }
.footer-brand p a:hover { color: var(--gold); }
