:root {
  --bg: #f4f2ec;
  --ink: #0d0e12;
  --ink-soft: #6a6c75;
  --line: #d9d6cc;
  --space: #05060c;
  --accent: #ff4f9a;
  --accent2: #5b6cff;
  --ease: cubic-bezier(.22,.61,.36,1);
  --serif: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --en: "Inter", sans-serif;
  --jp: "Noto Sans JP", "Zen Kaku Gothic New", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--jp);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
sup { font-size: .5em; vertical-align: super; }

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--space);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { width: min(70vw, 360px); text-align: center; color: #fff; }
.loader__label { margin-bottom: 26px; }
.loader__logo-img {
  width: min(58vw, 220px); height: auto; margin: 0 auto;
  filter: brightness(0) invert(1); opacity: .95;
}
.loader__bar {
  height: 2px; background: rgba(255,255,255,.14); overflow: hidden; border-radius: 2px;
}
.loader__bar span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: transform .12s linear;
}
.loader__num {
  font-family: var(--en); font-weight: 900; font-size: 64px;
  margin-top: 18px; line-height: 1; display: flex; justify-content: center; align-items: baseline; gap: 2px;
}
.loader__num i { font-size: 20px; font-style: normal; color: #aeb6d8; }

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 56px);
  mix-blend-mode: difference; color: #fff;
  transition: padding .4s var(--ease);
}
.header.is-scrolled { padding-top: 16px; padding-bottom: 16px; }
.header__logo { display: flex; align-items: center; }
.header__logo-img {
  height: 30px; width: auto; display: block;
  filter: brightness(0) invert(1);
  transition: height .4s var(--ease);
}
.header.is-scrolled .header__logo-img { height: 26px; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 40px); }
.nav a {
  font-family: var(--en); font-weight: 600; font-size: 12px; letter-spacing: .12em;
  display: flex; flex-direction: column; gap: 2px; position: relative;
}
.nav a i { font-style: normal; font-family: var(--jp); font-size: 9px; letter-spacing: .1em; opacity: .7; font-weight: 400; }
.nav a::after {
  content: ""; position: absolute; bottom: -6px; left: 0; height: 1px; width: 0;
  background: currentColor; transition: width .35s var(--ease);
}
.nav a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 6px auto; width: 24px; transition: .3s var(--ease); }

