/*
Theme Name: Earth Life
Theme URI: https://earthlife.co.jp
Author: Earth Life Co., Ltd.
Description: 株式会社アースライフ コーポレートサイト用カスタムテーマ
Version: 1.1.0
Text Domain: earthlife
*/

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
  background: #faf9f7; color: #333; overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0;
  background: url('assets/img/wasigara.jpg') center / cover no-repeat fixed;
  opacity: 0.18; pointer-events: none;
}
a { color: #333; text-decoration: none; transition: color 0.6s ease; }
a:hover { color: #D4A853; }
img { max-width: 100%; display: block; }
::selection { background: #D4A853; color: #fff; }

/* ===== LOADING SCREEN ===== */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: #faf9f7;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1), visibility 1.2s;
}
#loader.done {
  opacity: 0; visibility: hidden; pointer-events: none;
}
#loader .logo-mark {
  opacity: 0;
  animation: loaderFadeIn 1.5s 0.3s cubic-bezier(0.4,0,0.2,1) forwards;
}
#loader .logo-line {
  width: 0; height: 1px; background: #D4A853; margin: 24px auto;
  animation: lineExpand 1.2s 1.0s cubic-bezier(0.4,0,0.2,1) forwards;
}
#loader .logo-sub {
  opacity: 0; letter-spacing: 0.35em; font-size: 11px; color: #999;
  animation: loaderFadeIn 1s 1.8s forwards;
}
@keyframes loaderFadeIn {
  to { opacity: 1; }
}
@keyframes lineExpand {
  to { width: 60px; }
}

/* ===== HEADER / MENU BAR ===== */
#menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  opacity: 0; transform: translateY(-10px);
  transition: opacity 1.5s ease, transform 1.5s ease, background 0.4s ease;
  padding: 0 40px; height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}
#menubar.visible {
  opacity: 1; transform: translateY(0);
}
#menubar.scrolled {
  background: rgba(250,249,247,0.92); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#menubar .logo-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  transition: opacity 0.4s;
}
#menubar .logo-link:hover { opacity: 0.6; }
#menubar .header-logo {
  width: 36px; height: 36px; object-fit: contain;
}
#menubar .logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px; font-weight: 500; letter-spacing: 0.15em;
}
#menubar nav { display: flex; gap: 32px; align-items: center; }
#menubar nav a {
  font-size: 11px; font-weight: 400; letter-spacing: 0.2em;
  text-transform: uppercase; color: #888;
  transition: color 0.6s ease;
  position: relative;
}
#menubar nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: #D4A853;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
#menubar nav a:hover { color: #D4A853; }
#menubar nav a:hover::after { width: 100%; }

/* Hamburger for mobile */
.hamburger {
  display: none; cursor: pointer; width: 28px; height: 20px;
  position: relative; z-index: 200;
}
.hamburger span {
  display: block; width: 100%; height: 1px; background: #333;
  position: absolute; left: 0;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; }
.hamburger span:nth-child(3) { top: 100%; }
.hamburger.open span:nth-child(1) { top: 50%; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 50%; transform: rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(250,249,247,0.97); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }
.mobile-overlay nav {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.mobile-overlay nav a {
  font-size: 14px; letter-spacing: 0.25em; color: #666;
  transition: color 0.4s; text-transform: uppercase;
}
.mobile-overlay nav a:hover { color: #D4A853; }

/* ===== HERO (FULL SCREEN) ===== */
#hero {
  position: relative; width: 100%; height: 100vh; overflow: hidden;
}
#hero .hero-bg {
  position: absolute; inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.1);
  transition: transform 8s cubic-bezier(0.4,0,0.2,1);
  filter: brightness(0.55);
}
#hero.active .hero-bg { transform: scale(1); }
#hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.45) 100%);
}
#hero .hero-content {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 24px;
}
.hero-catch {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 300; letter-spacing: 0.2em; line-height: 1.8;
  color: #fff;
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.5s 0.3s ease, transform 1.5s 0.3s cubic-bezier(0.4,0,0.2,1);
}
#hero.active .hero-catch { opacity: 1; transform: translateY(0); }
.hero-sub {
  font-size: 12px; letter-spacing: 0.4em; color: #ccc; margin-top: 24px;
  opacity: 0;
  transition: opacity 1.5s 1s ease;
}
#hero.active .hero-sub { opacity: 1; }
.hero-line-deco {
  width: 1px; height: 0; background: #D4A853; margin-top: 40px;
  transition: height 1.2s 1.4s cubic-bezier(0.4,0,0.2,1);
}
#hero.active .hero-line-deco { height: 60px; }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.3em; color: #aaa;
  opacity: 0;
  transition: opacity 1.5s 2s ease;
}
#hero.active .hero-scroll { opacity: 1; }
.hero-scroll::after {
  content: ''; display: block; width: 1px; height: 30px;
  background: #aaa; margin: 8px auto 0;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== SECTIONS COMMON ===== */
.section {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.section-inner {
  max-width: 1100px; width: 100%; padding: 120px 40px;
  position: relative; z-index: 2;
}
.section-label {
  font-size: 11px; letter-spacing: 0.35em; color: #D4A853;
  text-transform: uppercase; margin-bottom: 16px;
  font-weight: 400;
}
.section-title {
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300; letter-spacing: 0.08em; line-height: 1.4;
  margin-bottom: 40px;
}
.section-body {
  font-size: 14px; line-height: 2.2; color: #666;
  font-weight: 300; max-width: 600px;
}
.gold-line {
  width: 40px; height: 1px; background: #D4A853; margin-bottom: 32px;
}

/* Fade-in animations */
.fade-up {
  opacity: 0; transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1), transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left {
  opacity: 0; transform: translateX(-60px);
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1), transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right {
  opacity: 0; transform: translateX(60px);
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1), transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.fade-right.visible { opacity: 1; transform: translateX(0); }
.fade-in {
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4,0,0.2,1);
}
.fade-in.visible { opacity: 1; }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }
.delay-4 { transition-delay: 0.7s; }

