/* E案 only (copied from D案's d.css): on top of style.css and ../b/b.css */

/* Phone menu and footer menu: image parts (01.SERVICE …) in place of the text */
.dnav-list a { display: block; line-height: 0; transition: opacity .2s; }
.dnav-list a:hover { opacity: .7; }
.dnav-list img { display: block; }
@media (max-width: 600px) {
  .dnav-list img { width: auto; height: 14px; }
  .dnav-list img[src*="-faq"] { height: 15.47px; } /* the FAQ part is 21px tall (Q tail) for the same 19px letters */
}

/* PC header menu: image parts (black, and white while the header is over a dark section) in place of the text.
   Not current: half opacity, as B案's text menu; hover / current: full */
.dnav a { line-height: 0; }
.dnav img { width: auto; height: 19px; }
.dnav a[href$="#faq"] img { height: 21px; margin-bottom: -2px; } /* Q tail below the line */
@media (max-width: 1600px) { /* B案's menu text goes 20px → 18px here */
  .dnav img { height: calc(19px * 18 / 20); }
  .dnav a[href$="#faq"] img { height: calc(21px * 18 / 20); margin-bottom: calc(-2px * 18 / 20); }
}

/* ---------- Header (Figma 794:6238): the ZENBU Robotics logo (292px wide at 1920) in place of the mark,
   and the menu right after it (114px on) instead of centered ----------
   Narrower screens shrink the logo and the space, and hide the menu below 1241px so it never runs into the
   language switch and button (B案 hides it below 1101px; the logo is wider than the mark) */
.header { grid-template-columns: auto auto 1fr; }
.header .header__zlogo { line-height: 0; }
.header .header__zlogo img { width: 292px; height: auto; }
.header .header__nav { margin-left: 74px; } /* + the 40px column gap = 114px */
@media (max-width: 1600px) {
  .header .header__zlogo img { width: 220px; }
  .header .header__nav { margin-left: 20px; }
}
@media (max-width: 1440px) {
  .header .header__zlogo img { width: 180px; }
  .header .header__nav { margin-left: 16px; } /* the column gap is 24px here (style.css) */
}
@media (max-width: 1240px) {
  .header { grid-template-columns: 1fr auto; }
  .header .header__nav { display: none; }
}
@media (max-width: 600px) {
  .header .header__zlogo img { width: 160px; }
}

/* Header: まずは資料請求 (white with a dark grey line; white line over dark sections), 12px from 相談する.
   Hidden on phones with the rest of the header's buttons */
.header .btn--outline { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 2px var(--c-text); transition: opacity .2s; }
.header.is-dark .btn--outline { color: var(--c-white); box-shadow: inset 0 0 0 2px var(--c-white); }
.header .btn--outline:hover { opacity: .7; }
.header__download { margin-right: -28px; } /* + the 40px gap = 12px */
@media (max-width: 1440px) { .header__download { margin-right: -12px; } } /* the gap is 24px here */
@media (max-width: 600px) { .header .header__download { display: none; } }

/* Footer: まずは資料請求 beside 相談する (12px apart). On phones both are in the bar at the bottom of the screen instead */
.dfoot__download { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 2px var(--c-text); transition: opacity .2s; }
.dfoot__download:hover { opacity: .7; }
.footer .dfoot__btn { margin-right: -28px; } /* + the 40px gap = 12px */
@media (max-width: 600px) { .footer .dfoot__download { display: none; } }

/* Phone bar at the bottom of the screen: まずは資料請求 (white with a dark grey line) + 相談する, side by side */
.spbar .btn--outline { background: var(--c-white); color: var(--c-text); box-shadow: inset 0 0 0 2px var(--c-text); }

/* The X (SNS) icon was removed (2026-11-22). Its row keeps the icon's 24px height so the parts below stay where they were:
   the phone menu's privacy link row, and the phone footer's language switch row */
.spmenu__row { min-height: 24px; }
@media (max-width: 600px) { .footer .footer__actions { min-height: 24px; } }

