/* 株式会社デバイスエージェンシー コーポレートサイト
   色はブランド（device-agency-brand）のみ。ここにない色を各ページで足さない。 */
:root {
  --blue: #2874fc;
  --blue-deep: #1e5fbe;
  --sky: #e8f1fb;
  --ink: #32373c;
  --red: #e60012;
  --white: #fff;
  --gray-50: #f5f5f5;
  --gray-100: #eee;
  --gray-600: #666;
  --font:
    "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    Meiryo, sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1160px;
  --section: clamp(48px, 5.5vw, 80px);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--blue-deep);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.03em;
}
p {
  margin: 0 0 1em;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  background: var(--white);
  padding: 8px 12px;
  z-index: 99;
}

/* ---------- ヘッダー ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--gray-100);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 60px;
  height: auto;
  flex: none;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
  white-space: nowrap;
}
.brand-name .en {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  color: #424242;
}
.brand-name .ja {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #8a96a8;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #555;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--blue);
}
.nav .btn {
  color: var(--white);
  border-bottom: 0;
  padding: 10px 22px;
}
.menu-btn {
  display: none;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 15px 34px;
  border-radius: 6px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  transition: opacity 0.3s;
}
.btn:hover {
  opacity: 0.8;
}
.btn.line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn.white {
  background: var(--white);
  color: var(--ink);
}

/* ---------- ヒーロー（写真が主役。ここだけ大きく攻める） ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 11fr 12fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: min(78vh, 680px);
}
.hero h1 {
  font-size: clamp(1.75rem, 0.8rem + 2.9vw, 3.25rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0;
}
.hero h1 span {
  display: block;
  white-space: nowrap;
}
.hero .lead {
  margin: 28px 0 36px;
  max-width: 30em;
  font-size: 1.0625rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-photo {
  position: relative;
  align-self: stretch;
  margin-right: calc(var(--gutter) * -1);
}
.hero-photo::before {
  content: "";
  position: absolute;
  left: -22px;
  bottom: -22px;
  width: 55%;
  height: 55%;
  background: var(--blue);
}
.hero-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: 82% 50%;
}
.hero-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px var(--gutter) 12px 16px;
  color: var(--white);
  font-size: 0.8125rem;
  text-align: right;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

/* ---------- セクション共通 ---------- */
.section {
  padding: var(--section) 0;
}
.section.tint {
  background: var(--gray-50);
}
.sec-head {
  max-width: 40em;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sec-head h2 {
  font-size: clamp(1.625rem, 1rem + 2vw, 2.375rem);
  font-weight: 900;
}
.sec-head p {
  margin: 22px 0 0;
  color: var(--gray-600);
}

/* ---------- 事業（見せ方は事業ごとに変える） ---------- */
.feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.feature img {
  width: 100%;
  aspect-ratio: 8/5;
  object-fit: cover;
}
.feature h3 {
  font-size: clamp(1.375rem, 1rem + 1.2vw, 1.875rem);
  font-weight: 900;
  margin-bottom: 16px;
}
.feature .items {
  margin: 20px 0 28px;
  border-top: 1px solid var(--gray-100);
}
.feature .items li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 700;
}
.feature .items li small {
  display: block;
  font-weight: 400;
  color: var(--gray-600);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(56px, 7vw, 96px);
}
.pair article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.pair img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.pair h3 {
  font-size: 1.375rem;
  font-weight: 900;
  margin-bottom: 10px;
}
.pair p {
  font-size: 0.9375rem;
}
.more {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
}

/* ---------- 進め方（順番のあるものだけ番号を付ける） ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: s;
  position: relative;
}
.flow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 2px;
  background: var(--blue);
}
.flow li {
  position: relative;
  padding: 64px 28px 0 0;
  counter-increment: s;
}
.flow li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
  font-size: 1.125rem;
  display: grid;
  place-items: center;
  line-height: 1;
}
.flow b {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 6px;
}
.flow span {
  font-size: 0.9375rem;
  color: var(--gray-600);
  display: block;
}

/* ---------- 写真が並ぶ事例 ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.mosaic figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
}
.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/2;
  transition: transform 0.6s;
}
.mosaic figure:hover img {
  transform: scale(1.04);
}
.mosaic figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 10px;
  color: var(--white);
  font-size: 0.875rem;
  line-height: 1.6;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}
.mosaic .w3 {
  grid-column: span 3;
}
.mosaic .w2 {
  grid-column: span 2;
}
.mosaic .w4 {
  grid-column: span 4;
}

/* ---------- 連絡帯 ---------- */
.contact-band {
  background: var(--blue-deep);
  color: var(--white);
  padding: clamp(56px, 7vw, 88px) 0;
}
.contact-band .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.contact-band h2 {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.125rem);
  font-weight: 900;
}
.contact-band p {
  margin: 12px 0 0;
}
.contact-band .tel {
  display: block;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 2.75rem);
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.contact-band .btn {
  margin-top: 10px;
}

