/* FDE service-site home: this intentionally replaces the corporate-home
 * treatment with the standalone fde.mi-asahi.co.jp visual system. */
:root {
  --ma-fde-ink: #082958;
  --ma-fde-blue: #1769e8;
  --ma-fde-line: #d7e0ed;
  --ma-fde-mist: #f7faff;
  --ma-fde-shell: min(1180px, calc(100% - 64px));
  --ma-fde-ease: cubic-bezier(.2, .8, .2, 1);
}

.ma-fde-site-shell { width: var(--ma-fde-shell); margin-inline: auto; }

.ma-fde-site-header {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid rgba(8, 41, 88, .09);
  background: rgba(255, 255, 255, .96);
}

.ma-fde-site-header__inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ma-fde-site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--ma-fde-ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 2rem;
  font-weight: 820;
  letter-spacing: -.055em;
  line-height: 1;
  text-decoration: none;
}

.ma-fde-site-brand b { color: var(--ma-fde-blue); }
.ma-fde-site-menu { display: none; margin-left: auto; }
.ma-fde-site-menu > summary { display: none; }

.ma-fde-site-nav {
  display: flex;
  align-items: center;
  gap: 23px;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -.02em;
}

.ma-fde-site-nav > a:not(.ma-fde-site-nav__cta) {
  position: relative;
  padding: 29px 0;
  color: var(--ma-fde-ink);
  text-decoration: none;
}

.ma-fde-site-nav > a:not(.ma-fde-site-nav__cta)::after {
  position: absolute;
  bottom: 17px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ma-fde-blue);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scale(.5);
  transition: opacity .2s var(--ma-fde-ease), transform .2s var(--ma-fde-ease);
}

.ma-fde-site-nav > a:not(.ma-fde-site-nav__cta):hover::after,
.ma-fde-site-nav > a:not(.ma-fde-site-nav__cta):focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.ma-fde-site-nav__corporate { color: #566781 !important; }

.ma-fde-site-nav__cta,
.ma-fde-service-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 18px;
  border: 1px solid var(--ma-fde-blue);
  border-radius: 7px;
  color: #fff;
  background: var(--ma-fde-blue);
  box-shadow: 0 12px 25px rgba(23, 105, 232, .18);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform .22s var(--ma-fde-ease), background .22s var(--ma-fde-ease), box-shadow .22s var(--ma-fde-ease);
}

.ma-fde-site-nav__cta:hover,
.ma-fde-site-nav__cta:focus-visible,
.ma-fde-service-button:hover,
.ma-fde-service-button:focus-visible {
  color: #fff;
  background: #0a55c8;
  box-shadow: 0 15px 28px rgba(23, 105, 232, .27);
  transform: translateY(-2px);
}

.ma-fde-site-nav__cta:active,
.ma-fde-service-button:active { transform: scale(.98); }

.ma-fde-service-home { width: 100%; max-width: none; }
.ma-fde-service-home .ma-fde-service-hero {
  position: relative;
  overflow: hidden;
  min-height: min(820px, calc(100dvh - 82px));
  padding: 82px 0 104px;
  background: var(--ma-fde-mist);
}

