/* Global Components - Enhanced Modern Design */

/* About Section */
.about-grid {
  display: grid;
  gap: var(--sp-24);
  margin-bottom: var(--sp-40);
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-grid .image {
  position: relative;
  background: #f5f5f5;
  overflow: hidden;
}

.about-grid .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-grid .copy {
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

.about-sub {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin-top: 8px;
}

.about-grid .copy p {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--color-text);
}

.about-grid .copy a {
  color: var(--color-beige);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-grid .copy a:hover {
  color: var(--color-beige-dark);
}

/* FAQ Section */
.faq-wrap {
  margin-top: 48px;
}

.faq-items {
  display: grid;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

details {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: all 0.3s ease;
}

details:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

details[open] {
  border-color: var(--color-beige);
  box-shadow: 0 4px 16px rgba(211,181,140,.15);
}

summary {
  padding: 16px 20px;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '›';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-lg);
  font-weight: 300;
  color: var(--color-beige);
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(90deg);
}

details p {
  padding: 0 20px 20px;
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0;
}

/* Recruit Banner */
.recruit-banner {
  margin: 0;
}

.recruit-link {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transition: all 0.3s ease;
  text-decoration: none;
}

.recruit-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.recruit-bg {
  aspect-ratio: 21/9;
  background-size: cover;
  background-position: center;
  filter: brightness(0.95);
  transition: filter 0.3s ease;
}

.recruit-link:hover .recruit-bg {
  filter: brightness(1);
}

.recruit-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 40px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  color: #fff;
}

.recruit-copy .eyebrow {
  font-size: var(--fs-xsmall);
  font-weight: var(--fw-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
}

.recruit-copy .title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}

.recruit-copy .sub {
  font-size: var(--fs-base);
  opacity: 0.95;
}

@media (max-width: 768px) {
  .recruit-copy {
    padding: 24px 28px;
  }
  
  .recruit-copy .title {
    font-size: var(--fs-xl);
  }
}

/* Social / Instagram Section */
#section-social {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  padding: 60px 20px;
}

