:root {
  --red: #d71718;
  --red-dark: #8e0e10;
  --black: #050505;
  --panel: #272727;
  --panel-2: #171717;
  --white: #f7f7f7;
  --muted: #b8b8b8;
  --line: rgba(215, 23, 24, .5);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
}
a { color: inherit;
  text-decoration: none; 
} 
img { display: block;
   max-width: 100%; 
  }
button, input, select, textarea { font: inherit; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; padding: .7rem 1rem; background: #fff; color: #000; }
.nagata-bot {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 300;
  display: grid;
  justify-items: end;
  gap: .65rem;
}
.nagata-bot__button {
  width: 68px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--red);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.nagata-bot__button:hover { transform: scale(1.06); box-shadow: 0 6px 22px rgba(0,0,0,.55); }
.nagata-bot__button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nagata-bot__button img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.nagata-bot__message {
  max-width: min(280px, calc(100vw - 2rem));
  margin: 0;
  padding: .7rem .95rem;
  border: 1px solid var(--red);
  border-radius: 1rem 1rem .25rem 1rem;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.6;
}
/* ここまで一応理解 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/*
  Main HERO
  画像自体にタイトル「DENSHI」が入っているため、文字は重ねずビジュアルをそのまま見せます。
  PC・スマートフォンとも画像全体が見えるよう、元画像の比率を維持します。
*/
.hero {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 2392 / 1760;
  min-height: 0;
  overflow: hidden;
  background: #8fc3e5;
}
.hero__picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(215,23,24,.25);
  border-bottom: 1px solid rgba(215,23,24,.28);
}
.site-nav__inner {
  width: min(100%, 1450px);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.nav-link {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: .25s;
  border-right: 1px solid rgba(255,255,255,.05);
}
.nav-link:hover, .nav-link[aria-current='page'] { background: rgba(255,255,255,.07); }
.nav-link .en {
  color: var(--red);
  font-family: 'Antonio', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1;
  letter-spacing: .07em;
}
.nav-link .ja { margin-top: .3rem; font-size: .88rem; font-weight: 700; }

.page-shell {
  background:
    linear-gradient(180deg, rgba(39,39,39,.98), rgba(28,28,28,.98)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 8px);
}
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; position: relative; }
.section--dark { background: var(--panel-2); }
.section--redline::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: min(92%, var(--max)); height: 1px; background: var(--line);
}
.inner { width: min(90%, var(--max)); margin: auto; }
.section-title { margin-bottom: 2.4rem; text-align: center; }
.section-title .en {
  display: block;
  color: var(--red);
  font-family: 'Antonio', sans-serif;
  font-size: clamp(1.2rem, 4vw, 4rem);
  line-height: .9;
  letter-spacing: -.02em;
}
.section-title .ja { display: block; margin-top: .65rem; font-size: 1.05rem; font-weight: 700; }
.section-title .en.section-title__jp { font-family: 'Noto Sans JP', sans-serif; font-size: 1.2rem; line-height: 1.5; letter-spacing: 0; }
.section-lead { max-width: 780px; margin: 0 auto 3rem; text-align: center; color: #dedede; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature-card {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 4px;
  overflow: hidden;
  min-height: 100%;
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
}
.feature-card__visual {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(215,23,24,.22), transparent 45%),
    linear-gradient(45deg, #090909, #414141);
}
.feature-card__visual--department {
  aspect-ratio: 2 / 1;
  background: #111;
}
.feature-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-card__visual::after {
  content: attr(data-label);
  position: absolute;
  left: 1.2rem; bottom: 1rem;
  font-family: 'Antonio', sans-serif;
  letter-spacing: .11em;
  color: rgba(255,255,255,.8);
  font-size: 1.25rem;
}
.feature-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem 1.45rem 1.7rem;
}
.feature-card h3 { margin: 0 0 .7rem; font-size: 1.35rem; }
.feature-card p { margin: 0; color: #c9c9c9; font-size: .96rem; }
.feature-card__body .cta-row { margin-top: auto; padding-top: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  min-height: 58px;
  padding: .8rem 1.5rem;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--red);
  font-weight: 700;
  box-shadow: 0 4px 4px rgba(0,0,0,.28);
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn::after { content: '\203A'; font-size: 1.55rem; margin-left: .7rem; line-height: 1; }
.btn--ghost { background: transparent; border: 1px solid var(--red); }
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

.visual-break {
  height: auto;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.45)),
    radial-gradient(circle at 28% 50%, rgba(215,23,24,.44), transparent 16%),
    linear-gradient(120deg, #131313 0 28%, #4a4a4a 28% 45%, #101010 45% 100%);
  background-attachment: fixed;
}
.visual-break__mark {
  position: relative;
  z-index: 1;
  font-family: 'Antonio', sans-serif;
  font-size: clamp(4rem, 15vw, 11rem);
  letter-spacing: .12em;
  color: rgba(255,255,255,.14);
}
.visual-break__image {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.info-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: start; }
.info-box { padding: 1.8rem; background: rgba(0,0,0,.28); border-left: 3px solid var(--red); }
.info-box h3 { margin-top: 0; }
.info-box p:last-child { margin-bottom: 0; }
.meta-list { display: grid; gap: 1rem; margin: 0; }
.meta-list div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.09); padding-bottom: .8rem; }
.meta-list dt { color: var(--red); font-weight: 700; }
.meta-list dd { margin: 0; }

