/* =========================================
   株式会社大樹 - メインスタイルシート
   ========================================= */

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

:root {
  --navy:   #0d1f3c;
  --navy2:  #162a50;
  --gold:   #b8962e;
  --gold2:  #d4af5a;
  --white:  #ffffff;
  --light:  #f5f7fa;
  --gray:   #6b7280;
  --dark:   #1a1a2e;
  --shadow: 0 4px 24px rgba(13,31,60,.12);
  --radius: 8px;
  --transition: .3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.8;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Utility --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: .95rem;
  margin-bottom: 52px;
}
.section-title .line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 14px auto 0;
  border-radius: 2px;
}
.btn {
  display: inline-block;
  padding: 14px 40px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  letter-spacing: .06em;
}
.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold2); border-color: var(--gold2); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy2); transform: translateY(-2px); }

/* Fade-in on scroll */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   HEADER
   ========================================= */
#header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(13,31,60,.92);
  backdrop-filter: blur(8px);
  transition: background var(--transition), box-shadow var(--transition);
}
#header.scrolled { background: var(--navy); box-shadow: var(--shadow); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 32px;
}
.logo a {
  display: flex; flex-direction: column; line-height: 1.2;
}
.logo .logo-name { font-size: 1.25rem; font-weight: 700; color: var(--white); letter-spacing: .08em; }
.logo .logo-en   { font-size: .65rem; color: var(--gold2); letter-spacing: .14em; }

nav ul { display: flex; gap: 32px; }
nav ul li a {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  letter-spacing: .06em;
  transition: color var(--transition);
  position: relative; padding-bottom: 4px;
}
nav ul li a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold2);
  transition: width var(--transition);
}
nav ul li a:hover { color: var(--gold2); }
nav ul li a:hover::after { width: 100%; }

.header-cta { margin-left: 24px; }
.header-cta .btn { padding: 10px 24px; font-size: .85rem; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; top: 72px; left: 0; width: 100%;
  background: var(--navy); padding: 24px; z-index: 999;
  border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-nav.open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 0; }
.mobile-nav ul li a {
  display: block; padding: 14px 0; color: var(--white); border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .95rem; letter-spacing: .06em;
}
.mobile-nav .m-cta { margin-top: 20px; text-align: center; }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative; width: 100%; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.55);
  transform: scale(1.05);
  animation: heroZoom 12s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.00); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(13,31,60,.35) 0%, rgba(13,31,60,.55) 100%);
}
.hero-content {
  position: relative; z-index: 2; text-align: center; color: var(--white);
  padding: 0 24px;
  animation: heroFade 1.2s ease forwards;
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-tagline {
  font-size: clamp(.8rem, 1.5vw, .95rem);
  letter-spacing: .2em;
  color: var(--gold2);
  margin-bottom: 20px;
  font-weight: 400;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
}
.hero-title .gold { color: var(--gold2); }
.hero-sub {
  font-size: clamp(.9rem, 1.8vw, 1.1rem);
  opacity: .9;
  margin-bottom: 40px;
  line-height: 2;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.7); font-size: .72rem; letter-spacing: .12em;
}
.scroll-arrow { width: 1px; height: 48px; background: rgba(255,255,255,.4); animation: scrollPulse 1.6s ease infinite; }
@keyframes scrollPulse { 0%,100%{opacity:.4;height:32px} 50%{opacity:1;height:48px} }

/* =========================================
   PHILOSOPHY (TOP)
   ========================================= */
.philosophy {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.philosophy h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--gold2);
  letter-spacing: .1em;
  margin-bottom: 24px;
}
.philosophy p {
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  opacity: .9; line-height: 2.2;
  max-width: 700px; margin: 0 auto;
}

/* =========================================
   SERVICE CARDS
   ========================================= */
.services { background: var(--light); }
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(13,31,60,.18); }
.service-card-img {
  width: 100%; height: 220px; object-fit: cover;
}
.service-card-body { padding: 28px; }
.service-card-body h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 10px; }
.service-card-body p  { font-size: .9rem; color: var(--gray); line-height: 1.8; margin-bottom: 20px; }
.service-card-body .btn { font-size: .85rem; padding: 10px 28px; }

