/* ==========================================================
   G-WORKS — style.css（第2稿）
   モバイルファースト / システムフォントのみ / 外部依存なし
   ========================================================== */

:root {
  --ink: #0f1e27;
  --ink-2: #34464f;
  --muted: #56676f;
  --line: #dde5e8;
  --paper: #f2f5f5;
  --night: #0d1b24;
  --night-2: #08131a;
  --blue: #005ade;
  --focus: var(--blue);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 768px) {
  :root { --header-h: 76px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { line-height: 1.4; }
p { text-wrap: pretty; }

a { color: var(--blue); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; --focus: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--ink);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 0 var(--line);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
/* JS有効時のみ、ヒーロー上で透明＋白抜き */
html.js .site-header:not(.is-solid) {
  color: #fff;
  background: transparent;
  box-shadow: none;
  --focus: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand { display: inline-flex; color: inherit; }
.logo { width: 122px; height: 28px; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item { display: none; }
.nav a {
  display: inline-block;
  color: inherit;
  font-size: .875rem;
  letter-spacing: .06em;
  text-decoration: none;
}
.nav-item a {
  position: relative;
  padding: 8px 14px;
}
.nav-item a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-item a:hover::after { transform: scaleX(1); }

.nav-cta {
  padding: 8px 16px;
  font-weight: 600;
  color: #fff !important;
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background-color .25s, border-color .25s;
}
html.js .site-header:not(.is-solid) .nav-cta {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .8);
}
.nav-cta:hover,
html.js .site-header:not(.is-solid) .nav-cta:hover {
  background: var(--blue);
  border-color: var(--blue);
}

@media (min-width: 768px) {
  .logo { width: 147px; height: 34px; }
  .nav-item { display: block; }
  .nav ul { gap: 8px; }
  .nav-cta { margin-left: 8px; padding: 9px 20px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 12px 26px;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-arrow { transition: transform .3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-primary { color: var(--ink); background: #fff; border: 1px solid #fff; }
.btn-primary:hover { color: #fff; background: var(--blue); border-color: var(--blue); }

.btn-ghost { color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Hero ---------- */
.hero {
  --focus: #fff;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background: var(--night);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide.is-leaving { opacity: 1; z-index: 1; transition: none; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
/* Ken Burns：退場中も同じ animation を保ち、ジャンプさせない */
.hero-slide.is-active img,
.hero-slide.is-leaving img {
  animation: kenburns 10s linear both;
}
.hero-slide:nth-child(1) { --s0: 1.04; --s1: 1.16; --x0: 0%;  --y0: 0%;  --x1: -2%;   --y1: -1%; }
.hero-slide:nth-child(2) { --s0: 1.16; --s1: 1.04; --x0: 2%;  --y0: 1%;  --x1: 0%;    --y1: 0%; }
.hero-slide:nth-child(3) { --s0: 1.04; --s1: 1.15; --x0: 0%;  --y0: 0%;  --x1: 2%;    --y1: -1.5%; }
.hero-slide:nth-child(4) { --s0: 1.15; --s1: 1.04; --x0: -2%; --y0: 0%;  --x1: 0%;    --y1: 0%; }
.hero-slide:nth-child(5) { --s0: 1.04; --s1: 1.16; --x0: 0%;  --y0: 0%;  --x1: -1.5%; --y1: 1%; }

@keyframes kenburns {
  from { transform: scale(var(--s0, 1.04)) translate3d(var(--x0, 0), var(--y0, 0), 0); }
  to   { transform: scale(var(--s1, 1.14)) translate3d(var(--x1, 0), var(--y1, 0), 0); }
}

/* 可読性のためのオーバーレイ */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 14, 20, .55) 0%, rgba(6, 14, 20, .1) 26%, rgba(6, 14, 20, .14) 48%, rgba(6, 14, 20, .78) 100%),
    linear-gradient(90deg, rgba(6, 14, 20, .5) 0%, rgba(6, 14, 20, 0) 72%);
}

.hero-inner {
  position: relative;
  padding-block: calc(var(--header-h) + 48px) clamp(116px, 16vh, 168px);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.sq {
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.25rem, 9vw, 5rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .04em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .28);
}
.hero-title span { display: block; }

.hero-lead {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: clamp(.9375rem, 2.4vw, 1.0625rem);
  line-height: 1.95;
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* 読み込み時の登場（CSSのみ。終了後は必ず表示状態） */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-inner > * {
    animation: rise 1.2s var(--ease) both;
    animation-delay: calc(.2s + var(--i, 0) * .14s);
  }
}
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}

/* スライド情報・操作 */
.hero-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: .75rem;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .88);
}
.hero-caption-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
}
.hero-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-count {
  display: none;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.hero.has-slideshow .hero-count { display: inline; }

.hero-controls { display: flex; align-items: center; gap: 14px; flex: none; }

.hero-progress {
  display: none;
  width: 64px;
  height: 1px;
  background: rgba(255, 255, 255, .35);
  overflow: hidden;
}
.hero.has-slideshow .hero-progress { display: block; }
.hero-progress i {
  display: block;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.hero-progress.run i { animation: progress var(--interval, 7s) linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }

.hero.is-paused .hero-slide img,
.hero.is-paused .hero-progress i { animation-play-state: paused; }

.hero-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .25s;
}
.hero-toggle:hover { background: rgba(255, 255, 255, .16); }
.hero-toggle::before {
  content: "";
  width: 10px;
  height: 12px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}
.hero-toggle[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

/* ---------- Section common ---------- */
.section { padding-block: clamp(80px, 12vw, 144px); }

.sec-head { margin-bottom: clamp(36px, 6vw, 64px); }

.sec-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--blue);
}
.sec-label::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--blue);
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.625rem);
  font-weight: 700;
  letter-spacing: .05em;
}

