/* Interaction styles preserve the PDF's initial mobile composition. */
html { scroll-padding-top: 96px; }
:focus-visible { outline: 3px solid #c80655; outline-offset: 5px; }
.header .nav_toggle { cursor: pointer; flex-shrink: 0; }
.header .header-menu.show { pointer-events: auto; }
.header .nav_toggle::before { content: ''; position: absolute; inset: -10px -5px; }
body.menu-open { overflow: hidden; }
.footer a:hover, .ebisu-qa a:hover { text-decoration: underline; }
.top-page .top-banner { padding: 40px 5%; }
.inquiry-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  min-height: 240px;
  margin: 0 auto;
  padding: 34px 28px;
  color: #fff;
  background: #1e297f;
  text-align: center;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 180ms ease;
}
.inquiry-banner-title { font-size: clamp(30px, 3.2vw, 44px); font-weight: 700; }
.inquiry-banner-copy { margin-top: 8px; font-size: clamp(22px, 2.1vw, 28px); }
.inquiry-banner-title > span, .inquiry-banner-copy > span { display: inline-block; }
.inquiry-banner-action {
  margin-top: 22px;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
@media (hover: hover) { .inquiry-banner:hover { background: #142063; } }
@media (max-width: 600px) {
  .top-page .top-banner { padding: 28px 5%; }
  .inquiry-banner { min-height: 210px; padding: 28px 16px; }
  .inquiry-banner-title { font-size: clamp(22px, 6.2vw, 28px); }
  .inquiry-banner-copy { font-size: clamp(17px, 4.8vw, 21px); }
  .inquiry-banner-action { margin-top: 18px; font-size: 16px; }
}
.ebisu-form-section input, .ebisu-form-section textarea { scroll-margin-top: 110px; }
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 28px; border: 1px solid #d4e2f2; color: #1e297f; background: #fff; font: 16px/1.8 sans-serif; }
dialog::backdrop { background: #131a48b3; }
dialog h2 { font-size: 24px; margin-bottom: 16px; }
dialog pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; padding: 16px; background: #f2f6fd; }
.review-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.review-actions a, .review-actions button { display: inline-block; padding: 10px 16px; border: 1px solid #1e297f; cursor: pointer; }
.primary-action { background: #1e297f; color: #fff; }
#mail-status { margin: 10px 0; }
@media (min-width: 601px) and (max-width: 1100px) {
  .header { padding-right: 5%; }
  .header .nav .nav-item { padding: 0 10px; }
}
@media (max-width: 360px) {
  .header .header-wrapper .logo-link .img { width: 48px; }
  .header .header-wrapper .logo-link .span { padding: 14px 10px; font-size: 1.8rem; }
  .top-page .view .h2 { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Progressive enhancement: content stays visible unless the observer is ready. */
html body .scroll-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: opacity 700ms cubic-bezier(.22, 1, .36, 1), transform 700ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
html body .scroll-reveal.is-reveal-pending {
  opacity: 0 !important;
  transform: translate3d(0, 22px, 0) !important;
  transition: none;
  pointer-events: none;
}
html body .scroll-reveal.reveal-immediate,
html body .scroll-reveal:focus-within {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  html body .scroll-reveal,
  html body .scroll-reveal.is-reveal-pending {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    pointer-events: auto;
  }
}
@media print {
  html body .scroll-reveal,
  html body .scroll-reveal.is-reveal-pending {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* The fixed photo layer is clipped to the FV, never to the rest of the page. */
.top-page .view {
  --hero-height: clamp(540px, 84svh, 820px);
  height: var(--hero-height);
  clip-path: inset(0);
  isolation: isolate;
  z-index: 0;
  background: #1e297f;
}
.top-page .view .h2 {
  top: 27%;
  left: 5%;
  max-width: 90%;
  transform: none;
  font-size: clamp(40px, 4.2vw, 64px);
}
.top-page .view .h2 .copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .015em;
}
.top-page .view .copy-line {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: .03em .25em .07em;
  background: #1e297f;
  white-space: nowrap;
}
.hero-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--hero-height);
  z-index: 0;
  pointer-events: none;
}
.hero-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1000ms ease-in-out;
}
.hero-frame.is-active { opacity: 1; }
.hero-frame:first-child { object-position: center 65%; }
.hero-controls {
  position: absolute;
  bottom: 5%;
  left: 5%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border: 1px solid #ffffff60;
  border-radius: 30px;
  color: #fff;
  background: #11194bbf;
}
.hero-controls[hidden], .hero-controls [hidden] { display: none; }
.hero-controls button { cursor: pointer; min-height: 36px; }
.hero-dot { display: grid; place-items: center; width: 34px; }
.hero-dot span { width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; }
.hero-dot[aria-pressed="true"] span { background: #fff; }
.hero-pause { padding: 0 10px; margin-left: 5px; border-left: 1px solid #ffffff60; font-size: 14px; }
.hero-controls :focus-visible { outline-color: #fff; outline-offset: 0; border-radius: 18px; }
@media (max-width: 600px) {
  .top-page .view { --hero-height: clamp(500px, 78svh, 680px); }
  .top-page .view .h2 {
    top: 128px;
    font-size: clamp(28px, 8.4vw, 36px);
  }
  .top-page .view .h2 .copy { gap: 8px; line-height: 1.45; }
  .top-page .view .copy-line:first-child { display: contents; }
  .top-page .view .copy-phrase {
    display: block;
    padding: .03em .25em .07em;
    background: #1e297f;
    white-space: nowrap;
  }
  .hero-frame:first-child { object-position: center; }
}
@media (min-width: 601px) and (max-height: 600px) {
  .top-page .view { --hero-height: max(380px, 100svh); }
  .top-page .view .h2 { top: 110px; font-size: clamp(34px, 4.2vw, 48px); }
}
@media (prefers-reduced-motion: reduce) { .hero-frame { transition: none; } }
@media print {
  .hero-backdrop { position: absolute; }
  .hero-controls { display: none; }
}

/* Keep bilingual headings and short labels together as the available width changes. */
body { font-size: 16px; line-break: strict; }
.ebisu-appended, .ebisu-form-section { font-size: 16px; }
.area-title { font-size: clamp(32px, 4.2vw, 40px); }
.area-title > p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  line-height: 1.4;
}
.area-title-en { display: block; width: max-content; max-width: 100%; text-wrap: balance; }
.area-title .span {
  display: block;
  margin-left: 0;
  font-size: 16px;
  line-height: 1.7;
  width: max-content;
  max-width: 100%;
}
.area-title::after { margin-top: 14px; background-color: currentColor; }
.phrase { display: inline-block; width: max-content; max-width: 100%; }
.content p { text-wrap: pretty; }
.top-page .about-area .copy { font-size: clamp(21px, 2.4vw, 30px); }
.top-page .point-area .text-area .title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 16px;
}
.top-page .point-area .text-area .title::after { flex-basis: 100%; }
.top-page .point-area .text-area .span { margin-left: 0; white-space: nowrap; }
.top-page .design { font-size: clamp(56px, 14vw, 120px); }
.top-page .service-area .top-service .wrapper { width: min(435px, calc(100% - 48px)); }
.top-page .service-area .top-service .name {
  font-size: clamp(24px, 2.6vw, 35px);
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}
.top-news .list-link {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 40px;
  gap: 24px;
  align-items: center;
}
.top-news .category { width: max-content; margin-right: 0; white-space: nowrap; }
.top-news .day:empty { display: none; }
.top-news .title { min-width: 0; overflow-wrap: anywhere; }
.ebisu-service-detail h4, .ebisu-faq-category, .ebisu-qa h4 { text-wrap: balance; }
.ebisu-service-detail p, .ebisu-qa p { max-width: 52em; }
.ebisu-greeting .content { max-width: 48em; }
.ebisu-greeting .content p + p { margin-top: 1.25em; }
.contact-area .content { padding: clamp(40px, 6vw, 80px) clamp(20px, 6vw, 80px); }
.contact-area .text { margin-top: 20px; font-size: clamp(20px, 2.1vw, 24px); }
.contact-area .flex-wrap { display: flex; flex-wrap: wrap; gap: 28px 32px; }
.contact-area .tel { flex: 1 1 300px; font-size: clamp(26px, 3.8vw, 40px); text-align: center; }
.contact-area .tel-main { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; max-width: 100%; gap: 12px; }
.contact-area .tel .tel-icon { flex-shrink: 0; width: 1em; margin-right: 0; }
.contact-area .tel .span { font-size: 16px; }
.contact-area .form { flex: 1 1 250px; width: auto; margin: 0; }
.contact-area .form .link-btn { margin: 0; padding: 18px 32px; font-size: 16px; line-height: 1.6; }
.contact-area .form .link-btn::after { right: 16px; }
.ebisu-form-section label { font-size: 16px; }
.ebisu-form-section input, .ebisu-form-section textarea { font-size: 16px; }
.footer .flex-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px 40px; }
.footer .main { flex: 1 1 320px; margin-right: 0; }
.footer .sub { flex: 1 1 240px; margin-top: 0; }
.footer a, dialog { overflow-wrap: anywhere; }
.header .nav .nav-link { white-space: nowrap; line-height: 1.5; }
@media (max-width: 900px) {
  .top-page .about-area .content > .flex-wrap,
  .top-page .point-area .point-content { display: block; }
  .top-page .about-area .copy, .top-page .about-area .text,
  .top-page .point-area .img-area, .top-page .point-area .text-area { width: 100%; }
  .top-page .about-area .text { margin-top: 26px; }
  .top-page .point-area .text-area { margin-top: 64px; }
}
@media (max-width: 830px) {
  .header .header-wrapper .header-menu { height: 100dvh; padding: 100px 5% 24px; }
  .header .header-menu-inner { width: 100%; max-height: 100%; overflow-y: auto; }
  .header .nav .nav-item { padding: 4px 16px; }
  .header .nav .nav-link { padding: 12px 10px; font-size: 18px; }
}
@media (max-width: 600px) {
  .area-title > p { flex-direction: column; align-items: flex-start; }
  .top-news .list-link { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