/* =========================================
   STATS
   ========================================= */
.stats { background: var(--navy); padding: 60px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; text-align: center;
}
.stat-item .num { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; color: var(--gold2); }
.stat-item .unit{ font-size: 1.1rem; color: var(--gold2); }
.stat-item .label{ font-size: .88rem; color: rgba(255,255,255,.75); margin-top: 6px; letter-spacing: .06em; }

/* =========================================
   WHY (TOP)
   ========================================= */
.why { background: var(--white); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.why-item {
  background: var(--light);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.why-item .why-num  { font-size: .8rem; color: var(--gold); letter-spacing: .14em; font-weight: 600; margin-bottom: 8px; }
.why-item h3        { font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; }
.why-item p         { font-size: .88rem; color: var(--gray); line-height: 1.8; }

/* =========================================
   FLOW
   ========================================= */
.flow { background: var(--light); }
.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0; position: relative;
}
.flow-step {
  text-align: center; padding: 32px 20px; position: relative;
}
.flow-step:not(:last-child)::after {
  content: '▶';
  position: absolute; top: 50%; right: -12px; transform: translateY(-50%);
  color: var(--gold); font-size: 1.2rem;
}
.step-num {
  width: 56px; height: 56px;
  background: var(--gold); color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700;
  margin: 0 auto 16px;
}
.flow-step h3 { font-size: .95rem; color: var(--navy); margin-bottom: 8px; }
.flow-step p  { font-size: .82rem; color: var(--gray); line-height: 1.7; }

/* =========================================
   PAGE HERO (sub pages)
   ========================================= */
.page-hero {
  position: relative; width: 100%; height: 480px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-top: 72px;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.52);
  animation: heroZoom 12s ease-out forwards;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(13,31,60,.4), rgba(13,31,60,.6));
}
.page-hero-content {
  position: relative; z-index: 2; text-align: center; color: var(--white);
  padding: 0 24px;
}
.page-hero-content .en  { font-size: .85rem; letter-spacing: .22em; color: var(--gold2); margin-bottom: 16px; }
.page-hero-content h1   { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 16px; }
.page-hero-content p    { font-size: 1rem; opacity: .88; max-width: 560px; margin: 0 auto; line-height: 2; }

/* Breadcrumb */
.breadcrumb { background: var(--light); padding: 14px 0; font-size: .82rem; color: var(--gray); }
.breadcrumb a { color: var(--navy); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 8px; }

/* =========================================
   CONTENT SECTIONS (sub pages)
   ========================================= */
.content-block { padding: 72px 0; }
.content-block:nth-child(even) { background: var(--light); }

.content-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.content-two-col.reverse { direction: rtl; }
.content-two-col.reverse > * { direction: ltr; }

.content-text h2 { font-size: 1.65rem; color: var(--navy); margin-bottom: 16px; }
.content-text h2 .bar {
  display: block; width: 40px; height: 3px; background: var(--gold); margin-top: 12px; border-radius: 2px;
}
.content-text p { color: var(--gray); line-height: 1.9; margin-bottom: 16px; font-size: .95rem; }

.content-img img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Feature cards */
.feature-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
  margin-top: 48px;
}
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 32px 24px;
  box-shadow: var(--shadow); border-top: 3px solid var(--gold);
  transition: transform var(--transition);
}
.feature-card:hover { transform: translateY(-4px); }
.feature-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 10px; }
.feature-card p  { font-size: .88rem; color: var(--gray); line-height: 1.8; }

/* List style */
.check-list { margin: 20px 0; }
.check-list li {
  padding: 10px 0 10px 28px; position: relative;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: .92rem; color: var(--dark);
}
.check-list li::before {
  content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid rgba(13,31,60,.12); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; cursor: pointer; background: var(--white);
  font-weight: 600; font-size: .95rem; color: var(--navy);
  transition: background var(--transition);
}
.faq-q:hover { background: var(--light); }
.faq-q .faq-icon { font-size: 1.2rem; color: var(--gold); transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 24px 20px; color: var(--gray); font-size: .9rem; line-height: 1.9; border-top: 1px solid rgba(13,31,60,.08); }
.faq-item.open .faq-a { display: block; }