.sec-lead {
  max-width: 38em;
  margin: 18px 0 0;
  color: var(--ink-2);
}

/* ---------- Services（2本柱） ---------- */
.services { background: var(--paper); }

.pillars {
  display: grid;
  gap: 24px;
}
@media (min-width: 960px) {
  .pillars { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 52px);
  background: #fff;
  border: 1px solid var(--line);
}
.pillar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 64px;
  height: 4px;
  background: var(--ink);
}

.pillar-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.pillar-no {
  font-size: clamp(3rem, 11vw, 4.5rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.pillar-en {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--muted);
}

.pillar h3 {
  margin: 20px 0 12px;
  font-size: clamp(1.5rem, 4.6vw, 2rem);
  letter-spacing: .05em;
}
.pillar-lead { margin: 0; color: var(--ink-2); }

.pillar-items {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pillar-items li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.pillar-items li:last-child { padding-bottom: 0; border-bottom: 0; }
.pillar-items h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: .03em;
}
.pillar-items h4::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--blue);
}
.pillar-items p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.85;
  color: var(--ink-2);
}

.services-note {
  margin: 32px 0 0;
  font-size: .8125rem;
  color: var(--muted);
}

/* ---------- Band（写真の区切り） ---------- */
.band {
  --focus: #fff;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(360px, 62vw, 620px);
  overflow: hidden;
  color: #fff;
  background: var(--night);
}
.band-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html.js .band-img {
  transform: scale(1.1);
  transition: transform 2.8s var(--ease);
}
html.js .band.is-visible .band-img { transform: scale(1); }

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 14, 20, .05) 30%, rgba(6, 14, 20, .72) 100%),
    linear-gradient(90deg, rgba(6, 14, 20, .4) 0%, rgba(6, 14, 20, 0) 70%);
}
.band-inner { padding-block: clamp(40px, 7vw, 80px); }
.band-text {
  margin: 0;
  font-size: clamp(1.625rem, 5.2vw, 3rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .08em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}
.band-sub {
  max-width: 32em;
  margin: 14px 0 0;
  font-size: .9375rem;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}

/* ---------- Approach ---------- */
.strengths {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.strengths li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 12px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.st-no {
  padding-top: .3em;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--blue);
}
.strengths h3 {
  margin: 0 0 8px;
  font-size: 1.1875rem;
  letter-spacing: .04em;
}
.strengths p {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-2);
}
@media (min-width: 900px) {
  .strengths {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    border-top: 0;
  }
  .strengths li {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0 0;
    border-top: 1px solid var(--ink);
    border-bottom: 0;
  }
}

