/* ============================================
   MORI NO KOUBOU - 森の工房
   Deep Forest Construction Company
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #2D5016;
  --green-dark: #1a3a0d;
  --green-light: #4a8c2a;
  --cream: #FFFDF5;
  --cream-dark: #F5F0E0;
  --wood: #8B6914;
  --wood-light: #D4A574;
  --wood-pale: #F0E6D4;
  --text: #2C2A25;
  --text-light: #6B6560;
  --border: rgba(45, 80, 22, 0.1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --font-heading: 'Zen Old Mincho', serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--wood);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--green-dark);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 48px;
}

/* --- Sample Banner --- */
.sample-banner {
  background: var(--green);
  color: var(--cream);
  text-align: center;
  font-size: 0.8rem;
  padding: 8px 16px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1000;
}

.sample-banner a {
  color: var(--wood-light);
  text-decoration: underline;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 253, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  transform: translateY(32px);
}

.header.scrolled {
  transform: translateY(0);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 110;
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-light);
  text-transform: uppercase;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-desktop a {
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--transition);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width var(--transition);
}

.nav-desktop a:hover::after {
  width: 100%;
}

.nav-desktop a:hover {
  color: var(--green);
}

.nav-cta {
  background: var(--green);
  color: var(--cream) !important;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background var(--transition) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--green-dark) !important;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--green-dark);
  transition: all 0.35s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: var(--cream);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: var(--cream);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--green-dark);
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-inner {
  text-align: center;
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.mobile-nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--cream);
  letter-spacing: 0.1em;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav-links a {
  display: block;
  color: var(--cream);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  padding: 14px 0;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
  letter-spacing: 0.05em;
}

.mobile-nav.active .mobile-nav-links a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.active .mobile-nav-links a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-links a:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active .mobile-nav-links a:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-links a:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.active .mobile-nav-links a:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-links a:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav.active .mobile-nav-links a:nth-child(7) { transition-delay: 0.4s; }

.mobile-nav-links a:hover {
  color: var(--wood-light);
}

.mobile-nav-info {
  margin-top: 40px;
  color: rgba(255, 253, 245, 0.5);
  font-size: 0.85rem;
  line-height: 2;
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 58, 13, 0.55) 0%,
    rgba(26, 58, 13, 0.70) 60%,
    rgba(26, 58, 13, 0.85) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
}

.hero-leaf {
  margin-bottom: 24px;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero-sub {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: rgba(255, 253, 245, 0.8);
  line-height: 2;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}

.hero-stat-unit {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255, 253, 245, 0.8);
  margin-left: 2px;
}

.hero-stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 253, 245, 0.5);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 253, 245, 0.2);
}

.hero-cta {
  display: inline-block;
  background: var(--wood);
  color: var(--cream);
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
  background: #9a7618;
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255, 253, 245, 0.4);
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 253, 245, 0.4), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* --- Story --- */
.story {
  background: var(--cream);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: center;
}

.story-portrait {
  display: flex;
  justify-content: center;
}

.story-portrait svg {
  max-width: 260px;
  height: auto;
}

.story-text {
  font-size: 0.95rem;
  line-height: 2.2;
  color: var(--text);
}

.story-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.8;
  margin-bottom: 24px;
}

.story-text p {
  margin-bottom: 16px;
}

.story-signature {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.story-sig-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.story-sig-title {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* --- Journey --- */
.journey {
  background: var(--cream-dark);
}

.journey-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 48px;
}

.journey-step {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.journey-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.journey-step-num {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--wood);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0.7;
}

.journey-step-icon {
  margin-bottom: 16px;
}

.journey-step-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.journey-step-text {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.9;
}

/* --- Passive Design --- */
.passive {
  background: var(--cream);
}

.passive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.passive-card {
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.passive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.passive-card-icon {
  margin-bottom: 20px;
}

.passive-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 12px;
}

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

/* --- Gallery --- */
.gallery {
  background: var(--cream-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-img {
  height: 240px;
  overflow: hidden;
}

.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-img img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 24px;
}

.gallery-info h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.gallery-info p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.gallery-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--green);
  background: rgba(45, 80, 22, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* --- Voices --- */
.voices {
  background: var(--cream);
}

.voices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}

.voice-card {
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border);
  position: relative;
}