/* ---------- ZENBU Robotics logo (assets/e/logo-zenbu*.svg) in place of BAKERU Robotics' mark + logotype ----------
   One image each, as wide as the old logo's height × 412 / 48 (the hero in Figma 794:6273: 48px → 412px);
   these beat the old two-image rules (img:first-child / :last-child, style.css and b.css) */
.bsvc .about__logo img.zlogo, .cta__logo img.zlogo { width: 412px; height: auto; }
.footer__logo > img.zlogo, .footer__logo > svg.zlogo { width: min(928px, 70vw); height: auto; } /* as tall as the old footer logo (121px); svg: reveal.js turns it into lines to draw */
.footer__mini-logo img.zlogo { width: 206px; height: auto; }
.spmenu__logo img.zlogo { width: 240px; height: auto; }
@media (max-width: 600px) {
  .bsvc .about__logo img.zlogo { width: 280px; }
  .cta__logo img.zlogo { width: 280px; }
  .footer__logo > .zlogo.zlogo { display: none; }
  .footer__logo > .zlogo.footer__logo-sp { display: block; width: 280px; }
  .footer__mini-logo img.zlogo { display: none; }
  .footer__mini-logo img.zlogo.footer__mini-logo-sp { display: block; }
}

/* SERVICE: the tagline under the logo is an image part (assets/e/svc-tagline.svg) in place of the text;
   on phones it keeps its size next to the logo (357 / 412 of the logo's 280px) */
.bsvc__tagline { line-height: 0; }
.bsvc__tagline img { display: block; width: 357px; max-width: 100%; height: auto; }
@media (max-width: 600px) { .bsvc__tagline img { width: 243px; } }

/* NEWS cards: the photo frame keeps the photos' 16:9 at any card width (style.css fixes it at 225px tall,
   which is 16:9 only on the 400px PC card; narrower phone cards cut off its sides) */
.card__ph { height: auto; aspect-ratio: 16 / 9; }
/* the title: 3 lines at most, the last one ending in "…" when it runs longer (as the summary on phones, style.css) */
.card__ttl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* Section titles: the word only (assets/e/ttl-*.svg, no parts at its sides), drawn as a line by e.js */
.ttl__draw { display: block; overflow: visible; }

/* ---------- Hero (Figma 786:8350, 1920 × 1080) ----------
   --u is 1px up to 1920px wide; wider screens grow the hero with the width (16:9, as .kv in style.css),
   so every size and position here scales with it */
.dkv { --u: 1px; background: var(--c-white); }
@media (min-width: 1921px) { .dkv { --u: calc(100vw / 1920); } }

/* Background lettering: two marquees. Each track holds the word twice (word + gap each) and moves by one of them,
   so the loop is seamless. BAKERU runs left to right, ROBOTICS right to left */
.dkv__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dkv__row { position: absolute; left: calc(-33 * var(--u)); }
.dkv__row--ltr { top: calc(128 * var(--u)); }
.dkv__row--rtl { top: calc(694 * var(--u)); }
.dkv__track { display: flex; width: max-content; will-change: transform; }
.dkv__track img { display: block; width: auto; margin-right: calc(160 * var(--u)); }
.dkv__row--ltr img { height: calc(558 * var(--u)); } /* ZENBU (assets/e/kv-zenbu.svg) at its own size */
.dkv__row--rtl img { height: calc(396 * var(--u)); }
.dkv__row--ltr .dkv__track { animation: dkv-ltr 40s linear infinite; }
.dkv__row--rtl .dkv__track { animation: dkv-rtl 40s linear infinite; }
@keyframes dkv-ltr { from { transform: translateX(-50%); } to { transform: none; } }
@keyframes dkv-rtl { from { transform: none; } to { transform: translateX(-50%); } }

/* Handwritten copy, centred */
.dkv__ttl { position: absolute; left: 50%; top: calc(158 * var(--u)); width: min(calc(1014 * var(--u)), calc(100% - 80px)); margin: 0; transform: translateX(-50%); }
.dkv__ttl img { display: block; width: 100%; height: auto; }

