/* ========================================
   Trust vintage - 共通スタイル
   ======================================== */

:root {
  /* ダークテーマ基調（#39393b 中心の階調） */
  --bg-base: #39393b;
  --bg-raised: #3e3e41;
  --bg-surface: #434346;
  --bg-elevated: #48484c;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --color-text: #e8e8e8;
  --color-text-light: #9a9a9a;
  /* 深みのあるグリーンへ（全体のアクセント色） */
  --color-accent: #0a9a4a;
  --color-accent-hover: #087f3e;
  --color-accent-soft: rgba(10, 154, 74, 0.22);
  --color-secondary: #5fbf86;
  /* 互換エイリアス */
  --color-primary: var(--bg-surface);
  --color-bg: var(--bg-base);
  --color-white: #ffffff;
  --font-main:
    "Shippori Mincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    "Yu Mincho",
    "YuMincho",
    "MS PMincho",
    serif;
  --max-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  overflow-x: clip;
}

/* ========================================
  固定背景（動画＋ディム＋スクロール連動ぼかし）
  ======================================== */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* contain 時のレターボックスをページ背景と馴染ませる */
  background: var(--bg-base);
}

.site-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* background-size: cover 相当（全面を動画で覆う） */
  object-fit: cover;
  object-position: center center;
}

/* 固定ヘッダー直下から動画を表示（ヘッダーと被せない） */
body.page-home .site-bg__video {
  top: var(--header-height);
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: calc(100% - var(--header-height));
}

/* スマホ縦：切り取り基準は object-position */
@media (max-width: 768px) {
  body.page-home .site-bg__video {
    object-position: 50% 46%;
  }
}

.site-bg__dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.42);
}

.site-bg__blur-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: transparent;
}

/* 動画終了時：ぼかしが段階的に晴れる（JS が一時的に付与） */
.site-bg__blur-layer.is-blur-transition {
  transition:
    backdrop-filter 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    -webkit-backdrop-filter 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.page-home main {
  position: relative;
  z-index: 1;
  background: transparent;
}

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

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

/* ========================================
   ヘッダー
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #39393b;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--color-text);
  text-decoration: none;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-list a {
  font-size: 0.9rem;
  color: rgba(232, 232, 232, 0.92);
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--color-accent);
}

.nav-toggle,
.nav-toggle-label {
  display: none;
}

@media (max-width: 900px) {
  .nav-list {
    gap: 16px;
    font-size: 0.85rem;
  }
}

/* ========================================
   レスポンシブ - タブレット (1024px以下)
   ======================================== */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0 20px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 36px;
  }

  .container {
    padding: 0 20px;
  }

  .page-header {
    padding: 100px max(20px, env(safe-area-inset-right, 0px)) 48px
      max(20px, env(safe-area-inset-left, 0px));
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .cta-section {
    padding: 80px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .card-grid {
    gap: 24px;
  }

  .card-body {
    padding: 20px;
  }

  .footer {
    padding: 40px 0 20px;
    margin-top: 0;
  }
}

/* ========================================
   レスポンシブ - タブレット縦・スマホ (768px以下)
   ======================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .header-inner {
    padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
    flex-wrap: wrap;
  }

  .logo img {
    height: 38px;
  }

  /* ハンバーガーメニュー */
  .nav-toggle {
    display: none;
  }

  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1001;
    box-sizing: border-box;
    padding: 8px;
  }

  .nav-toggle-label span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(57, 57, 59, 0.96);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    z-index: 999;
  }

  .nav-toggle:checked ~ .nav {
    max-height: 320px;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
  }

  .nav-list li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-list a {
    display: block;
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 28px;
  }

  .page-header {
    padding: 80px max(20px, env(safe-area-inset-right, 0px)) 40px
      max(20px, env(safe-area-inset-left, 0px));
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .container {
    padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    min-height: 44px;
    width: 100%;
    max-width: 100%;
  }

  .cta-section {
    padding: 80px 0;
    text-align: left;
  }

  .cta-section h2 {
    font-size: 1.35rem;
  }

  .cta-section p {
    margin-bottom: 20px;
    font-size: 0.9rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-body {
    padding: 20px;
  }

  .card:hover {
    transform: none;
  }

  .footer {
    padding: 32px 0 20px;
    margin-top: 0;
  }

  .footer-inner {
    padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  }

  .footer-company {
    font-size: 1rem;
  }

  .footer-address,
  .footer-antique-license,
  .footer-links a,
  .footer-social-link {
    font-size: 0.8rem;
  }

  .footer-social-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    box-sizing: border-box;
  }

  .footer-links {
    gap: 4px 20px;
  }

  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    box-sizing: border-box;
  }
}

/* ========================================
   レスポンシブ - スマホ (480px以下)
   ======================================== */
@media (max-width: 480px) {
  .header-inner {
    padding: 0 max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  }

  .logo img {
    height: 32px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.2rem;
    margin-bottom: 24px;
  }

  .page-header {
    padding: 70px max(18px, env(safe-area-inset-right, 0px)) 32px
      max(18px, env(safe-area-inset-left, 0px));
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .container {
    padding: 0 max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
    min-height: 44px;
    width: 100%;
    max-width: 100%;
  }

  .cta-section {
    padding: 80px max(18px, env(safe-area-inset-right, 0px)) 80px
      max(18px, env(safe-area-inset-left, 0px));
  }

  .footer-inner {
    padding: 0 max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  }

  .cta-section h2 {
    font-size: 1.2rem;
  }
}

/* ========================================
   メインコンテンツ
   ======================================== */

main {
  padding-top: var(--header-height);
}

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

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 12px;
}