.voice-quote {
  margin-bottom: 16px;
}

.voice-text {
  font-size: 0.92rem;
  line-height: 2;
  color: var(--text);
  margin-bottom: 20px;
}

.voice-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.voice-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
}

.voice-detail {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* --- Company --- */
.company {
  background: var(--cream-dark);
}

.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 48px;
}

.company-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
}

.company-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-table table {
  width: 100%;
  border-collapse: collapse;
}

.company-table tr {
  border-bottom: 1px solid var(--border);
}

.company-table th,
.company-table td {
  padding: 14px 0;
  font-size: 0.88rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

.company-table th {
  width: 110px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  padding-right: 16px;
}

.company-table td {
  color: var(--text);
}

/* --- Contact --- */
.contact {
  background: var(--cream);
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--border);
}

.contact-card-icon {
  margin-bottom: 16px;
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.contact-btn {
  display: inline-block;
  background: var(--green);
  color: var(--cream);
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background var(--transition), transform var(--transition);
}

.contact-btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.contact-btn-tel {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.contact-btn-tel:hover {
  background: var(--green);
  color: var(--cream);
}

/* --- Footer --- */
.footer {
  background: var(--green-dark);
  color: rgba(255, 253, 245, 0.7);
  padding: 60px 0 32px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 253, 245, 0.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--cream);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.footer-addr {
  font-size: 0.78rem;
  line-height: 1.8;
  opacity: 0.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.footer-nav a {
  font-size: 0.8rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.72rem;
  opacity: 0.5;
}

.footer-credit a {
  color: var(--wood-light);
  transition: color var(--transition);
}

.footer-credit a:hover {
  color: var(--cream);
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet (768px+) --- */
@media (min-width: 768px) {
  .section {
    padding: 120px 0;
  }

  .story-grid {
    grid-template-columns: 280px 1fr;
    gap: 60px;
  }

  .journey-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .passive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-img {
    height: 280px;
  }

  .voices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .company-img {
    height: 100%;
    min-height: 360px;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --- Responsive: Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .section {
    padding: 140px 0;
  }

  .nav-desktop {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .header-inner {
    height: 80px;
  }

  .story-grid {
    grid-template-columns: 320px 1fr;
    gap: 80px;
  }

  .story-portrait svg {
    max-width: 320px;
  }

  .journey-timeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .passive-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-img {
    height: 260px;
  }

  .voices-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-nav {
    gap: 14px 32px;
  }
}

/* --- Responsive: Large Desktop (1200px+) --- */
@media (min-width: 1200px) {
  .container {
    padding: 0 40px;
  }

  .journey-timeline {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }

  .journey-step {
    padding: 28px 20px;
  }
}

/* --- Small Mobile Adjustments --- */
@media (max-width: 374px) {
  .hero-stats {
    gap: 14px;
  }

  .hero-stat-num {
    font-size: 1.6rem;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* --- Print Styles --- */
@media print {
  .sample-banner,
  .header,
  .mobile-nav,
  .hero-scroll {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .section {
    padding: 40px 0;
  }
}

/* --- Leaf decorations between sections --- */
.journey::before,
.passive::before,
.gallery::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--green);
  margin: 0 auto 0;
  opacity: 0.2;
  position: relative;
  top: -50px;
}

/* Organic top shape for journey section */
.journey {
  position: relative;
}

.journey::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 0%);
}

/* --- Selection color --- */
::selection {
  background: rgba(45, 80, 22, 0.2);
  color: var(--green-dark);
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(45, 80, 22, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 80, 22, 0.35);
}
