/* ==========================================================================
   RAKUAN Style Sheet (Autour One + Zen Maru Gothic Combined Version)
   ========================================================================== */

/* Google Fonts 読み込み */
@import url('https://fonts.googleapis.com/css2?family=Autour+One&family=Yomogi&family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root {
  --bg-color: #FAFAFA;
  --bg-card: #FFFFFF;
  --text-main: #304e17; /* ダークモスグリーン */
  --text-sub: #546b41;  /* 柔らかいモスグリーン */
  --border-color: #E8E6E3;
  --font-main: 'Autour One', 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  --font-hand: 'Yomogi', cursive;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 2.1;
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
}

/* 全テキスト要素へフォント適用 */
body, h1, h2, h3, h4, h5, h6, p, a, span, li, div {
  font-family: var(--font-main);
  color: var(--text-main);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-subtitle {
  display: block;
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--text-sub) !important;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 48px;
}

/* ==========================================
   Header
   ========================================== */
#header, .header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo, .logo a {
  display: flex;
  flex-direction: column;
}

.logo-main, .logo-en {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  line-height: 1.1;
  font-weight: 700;
}

.logo-sub, .logo-ja {
  font-size: 1.4rem;
  color: var(--text-sub);
  font-family: var(--font-hand) !important;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
}

.nav-main, .nav-en {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  display: block;
}

.nav-sub, .nav-ja {
  font-size: 1.0rem;
  color: var(--text-sub) !important;
  font-family: var(--font-hand) !important;
  margin-top: 3px;
  letter-spacing: 0.04em;
  font-weight: 700 !important;
  display: block;
}

.nav a:hover {
  opacity: 0.6;
}

