/* =========================================================
   有限会社弘武 / KOUBU — shared design system
   Dark industrial · construction-yellow + deep-green
   ========================================================= */

:root {
  --ink: #122019; /* deep green-black base      */
  --ink-2: #18291f; /* raised dark panel          */
  --ink-3: #29382f; /* hairlines on dark          */
  --paper: #f4f1ea; /* warm off-white             */
  --paper-2: #e9e3d6; /* warm off-white, deeper     */
  --paper-line: #d8d1c2;

  --yellow: #f6ce21; /* logo accent yellow         */
  --yellow-d: #d9b200;
  --green: #276a40; /* logo emerald (primary)     */
  --green-2: #2f8050; /* brighter green             */
  --green-d: #1a4c2d; /* deep green                 */
  --green-ink: #103221; /* darkest green for panels   */

  --txt-dark: #18211c; /* text on paper              */
  --txt-mut: #5c6359; /* muted text on paper        */
  --txt-light: #f4f1ea; /* text on dark               */
  --txt-lmut: #98a39a; /* muted text on dark         */

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 72px);

  --f-jp: "Noto Sans JP", system-ui, sans-serif;
  --f-disp: "Noto Serif JP", serif;
  --f-mincho: "Noto Serif JP", serif;
  --f-en: "Anton", "Noto Sans JP", sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", "Menlo", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--f-jp);
  color: var(--txt-dark);
  background: var(--paper);
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* ---------- type helpers ---------- */
.en {
  font-family: var(--f-en);
  letter-spacing: 0.04em;
  line-height: 0.92;
}
.disp {
  font-family: var(--f-disp);
  font-weight: 900;
  letter-spacing: 0.03em;
}
.mono {
  font-family: var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* hazard stripe (green/yellow brand) */
.hazard {
  height: 7px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 16px,
    var(--green) 16px 32px
  );
}
.hazard-thin {
  height: 5px;
}

/* scaffold-pole faint grid for dark sections */
.poles {
  position: relative;
}
.poles::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px
  );
  background-size: 84px 100%;
  mask-image: linear-gradient(
    180deg,
    transparent,
    #000 18%,
    #000 82%,
    transparent
  );
}

/* ===========================================================
   HEADER
   =========================================================== */
.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: rgba(20, 21, 24, 0);
  transition:
    background 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.hdr.solid {
  background: rgba(18, 19, 22, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--ink-3);
}
.hdr__brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px var(--gut);
  color: var(--txt-light);
}
.hdr__logo {
  height: 46px;
  width: auto;
}
.hdr__name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}
.hdr__name b {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--txt-light);
}
.hdr__name span {
  font-family: var(--f-en);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--yellow);
}
.hdr__name-img {
  height: 30px;
  width: auto;
  display: block;
  margin-top: -5px; /* 上の社名との間隔を詰める */
}

.nav {
  display: flex;
  align-items: stretch;
}
.nav__list {
  display: flex;
  align-items: stretch;
}
.nav__list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 0 18px;
  color: var(--txt-light);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.nav__list a small {
  font-family: var(--f-en);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--txt-lmut);
  transition: color 0.25s;
}
.nav__list a b {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.nav__list a:hover,
.nav__list a.is-active {
  background: rgba(39, 106, 64, 0.4);
}
.nav__list a:hover small,
.nav__list a.is-active small {
  color: var(--yellow);
}

.nav__cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 26px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.25s var(--ease);
}
.nav__cta:hover {
  background: var(--green-2);
}
.nav__cta .ph-num {
  font-family: var(--f-en);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--yellow);
}
.nav__cta .ph-lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.8;
}

/* header Instagram icon */
.nav__ig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  color: var(--txt-light);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.nav__ig:hover {
  background: rgba(39, 106, 64, 0.4);
  color: var(--yellow);
}
.nav__ig svg {
  display: block;
  width: 20px;
  height: 20px;
}

.burger {
  display: none;
}

@media (max-width: 1080px) {
  .nav__list {
    display: none;
  }
  .nav__ig {
    display: none;
  }
  .burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    width: 64px;
    background: var(--green);
    border: 0;
    cursor: pointer;
  }
  .burger span {
    height: 3px;
    width: 26px;
    margin: 0 auto;
    background: var(--yellow);
  }
  .nav__cta {
    display: none;
  }
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 90px var(--gut) 40px;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  visibility: hidden;
}
.drawer.open {
  transform: none;
  visibility: visible;
}
.drawer a {
  color: var(--txt-light);
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-3);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.drawer a small {
  font-family: var(--f-en);
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.2em;
  width: 96px;
}
.drawer a b {
  font-weight: 500;
  font-size: 18px;
}
.drawer__close {
  position: absolute;
  top: 24px;
  right: var(--gut);
  background: none;
  border: 0;
  color: var(--txt-light);
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}