.works { margin-top: clamp(56px, 8vw, 88px); }
.works-title {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: .06em;
}
.track {
  margin: 0;
  padding: 0;
  list-style: none;
}
.track li {
  display: grid;
  gap: 2px 28px;
  padding: 16px 0;
  font-size: .9375rem;
  border-bottom: 1px solid var(--line);
}
.yr {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .track li { grid-template-columns: 8.5em 1fr; align-items: baseline; }
}

/* ---------- Background（控えめ） ---------- */
.background {
  padding-block: clamp(56px, 8vw, 88px);
  background: var(--paper);
}
.background-grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .background-grid { grid-template-columns: 1fr 2fr; gap: 64px; }
}
.background h2 {
  font-size: 1.25rem;
  letter-spacing: .06em;
}
.background p,
.background li {
  font-size: .875rem;
  line-height: 1.85;
  color: var(--ink-2);
}
.background p { margin: 0; }
.bg-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.bg-list li {
  position: relative;
  padding-left: 16px;
}
.bg-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 5px;
  height: 5px;
  background: var(--muted);
}

/* ---------- Company ---------- */
.company { padding-bottom: clamp(120px, 16vw, 200px); }
.company-grid { display: grid; }
@media (min-width: 900px) {
  .company-grid { grid-template-columns: 1fr 2fr; gap: 64px; }
}
.profile {
  margin: 0;
  border-top: 1px solid var(--ink);
}
.profile > div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.profile dt {
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
}
.profile dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.biz {
  margin: 0;
  padding: 0;
  list-style: none;
}
.biz li + li { margin-top: 4px; }

/* ---------- Contact ---------- */
.contact {
  --focus: #fff;
  position: relative;
  color: #fff;
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(0, 90, 222, .22), transparent 70%),
    var(--night);
}
.ridge {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(44px, 8vw, 120px);
}
.contact .sec-label { color: #9cc0ff; }
.contact-inner { max-width: 760px; margin-inline: auto; }
@media (min-width: 900px) {
  .contact-inner { margin-inline: max(var(--gutter), (100% - var(--wrap)) / 2); }
}
.contact-text {
  margin: 0 0 32px;
  color: #d5e0e5;
}
.btn-mail {
  min-height: 60px;
  padding: 16px 30px;
  font-size: clamp(1.0625rem, 4.4vw, 1.375rem);
  letter-spacing: .04em;
  color: var(--ink);
  background: #fff;
  border: 1px solid #fff;
}
.btn-mail:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
.contact-tel {
  margin: 20px 0 0;
  color: #d5e0e5;
}
.contact-tel a {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  --focus: #fff;
  padding-block: 56px 32px;
  font-size: .8125rem;
  color: #b8c6cc;
  background: var(--night-2);
}
.site-footer a { color: #fff; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}
.footer-top p { margin: 0; }
.footer-brand { display: inline-flex; color: #fff; }
.footer-logo { width: 116px; height: 27px; }
.footer-addr { line-height: 1.7; }

.credits {
  margin-top: 36px;
  padding-top: 20px;
  font-size: .75rem;
  line-height: 1.7;
  color: #a3b3ba;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.credits p { margin: 0 0 6px; }
.credits ul { margin: 0; padding: 0; list-style: none; }
.credits a { color: #dbe5ea; }

.copy {
  margin: 24px 0 0;
  color: #a3b3ba;
  letter-spacing: .06em;
}

/* ---------- Scroll reveal（JS有効時のみ隠す） ---------- */
html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion：全停止・1枚目静止・即表示 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-slide,
  .hero-slide.is-active,
  .hero-slide.is-leaving { transition: none !important; }
  .hero-slide:not(:first-child) { opacity: 0 !important; }
  .hero-slide:first-child { opacity: 1 !important; }
  .hero-slide img { animation: none !important; transform: none !important; }
  .hero-count,
  .hero-progress,
  .hero-toggle { display: none !important; }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html.js .band-img { transform: none; transition: none; }

  .btn, .btn-arrow, .nav-item a::after, .site-header { transition: none; }
}