.detail-hero { padding: clamp(4rem, 10vw, 8rem) 0 3.5rem; background: linear-gradient(120deg,#111,#2c2c2c 50%,#090909); border-bottom: 1px solid var(--line); }
.detail-hero .en { color: var(--red); font-family: 'Antonio', sans-serif; font-size: clamp(4rem,10vw,7rem); line-height: .9; }
.detail-hero h1 { margin: .7rem 0 0; font-size: clamp(1.8rem,4vw,3rem); }
.detail-hero p { max-width: 760px; color: #d2d2d2; }

.ai-traffic-figure, .road-inspection-figure, .sphere-robot-figure, .noncontact-figure { max-width: 1038px; margin: 0 auto 3rem; }
.ai-traffic-figure img, .road-inspection-figure img, .sphere-robot-figure img, .noncontact-figure img { width: 100%; height: auto; border: 1px solid rgba(255,255,255,.1); }
.ai-traffic-figure figcaption, .road-inspection-figure figcaption, .sphere-robot-figure figcaption, .noncontact-figure figcaption { margin-top: .5rem; color: #aaa; font-size: .85rem; text-align: right; }

.research-list { display: grid; gap: 1.2rem; }
.research-item { display: grid; grid-template-columns: 260px 1fr; gap: 1.6rem; background: #131313; border: 1px solid rgba(255,255,255,.08); }
.research-item__visual { min-height: 190px; background: linear-gradient(135deg,#3a3a3a,#090909); position: relative; }
.research-item__visual::after { position: absolute; inset: auto 1rem 1rem auto; color: var(--red); font-family: 'Antonio',sans-serif; letter-spacing:.12em; }
.research-item__body { padding: 1.5rem 1.6rem 1.5rem 0; }
.research-item__body h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.research-item__body p { color: #c8c8c8; }
.tag { display: inline-block; padding: .22rem .55rem; margin-right: .45rem; background: var(--red); border-radius: 2px; font-size: .78rem; font-weight: 700; }

.site-footer { background: #000; border-top: 1px solid rgba(255,255,255,.08); padding: 2.4rem 0; color: #a8a8a8; font-size: .86rem; text-align: center; }
.site-footer strong { color: #fff; }
.site-views { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; margin: 1rem 0 0; }

@media (max-width: 820px) {
  .site-nav { position: sticky; }
  .site-nav__inner { grid-template-columns: repeat(2,1fr); }
  .nav-link { min-height: 66px; }
  .feature-grid { grid-template-columns: 1fr; }
  .visual-break { background-attachment: scroll; }
  .info-columns { grid-template-columns: 1fr; gap: 2rem; }
  .research-item { grid-template-columns: 1fr; }
  .research-item__visual { min-height: 0; aspect-ratio: 16 / 9; }
  .research-item__visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .research-item__body { padding: 0 1.3rem 1.4rem; }
}

@media (max-width: 520px) {
  .nagata-bot { right: max(.75rem, env(safe-area-inset-right)); bottom: max(.75rem, env(safe-area-inset-bottom)); }
  .nagata-bot__button { width: 58px; height: 58px; }
  .nagata-bot__message { font-size: .82rem; }
  .section { padding: 2.75rem 0; }
  .section-title { margin-bottom: 1.5rem; }
  .section-title .en {
    font-size: clamp(1.3rem, 6.5vw, 2rem);
    line-height: 1.3;
  }
  .section-title .en.section-title__jp {
    font-size: clamp(1.3rem, 6vw, 1.5rem);
    line-height: 1.5;
  }
  main h2 { font-size: 1.2rem; line-height: 1.5; }
  .detail-hero { padding: 3.5rem 0 2.5rem; }
  .detail-hero .en { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .detail-hero h1 { font-size: 1.65rem; }
  .detail-hero p { margin-bottom: 0; }
  .feature-card__body { padding: 1.25rem 1.2rem 1.4rem; }
  .feature-card h3 { font-size: 1.2rem; }
  .feature-card__body .cta-row { padding-top: 1.5rem; }
  .btn { width: 100%; min-width: 0; min-height: 54px; }
  .cta-row { gap: .75rem; }
  .nav-link .ja { font-size: .78rem; }
  .meta-list div { grid-template-columns: 6rem 1fr; gap: .75rem; }
  .research-item__body h2 { font-size: 1.2rem; }
  .tag { margin-bottom: .35rem; }
  .site-footer { padding: 2rem 1rem; }
}
