.sanko-bento {
  --bento-fill: #f0f6fa;
  --bento-line: #d4e0e9;
  --bento-radius: 18px;
  --bento-section-gap: 24px;
  --bento-card-gap: 14px;
}
.bento-entry {
  display: grid;
  gap: var(--bento-card-gap);
  margin: 0 0 var(--bento-section-gap);
}
.bento-entry > a {
  border: 1px solid var(--bento-line);
  border-radius: var(--bento-radius);
  color: #173e61;
  background: var(--bento-fill);
  text-decoration: none;
}
.sanko-bento .site-content > .bento-entry { margin-block-end: var(--bento-section-gap); }
.bento-entry { grid-template-columns: 1.35fr 1fr; }
.bento-entry > a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 112px;
  gap: var(--bento-card-gap);
  padding: 18px 22px;
}
.bento-entry > a:first-child {
  grid-row: span 2;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  background: #e4eff7;
}
.bento-entry img { display: block; width: 100%; height: auto; }
.bento-entry strong { display: block; font-size: 1.18rem; line-height: 1.45; }
.bento-entry a:first-child strong { font-size: clamp(1.3rem, 2.4vw, 2rem); }
.bento-entry strong + span { display: block; font-size: .9rem; line-height: 1.6; margin-top: .25rem; }
.bento-entry > a:hover { background: #dcebf5; border-color: #285a86; }

.sanko-bento .site-content > section,
.sanko-bento .site-content > #recruit {
  margin: 0 0 var(--bento-section-gap);
  width: 100%;
  padding: clamp(20px, 4vw, 48px);
  background: #fff;
  border: 1px solid var(--bento-line);
  border-radius: var(--bento-radius);
  scroll-margin-top: 60px;
}
.sanko-bento .site-content > :is(#company, #contact, #jobs, #recruit, #questions) {
  background: var(--bento-fill);
}
.sanko-bento .site-content .business-list,
.sanko-bento .site-content .rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bento-card-gap);
  border: 0;
  margin-block-start: 22px;
}
.sanko-bento .site-content .business-list > .business-item,
.sanko-bento .site-content .rows > .row,
.sanko-bento .office-card,
.sanko-bento #questions details {
  display: block;
  margin: 0;
  padding: clamp(15px, 2vw, 25px);
  border: 1px solid var(--bento-line);
  border-radius: 14px;
  background: #fff;
}
.sanko-bento .business-item .business-art {
  display: block;
  width: min(100%, 170px);
  margin: 0 0 14px;
}
.sanko-bento .row .number { display: block; margin-bottom: 8px; }
.sanko-bento :is(#service, #work) .split { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sanko-bento #offices .office-grid { margin-block-start: 22px; gap: var(--bento-card-gap); }
.sanko-bento #questions details + details { margin-top: var(--bento-card-gap); }
.sanko-bento #questions summary { min-height: 32px; padding: 0; }
.sanko-bento .site-content .contact-phone { overflow-wrap: anywhere; }
.sanko-bento .site-content > #recruit .split { align-items: center; }

@media (max-width: 850px) {
  .sanko-bento .site-content .business-list,
  .sanko-bento .site-content .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sanko-bento { --bento-section-gap: 18px; --bento-card-gap: 10px; }
  .bento-entry { grid-template-columns: minmax(0, 1fr); }
  .bento-entry > a:first-child { grid-row: auto; min-height: 122px; }
  .bento-entry > a,
  .bento-entry > a:first-child { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .sanko-bento .site-content .business-list,
  .sanko-bento .site-content .rows { grid-template-columns: minmax(0, 1fr); }
  .sanko-bento .site-content > section { scroll-margin-top: 20px; }
}

/* The entry cards provide the links; keep the home hero focused on the copy. */
.sanko-bento.corporate-home .site-content > .hero h1 {
  font-size: clamp(2.15rem, 4.2vw, 4rem);
  line-height: 1.3;
  margin-block-end: clamp(14px, 1.6vw, 24px);
  text-wrap: balance;
}
.sanko-bento.corporate-home .site-content > .hero .lead {
  margin-block-end: 0;
}
@media (max-width: 600px) {
  .sanko-bento.corporate-home .site-content > .hero h1 {
    font-size: clamp(1.65rem, 8.4vw, 2.8rem);
  }
}

/* Use distinct tones for information and action cards. */
.sanko-bento {
  --bento-soft: #f5f9fc;
  --bento-blue: #e1eef7;
}
.bento-entry > a:last-child {
  background: var(--bento-soft);
}
.bento-entry > a:last-child:hover {
  background: var(--bento-blue);
}
.sanko-bento .site-content > :is(#related) {
  background: var(--bento-soft);
}
.sanko-bento .site-content > :is(#contact, #jobs, #recruit) {
  background: var(--bento-blue);
}
.sanko-bento .site-content #brochure .action {
  background: #285a86;
  color: #fff;
  max-width: 100%;
}
.sanko-bento .site-content #brochure .action:hover {
  background: #173e61;
}

