:root {
  --black: #030303;
  --panel: #080909;
  --line: rgba(255, 255, 255, 0.18);
  --text: #f1f0ec;
  --muted: #aaa9a5;
  --orange: #f15a16;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--black);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.08em;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  align-items: center;
  min-height: 112px;
  padding: 0 max(7vw, 36px);
  border-bottom: 1px solid transparent;
  background: rgba(3, 3, 3, 0.76);
  backdrop-filter: blur(12px);
  transition: min-height 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.site-header.is-scrolled {
  min-height: 78px;
  border-color: var(--line);
  background: rgba(3, 3, 3, 0.94);
}
.logo img { width: 154px; }
.global-nav { display: flex; align-items: center; gap: clamp(30px, 4vw, 70px); font-weight: 500; }
.global-nav > a:not(.header-contact) { position: relative; padding: 12px 0; }
.global-nav > a:not(.header-contact)::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  content: "";
}
.global-nav > a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-contact, .contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  min-width: 205px;
  padding: 18px 24px;
  color: #fff;
  background: var(--orange);
  transition: color 0.25s ease, background 0.25s ease;
}
.header-contact:hover, .contact-button:hover { color: var(--orange); background: #fff; }
.header-contact { min-width: 150px; justify-content: center; }
.menu-button { display: none; }

main { overflow: hidden; }
.hero {
  position: relative;
  min-height: 760px;
  padding: 190px max(8vw, 48px) 80px;
  background: #030303;
  overflow: hidden;
}
.hero::before {
  position: absolute;
  z-index: 0;
  inset: -4%;
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.98) 0%, rgba(3, 3, 3, 0.82) 35%, rgba(3, 3, 3, 0.48) 68%, rgba(3, 3, 3, 0.86) 100%),
    linear-gradient(180deg, rgba(3, 3, 3, 0.35) 0%, rgba(3, 3, 3, 0.08) 48%, #030303 100%),
    url("../images/hero-cosmic-bg.png") center center / cover no-repeat;
  animation: hero-bg-breath 16s ease-in-out infinite;
  content: "";
  pointer-events: none;
  transform: scale(1);
  transform-origin: 64% 48%;
  will-change: transform, opacity;
}
.hero::after {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 200px;
  background: linear-gradient(transparent, #030303 88%);
  pointer-events: none;
  content: "";
}
@keyframes hero-bg-breath {
  0%, 100% { opacity: .92; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}
.hero-canvas {
  position: absolute;
  z-index: 0;
  inset: 84px -4% 0 18%;
  width: 86%;
  height: calc(100% - 84px);
  opacity: .68;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 1500px; margin: 0 auto; }
.hero-copy { width: 520px; }
.hero-kicker { margin: 0 0 22px; font-family: "Noto Serif JP", serif; font-size: 18px; }
.hero h1 {
  margin: 0 0 25px;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(44px, 4vw, 66px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.12em;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.scroll-guide {
  position: absolute;
  z-index: 3;
  left: 30px;
  bottom: 95px;
  width: 1px;
  height: 76px;
  background: rgba(255,255,255,.55);
}
.scroll-guide span {
  position: absolute;
  left: -2px;
  top: -58px;
  font-size: 9px;
  letter-spacing: .18em;
  writing-mode: vertical-rl;
}

.section-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 55px;
  max-width: 1390px;
  margin: 0 auto;
  padding: 62px max(5vw, 34px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.section-intro { padding-top: 14px; }
.eyebrow { margin: 0 0 8px; color: var(--orange); font-size: 11px; letter-spacing: .16em; }
.section-intro h2 {
  margin: 0 0 18px;
  font-family: "Noto Serif JP", serif;
  font-size: 29px;
  font-weight: 400;
  letter-spacing: .1em;
}
.section-intro > p:not(.eyebrow) { margin: 0 0 16px; color: #c2c1bd; font-size: 12px; }
.section-intro .section-note {
  color: #aaa9a5;
  font-size: 11px;
  line-height: 1.9;
}

.service-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 1.35fr;
  border: 1px solid var(--line);
}
.service-card { position: relative; min-width: 0; }
.service-card-large {
  display: flex;
  min-height: 310px;
  padding: 28px 30px;
  border-right: 1px solid var(--line);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}
.number {
  position: absolute;
  top: 20px;
  left: 26px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  color: #777;
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
}
.service-card-large img { width: 86px; margin: 0 auto 28px; }
.service-card h3 { margin: 0 0 5px; font-family: "Noto Serif JP", serif; font-size: 19px; font-weight: 400; }
.service-card p { margin: 0; color: #a9a8a4; font-size: 10px; line-height: 1.7; }
.service-stack { display: grid; grid-template-rows: repeat(3, 1fr); }
.service-card-small {
  display: grid;
  grid-template-columns: 52px 70px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 103px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.service-card-small:last-child { border-bottom: 0; }
.service-card-small .number { position: static; align-self: start; }
.service-card-small img { width: 58px; }
.service-card-small h3 { font-size: 15px; }

.works { align-items: start; }
.works-gallery {
  display: grid;
  grid-template-columns: 1.3fr .75fr .72fr;
  grid-template-rows: repeat(2, 145px);
  gap: 10px;
}
.work-item { position: relative; overflow: hidden; background: #111; }
.work-main { grid-row: 1 / 3; }
.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .7s ease;
}
.work-item:hover img { transform: scale(1.045); filter: brightness(1.08); }

.company-info { border-left: 1px solid rgba(255,255,255,.1); }
.company-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.company-summary > div { min-height: 92px; padding: 12px 20px; border-right: 1px solid rgba(255,255,255,.1); }
.company-summary dt { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; color: #bbb; font-size: 10px; }
.company-summary dt img { width: 28px; height: 28px; object-fit: contain; }
.company-summary dd { margin: 0 0 0 38px; font-size: 11px; line-height: 1.55; }
.company-summary small { color: #aaa; font-size: 9px; }
.phone-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #777; border-radius: 50%; color: var(--orange); }
.company-detail { margin: 0; }
.company-detail > div { display: grid; grid-template-columns: 95px 1fr; padding: 13px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; }
.company-detail dt { color: #bbb; }
.company-detail dd { margin: 0; }

.contact {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .85fr auto;
  gap: 44px;
  align-items: center;
  max-width: 1390px;
  min-height: 165px;
  margin: 20px auto 28px;
  padding: 26px 70px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(4,4,4,.96), rgba(4,4,4,.72)), url("../images/f_bg01.png") right center / cover no-repeat;
  overflow: hidden;
}
.contact h2 { margin: 0 0 10px; font-family: "Noto Serif JP", serif; font-size: 25px; font-weight: 400; }
.contact-copy p { margin: 0; color: #aaa; font-size: 10px; }
.contact-copy .privacy-note {
  max-width: 650px;
  margin-top: 10px;
  color: #c2c1bd;
  font-size: 9px;
  line-height: 1.8;
}
.contact-phone {
  display: flex;
  padding-left: 42px;
  border-left: 1px solid rgba(255,255,255,.35);
  flex-direction: column;
  justify-content: center;
}
.contact-phone span {
  margin-bottom: 2px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .2em;
}
.contact-phone a {
  color: #fff;
  font-family: "Noto Serif JP", serif;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: .05em;
  transition: color 0.25s ease;
}
.contact-phone a:hover {
  color: var(--orange);
}
.contact-button { min-width: 280px; }

.site-footer {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 18px max(4vw, 30px);
  border-top: 1px solid rgba(255,255,255,.09);
}
.footer-logo img { width: 140px; }
.site-footer nav { display: flex; justify-content: center; gap: 20px; color: #aaa; font-size: 9px; }
.site-footer nav span { color: #333; }
.site-footer small { color: #888; font-size: 8px; letter-spacing: .08em; }

.page-top {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1050px) {
  .site-header { padding: 0 28px; }
  .global-nav { gap: 24px; }
  .header-contact { min-width: 170px; gap: 20px; }
  .section-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 30px; }
  .section-intro h2 {
    font-size: 24px;
    line-height: 1.75;
  }
  .company .section-intro h2 {
    white-space: nowrap;
  }
  .service-board { grid-template-columns: repeat(2, 1fr); }
  .service-card-large {
    align-items: center;
    text-align: center;
  }
  .service-card-large .number {
    align-self: stretch;
  }
  .service-stack {
    grid-column: 1 / 3;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }
  .service-card-small {
    grid-template-columns: 52px 70px 1fr;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-bottom: 0;
    padding: 16px 22px;
  }
  .service-card-small:last-child { border-bottom: 0; }
  .company-summary { grid-template-columns: repeat(2, 1fr); }
  .contact {
    margin-right: 24px;
    margin-left: 24px;
    padding: 30px 34px;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px 34px;
  }
  .contact-button {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer nav { display: none; }
}

@media (max-width: 767px) {
  body { font-size: 13px; }
  .site-header { grid-template-columns: 1fr 58px; min-height: 72px; padding: 0 0 0 20px; }
  .site-header.is-scrolled { min-height: 64px; }
  .logo img { width: 136px; }
  .menu-button {
    display: grid;
    place-content: center;
    gap: 6px;
    align-self: stretch;
    border: 0;
    background: #111;
  }
  .menu-button span { display: block; width: 24px; height: 1px; background: #fff; transition: transform .25s ease, opacity .25s ease; }
  .menu-button.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-button.is-open span:nth-child(2) { opacity: 0; }
  .menu-button.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .global-nav {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 0;
    padding: 12px 20px 24px;
    background: rgba(3,3,3,.98);
    transform: translateY(-130%);
    transition: transform .3s ease;
  }
  .global-nav.is-open { transform: translateY(0); }
  .global-nav > a { padding: 15px 4px !important; border-bottom: 1px solid #222; }
  .header-contact { min-width: 0; background: transparent; }
  .hero { min-height: 380px; padding: 100px 24px 32px; }
  .hero-canvas { inset: 128px -48% 0 12%; width: 135%; height: 260px; opacity: .6; }
  .hero-copy { width: 100%; }
  .hero-kicker { font-size: 14px; }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); letter-spacing: .06em; }
  .hero-lead { font-size: 14px; }
  .hero-note { right: 22px; bottom: 48px; font-size: 9px; }
  .scroll-guide { display: none; }
  .section-grid { grid-template-columns: 1fr; gap: 25px; padding: 48px 20px; }
  .section-intro br { display: none; }
  .service-board { grid-template-columns: 1fr; }
  .service-card-large { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-stack { grid-column: auto; grid-template-columns: 1fr; }
  .service-card-small { grid-template-columns: 42px 58px 1fr; border-top: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .works-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 210px repeat(2, 115px); }
  .work-main { grid-column: 1 / 3; grid-row: auto; }
  .company-info { border-left: 0; }
  .company-summary { grid-template-columns: 1fr 1fr; }
  .company-summary > div { padding: 12px; }
  .company-detail > div { grid-template-columns: 75px 1fr; padding: 13px 12px; }
  .contact { grid-template-columns: 1fr; gap: 24px; margin: 0 14px 25px; padding: 32px 24px; }
  .contact-phone { padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.3); border-left: 0; }
  .contact-phone a { font-size: 29px; }
  .contact-button { grid-column: auto; width: 100%; min-width: 0; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }

  .page-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    background: var(--orange);
    color: #fff;
    font-family: "Noto Serif JP", serif;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.12em;
    box-shadow: 0 8px 24px rgba(241, 90, 22, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
  }

  .page-top::before {
    display: block;
    margin-bottom: 1px;
    font-size: 13px;
    line-height: 1;
    content: "↑";
  }

  .page-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