/* ===========================================================
   GENERIC LAYOUT
   =========================================================== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gut);
}
.section {
  padding: clamp(72px, 11vw, 150px) 0;
}
.section--dark {
  background: var(--ink);
  color: var(--txt-light);
}
.section--green {
  background: var(--green-ink);
  color: var(--txt-light);
}

/* section label : big EN word + JP sub */
.slabel {
  margin-bottom: clamp(32px, 5vw, 60px);
}
.slabel small {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 700;
}
.slabel small::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--yellow);
}
.section--dark .slabel small,
.section--green .slabel small {
  color: var(--yellow);
}
.slabel h2 {
  font-family: var(--f-en);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin-top: 10px;
}
.slabel .ja {
  display: block;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: 0.06em;
  margin-top: 8px;
}
.slabel--center {
  text-align: center;
}
.slabel--center small {
  justify-content: center;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s;
}
.btn .ar {
  font-family: var(--f-en);
  transition: transform 0.3s var(--ease);
}
.btn:hover .ar {
  transform: translateX(6px);
}
.btn--y {
  background: var(--yellow);
  color: var(--green-ink);
}
.btn--y:hover {
  background: #fff;
}
.btn--g {
  background: var(--green);
  color: #fff;
}
.btn--g:hover {
  background: var(--green-d);
}
.btn--ghost {
  background: transparent;
  color: var(--txt-light);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.btn--ink {
  background: var(--ink);
  color: #fff;
}
.btn--ink:hover {
  background: var(--green-ink);
}

/* image placeholder */
.ph {
  position: relative;
  overflow: hidden;
  background: #cfc8b8;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.05) 0 12px,
    rgba(0, 0, 0, 0) 12px 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
/* filled with a (test) image */
.ph.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ph.has-img::after {
  display: none;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7363;
  background: rgba(244, 241, 234, 0.82);
  padding: 7px 12px;
  border: 1px dashed #9a9282;
  max-width: 84%;
  text-align: center;
  line-height: 1.5;
}
.ph--dark {
  background: #23252a;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.04) 0 12px,
    rgba(255, 255, 255, 0) 12px 24px
  );
}
.ph--dark::after {
  color: #b9b3a6;
  background: rgba(20, 21, 24, 0.7);
  border-color: #46484d;
}

/* tags / chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  padding: 6px 11px;
  border: 1px solid currentColor;
  color: var(--green);
  text-transform: uppercase;
}

/* big outline index number */
.bignum {
  font-family: var(--f-en);
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--green-2);
  letter-spacing: 0;
}
.bignum--fill {
  color: var(--yellow);
  -webkit-text-stroke: 0;
}

/* diagonal clip helpers */
.cut-top {
  clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%);
}
.cut-btm {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5vw), 0 100%);
}

/* ===========================================================
   FOOTER
   =========================================================== */
.foot {
  background: var(--ink);
  color: var(--txt-light);
}
.foot__cta {
  background: var(--green-ink);
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 9vw, 110px) 0;
}
.foot__cta .poles::before {
  opacity: 0.6;
}
.foot__cta-inner {
  position: relative;
  display: grid;
  gap: 30px;
  justify-items: start;
}
.foot__cta h3 {
  font-family: var(--f-en);
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}
.foot__cta .ja {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 22px);
}
.foot__cta .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.foot__phone {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.foot__phone .num {
  font-family: var(--f-en);
  font-size: clamp(30px, 4.5vw, 46px);
  color: var(--yellow);
  letter-spacing: 0.01em;
}
.foot__phone .lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--txt-lmut);
}

.foot__main {
  padding: clamp(48px, 7vw, 80px) 0 30px;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.foot__brand .mk {
  height: 60px;
  width: auto;
  display: block;
}
.foot__brand p {
  color: var(--txt-lmut);
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.9;
}
.foot__col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--yellow);
  margin-bottom: 16px;
}
.foot__col a,
.foot__col li {
  color: var(--txt-lmut);
  font-size: 13px;
  padding: 6px 0;
  display: block;
  transition: color 0.2s;
}
.foot__col a:hover {
  color: var(--txt-light);
}
.foot__bottom {
  border-top: 1px solid var(--ink-3);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot__bottom small {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--txt-lmut);
}
.foot__sub {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.foot__policy {
  font-size: 12px;
  color: var(--txt-lmut);
  transition: color 0.2s;
}
.foot__policy:hover {
  color: var(--yellow);
}
.sns {
  display: flex;
  gap: 10px;
}
.sns a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt-lmut);
  transition: 0.2s;
}
.sns a:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.sns a svg {
  display: block;
  width: 18px;
  height: 18px;
}

@media (max-width: 860px) {
  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot__brand {
    grid-column: 1 / -1;
  }
}

/* ===========================================================
   PAGE HERO (sub pages)
   =========================================================== */