/* ===== COMPANY SECTION ===== */
#company {
  background: rgba(255,255,255,0.85);
}
#company .bg-image {
  position: absolute; inset: 0;
  background: url('assets/img/wasigara.jpg') center center / cover no-repeat fixed;
  opacity: 0.18;
}
.company-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center;
}
.company-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px;
}
.stat-item {
  border-top: 1px solid #e0ddd8; padding-top: 20px;
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px; font-weight: 300; color: #D4A853;
  line-height: 1;
}
.stat-label {
  font-size: 11px; color: #888; letter-spacing: 0.1em; margin-top: 8px;
}

/* ===== MESSAGE SECTION ===== */
#message {
  background: rgba(245,243,240,0.88);
}
.message-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
.message-image {
  position: relative; overflow: hidden;
}
.message-image img {
  width: 100%; height: 500px; object-fit: cover;
  filter: brightness(0.9);
  transition: transform 1.5s cubic-bezier(0.4,0,0.2,1);
}
.message-image:hover img { transform: scale(1.04); }
.message-image::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(212,168,83,0.3);
  transform: translate(12px, 12px);
  pointer-events: none;
}
.message-quote {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px; font-weight: 300; line-height: 2;
  color: #444; margin-bottom: 32px;
  position: relative; padding-left: 20px;
  border-left: 1px solid #D4A853;
}

/* ===== ABOUT SECTION ===== */
#about {
  background: rgba(255,255,255,0.85);
}
.about-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
.about-image {
  position: relative; overflow: hidden;
}
.about-image img {
  width: 100%; height: 480px; object-fit: cover;
  filter: brightness(0.9);
  transition: transform 1.5s cubic-bezier(0.4,0,0.2,1);
}
.about-image:hover img { transform: scale(1.04); }
.about-values {
  display: flex; flex-direction: column; gap: 28px; margin-top: 48px;
}
.value-item {
  display: flex; gap: 20px; align-items: flex-start;
}
.value-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 300; color: #D4A853;
  line-height: 1; min-width: 36px;
}
.value-text h4 {
  font-size: 14px; font-weight: 500; letter-spacing: 0.1em; margin-bottom: 6px;
}
.value-text p {
  font-size: 12px; color: #888; line-height: 1.8;
}

/* ===== PRODUCTS/PROJECTS SECTION ===== */
#projects {
  background: rgba(245,243,240,0.88); padding: 120px 0;
}
.projects-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
}
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 60px;
}
.project-card {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 3/4;
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.7) grayscale(0.2);
  transition: all 1.2s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover img {
  filter: brightness(0.85) grayscale(0);
  transform: scale(1.08);
}
.project-card .card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px;
}
.project-card .card-label {
  font-size: 10px; letter-spacing: 0.25em; color: #D4A853;
  text-transform: uppercase; margin-bottom: 8px;
}
.project-card .card-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px; font-weight: 400; letter-spacing: 0.08em;
  line-height: 1.5; color: #fff;
}
.project-card .card-line {
  width: 0; height: 1px; background: #D4A853; margin-top: 16px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover .card-line { width: 40px; }
.project-card.large { grid-row: span 2; }

/* ===== RECRUIT SECTION ===== */
#recruit {
  background: rgba(255,255,255,0.85);
  position: relative;
}
#recruit .bg-image {
  position: absolute; inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.06; filter: blur(2px);
}
.recruit-layout {
  text-align: center;
}
.recruit-catch {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 300; letter-spacing: 0.15em; line-height: 1.8;
  margin-bottom: 32px;
}
.recruit-body {
  font-size: 14px; color: #777; line-height: 2.2; max-width: 550px;
  margin: 0 auto 48px;
}
.btn-outline {
  display: inline-block; padding: 14px 48px;
  border: 1px solid #D4A853; color: #D4A853;
  font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden; cursor: pointer;
}
.btn-outline::before {
  content: ''; position: absolute; inset: 0;
  background: #D4A853; transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}
.btn-outline:hover::before { transform: translateX(0); }
.btn-outline:hover { color: #fff; }
.btn-outline span { position: relative; z-index: 1; }

/* ===== CONTACT SECTION ===== */
#contact {
  background: rgba(245,243,240,0.88);
  min-height: auto;
  padding: 100px 0;
}
.contact-inner {
  max-width: 800px; margin: 0 auto; padding: 0 40px; text-align: center;
}
.contact-info {
  display: flex; justify-content: center; gap: 60px; margin-top: 48px;
  flex-wrap: wrap;
}
.contact-block {
  text-align: center;
}
.contact-block .label {
  font-size: 10px; letter-spacing: 0.25em; color: #999;
  text-transform: uppercase; margin-bottom: 12px;
}
.contact-block .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 300; letter-spacing: 0.05em;
}
.contact-block .value a { color: #333; }
.contact-block .value a:hover { color: #D4A853; }

/* ===== FIXED FOOTER ===== */
#footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  padding: 16px 40px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  opacity: 0; transition: opacity 1.5s 0.5s ease;
}
#footer.visible { opacity: 1; }
#footer .copyright {
  font-size: 9px; letter-spacing: 0.15em; color: #999;
}
#footer .social {
  display: flex; gap: 20px; pointer-events: auto;
}
#footer .social a {
  font-size: 9px; letter-spacing: 0.15em; color: #999;
  transition: color 0.6s;
}
#footer .social a:hover { color: #D4A853; }