/* ---------- 下層ページ ---------- */
.page-head {
  background: var(--sky);
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.page-head h1 {
  font-size: clamp(1.875rem, 1rem + 3vw, 3rem);
  font-weight: 900;
}
.page-head p {
  margin: 18px 0 0;
  max-width: 38em;
}
.crumb {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}
.crumb a {
  color: var(--gray-600);
}
dl.spec {
  display: grid;
  grid-template-columns: 11em 1fr;
  margin: 0;
  border-top: 2px solid var(--ink);
}
dl.spec dt,
dl.spec dd {
  margin: 0;
  padding: 20px 8px;
  border-bottom: 1px solid var(--gray-100);
}
dl.spec dt {
  font-weight: 700;
}
dl.spec ol {
  counter-reset: w;
}
dl.spec ol li {
  counter-increment: w;
  padding-left: 2.2em;
  position: relative;
  margin-bottom: 4px;
}
dl.spec ol li::before {
  content: counter(w) ".";
  position: absolute;
  left: 0;
  color: var(--gray-600);
}
.note {
  background: var(--sky);
  padding: 20px 24px;
  border-radius: 6px;
  font-size: 0.9375rem;
}
.red {
  color: var(--red);
}
.prose {
  max-width: 46em;
}
.prose h2 {
  font-size: 1.375rem;
  font-weight: 900;
  margin: 2.4em 0 0.8em;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--sky);
}
.prose h3 {
  font-size: 1.0625rem;
  margin: 1.6em 0 0.4em;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 1.6em;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  border: 1px solid #ccc;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--gray-50);
}
.prose ul {
  list-style: disc;
  padding-left: 1.4em;
  margin-bottom: 1em;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
}
.contact-grid > div {
  padding: 32px 28px 32px 0;
  border-bottom: 1px solid var(--gray-100);
}
.contact-grid b {
  display: block;
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.contact-grid .big {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.125rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  word-break: break-all;
}

/* ---------- フッター ---------- */
.site-foot {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 28px;
  font-size: 0.9375rem;
}
.site-foot a {
  color: var(--white);
}
.site-foot .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-foot .foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--white);
}
.site-foot .foot-brand .brand-mark {
  width: 54px;
}
.site-foot .foot-brand .en {
  font-size: 1.25rem;
  color: var(--white);
}
.site-foot .foot-brand .ja {
  color: rgba(255, 255, 255, 0.8);
  border-top-color: rgba(255, 255, 255, 0.45);
}
.site-foot h2 {
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.site-foot li {
  margin-bottom: 6px;
}
.site-foot address {
  font-style: normal;
  line-height: 1.9;
}
.site-foot small {
  display: block;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.75;
  font-size: 0.8125rem;
}

/* ---------- 表示アニメーション（最初の1回だけ・動きを減らす設定では止める） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-photo img {
    animation: reveal 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
  }
  @keyframes reveal {
    from {
      clip-path: inset(0 0 0 100%);
    }
  }
}

/* ---------- スマホ ---------- */
@media (max-width: 860px) {
  .menu-btn {
    display: block;
    background: none;
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 8px 14px;
    font: inherit;
    font-weight: 700;
    color: var(--ink);
  }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid var(--gray-100);
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav .btn {
    margin-top: 14px;
    text-align: center;
  }
  .brand-mark {
    width: 48px;
  }
  .brand-name .en {
    font-size: 1.1875rem;
  }
  .brand-name .ja {
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
  }
  .menu-btn {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .site-head .wrap {
    gap: 12px;
  }
  .hero h1 span {
    white-space: normal;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 0;
    gap: 36px;
  }
  .hero-photo {
    margin: 0 calc(var(--gutter) * -1);
  }
  .hero-photo::before {
    left: 0;
    width: 40%;
    bottom: -14px;
    height: 40%;
  }
  .hero-photo img {
    min-height: 0;
    aspect-ratio: 8/5;
  }
  .feature,
  .pair,
  .pair article {
    grid-template-columns: 1fr;
  }
  .pair img {
    aspect-ratio: 8/5;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .flow::before {
    left: 22px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }
  .flow li {
    padding: 0 0 32px 68px;
    min-height: 46px;
  }
  .mosaic {
    grid-template-columns: 1fr 1fr;
  }
  .mosaic .w2,
  .mosaic .w3,
  .mosaic .w4 {
    grid-column: span 2;
  }
  .contact-band .wrap {
    grid-template-columns: 1fr;
  }
  dl.spec {
    grid-template-columns: 1fr;
  }
  dl.spec dt {
    border-bottom: 0;
    padding-bottom: 0;
    color: var(--gray-600);
    font-size: 0.875rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .site-foot .cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---------- 下層ページの写真つき見出し ---------- */
.page-head.has-photo {
  padding-bottom: 0;
  overflow: hidden;
}
.page-head.has-photo .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.page-head.has-photo .wrap > div {
  padding-bottom: clamp(40px, 5vw, 64px);
  align-self: center;
}
.ph-photo {
  margin: 0 calc(var(--gutter) * -1) 0 0;
  align-self: stretch;
}
.ph-photo img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}
.contact-grid {
  grid-template-columns: 1.3fr 1.5fr 1fr;
  align-items: end;
}
.contact-grid .big {
  font-size: clamp(1.75rem, 1rem + 2.4vw, 2.75rem);
  color: var(--blue-deep);
}
.contact-grid .mid {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  word-break: break-all;
}
.map {
  width: 100%;
  height: 320px;
  border: 0;
  margin-top: 48px;
  background: var(--gray-100);
}
@media (max-width: 860px) {
  .page-head.has-photo .wrap {
    grid-template-columns: 1fr;
  }
  .page-head.has-photo .wrap > div {
    padding-bottom: 28px;
  }
  .ph-photo {
    margin: 0 calc(var(--gutter) * -1);
  }
  .ph-photo img {
    min-height: 0;
    aspect-ratio: 8/5;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 導入事例（1件目を大きく、残りは2列。カードの枠や影は付けない） ---------- */
.case-lead {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--gray-100);
}
.case-lead img,
.case-item img {
  width: 100%;
  aspect-ratio: 8/5;
  object-fit: cover;
}
.case-lead h2 {
  font-size: clamp(1.5rem, 1rem + 1.4vw, 2rem);
  font-weight: 900;
  margin-bottom: 14px;
}
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 64px) clamp(28px, 5vw, 64px);
  margin-top: clamp(48px, 6vw, 80px);
}
.case-item h3 {
  font-size: 1.25rem;
  font-weight: 900;
  margin: 20px 0 8px;
}
.case-meta {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 4px 12px;
  margin: 0 0 18px;
  font-size: 0.9375rem;
}
.case-meta dt {
  color: var(--gray-600);
}
.case-meta dd {
  margin: 0;
  font-weight: 700;
}

/* ---------- セクション見出し：広い画面では見出しと説明を左右に並べる ---------- */
@media (min-width: 861px) {
  .sec-head {
    max-width: none;
    display: grid;
    grid-template-columns: 1.15fr 1.7fr;
    gap: 48px;
    align-items: end;
  }
  .sec-head p {
    margin: 0;
  }
  dl.spec ol {
    columns: 2;
    column-gap: 40px;
  }
  dl.spec ol li {
    break-inside: avoid;
  }
}
@media (max-width: 860px) {
  .case-lead,
  .case-grid {
    grid-template-columns: 1fr;
  }
}

/* 再採点の指摘対応（手順の説明文を読みやすく） */
.flow span {
  color: var(--ink);
  font-size: 1rem;
}

/* 画像生成の写真には「イメージ写真」と必ず表示する */
figure.gen {
  margin: 0;
  position: relative;
}
figure.gen .img-note {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  font-size: 0.75rem;
  line-height: 1.6;
}
.feature figure.gen img {
  width: 100%;
  aspect-ratio: 8/5;
  object-fit: cover;
}
.pair figure.gen img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table {
  min-width: 560px;
}

/* 狭いスマホ（360px前後）でロゴ横の社名がメニューボタンに触れないように */
@media (max-width: 400px) {
  .brand {
    gap: 8px;
  }
  .brand-mark {
    width: 36px;
  }
  .brand-name .en {
    font-size: 0.9375rem;
  }
  .brand-name .ja {
    font-size: 0.5rem;
    letter-spacing: 0.04em;
  }
}
/* プライバシーポリシーの番号付きリストは番号を出す */
.prose ol {
  list-style: decimal;
  padding-left: 1.6em;
  margin-bottom: 1em;
}
.prose ol li {
  margin-bottom: 0.6em;
}
.policy-date {
  margin-top: 3em;
  color: var(--gray-600);
  font-size: 0.9375rem;
}
