/* ===========================
   坊内建設工業株式会社
   Corporate Site Stylesheet
   =========================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 140px;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.8;
  position: relative;
}



img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Variables ---------- */
:root {
  --brown:        #2a2a2a;   /* メイン：黒寄りグレー */
  --brown-light:  #3f3f3f;   /* グレー明るめ */
  --green:        #7ab648;   /* アクセント：黄緑 */
  --green-light:  #9fd46a;   /* 黄緑明るめ */
  --cyan:         #4db8d4;   /* サブ：水色 */
  --cyan-light:   #7ecfe0;   /* 水色明るめ */
  --white:        #ffffff;
  --gray-bg:      #f5f3f0;   /* 温かみのあるオフホワイト */
  --gray-border:  #ddd;
  --text-dark:    #1a1a1a;
  --text-mid:     #666;
  --transition:   0.3s ease;
}

/* ---------- Typography ---------- */
.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--brown);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-title span {
  display: block;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.1em;
}

.section-desc {
  color: var(--text-mid);
  font-size: 0.95rem;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
}

.btn-primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--brown);
}

.btn-navy {
  background: var(--brown);
  color: var(--white);
  border: 2px solid var(--brown);
}

.btn-navy:hover {
  background: var(--brown-light);
  border-color: var(--brown-light);
}

/* ---------- Header ---------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(42, 42, 42, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(122, 182, 72, 0.35);
  transition: background var(--transition);
}

.header-inner {
  width: 100%;
  padding: 0 2rem;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  height: 72px;
  width: auto;
}

.header-logo .logo-text {
  color: var(--white);
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.header-logo .logo-text strong {
  display: block;
  font-size: 1.425rem;
  font-weight: 700;
  color: var(--green);
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  letter-spacing: 0.06em;
  position: relative;
  transition: color var(--transition);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--green);
}

.header-nav a:hover::after,
.header-nav a.active::after {
  width: 60%;
}

.header-nav .btn-contact {
  background: var(--green);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-left: 0.75rem;
  transition: background var(--transition);
}

.header-nav .btn-contact:hover {
  background: var(--green-light);
}

.header-nav .btn-contact::after {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/logo/トップ背景1.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 12s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(61, 43, 31, 0.85) 0%,
    rgba(61, 43, 31, 0.55) 60%,
    rgba(0,0,0,0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: 72px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(122,182,72,0.5);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-title-en {
  display: block;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  flex: 0 0 auto;
}

/* hero-scroll は削除済みのため定義のみ残す（非表示） */
.hero-scroll {
  display: none;
}

/* ---------- Section Wrapper ---------- */
.section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-desc {
  margin: 0 auto;
}

/* ---------- Home: About Teaser ---------- */
.about-teaser {
  background: var(--gray-bg);
}

.about-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-teaser-img {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.about-teaser-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-teaser-img:hover img {
  transform: scale(1.04);
}

.about-teaser-img::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  width: 80px;
  height: 80px;
  border-top: 3px solid var(--green);
  border-left: 3px solid var(--green);
  z-index: 1;
}

.about-teaser-img::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 80px;
  height: 80px;
  border-bottom: 3px solid var(--cyan);
  border-right: 3px solid var(--cyan);
  z-index: 1;
}

.about-teaser-body .section-desc {
  margin-bottom: 1.5rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brown);
  line-height: 1;
}

.stat-num span {
  font-size: 1rem;
  font-weight: 600;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-top: 0.3rem;
  letter-spacing: 0.05em;
}

/* ---------- Home: Works Teaser ---------- */
.works-teaser {
  background: var(--brown);
}

.works-teaser .section-title {
  color: var(--white);
}

.works-teaser .section-title span {
  color: rgba(255,255,255,0.5);
}

.works-teaser .section-label {
  color: var(--green);
}