/* Hero Slider & House Frame */
.hero-slider-section {
  width: 100%;
  padding: 100px 0 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.house-frame {
  position: relative;
  width: 90%;
  max-width: 650px;
  height: 420px;
  margin: 0 auto;
  overflow: hidden;
  -webkit-clip-path: polygon(50% 0%, 100% 22%, 100% 100%, 0% 100%, 0% 22%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 100%, 0% 100%, 0% 22%);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  isolation: isolate;
}

.hero-swiper {
  width: 100% !important;
  height: 100% !important;
  position: relative;
}

/* Let Swiper handle stack layout for fade mode natively */
.hero-swiper .swiper-wrapper {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.house-frame-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.hero-swiper .swiper-pagination {
  bottom: 15px !important;
  z-index: 11;
}

@media screen and (max-width: 768px) {
  .hero-slider-section {
    padding: 80px 0 20px 0;
  }
  .house-frame {
    width: 92%;
    height: 260px;
  }
}
/* ==========================================
   Service Section
   ========================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background-color: var(--bg-card);
  padding: 28px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.service-img {
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 2px;
  height: 200px;
  background-color: #EAEAEA;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-num {
  font-size: 1.1rem;
  color: var(--text-sub) !important;
  display: block;
  margin-bottom: 4px;
}

.service-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 1.0rem;
  color: var(--text-sub) !important;
  line-height: 1.9;
}

/* ==========================================
   Works Section
   ========================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.works-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #EAEAEA;
  height: 300px;
}

.works-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   Rakuan Days Section
   ========================================== */
.days-section {
  background-color: #F4F3EF;
}

.section-desc {
  color: var(--text-sub) !important;
  margin-top: -32px;
  margin-bottom: 48px;
  font-size: 1.0rem;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.comic-card {
  background: var(--bg-card);
  padding: 32px 24px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.comic-badge {
  font-family: var(--font-hand) !important;
  font-size: 1.0rem;
  color: var(--text-sub) !important;
  margin-bottom: 8px;
}

.comic-thumb {
  height: 180px;
  background-color: #FAFAFA;
  border: 1px dashed #D0D0D0;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comic-panel-preview {
  font-family: var(--font-hand) !important;
  font-size: 1.3rem;
  color: #999999 !important;
  display: flex;
  gap: 12px;
}

.comic-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.comic-excerpt {
  font-size: 1.0rem;
  color: var(--text-sub) !important;
  margin-bottom: 24px;
  flex-grow: 1;
  line-height: 1.9;
}

.read-more {
  font-size: 1.0rem;
  font-weight: 700;
}

/* ==========================================
   Recruit Section
   ========================================== */
.recruit-section {
  background-color: #1F2326;
  padding: 100px 0;
}

.recruit-section .section-title,
.recruit-section .section-subtitle,
.recruit-title-light,
.recruit-copy,
.recruit-desc {
  color: #FFFFFF !important;
}

.recruit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.recruit-poster-wrap {
  background: #FFFFFF;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.recruit-poster-wrap img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.recruit-info-box {
  text-align: center;
}

.recruit-copy {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.recruit-desc {
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.9;
  opacity: 0.9;
}

.recruit-badges {
  display: flex !important;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 16px 0 !important;
}

.badge {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  font-size: 0.85rem !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  display: inline-block !important;
}

.btn-recruit {
  display: inline-block;
  padding: 16px 36px;
  background-color: #FFFFFF;
  color: #111111 !important;
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 2px;
  transition: opacity 0.3s ease;
}

.btn-recruit:hover {
  opacity: 0.8;
}

.recruit-btn-shiny {
  display: inline-block !important;
  background: linear-gradient(135deg, #5c8f30 0%, #304e17 100%) !important;
  color: #FFFFFF !important;
  font-size: 1.1rem !important;
  font-weight: bold !important;
  padding: 18px 36px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.3s ease !important;
  margin-top: 8px;
}

.recruit-btn-shiny:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(92, 143, 48, 0.5) !important;
  opacity: 1 !important;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
  width: 100% !important;
  clear: both !important;
  display: block !important;
  text-align: center;
  padding: 80px 0;
}

.contact-lead, .contact-intro p {
  color: var(--text-sub) !important;
  margin-bottom: 40px;
  font-size: 1.05rem;
  line-height: 2.2;
  letter-spacing: 0.08em;
}

.contact-box {
  background: #FFFFFF !important;
  padding: 56px 40px !important;
  border-radius: 16px !important;
  max-width: 850px !important;
  margin: 0 auto !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  text-align: center !important;
}

.contact-info-img {
  max-width: 720px !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 auto 32px auto !important;
  border-radius: 4px;
  display: block;
}

.email-link {
  font-size: 1.8rem;
  display: inline-block;
  margin-bottom: 16px;
}

.company-address {
  font-size: 1.3rem;
  color: var(--text-sub) !important;
}

.contact-form-btn, .contact-box a.contact-form-btn {
  display: inline-block !important;
  background: linear-gradient(135deg, #5c8f30 0%, #304e17 100%) !important;
  color: #FFFFFF !important;
  font-size: 1.3rem !important;
  font-weight: bold !important;
  padding: 20px 56px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.3s ease !important;
  margin: 16px auto 0 auto !important;
  cursor: pointer !important;
}

.contact-form-btn:hover, .contact-box a.contact-form-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 10px 25px rgba(48, 78, 23, 0.4) !important;
  opacity: 1 !important;
}

/* ==========================================
   Footer Section
   ========================================== */
#footer, .footer {
  width: 100% !important;
  clear: both !important;
  display: block !important;
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background-color: #FFFFFF;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.copyright {
  font-size: 1.2rem;
  color: var(--text-sub) !important;
}

/* ==========================================
   Responsive Styles (スマホ・タブレット表示)
   ========================================== */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero-copy { font-size: 1.6rem; }
  
  .about-grid,
  .about-inner,
  .about-container,
  .service-grid,
  .works-grid,
  .comic-grid,
  .recruit-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  .nav { display: none; }
  .email-link { font-size: 1.35rem; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

  /* Aboutスマホ画像 */
  #about, .about-section { padding: 30px 16px; }
  .about-image, .about-img-wrap, .about-image-wrap, #about img, .about-section img {
    width: 100% !important;
    max-height: 260px !important;
  }

  /* スライドショースマホ表示 */
  .hero-slider-section { padding: 15px 0 30px 0; }
  .house-frame {
    width: 92%;
    height: 270px;
    -webkit-clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
    clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
  }

  .house-frame-outer {
    width: 95%;
    height: 320px;
    padding: 6px;
    -webkit-clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
    clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
  }

  .house-frame-inner {
    -webkit-clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
    clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
  }

  .house-frame-wrapper {
    width: 92%;
    height: 300px;
  }

  .house-frame-content {
    -webkit-clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
    clip-path: polygon(50% 0%, 100% 18%, 100% 100%, 0% 100%, 0% 18%);
  }

  .contact-box {
    padding: 32px 16px !important;
  }

  .contact-form-btn, .contact-box a.contact-form-btn {
    font-size: 1.1rem !important;
    padding: 16px 28px !important;
    width: 100% !important;
  }
}
/* ========================================
   MOBILE DISPLAY FIX
======================================== */

@media screen and (max-width: 768px) {

    body {
        color: #234414;
        background: #ffffff;
    }

    main,
    section,
    p,
    h1,
    h2,
    h3,
    h4,
    li,
    a,
    span {
        color: #234414;
    }

    /* JavaScript animation によって
       消えてしまう場合の対策 */

    .fade-in,
    .fade-up,
    .reveal,
    .scroll-animation,
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }

}
/* =========================================================
   RAKUAN - MOBILE FINAL FIX
   スマホで一瞬表示されて消える問題を完全に防止
========================================================= */

@media screen and (max-width: 768px) {

  html,
  body {
    width: 100%;
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: #FAFAFA !important;
    color: #304e17 !important;
  }

  /* ページ全体を常に表示 */
  body,
  main,
  header,
  footer,
  section,
  div,
  article,
  p,
  h1,
  h2,
  h3,
  h4,
  span,
  a,
  li {
    visibility: visible !important;
  }

  /* JSアニメーションによる消失を完全無効化 */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  /* opacity で消されるのを防ぐ */
  .fade-in,
  .fade-up,
  .fade-down,
  .fade-left,
  .fade-right,
  .reveal,
  .scroll-animation,
  .animate,
  [data-aos],
  [data-scroll],
  [data-animation] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  /* =====================================================
     HEADER
  ===================================================== */

  .header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #FAFAFA !important;
    box-shadow: none !important;
    padding: 20px 16px !important;
  }

  .header-inner {
    width: 100% !important;
    padding: 0 !important;
    display: block !important;
  }

  .logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .logo a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .logo-en {
    display: block !important;
    color: #304e17 !important;
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .logo-ja {
    display: block !important;
    color: #546b41 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  /* スマホではPCナビを非表示 */
  .nav {
    display: none !important;
  }

  /* =====================================================
     HERO
  ===================================================== */

  .hero-slider-section {
    display: block !important;
    width: 100% !important;
    min-height: 300px !important;
    height: auto !important;
    padding: 20px 0 40px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .house-frame-wrapper {
    display: block !important;
    width: calc(100% - 32px) !important;
    max-width: none !important;
    height: 300px !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .house-frame-content {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .main-swiper {
    width: 100% !important;
    height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .swiper-wrapper,
  .swiper-slide {
    width: 100% !important;
    height: 100% !important;
  }

  .swiper-slide {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .house-frame-content img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* =====================================================
     SECTIONS
  ===================================================== */

  .section,
  #about,
  #service,
  #works,
  #days,
  #recruit,
  #contact {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .section-subtitle,
  .section-title,
  .section-desc,
  .lead-text,
  .description,
  .service-name,
  .service-desc,
  .comic-title,
  .comic-excerpt,
  .contact-intro,
  .contact-intro p {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    color: #304e17 !important;
  }

  /* =====================================================
     ABOUT
  ===================================================== */

  .about-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 30px !important;
  }

  .about-text,
  .about-image-wrap {
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .about-image-wrap img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  /* =====================================================
     SERVICE / WORKS / DAYS
  ===================================================== */

  .service-grid,
  .works-grid,
  .comic-grid,
  .recruit-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 24px !important;
  }

  .service-card,
  .works-item,
  .comic-card,
  .recruit-info-box,
  .recruit-poster-wrap {
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* =====================================================
     CONTACT
  ===================================================== */

  .contact-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .contact-box {
    width: 100% !important;
    padding: 30px 16px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* =====================================================
     FOOTER
  ===================================================== */

  .footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

} /* ← 閉じ忘れていたモバイル用@media (max-width: 768px) を閉じる */

/* ==========================================
   Hero Slider & House Frame (Cleaned Version)
   ========================================== */
.hero-slider-section {
  width: 100%;
  padding: 100px 0 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Outer Container with GPU acceleration for Mobile WebKit */
.house-frame {
  position: relative;
  width: 90%;
  max-width: 650px;
  height: 420px;
  margin: 0 auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Swiper Container with House Clip-Path */
.hero-swiper {
  width: 100% !important;
  height: 100% !important;
  position: relative;
  overflow: hidden;
  -webkit-clip-path: polygon(50% 0%, 100% 22%, 100% 100%, 0% 100%, 0% 22%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 100%, 0% 100%, 0% 22%);
}

.hero-swiper .swiper-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
}

.hero-swiper .swiper-slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* SVG Outline Overlay */
.house-frame-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Swiper Pagination Dots */
.hero-swiper .swiper-pagination {
  bottom: 15px !important;
  z-index: 11;
}

/* Mobile responsive sizing */
@media screen and (max-width: 768px) {
  .hero-slider-section {
    padding: 80px 0 20px 0;
  }
  .house-frame {
    width: 92%;
    height: 260px;
  }
}