.phero {
  position: relative;
  background: var(--ink);
  color: var(--txt-light);
  padding: clamp(150px, 18vw, 220px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}
.phero .ph {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}
.phero__inner {
  position: relative;
}
.phero small {
  font-family: var(--f-mono);
  letter-spacing: 0.24em;
  color: var(--yellow);
  font-size: 0.72rem;
}
.phero h1 {
  font-family: var(--f-en);
  font-size: clamp(52px, 11vw, 128px);
  line-height: 0.86;
  margin-top: 10px;
}
.phero .ja {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(18px, 2.6vw, 30px);
  margin-top: 14px;
  letter-spacing: 0.08em;
}

/* breadcrumb */
.crumb {
  background: var(--ink-2);
  color: var(--txt-lmut);
}
.crumb ul {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  font-size: 12px;
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
}
.crumb a:hover {
  color: var(--yellow);
}

/* reveal on scroll */
[data-rise] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
[data-rise].in {
  opacity: 1;
  transform: none;
}

/* utility */
.lead {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 2.1;
  color: var(--txt-mut);
}
.section--dark .lead,
.section--green .lead {
  color: var(--txt-lmut);
}

/* ===========================================================
   BRAND MARQUEE — ロゴ ×「SCAFFOLD WORKER」横スクロール帯
   （トラックマーキングのSCAFFOLD WORKERをアクセントに転用）
   =========================================================== */
.marquee {
  overflow: hidden;
  background: var(--paper-2);
  border-top: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
}
.marquee__inner {
  display: flex;
  width: max-content;
  animation: marqueeScroll var(--marquee-speed, 40s) linear infinite;
}
.marquee__track {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}
/* ロゴ＋英語社名のロックアップ */
.marquee__lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.marquee__mark {
  height: 40px;
  width: auto;
  display: block;
}
.marquee__word {
  height: 55px;
  width: auto;
  display: block;
}
.marquee__word-txt {
  font-family: var(--f-en);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--green);
}
.marquee__txt {
  font-family: var(--f-en);
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.16em;
  color: var(--green);
  white-space: nowrap;
}
.marquee__sep {
  color: var(--green-2);
  font-size: 10px;
}
@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__inner {
    animation: none;
  }
}

/* ===========================================================
   LOADING SCREEN  —  brand mark "draws itself" (conic reveal)
   The logo PNG is revealed by a rotating conic-gradient mask, so the
   swirl appears to be drawn into existence, then the fill settles in.
   =========================================================== */
@property --koubu-sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.koubu-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    120% 90% at 50% 45%,
    var(--ink-2) 0%,
    var(--ink) 62%
  );
  transition:
    opacity 0.7s var(--ease),
    visibility 0.7s var(--ease);
}
.koubu-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.koubu-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vw, 44px);
}

/* the building logo mark (360 x 320) */
.koubu-build {
  width: clamp(128px, 27vw, 182px);
  aspect-ratio: 360 / 320;
  background-image: var(--logo);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  /* start the reveal from the 3 o'clock direction (90deg clockwise from top) */
  -webkit-mask-image: conic-gradient(
    from 90deg,
    #000 var(--koubu-sweep),
    transparent 0
  );
  mask-image: conic-gradient(
    from 90deg,
    #000 var(--koubu-sweep),
    transparent 0
  );
  animation:
    koubuDraw 1.7s var(--ease) forwards,
    koubuSettle 1.7s var(--ease) forwards;
}
@keyframes koubuDraw {
  from {
    --koubu-sweep: 0deg;
  }
  to {
    --koubu-sweep: 360deg;
  }
}
@keyframes koubuSettle {
  0% {
    opacity: 0.25;
    transform: scale(0.94) rotate(-6deg);
    filter: drop-shadow(0 0 0 rgba(246, 206, 33, 0));
  }
  70% {
    opacity: 1;
    transform: scale(1.02) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.45));
  }
}

.koubu-loader__brand {
  font-family: var(--f-en);
  font-size: clamp(20px, 4.6vw, 30px);
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* offset trailing letter-spacing */
  color: var(--yellow);
  opacity: 0;
  animation: koubuBrandIn 0.7s var(--ease) 1.1s forwards;
}
@keyframes koubuBrandIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 0.92;
    transform: none;
  }
}
/* 社名ロゴ画像（assets/logo-name.png がある場合に表示） */
.koubu-loader__name {
  width: clamp(150px, 34vw, 230px);
  height: auto;
  display: block;
  opacity: 0;
  animation: koubuNameIn 0.7s var(--ease) 1.05s forwards;
}
@keyframes koubuNameIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Fallback: if @property / conic mask is unsupported, the logo simply
   fades in (the invalid mask is ignored, so it stays fully visible). */
@media (prefers-reduced-motion: reduce) {
  .koubu-build {
    animation: koubuFade 0.6s var(--ease) forwards;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .koubu-loader__brand,
  .koubu-loader__name {
    animation: koubuFade 0.6s var(--ease) 0.2s forwards;
  }
}
@keyframes koubuFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.95;
  }
}

/* 簡易ローディング（施工事例一覧などの軽い遷移用）：ロゴ描画ではなく小さなスピナー */
.koubu-loader.is-quick {
  transition-duration: 0.3s;
}
.koubu-loader.is-quick .koubu-build,
.koubu-loader.is-quick .koubu-loader__brand,
.koubu-loader.is-quick .koubu-loader__name {
  display: none;
}
.koubu-loader.is-quick .koubu-loader__inner::after {
  content: "";
  display: block;
  width: 46px;
  height: 46px;
  border: 3px solid rgba(246, 206, 33, 0.25);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: koubuSpin 0.7s linear infinite;
}
@keyframes koubuSpin {
  to {
    transform: rotate(360deg);
  }
}