.works-teaser .section-desc {
  color: rgba(255,255,255,0.7);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover img {
  transform: scale(1.08);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61,43,31,0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: background var(--transition);
}

.work-card:hover .work-card-overlay {
  background: linear-gradient(to top, rgba(61,43,31,0.95) 0%, rgba(61,43,31,0.3) 60%);
}

.work-card-en {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.3rem;
}

.work-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.works-more {
  text-align: center;
  margin-top: 3rem;
}

/* ---------- Home: CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-light) 100%);
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: rgba(122,182,72,0.06);
  transform: rotate(-15deg);
}

.cta-section .section-label {
  color: var(--cyan);
}

.cta-section .section-title {
  color: var(--white);
}

.cta-section .section-title span {
  color: rgba(255,255,255,0.5);
}

.cta-tel {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem;
}

.cta-tel a {
  color: inherit;
}

.cta-tel-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 72px;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(61,43,31,0.85) 0%, rgba(61,43,31,0.4) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  width: 100%;
}

.page-hero-en {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-border);
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-mid);
}

.breadcrumb-inner a {
  color: var(--brown);
  transition: color var(--transition);
}

.breadcrumb-inner a:hover {
  color: var(--green);
}

.breadcrumb-inner .sep {
  color: var(--gray-border);
}

/* ---------- About Page ---------- */
.about-table-section {
  background: var(--white);
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.company-table th,
.company-table td {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--gray-border);
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 200px;
  color: var(--brown);
  font-weight: 700;
  background: var(--gray-bg);
  white-space: nowrap;
}

.company-table td {
  color: var(--text-dark);
}

.company-table tr:first-child th,
.company-table tr:first-child td {
  border-top: 2px solid var(--brown);
}

/* Map */
.map-section {
  background: var(--gray-bg);
}

#map {
  width: 100%;
  height: 420px;
  border-radius: 3px;
  border: 1px solid var(--gray-border);
}

/* ---------- Works Page ---------- */
.works-category {
  padding: 4rem 2rem;
  border-bottom: 1px solid var(--gray-border);
}

.works-category:last-child {
  border-bottom: none;
}

.works-category:nth-child(even) {
  background: var(--gray-bg);
}

.works-category-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.works-category-header {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--brown);
}

.works-category-num {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(61,43,31,0.12);
  line-height: 1;
  font-family: 'Georgia', serif;
}

.works-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.2;
}

.works-category-title span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--green);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.works-item {
  background: var(--white);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.works-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.works-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.works-item-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.works-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.works-item:hover .works-item-img img {
  transform: scale(1.06);
}

.works-item-body {
  padding: 1.25rem 1.5rem;
}

.works-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--cyan);
  padding-left: 0.6rem;
}

.works-item-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
#footer {
  background: var(--brown);
  color: rgba(255,255,255,0.75);
}

.footer-main {
  width: 100%;
  padding: 4rem 2rem 3rem;
  display: flex;
  justify-content: flex-start;
  gap: 3rem;
  align-items: flex-start;
}

.footer-brand {
  flex: 0 0 auto;
  margin-right: auto;
}

.footer-main > div:not(.footer-brand) {
  flex: 1 1 auto;
}

.footer-main > div:nth-child(2),
.footer-main > div:nth-child(3) {
  flex: 0 0 auto;
}

.footer-brand img {
  height: 72px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-size: 1.425rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand-addr {
  font-size: 1.23rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.footer-brand-tel {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 0.75rem;
}

.footer-nav-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(122,182,72,0.35);
}

.footer-nav-list li {
  margin-bottom: 0.5rem;
}

.footer-nav-list a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

.footer-nav-list a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), background var(--transition);
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--green-light);
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-teaser-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 72px;
    padding: 0 1.25rem;
  }

  .header-logo img {
    height: 48px;
  }

  .header-logo .logo-text {
    font-size: 0.75rem;
  }

  .header-logo .logo-text strong {
    font-size: 0.95rem;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--brown);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    border-top: 1px solid rgba(122,182,72,0.25);
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    width: 100%;
  }

  .header-nav a::after {
    display: none;
  }

  .header-nav .btn-contact {
    margin: 1rem 0 0;
    text-align: center;
  }

  .hamburger {
    display: flex;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-brand {
    margin-right: 0;
  }

  .footer-nav-cols {
    display: flex;
    gap: 2rem;
  }

  .footer-brand-name {
    font-size: 1rem;
  }

  .footer-brand-addr {
    font-size: 0.85rem;
  }

  .footer-brand-tel {
    font-size: 1.2rem;
  }

  .company-table th {
    width: 120px;
    font-size: 0.85rem;
  }

  .company-table th,
  .company-table td {
    padding: 0.9rem 1rem;
  }

  .works-items {
    grid-template-columns: 1fr;
  }

  .about-stats {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    text-align: center;
  }
}