@media (min-width: 851px) {
  .sanko-bento:is(.bento-company, .bento-company-en) .site-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--bento-section-gap);
  }
  .sanko-bento:is(.bento-company, .bento-company-en) .site-content > :not(#history, #brochure) {
    grid-column: 1 / -1;
  }
}

/* A section that contains cards serves as an unframed layout. */
.sanko-bento .site-content > :is(#business, #offices, #questions, section):has(:is(.business-list > .business-item, .rows > .row, .office-grid > .office-card, details)) {
  padding-inline: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sanko-bento .site-content :is(
    .bento-entry > a,
    .business-list > .business-item,
    .rows > .row,
    .office-grid > .office-card,
    #questions details,
    .site-content > section:not(:has(:is(.business-list > .business-item, .rows > .row, .office-grid > .office-card, details)))
  ) {
    transition: scale 180ms ease-out;
  }

  .sanko-bento .site-content :is(
    .bento-entry > a,
    .business-list > .business-item,
    .rows > .row,
    .office-grid > .office-card,
    #questions details,
    .site-content > section:not(:has(:is(.business-list > .business-item, .rows > .row, .office-grid > .office-card, details)))
  ):hover {
    scale: 1.01;
  }
}

/* Match the blue line drawings used in recruitment. */
.sanko-bento .site-content > #history { --heading-art: url("assets/heading-history.svg"); }
.sanko-bento .site-content > #brochure { --heading-art: url("assets/heading-brochure.svg"); }
.sanko-bento .site-content > #contact { --heading-art: url("assets/heading-contact.svg"); }
.sanko-bento .site-content > #offices { --heading-art: url("assets/heading-offices.svg"); }
.sanko-bento .site-content > #related { --heading-art: url("assets/heading-related.svg"); }
.sanko-bento .site-content > #recruit { --heading-art: url("assets/heading-recruit.svg"); }
.sanko-bento:is(.bento-recruit, .bento-recruit-en) #questions { --heading-art: url("assets/purpose-1.svg"); }
.sanko-bento:is(.bento-recruit, .bento-recruit-en) #voices { --heading-art: url("assets/purpose-2.svg"); }
.sanko-bento:is(.bento-recruit, .bento-recruit-en) #jobs { --heading-art: url("assets/purpose-3.svg"); }

.sanko-bento .site-content > :is(#history, #brochure, #contact, #offices, #related, #recruit) h2,
.sanko-bento:is(.bento-recruit, .bento-recruit-en) :is(#questions, #voices, #jobs) h2 {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
}

.sanko-bento .site-content > :is(#history, #brochure, #contact, #offices, #related, #recruit) h2::after,
.sanko-bento:is(.bento-recruit, .bento-recruit-en) :is(#questions, #voices, #jobs) h2::after {
  content: "";
  flex: 0 0 clamp(34px, 5vw, 64px);
  aspect-ratio: 90 / 75;
  background: var(--heading-art) center / contain no-repeat;
}

.sanko-bento :is(#service, #work) .rows > .row:nth-child(1) { --heading-art: url("assets/service-routine.svg"); }
.sanko-bento #service .rows > .row:nth-child(2) { --heading-art: url("assets/service-specialist.svg"); }
.sanko-bento :is(#service, #work) .rows > .row:nth-child(3) { --heading-art: url("assets/service-equipment.svg"); }

.sanko-bento :is(#service, #work) .row h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sanko-bento :is(#service, #work) .row h3::after {
  content: "";
  flex: 0 0 clamp(32px, 4vw, 52px);
  aspect-ratio: 6 / 5;
  background: var(--heading-art) center / contain no-repeat;
}

.sanko-bento #contact .heading-keep {
  white-space: nowrap;
}

.sanko-bento #work .rows > .row:nth-child(2) { --heading-art: url("assets/heading-work.svg"); }

/* Play a short sequence over the original illustration on the homepage. */
@media (prefers-reduced-motion: no-preference) {
  .sanko-bento .hero figure.approved-work-illustration {
    position: relative;
  }
  .sanko-bento .hero figure.approved-work-illustration.work-scene-playing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/work-scene-motion.svg") center / 100% 100% no-repeat;
    pointer-events: none;
  }
}

.work-scene-figure-motion {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