.ma-fde-service-home .ma-fde-service-hero::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(8, 41, 88, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(8, 41, 88, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  -webkit-mask-image: linear-gradient(90deg, #000 0 58%, transparent 92%);
  mask-image: linear-gradient(90deg, #000 0 58%, transparent 92%);
}

.ma-fde-service-hero__grid {
  position: relative;
  display: grid;
  min-height: 570px;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .74fr);
  gap: 48px;
  align-items: center;
}

.ma-fde-service-hero__copy,
.ma-fde-service-map { animation: ma-fde-service-enter .72s var(--ma-fde-ease) both; }
.ma-fde-service-map { animation-delay: .13s; }

.ma-fde-service-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 23px;
  color: var(--ma-fde-blue);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ma-fde-service-eyebrow::before { width: 34px; height: 1px; background: currentColor; content: ""; }

.ma-fde-service-home .ma-fde-service-hero h1 {
  max-width: 760px;
  margin: 0 0 31px;
  color: var(--ma-fde-ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: clamp(5.4rem, 5.65vw, 7.8rem);
  font-weight: 790;
  letter-spacing: -.075em;
  line-height: 1.08;
  text-wrap: nowrap;
}

.ma-fde-service-home .ma-fde-service-hero h1 span { color: var(--ma-fde-blue); }

.ma-fde-service-hero__lead {
  max-width: 690px;
  margin: 0 0 38px;
  color: #435570;
  font-size: 2rem;
  letter-spacing: -.015em;
  line-height: 1.85;
}

.ma-fde-service-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 23px; }
.ma-fde-service-button { min-height: 52px; padding-inline: 23px; font-size: 1.4rem; }

.ma-fde-service-text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ma-fde-blue);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
}

.ma-fde-service-text-link span { transition: transform .2s var(--ma-fde-ease); }
.ma-fde-service-text-link:hover span,
.ma-fde-service-text-link:focus-visible span { transform: translateY(4px); }

.ma-fde-service-map {
  position: relative;
  min-height: 482px;
  padding: 34px;
  border: 1px solid rgba(23, 105, 232, .22);
  border-radius: 13px;
  color: #dcedff;
  background: var(--ma-fde-ink);
  box-shadow: 20px 22px 0 rgba(23, 105, 232, .13);
}

.ma-fde-service-map::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
}