/* ============ HERO ============ */
.hero {
  position: relative; height: 100svh; min-height: 620px;
  background: radial-gradient(120% 120% at 50% 30%, #11142a 0%, var(--space) 60%, #02030a 100%);
  color: #fff; overflow: hidden;
}
#webgl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__overlay {
  position: absolute; left: 0; bottom: clamp(48px, 9vh, 110px);
  width: 100%; padding: 0 clamp(20px, 5vw, 80px);
  pointer-events: none;
}
.hero__sub {
  font-family: var(--en); font-weight: 500; letter-spacing: .28em;
  font-size: clamp(11px, 1.1vw, 13px); color: #9aa3d0; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(38px, 7vw, 104px); line-height: 1.04; letter-spacing: .01em;
  text-shadow: 0 4px 40px rgba(0,0,0,.5);
}
.hero__title span { display: block; }
.hero__lead {
  margin-top: 24px; max-width: 540px; font-size: clamp(13px, 1.3vw, 15px);
  color: #c7cbe4; line-height: 1.9; font-weight: 300;
}
.hero__scroll {
  position: absolute; right: clamp(20px, 5vw, 64px); bottom: 40px;
  writing-mode: vertical-rl; font-family: var(--en); letter-spacing: .3em;
  font-size: 11px; color: #9aa3d0;
}
.hero__scroll span { position: relative; }
.hero__scroll span::after {
  content: ""; position: absolute; left: 50%; bottom: -52px; width: 1px; height: 40px;
  background: linear-gradient(#9aa3d0, transparent); animation: scrollLine 1.8s var(--ease) infinite;
}
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============ REVEAL ============ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.hero__overlay [data-reveal] { transition-delay: .1s; }

/* ============ SECTION HEAD ============ */
.section-head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 64px;
}
.section-head__no { font-family: var(--en); font-weight: 800; font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.section-head__en { font-family: var(--en); font-weight: 800; font-size: clamp(28px, 4vw, 52px); letter-spacing: .02em; }
.section-head__ja { font-size: 13px; color: var(--ink-soft); margin-left: auto; }

section { padding: clamp(80px, 12vh, 160px) clamp(20px, 6vw, 110px); }

/* ============ ABOUT ============ */
.about__statement {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(22px, 3.4vw, 46px); line-height: 1.55; letter-spacing: .01em;
  margin-bottom: clamp(60px, 9vh, 120px);
}
.about__statement p { margin-bottom: .4em; }
.about__statement em { font-style: normal; color: var(--accent); }
.about__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); }
.about__col h3 {
  font-family: var(--en); font-weight: 800; font-size: 22px; letter-spacing: .02em;
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.about__col h3 i { font-style: normal; font-family: var(--jp); font-size: 13px; color: var(--accent); font-weight: 500; }
.about__col p { font-size: 14px; color: var(--ink-soft); line-height: 1.95; }

/* ============ SERVICE ============ */
.service__group-label {
  font-family: var(--en); font-weight: 800; font-size: 13px; letter-spacing: .18em;
  display: flex; align-items: center; gap: 14px; margin: 8px 0 30px;
}
.service__group-label:not(:first-of-type) { margin-top: 80px; }
.service__group-label i { font-style: normal; font-family: var(--jp); font-size: 12px; color: var(--ink-soft); font-weight: 400; letter-spacing: .06em; }
.service__list { display: flex; flex-direction: column; }
.card {
  position: relative; display: grid; grid-template-columns: clamp(160px, 24vw, 280px) 1fr auto; gap: clamp(24px, 3vw, 48px);
  align-items: center; padding: 32px 14px; border-top: 1px solid var(--line);
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.service__list .card:last-child { border-bottom: 1px solid var(--line); }
.card:hover { background: #fff; padding-left: 28px; padding-right: 28px; }
.card__thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px;
  background: #e9e6dd; border: 1px solid var(--line);
}
.card__thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .6s var(--ease);
}
.card:hover .card__thumb img { transform: scale(1.05); }
.card__index {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-family: var(--en); font-weight: 700; font-size: 11px; color: #fff;
  background: rgba(13,14,18,.7); padding: 3px 9px; border-radius: 100px; letter-spacing: .08em;
}
.card__name {
  font-family: var(--en); font-weight: 800; font-size: clamp(24px, 3.2vw, 40px);
  letter-spacing: .01em; line-height: 1.1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.card__name small { font-family: var(--jp); font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.card__cat { font-size: 12px; letter-spacing: .08em; color: var(--accent); margin: 10px 0 12px; font-weight: 500; }
.card__desc { font-size: 14px; color: var(--ink-soft); max-width: 640px; line-height: 1.9; }
.card__link {
  display: inline-block; margin-top: 14px; font-family: var(--en); font-weight: 600;
  font-size: 13px; letter-spacing: .04em; opacity: 0; transform: translateX(-6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card:hover .card__link { opacity: 1; transform: none; }
.card__status {
  align-self: flex-start; font-family: var(--en); font-weight: 700; font-size: 11px;
  letter-spacing: .12em; padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--ink-soft); white-space: nowrap;
}
.card__status--live { color: #0a8f5b; border-color: #0a8f5b; }
.card__status--live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #0a8f5b; margin-right: 6px; vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.card--past { opacity: .82; }
.card--past:hover { opacity: 1; }

/* ============ COMPANY ============ */
.company__table { border-top: 1px solid var(--line); max-width: 860px; }
.company__table > div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 26px 6px; border-bottom: 1px solid var(--line); }
.company__table dt { font-family: var(--en); font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--ink-soft); }
.company__table dd { font-size: 16px; font-weight: 500; }

/* ============ CONTACT ============ */
.contact { background: var(--space); color: #fff; text-align: center; }
.contact__label { font-family: var(--en); font-weight: 700; letter-spacing: .3em; font-size: 12px; color: var(--accent); margin-bottom: 24px; }
.contact__title { font-family: var(--serif); font-weight: 900; font-size: clamp(32px, 5.5vw, 76px); line-height: 1.15; margin-bottom: 24px; }
.contact__lead { color: #b9bedb; font-size: 15px; font-weight: 300; margin-bottom: 46px; }
.contact__btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 56px; border-radius: 100px;
  background: linear-gradient(90deg, var(--accent2), var(--accent)); color: #fff;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  box-shadow: 0 10px 40px rgba(91,108,255,.35);
}
.contact__btn span { font-weight: 700; font-size: 17px; }
.contact__btn i { font-style: normal; font-family: var(--en); font-size: 12px; letter-spacing: .08em; opacity: .85; }
.contact__btn:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(255,79,154,.4); }

/* ============ FOOTER ============ */
.footer { background: var(--space); color: #fff; padding: 20px clamp(20px, 6vw, 110px) 40px; }
.footer__big {
  border-bottom: 1px solid rgba(255,255,255,.14); padding: 24px 0 30px;
}
.footer__logo-img {
  width: min(82%, 560px); height: auto; display: block;
  filter: brightness(0) invert(1);
}
.footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding-top: 28px; }
.footer__nav { display: flex; gap: 28px; }
.footer__nav a { font-family: var(--en); font-weight: 600; font-size: 12px; letter-spacing: .1em; color: #aeb6d8; transition: color .3s; }
.footer__nav a:hover { color: #fff; }
.footer__copy { font-family: var(--en); font-size: 12px; color: #7a80a0; letter-spacing: .04em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 0; background: var(--space); color: #fff;
    flex-direction: column; justify-content: center; align-items: center; gap: 32px;
    opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; mix-blend-mode: normal;
  }
  body.nav-open .nav { opacity: 1; visibility: visible; }
  .nav a { font-size: 20px; align-items: center; }
  .nav a i { font-size: 11px; }
  .nav-toggle { display: block; z-index: 300; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }
  .about__cols { grid-template-columns: 1fr; gap: 36px; }
  .card { grid-template-columns: 1fr; gap: 16px; }
  .card__thumb { aspect-ratio: 16 / 9; width: 100%; }
  .card__status { justify-self: start; margin-top: 4px; }
  .card__link { opacity: 1; transform: none; }
  .company__table > div { grid-template-columns: 1fr; gap: 6px; }
  .hero__lead br { display: none; }
}
@media (max-width: 480px) {
  .header__logo-img { height: 24px; }
  .footer__logo-img { width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation-duration: .01ms !important; }
}