.insta-marquee {
  overflow: hidden;
  margin: 24px 0;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.insta-track {
  display: flex;
  gap: 12px;
  animation: marquee 30s linear infinite;
  will-change: transform;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.insta-item {
  flex: 0 0 200px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: all 0.3s ease;
}

.insta-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive Instagram */
@media (max-width: 640px) {
  .insta-item {
    flex: 0 0 150px;
  }
}

/* Button Styles - Base styles in theme-base.css */

.btn-primary {
  background: linear-gradient(135deg, var(--color-beige) 0%, var(--color-primary) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(138, 106, 63, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 106, 63, 0.3);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* Site Container & Section - Base styles in theme-base.css */

/* ============================================================
 * Pagination (archive / search ページの番号付きナビゲーション)
 *   the_posts_pagination() の出力に対して適用。
 *   ブランド統一: ベージュ + ゴールド、丸枠、現在ページはゴールド塗り。
 * ============================================================ */
.archive-pagination,
nav.archive-pagination,
nav.navigation.archive-pagination {
  margin: 48px auto 24px;
  text-align: center;
}
.archive-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--brand-line, #e6d9b8);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-ink, #2f2a21);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers:focus-visible {
  background: var(--brand-cream, #faf6ee);
  border-color: var(--brand-gold, #c19a3d);
  color: var(--brand-gold-deep, #a07f2c);
}
.archive-pagination .page-numbers.current {
  background: var(--brand-gold, #c19a3d);
  border-color: var(--brand-gold, #c19a3d);
  color: #fff;
  font-weight: 600;
}
.archive-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
  color: var(--brand-ink-soft, #5a4f3e);
}
.archive-pagination .prev,
.archive-pagination .next {
  font-weight: 600;
  color: var(--brand-gold-deep, #a07f2c);
}
.archive-pagination h2.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
 * Site Preloader (初回サイト読み込み時のスプラッシュ画面)
 *   2024.ichiryu.jp/manage/ の lp_loading_screen 互換 — 「創業N年目」スプラッシュ
 *   - body 直後にフルスクリーン overlay
 *   - 中央に大きな年数 + 「おかげさまで 創業N年目」文言
 *   - 背景に商品写真（ヒーロー scaled 1.05 で微ズーム）+ 半透明白オーバーレイ
 *   - 数字は 0 から N までカウントアップ (scroll-reveal.js が制御)
 *   - window.load 完了 + 最低 1500ms 表示 → 0.7s で fade-out
 *   - prefers-reduced-motion 環境では即時非表示
 * ============================================================ */
.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.7s ease-out, visibility 0s linear 0.7s;
}
.site-preloader__bg {
  position: absolute;
  inset: 0;
  background-image: url('../../../../uploads/2019/06/splash1.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: ichiryuPreloaderBg 6s ease-in-out infinite alternate;
}
.site-preloader__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(245, 237, 216, 0.78) 0%,
    rgba(245, 237, 216, 0.85) 50%,
    rgba(245, 237, 216, 0.92) 100%
  );
}
.site-preloader__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;             /* 旧 20px → 40px。要素被り解消 */
  text-align: center;
  padding: 32px 24px;
  z-index: 1;
}
.site-preloader__years {
  display: block;
  font-family: var(--ff-serif, "Noto Serif JP", "Georgia", serif);
  font-size: clamp(80px, 18vw, 156px);  /* 少し縮小して余白確保 */
  font-weight: 500;
  color: var(--brand-ink, #2f2a21);
  line-height: 1.05;                     /* 1 → 1.05 で descender 余裕 */
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.6);
  margin: 0;
  padding: 0 0 8px;
}
.site-preloader__caption {
  margin: 0;
  font-family: var(--ff-serif, "Noto Serif JP", "Georgia", serif);
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--brand-ink, #2f2a21);
  line-height: 2;                        /* 1.7 → 2 で行間ゆとり */
}
.site-preloader__bar {
  position: relative;
  width: 120px;
  height: 2px;
  background: rgba(160, 127, 44, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 20px;                      /* 12 → 20 で更に余白 */
}
.site-preloader__bar > span {
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--brand-gold, #c19a3d);
  border-radius: 999px;
  animation: ichiryuPreloaderBar 1.4s ease-in-out infinite;
}
@keyframes ichiryuPreloaderBg {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}
@keyframes ichiryuPreloaderBar {
  0%   { left: -40%; }
  100% { left: 100%; }
}
/* body.is-loaded で fade-out + 完全非表示 */
body.is-loaded .site-preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* JS 無効環境では即非表示 */
.no-js .site-preloader {
  display: none !important;
}
/* 動きを抑える環境: 即非表示 */
@media (prefers-reduced-motion: reduce) {
  .site-preloader {
    transition: none;
  }
  .site-preloader__bg,
  .site-preloader__bar > span {
    animation: none;
  }
}

/* ============================================================
 * Scroll-Reveal Animation (2024.ichiryu.jp/manage/ と同等仕様)
 *   - 初期状態 opacity:0 + 軽い translateY
 *   - IntersectionObserver (assets/js/scroll-reveal.js) で
 *     画面内に入った要素に .visible を付与 → opacity:1 / 元位置へ
 *   - .slide-in-left バリアントは横スライド付き
 *   - prefers-reduced-motion 環境では即時表示
 * ============================================================ */
.fade-in,
.slide-in-left,
.scroll-reveal {
  opacity: 0;
  /* /manage/ の GSAP power2.out (cubic-bezier(0.4, 0, 0.2, 1)) と duration 0.5s に合わせる */
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.fade-in,
.scroll-reveal {
  /* fade-in は opacity のみ (translateY なし) — /manage/ の GSAP fromTo は { opacity: 0 } のみ指定 */
  transform: none;
}
.slide-in-left {
  transform: translateX(-20px);
}
.fade-in.visible,
.slide-in-left.visible,
.scroll-reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}
/* JS 無効環境では一切非表示にしない */
.no-js .fade-in,
.no-js .slide-in-left,
.no-js .scroll-reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .slide-in-left,
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   会社情報ページ（pages/page-company.php）
   ============================================================ */
.company-page .company-lead {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 720px;
  font-size: var(--fs-base);
  line-height: 1.85;
  color: var(--color-text);
}
.company-page .company-cards {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .company-page .company-cards {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
  }
}
.company-card {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--color-border, #e8e0d4);
  border-left: 3px solid var(--color-accent, #b89968);
  border-radius: 8px;
  color: var(--color-primary, #2c2c2c);
  text-decoration: none !important;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.company-card:hover {
  box-shadow: 0 6px 18px rgba(184, 153, 104, .18);
  transform: translateY(-2px);
  border-color: var(--color-accent, #b89968);
}
.company-card__body { min-width: 0; }
.company-card__label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--ff-serif, serif);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent, #b89968);
}
.company-card__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary, #2c2c2c);
  line-height: 1.4;
}
.company-card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-muted, #7a7a7a);
  line-height: 1.5;
}
.company-card__chev {
  color: var(--color-accent, #b89968);
  font-size: 22px;
  font-weight: 700;
}