/* Lead, まずは資料請求 (red, in place of the logo) and arrows, 80px from the bottom */
.dkv__foot { position: absolute; left: 50%; bottom: calc(80 * var(--u)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: calc(24 * var(--u)); width: max-content; }
.dkv__download { transition: opacity .2s; }
.dkv__download:hover { opacity: .7; }
.dkv__lead { margin: 0; font-size: calc(20 * var(--u)); line-height: 1.5; color: var(--c-text); text-align: center; }
.dkv__arrows img { width: calc(20 * var(--u)); height: auto; }

/* Entrance: the copy writes itself (the animation is inside kv-copy-anim.svg, made by tools/build-kv-handwriting.py);
   the button, lead and arrows rise in meanwhile (as the other heroes) */
.dkv__download, .dkv__lead, .dkv__arrows { animation: rise-in .9s cubic-bezier(.2, .7, .2, 1) backwards; }
.dkv__lead { animation-delay: .4s; }
.dkv__download { animation-delay: .5s; }
.dkv__arrows { animation-delay: .7s; }
@media (prefers-reduced-motion: reduce) {
  .dkv__track, .dkv__download, .dkv__lead, .dkv__arrows { animation: none; }
}

/* Phone: smaller lettering and copy, the logo block near the bottom of the screen */
@media (max-width: 600px) {
  .dkv__row--ltr { top: 12%; }
  .dkv__row--rtl { top: 44%; }
  .dkv__row--ltr img { height: 215px; }
  .dkv__row--rtl img { height: 153px; }
  .dkv__track img { margin-right: 60px; }
  .dkv__row--ltr .dkv__track, .dkv__row--rtl .dkv__track { animation-duration: 16s; } /* about the same speed on screen as on PC */
  .dkv__ttl { top: calc(18% + 40px); width: calc(100% - 32px); }
  html:lang(ja) .dkv__ttl { top: calc(18% + 80px); } /* the Japanese copy sits 40px lower */
  .dkv__foot { bottom: 104px; gap: 16px; } /* clear of the fixed consult bar at the bottom of the screen */
  .dkv__download { font-size: 16px; }
  .dkv__lead { font-size: 14px; }
}

/* ---------- Footer (Figma 786:8865): white, dark parts, the hero's lettering and handwritten copy behind ---------- */
.footer { background: var(--c-white); color: var(--c-text); }
.footer__logo { color: var(--c-text); } /* the line that draws the logo (stroke: currentColor in style.css) is dark grey on white */
.dfoot__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* the lettering runs as in the hero: BAKERU left to right, ROBOTICS right to left (keyframes dkv-ltr / dkv-rtl) */
.dfoot__row { position: absolute; left: -33px; }
.dfoot__row--ltr { top: 128px; }
.dfoot__row--rtl { top: 694px; }
.dfoot__row img { display: block; width: auto; max-width: none; margin-right: 160px; }
.dfoot__row--ltr img { height: 558px; }
.dfoot__row--rtl img { height: 396px; }
.dfoot__row--ltr .dkv__track { animation: dkv-ltr 40s linear infinite; }
.dfoot__row--rtl .dkv__track { animation: dkv-rtl 40s linear infinite; }
@media (prefers-reduced-motion: reduce) { .dfoot__row .dkv__track { animation: none; } }
.dfoot__copy { position: absolute; left: 50%; top: 342px; width: min(1014px, calc(100% - 80px)); height: auto; transform: translateX(-50%); pointer-events: none; }
/* menu: one column, 80px from the left; the privacy link 40px under it */
.footer .footer__nav { top: 416px; gap: 32px; }
.footer .footer__privacy { top: 730px; bottom: auto; } /* 416 + 6 rows (19px) + 5 gaps (32px) + 40 (VISIT removed in E案) */
.footer__privacy::before { content: "・"; }
.dfoot__privacy { display: none; transition: opacity .2s; } /* phone only: the privacy link in the row of the language switch */
.dfoot__privacy:hover { opacity: .7; }
.footer .footer__nav .dfoot__navprivacy { display: none; } /* phone only: the privacy link as the last row of the menu (beats .dnav-list a) */
.dfoot__navprivacy::before { content: "・"; }
.dfoot__btn { color: var(--c-white); }
.footer__bar { color: var(--c-text); }

@media (max-width: 600px) {
  .footer > div.dfoot__bg.dfoot__bg { position: absolute; inset: 0; } /* beats style.css: .footer > *:not(…):not(…) */
  .dfoot__row { left: -12px; }
  .dfoot__row--ltr { top: 12%; }
  .dfoot__row--rtl { top: 44%; }
  .dfoot__row--ltr img { height: 215px; }
  .dfoot__row--rtl img { height: 153px; }
  .dfoot__row img { margin-right: 60px; }
  .dfoot__row .dkv__track { animation-duration: 16s; }
  .footer > .dfoot__copy { align-self: center; width: 100%; margin: 40px 0; } /* 40px clear of the tagline above */
  /* the menu at 144% (120% twice: parts 14px → 20.16px tall, the gaps 24px → 34.56px); the phone slide menu keeps its size */
  .footer .footer__nav { gap: calc(24px * 1.44); }
  .footer .footer__nav img { height: calc(14px * 1.44); }
  .footer .footer__nav img[src*="-faq"] { height: calc(15.47px * 1.44); }
  /* the BAKERU / DeNA logos at 120% (24px → 28.8px tall, the gap 32px → 38.4px) and 40px higher than before
     (54px → 14px below the language row); the space under them takes up the difference, so the rest stays where it was */
  .footer .footer__group { gap: calc(32px * 1.2); margin-top: calc(54px - 40px + 32px); margin-bottom: calc(12px + 40px - 24px * .2 - 8px); } /* + 32px: the language row above moved up */
  /* the ZENBU Robotics logo, operator and copyright 8px higher (the space above them - 8px, below them + 8px: style.css 12px),
     so the note band under the footer stays where it was */
  .footer .footer__bar { padding-bottom: calc(12px + 8px); }
  .footer .footer__group img { height: calc(24px * 1.2); }
  .footer .footer__privacy { top: auto; }
  .footer__privacy::before { content: none; }
  /* no consult button here (the bar at the bottom of the screen has it); the privacy link takes its place beside the language switch */
  .footer .dfoot__btn, .footer > .footer__privacy { display: none; }
  /* the privacy link right under the menu, on its left edge, with "・" (as on PC), not in the row of the language switch */
  .footer .footer__nav .dfoot__navprivacy { display: block; grid-column: 1 / -1; font-size: 16px; line-height: 1; }
  /* the language switch and X, centred under it, 32px higher than style.css puts them (34px → 2px above);
     the logos below keep their place (see .footer__group) */
  .footer .footer__actions { justify-content: center; margin-top: calc(34px - 32px); }
  /* the language switch 19.2px tall (80% of the X icon's 24px; its parts are 13px, the current one 14px), gaps scaled with it */
  .footer .footer__actions .lang { gap: calc(4px * 19.2 / 13); }
  .footer .footer__actions .lang img { width: auto; height: 19.2px; }
  .footer .footer__actions .lang .swap__active { height: calc(14px * 19.2 / 13); left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
/* the footer's handwritten copy in the page language (English is also shown for Chinese where a page has no Chinese) */
.dfoot__copy--en, .dfoot__copy--zh,
html:lang(en) .dfoot__copy--ja, html:lang(zh-Hans) .dfoot__copy--ja { display: none; }
html:lang(en) .dfoot__copy--en, html:lang(zh-Hans) .dfoot__copy--zh { display: block; }

/* Buttons: all of them (相談する and the rest, dark grey or white) are BAKERU red in E案, also on the header over dark sections */
:root { --c-red: #ff4000; }
.btn--dark, .header .btn--dark, .header.is-dark .btn--dark, .btn--light { background: var(--c-red); color: var(--c-white); } /* the white ones on the dark bands too */
.dfoot__btn { background: var(--c-red); }
