/* =========================================================
   株式会社五幸産業 corporate website — base styles
   ========================================================= */

:root {
  --brand-green: #7c8d5e;
  --brand-green-light: #dfead0;
  --brand-green-pale: #f3f6ec;
  --brand-green-dark: #55643c;
  --text-dark: #23282a;
  --text-navy: #16304a;
  --text-sub: #5b6360;
  --border-gray: #e4e6de;
  --bg-gray: #f7f8f4;
  --white: #ffffff;
  --max-width: 1140px;
  --header-height: 76px;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --shadow-soft: 0 6px 24px rgba(30, 40, 20, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
}

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

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

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; margin: 0; color: var(--text-navy); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-green-dark);
  color: #fff;
  padding: 10px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--border-gray);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { width: 38px; height: 38px; }
.brand-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-navy);
  line-height: 1.2;
}
.brand-text small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: .08em;
}

.gnav { display: flex; align-items: center; gap: 6px; }
.gnav a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.gnav a:hover, .gnav a.active { background: var(--brand-green-pale); color: var(--brand-green-dark); }
.gnav .nav-cta {
  margin-left: 8px;
  background: var(--brand-green-dark);
  color: #fff !important;
  padding: 10px 20px;
}
.gnav .nav-cta:hover { background: var(--brand-green); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text-navy);
  transition: transform .25s, opacity .25s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .gnav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 40px;
    gap: 4px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .28s ease;
  }
  .gnav.is-open { transform: translateX(0); }
  .gnav a { padding: 16px 10px; font-size: 16px; border-bottom: 1px solid var(--border-gray); border-radius: 0; }
  .gnav .nav-cta { margin: 14px 0 0; text-align: center; border-radius: 6px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, rgba(20,30,20,.62), rgba(20,30,20,.45)), var(--brand-green-dark) center/cover;
  background-image: linear-gradient(180deg, rgba(15,26,15,.66), rgba(15,26,15,.42)), url('../images/gaiko2-4.jpg');
  background-size: cover;
  background-position: center;
  padding: 120px 0 100px;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .12em;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.5;
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: clamp(15px, 1.7vw, 18px);
  max-width: 640px;
  color: #f2f4ee;
}
.hero .btn-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* generic sub-page hero (smaller) */
.page-hero {
  background: linear-gradient(180deg, rgba(20,30,20,.6), rgba(20,30,20,.5)), var(--brand-green-dark) center/cover;
  color: #fff;
  padding: 74px 0 56px;
}
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); }
.page-hero p { color: #eef1e8; margin-top: 10px; max-width: 640px; }
.breadcrumb { font-size: 13px; color: #dfe6d6; margin-bottom: 14px; }
.breadcrumb a { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brand-green-dark); color: #fff; }
.btn-primary:hover { background: var(--brand-green); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.14); }
.btn-line { background: transparent; color: var(--brand-green-dark); border-color: var(--brand-green-dark); }
.btn-line:hover { background: var(--brand-green-pale); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.alt { background: var(--bg-gray); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-tag {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: .16em;
  color: var(--brand-green-dark);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.5; }
.section-head p { margin-top: 16px; color: var(--text-sub); }

/* ---------- 5 values grid ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }

.value-card {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 10px;
  padding: 30px 22px;
  text-align: left;
  transition: box-shadow .2s, transform .2s;
}
.value-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.value-card .value-en {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--brand-green-dark);
  font-weight: 700;
}
.value-card h3 { font-size: 19px; margin: 6px 0 12px; }
.value-card p { font-size: 14px; color: var(--text-sub); margin: 0; }
.value-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
  font-weight: 700;
  font-family: var(--font-serif);
  margin-bottom: 14px;
}

/* ---------- Two-col feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .split-media { order: 0; }
}
.split-media img { border-radius: 10px; box-shadow: var(--shadow-soft); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split h2, .split h3 { margin-bottom: 18px; }

/* ---------- Business cards ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .biz-grid { grid-template-columns: 1fr; } }
.biz-card {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}
.biz-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.biz-card .biz-body { padding: 26px 24px 30px; flex: 1; display: flex; flex-direction: column; }
.biz-card h3 { font-size: 20px; margin-bottom: 10px; }
.biz-card p { color: var(--text-sub); font-size: 14.5px; }
.biz-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; }
.biz-tags span {
  font-size: 12.5px;
  background: var(--brand-green-pale);
  color: var(--brand-green-dark);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Works (施工実績) ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .works-grid { grid-template-columns: 1fr; } }

.work-card {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .2s, box-shadow .2s;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(30,40,20,.14); }
.work-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(20,30,20,.72);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.work-body { padding: 20px 20px 24px; }
.work-body h3 { font-size: 18px; margin-bottom: 8px; }
.work-body p { font-size: 14px; color: var(--text-sub); margin-bottom: 10px; }
.work-meta { font-size: 12.5px; color: var(--brand-green-dark); font-weight: 700; }

/* ---------- Lightbox / detail modal ---------- */
.wm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 12, .86);
  display: none;
  align-items: center; justify-content: center;
  padding: 22px;
}
.wm-overlay.is-open { display: flex; }
.wm-dialog {
  background: #fff;
  border-radius: 12px;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}
.wm-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(20,20,20,.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 5;
}
.wm-header { padding: 30px 32px 6px; }
.wm-header .work-category { position: static; display: inline-block; margin-bottom: 12px; }
.wm-header h3 { font-size: 22px; margin-bottom: 10px; }
.wm-header p { color: var(--text-sub); font-size: 14.5px; }
.wm-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px 32px 34px;
}
@media (max-width: 560px) { .wm-photos { grid-template-columns: 1fr; } }
.wm-photo { border-radius: 8px; overflow: hidden; border: 1px solid var(--border-gray); background: var(--bg-gray); }
.wm-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.wm-photo .cap { padding: 10px 14px; font-size: 12.5px; color: var(--text-sub); display: flex; gap: 8px; align-items: baseline; }
.wm-photo .cap b { color: var(--brand-green-dark); font-family: var(--font-serif); }