.ma-fde-service-map > * { position: relative; }
.ma-fde-service-map > p { margin: 0 0 70px; color: #a6d7ff; font-size: 1.1rem; font-weight: 800; letter-spacing: .12em; line-height: 1.5; }
.ma-fde-service-map ol { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ma-fde-service-map li { display: grid; min-height: 63px; grid-template-columns: 48px 1fr; gap: 13px; align-items: center; padding: 12px 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.055); font-size: 1.5rem; font-weight: 720; }
.ma-fde-service-map li:nth-child(1) { animation: ma-fde-service-enter .52s .3s var(--ma-fde-ease) both; }
.ma-fde-service-map li:nth-child(2) { animation: ma-fde-service-enter .52s .38s var(--ma-fde-ease) both; }
.ma-fde-service-map li:nth-child(3) { animation: ma-fde-service-enter .52s .46s var(--ma-fde-ease) both; }
.ma-fde-service-map li:nth-child(4) { animation: ma-fde-service-enter .52s .54s var(--ma-fde-ease) both; }
.ma-fde-service-map b { color: #79daf4; font-size: 1.1rem; letter-spacing: .08em; }

.ma-fde-service-proof { border-block: 1px solid var(--ma-fde-line); background: #fff; }
.ma-fde-service-proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.ma-fde-service-proof p { display: grid; min-height: 111px; grid-template-columns: 35px 1fr; gap: 13px; align-items: center; margin: 0; padding: 20px 26px; border-right: 1px solid var(--ma-fde-line); color: var(--ma-fde-ink); font-size: 1.4rem; font-weight: 720; line-height: 1.55; }
.ma-fde-service-proof p:first-child { border-left: 1px solid var(--ma-fde-line); }
.ma-fde-service-proof b { color: var(--ma-fde-blue); font-size: 1.2rem; letter-spacing: .08em; }

@keyframes ma-fde-service-enter {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (max-width: 1120px) {
  :root { --ma-fde-shell: min(100% - 48px, 940px); }
  .ma-fde-site-nav { gap: 15px; }
  .ma-fde-site-nav__corporate { display: none; }
  .ma-fde-service-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr); gap: 43px; }
  .ma-fde-service-map { min-height: 423px; }
  .ma-fde-service-home .ma-fde-service-hero h1 { font-size: clamp(4.8rem, 5.45vw, 6.5rem); }
  .ma-fde-service-hero__lead { font-size: 1.75rem; }
}

@media (max-width: 780px) {
  :root { --ma-fde-shell: calc(100% - 40px); }
  .ma-fde-site-header__inner { min-height: 68px; }
  .ma-fde-site-brand { font-size: 1.8rem; }
  .ma-fde-site-nav--desktop { display: none; }
  .ma-fde-site-menu { display: block; }
  .ma-fde-site-menu > summary { display: grid; width: 44px; height: 42px; place-content: center; cursor: pointer; list-style: none; }
  .ma-fde-site-menu > summary::-webkit-details-marker { display: none; }
  .ma-fde-site-menu > summary::before,
  .ma-fde-site-menu > summary::after { display: block; width: 23px; height: 2px; background: var(--ma-fde-ink); content: ""; transition: transform .2s var(--ma-fde-ease); }
  .ma-fde-site-menu > summary::after { margin-top: 7px; }
  .ma-fde-site-menu[open] > summary::before { transform: translateY(4px) rotate(45deg); }
  .ma-fde-site-menu[open] > summary::after { transform: translateY(-5px) rotate(-45deg); }
  .ma-fde-site-menu:not([open]) .ma-fde-site-nav { display: none; }
  .ma-fde-site-nav { position: absolute; top: 68px; right: 0; left: 0; display: grid; gap: 0; padding: 14px 20px 22px; border-bottom: 1px solid var(--ma-fde-line); background: rgba(255,255,255,.99); }
  .ma-fde-site-nav > a:not(.ma-fde-site-nav__cta) { padding: 12px 0; border-bottom: 1px solid #e8eef6; }
  .ma-fde-site-nav > a:not(.ma-fde-site-nav__cta)::after { display: none; }
  .ma-fde-site-nav__cta { width: 100%; margin-top: 10px; }
  .ma-fde-service-home .ma-fde-service-hero { min-height: auto; padding: 70px 0 58px; }
  .ma-fde-service-home .ma-fde-service-hero::before { -webkit-mask-image: none; mask-image: none; }
  .ma-fde-service-hero__grid { min-height: 0; grid-template-columns: 1fr; gap: 45px; }
  .ma-fde-service-home .ma-fde-service-hero h1 { margin-bottom: 25px; font-size: clamp(4.5rem, 12vw, 6rem); letter-spacing: -.065em; line-height: 1.1; text-wrap: balance; }
  .ma-fde-service-hero__lead { margin-bottom: 32px; font-size: 1.7rem; line-height: 1.85; }
  .ma-fde-service-hero__lead br { display: none; }
  .ma-fde-service-hero__actions { align-items: flex-start; flex-direction: column; gap: 17px; }
  .ma-fde-service-map { min-height: 0; padding: 25px; box-shadow: 12px 14px 0 rgba(23, 105, 232, .13); }
  .ma-fde-service-map > p { margin-bottom: 28px; }
  .ma-fde-service-proof__grid { grid-template-columns: repeat(2, 1fr); }
  .ma-fde-service-proof p { min-height: 92px; padding: 18px; font-size: 1.3rem; }
  .ma-fde-service-proof p:nth-child(3) { border-left: 1px solid var(--ma-fde-line); }
}

@media (prefers-reduced-motion: reduce) {
  .ma-fde-service-hero__copy,
  .ma-fde-service-map,
  .ma-fde-service-map li { animation: none; }
}

/* Keep the existing contact form within narrow viewports. */
body#contact .ma-renewal-contact-form__layout > * { min-width: 0; }
@media (max-width: 900px) {
  body#contact .ma-renewal-contact-form__layout { grid-template-columns: minmax(0, 1fr); }
  body#contact .ma-contact-lead { white-space: normal !important; }
}
body#contact .ma-renewal-contact-form .mw_wp_form { width: 100%; min-width: 0; }
body#contact .ma-renewal-contact-form__body > * { max-width: 100%; min-width: 0; }
body#contact .ma-renewal-contact-form .mw_wp_form { max-width: 100% !important; }