/* ===== PAGE PROGRESS BAR ===== */
#progress {
  position: fixed; top: 0; left: 0; z-index: 110;
  width: 0; height: 1px; background: #D4A853;
  transition: width 0.1s linear;
}

/* ===== SIDE NAV DOTS ===== */
.side-nav {
  position: fixed; right: 30px; top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; transition: opacity 1s ease;
}
.side-nav.visible { opacity: 1; }
.side-nav a {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid #ccc; background: transparent;
  display: block; transition: all 0.4s ease;
  cursor: pointer;
}
.side-nav a.active {
  background: #D4A853; border-color: #D4A853;
  transform: scale(1.3);
}
.side-nav a:hover { border-color: #D4A853; }

/* ===== PARALLAX IMAGE STRIPS ===== */
.parallax-strip {
  height: 50vh; position: relative; overflow: hidden;
}
.parallax-strip img {
  position: absolute; top: -20%; left: 0; width: 100%; height: 140%;
  object-fit: cover; filter: brightness(0.5);
}
.parallax-strip .strip-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 300; letter-spacing: 0.2em; color: #fff !important;
  text-align: center;
}

/* ===== CURSOR (desktop only) ===== */
.custom-cursor {
  width: 12px; height: 12px; border: 1px solid #D4A853;
  border-radius: 50%; position: fixed; pointer-events: none;
  z-index: 9999; transition: transform 0.15s ease, opacity 0.3s;
  transform: translate(-50%, -50%);
  mix-blend-mode: normal;
}
.custom-cursor.hover { transform: translate(-50%, -50%) scale(3); opacity: 0.5; }

/* ===== WORDPRESS SPECIFIC ===== */
.wp-block-image img { max-width: 100%; height: auto; }
.entry-content { font-size: 14px; line-height: 2.2; color: #666; }
.entry-content h2 { font-family: 'Noto Serif JP', serif; font-size: 28px; font-weight: 300; margin: 48px 0 24px; }
.entry-content h3 { font-family: 'Noto Serif JP', serif; font-size: 22px; font-weight: 400; margin: 36px 0 16px; }
.entry-content p { margin-bottom: 1.5em; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #hero .hero-bg { transform: none; filter: brightness(0.4); }
  .fade-up, .fade-left, .fade-right, .fade-in { opacity: 1; transform: none; }
  .hero-catch, .hero-sub, .hero-line-deco, .hero-scroll { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .company-grid, .message-layout, .about-layout {
    grid-template-columns: 1fr; gap: 40px;
  }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card.large { grid-row: span 1; }
  .side-nav { display: none; }
}
@media (max-width: 768px) {
  #menubar { padding: 0 20px; height: 60px; }
  #menubar nav.desktop-nav { display: none; }
  .hamburger { display: block; }
  .section-inner { padding: 80px 20px; }
  .projects-inner { padding: 0 20px; }
  .projects-grid { grid-template-columns: 1fr; }
  .company-stats { grid-template-columns: 1fr 1fr; gap: 24px; }
  .message-image img { height: 300px; }
  .about-image img { height: 300px; }
  .contact-info { gap: 32px; }
  #footer { padding: 12px 20px; }
  .custom-cursor { display: none; }
  .parallax-strip { height: 35vh; }
  body::before {
    background-size: 600px auto;
    background-repeat: repeat;
    background-attachment: scroll;
  }
  #company .bg-image {
    background-size: 600px auto;
    background-repeat: repeat;
    background-attachment: scroll;
  }
}
@media (max-width: 480px) {
  .company-stats { grid-template-columns: 1fr; }
}