/* CTA Banner */
.cta-banner {
  background: var(--navy);
  padding: 72px 0; text-align: center; color: var(--white);
}
.cta-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-banner p  { opacity: .85; margin-bottom: 36px; font-size: .95rem; }
.cta-banner .btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Tabs */
.tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--gold); margin-bottom: 40px; }
.tab-btn {
  padding: 14px 32px; cursor: pointer; border: none; background: none;
  font-size: .95rem; font-weight: 600; color: var(--gray); letter-spacing: .06em;
  transition: var(--transition); border-radius: var(--radius) var(--radius) 0 0;
  font-family: inherit;
}
.tab-btn.active { background: var(--gold); color: var(--white); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Process Steps */
.process-steps { counter-reset: step; }
.process-step {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 28px 0; border-bottom: 1px solid rgba(13,31,60,.1);
}
.process-step:last-child { border-bottom: none; }
.process-num {
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--gold); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700;
}
.process-body h3 { font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.process-body p  { font-size: .88rem; color: var(--gray); line-height: 1.8; }

/* Table */
.info-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.info-table th, .info-table td { padding: 16px 20px; border-bottom: 1px solid rgba(13,31,60,.1); text-align: left; }
.info-table th { background: var(--light); color: var(--navy); font-weight: 600; width: 30%; }
.info-table td { color: var(--dark); }

/* =========================================
   CONTACT FORM
   ========================================= */
.contact-form-wrap { max-width: 760px; margin: 0 auto; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: .88rem; color: var(--navy); margin-bottom: 8px; font-weight: 600; }
.form-group .req { color: var(--gold); margin-left: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 16px;
  border: 1px solid rgba(13,31,60,.2);
  border-radius: var(--radius); font-size: .95rem;
  font-family: inherit; background: var(--white);
  transition: border-color var(--transition);
  color: var(--dark);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,150,46,.15);
}
.form-group textarea { height: 180px; resize: vertical; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 400; cursor: pointer; }
.checkbox-group input { width: auto; }
.form-submit { text-align: center; margin-top: 36px; }
.form-note { font-size: .8rem; color: var(--gray); margin-bottom: 12px; }
.success-msg {
  display: none; background: #e8f5e9; color: #2e7d32;
  padding: 20px; border-radius: var(--radius);
  border: 1px solid #a5d6a7; margin-bottom: 20px; text-align: center;
  font-weight: 600;
}

/* =========================================
   FOOTER
   ========================================= */
#footer { background: var(--dark); color: rgba(255,255,255,.75); padding-top: 60px; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-name { font-size: 1.2rem; color: var(--white); font-weight: 700; letter-spacing: .08em; }
.footer-brand .logo-en   { font-size: .65rem; color: var(--gold2); letter-spacing: .14em; margin-bottom: 16px; }
.footer-brand p { font-size: .82rem; line-height: 1.9; }

.footer-col h4 { font-size: .88rem; color: var(--white); margin-bottom: 16px; letter-spacing: .08em; }
.footer-col ul li a { font-size: .82rem; display: block; padding: 5px 0; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold2); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: .78rem; color: rgba(255,255,255,.45);
}

/* Floating CTA */
.float-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.float-cta a {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 22px;
  border-radius: 48px; font-size: .88rem; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.float-cta a:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.float-cta .f-consult { background: var(--gold); color: var(--white); }
.float-cta .f-tel { background: var(--navy); color: var(--white); font-size: .8rem; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .content-two-col { gap: 40px; }
}

@media (max-width: 768px) {
  nav, .header-cta { display: none; }
  .hamburger { display: flex; }
  .hero-title { font-size: 2rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .flow-step:not(:last-child)::after { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .content-two-col { grid-template-columns: 1fr; gap: 28px; }
  .content-two-col.reverse { direction: ltr; }
  .tab-btn { padding: 12px 18px; font-size: .85rem; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .page-hero { height: 360px; }
  .section { padding: 56px 0; }
  .float-cta { bottom: 16px; right: 16px; }
}