/* ---------- Philosophy / About ---------- */
.philosophy-quote {
  background: var(--brand-green-pale);
  border-radius: 14px;
  padding: 44px 40px;
  text-align: center;
  margin-bottom: 40px;
}
.philosophy-quote p { font-family: var(--font-serif); font-size: clamp(18px, 2.4vw, 24px); color: var(--text-navy); margin: 0; line-height: 1.9; }

.five-happiness-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 900px) { .five-happiness-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .five-happiness-list { grid-template-columns: 1fr; } }
.five-happiness-list li {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
  font-weight: 700;
  color: var(--text-navy);
  font-size: 14.5px;
}

.ceo-block {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 46px;
  align-items: start;
}
@media (max-width: 860px) { .ceo-block { grid-template-columns: 1fr; } }
.ceo-photo { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-soft); }
.ceo-sign { margin-top: 26px; text-align: right; font-family: var(--font-serif); font-size: 16px; color: var(--text-navy); }
.ceo-sign span { display: block; font-size: 13px; color: var(--text-sub); font-family: var(--font-sans); margin-bottom: 4px; }

/* ---------- Table (company info) ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-gray);
  vertical-align: top;
}
.info-table th {
  width: 200px;
  color: var(--text-navy);
  font-weight: 700;
  background: var(--bg-gray);
}
@media (max-width: 640px) {
  .info-table, .info-table tbody, .info-table tr { display: block; width: 100%; }
  .info-table th, .info-table td { display: block; width: auto; padding: 8px 4px; }
  .info-table th { background: none; padding-bottom: 0; border-bottom: none; font-size: 13px; }
  .info-table tr { padding: 14px 0; border-bottom: 1px solid var(--border-gray); }
  .info-table td { border-bottom: none; padding-top: 2px; }
}

/* ---------- Timeline (services steps) ---------- */
.step-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 900px) { .step-list { grid-template-columns: 1fr; } }
.step-list li {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 10px;
  padding: 24px 18px 18px;
  font-size: 14px;
  color: var(--text-sub);
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px; left: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand-green-dark);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-serif);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.step-list strong { display: block; color: var(--text-navy); margin-top: 4px; margin-bottom: 6px; font-size: 15px; }

/* ---------- Recruit ---------- */
.recruit-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .recruit-points { grid-template-columns: 1fr; } }
.recruit-points .point-card {
  background: #fff; border: 1px solid var(--border-gray); border-radius: 10px; padding: 24px;
}
.recruit-points .point-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--text-navy); }
.recruit-points .point-card p { font-size: 14px; color: var(--text-sub); margin: 0; }

.check-list li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid var(--border-gray);
  font-size: 15px;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 8px;
  color: var(--brand-green-dark);
  font-weight: 700;
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 640px) { .form-card { padding: 24px 18px; } }
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-navy);
  margin-bottom: 8px;
}
.form-row label .req {
  color: #c0392b;
  font-size: 12px;
  margin-left: 6px;
  border: 1px solid #c0392b;
  padding: 1px 6px;
  border-radius: 4px;
}
.form-row label .opt {
  color: var(--text-sub);
  font-size: 12px;
  margin-left: 6px;
  border: 1px solid var(--border-gray);
  padding: 1px 6px;
  border-radius: 4px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfd4c8;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--brand-green-dark);
  box-shadow: 0 0 0 3px rgba(124,141,94,.18);
}
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfd4c8;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-dark);
}
.radio-group input { accent-color: var(--brand-green-dark); }
.radio-group input:checked + span { font-weight: 700; }
.file-drop {
  border: 1.5px dashed #b9c1ac;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-sub);
  background: var(--bg-gray);
}
.file-list { margin-top: 10px; font-size: 13px; color: var(--brand-green-dark); }
.form-note {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-gray);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 26px;
}
.form-success, .form-error {
  display: none;
  padding: 18px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-weight: 700;
}
.form-success { background: #e9f3e3; color: #3a5a29; }
.form-error { background: #fbe9e7; color: #a13a2c; }
.form-success.is-visible, .form-error.is-visible { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--brand-green-dark);
  color: #fff;
  text-align: center;
  padding: 60px 0;
}
.cta-band h2 { color: #fff; font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 16px; }
.cta-band p { color: #e5ecdc; margin-bottom: 26px; }
.cta-band .btn-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: #14201a; color: #cfd6c6; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand span { font-family: var(--font-serif); font-size: 17px; color: #fff; font-weight: 700; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 16px; font-family: var(--font-sans); }
.site-footer ul li { margin-bottom: 10px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 40px;
  padding-top: 22px;
  font-size: 12.5px;
  color: #8b957e;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }
.small { font-size: 13px; color: var(--text-sub); }
.badge-soft {
  display: inline-block;
  background: var(--brand-green-pale);
  color: var(--brand-green-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.note-box {
  background: var(--bg-gray);
  border-left: 4px solid var(--brand-green-dark);
  padding: 18px 22px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-sub);
}