/* ========================================
   ページヘッダー（サブページ用）
   ======================================== */

.page-header {
  padding: 120px max(24px, env(safe-area-inset-right, 0px)) 60px
    max(24px, env(safe-area-inset-left, 0px));
  text-align: center;
  background: linear-gradient(160deg, #424245 0%, #39393b 55%, #353738 100%);
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text);
}

.page-header p {
  margin-top: 12px;
  margin-left: auto;
  margin-right: auto;
  max-width: 36em;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ========================================
   ボタン
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  box-sizing: border-box;
}

.btn-primary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--border-strong);
}

.btn-primary:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.btn-line {
  background: var(--color-accent);
  color: var(--color-white);
  border: 1px solid transparent;
}

.btn-line:hover {
  background: var(--color-accent-hover);
  opacity: 0.98;
}

/* ========================================
   カード
   ======================================== */

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

.card {
  background: var(--bg-surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(6, 199, 85, 0.25);
}

.card-img {
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.card-text {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ========================================
   フッター
   ======================================== */

.footer {
  background: #343436;
  color: var(--color-white);
  padding: 48px 0 24px;
  margin-top: 0;
  border-top: 1px solid var(--border-subtle);
}

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

.footer-company {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-address {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.footer-corp {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.footer-antique-license {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-contact {
  margin: 0 0 24px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-contact-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 10px;
}

.footer-contact-heading:not(:first-child) {
  margin-top: 18px;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  margin-bottom: 14px;
}

.footer-contact-list li:last-child {
  margin-bottom: 0;
}

.footer-contact-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 4px;
  line-height: 1.5;
}

.footer-contact-value {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.95);
  word-break: break-all;
  line-height: 1.5;
}

.footer-contact-value:hover {
  color: var(--color-accent);
}

.footer-social {
  margin: 0 0 20px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-social-link:hover {
  color: var(--color-accent);
}

.footer-social-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  color: inherit;
}

.footer-social-icon--instagram {
  transition: filter 0.2s ease;
}

.footer-social-link:hover .footer-social-icon--instagram {
  filter: brightness(1.09) saturate(1.06);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   CTAセクション
   ======================================== */

.cta-section {
  background: linear-gradient(145deg, #3a3f3c 0%, #39393b 45%, #363638 100%);
  color: var(--color-white);
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.cta-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.cta-section p {
  margin-bottom: 24px;
  opacity: 0.9;
}

.cta-section.section--glass {
  background: rgba(57, 59, 58, 0.55);
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.cta-section .cta-section-line-wrap {
  margin-top: 10px;
  margin-bottom: 0;
}

.line-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid rgba(6, 199, 85, 0.45);
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.line-inline-link:hover {
  color: #4af098;
  border-bottom-color: rgba(74, 240, 152, 0.75);
}

/* ========================================
   ユーティリティ
   ======================================== */

.text-center { text-align: center; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* セクション帯（旧インライン background 代替） */
.section--surface {
  background: var(--bg-surface);
}

.section--raised {
  background: var(--bg-raised);
}

/* トップ等：不透明帯と半透明帯の切り替え用 */
.section--solid {
  background: var(--bg-base);
}

.section--glass {
  background: rgba(57, 57, 59, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 下層ページ：トップ同様の白帯（買取実績のカード一覧ブロックは section--solid のみで従来のダーク帯） */
body.page-sub section.section.section--glass,
body.page-company section.section.section--glass,
body.page-results section.section.section--glass {
  background: #f1f1ed;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}

body.page-sub section.section.section--glass .section-title,
body.page-company section.section.section--glass .section-title,
body.page-company section.section.section--glass .section-title-left {
  color: #111;
}

body.page-company section.section.section--glass .vision-body p,
body.page-company section.section.section--glass .vision-desc {
  color: #333;
}

body.page-sub section.section.section--glass .method-title,
body.page-sub section.section.section--glass .method-catch,
body.page-sub section.section.section--glass .method-desc,
body.page-sub section.section.section--glass .method-sub,
body.page-sub section.section.section--glass .method-list li {
  color: #2a2a2a;
}

body.page-company section.section.section--glass .history-event {
  color: #222;
}

body.page-company section.section.section--glass .history-timeline::before {
  background: rgba(0, 0, 0, 0.1);
}

body.page-company section.section.section--glass .history-timeline li::before {
  border-color: #f1f1ed;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ガラス帯内：法務ブロック */
body.page-company section.section.section--glass.legal-section .legal-block {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  border-left-color: var(--color-accent);
}

body.page-company section.section.section--glass.legal-section .legal-block p {
  color: #333;
}

body.page-company section.section.section--glass.legal-section .legal-permit {
  color: var(--color-accent);
}

body.page-company section.section.section--glass .legal-accordion {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

body.page-company section.section.section--glass .legal-accordion summary {
  background: #fff;
  color: #1a1a1a;
}

body.page-company section.section.section--glass .legal-accordion summary:hover {
  background: #f3f3f1;
}

body.page-company section.section.section--glass .legal-body {
  color: #333;
}

body.page-company section.section.section--glass .legal-body h4 {
  color: var(--color-accent);
}

/* ガラス帯内：ページ内ナビのピル */
body.page-sub .method-nav-section.section--glass .method-nav a,
body.page-company .company-nav-section.section--glass .company-nav a,
body.page-results .category-nav-section.section--glass .category-nav a {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #222;
}

body.page-sub .method-nav-section.section--glass .method-nav a:hover,
body.page-company .company-nav-section.section--glass .company-nav a:hover,
body.page-results .category-nav-section.section--glass .category-nav a:hover {
  background: var(--color-accent-soft);
  color: #1a1a1a;
  border-color: var(--color-accent);
}
