/* Shared header and footer for zeirishi-ai.jp public pages. */
:root {
  --za-chrome-navy: #1a2b3c;
  --za-chrome-ink: #435568;
  --za-chrome-paper: #faf8f3;
  --za-chrome-surface: #fffdf9;
  --za-chrome-terracotta: #c4622d;
  --za-chrome-terracotta-dark: #a8501f;
  --za-chrome-terracotta-hover: #8f4218;
  --za-chrome-terracotta-on-dark: #e08a57;
}

.site-header,
.site-footer {
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(26, 43, 60, .11);
  background: rgba(250, 248, 243, .96);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1200px, calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: center;
  flex: 0 0 auto;
  gap: 10px;
  max-width: 360px;
  color: var(--za-chrome-navy);
  text-decoration: none;
}

.brand-logo {
  flex: 0 0 auto;
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 1px;
  justify-items: start;
  align-content: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.brand-kicker,
.brand-service {
  display: block;
  color: var(--za-chrome-navy);
  white-space: nowrap;
}

.brand-kicker {
  color: var(--za-chrome-terracotta);
  font-size: 15.4px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.24;
}

.brand-service {
  font-size: 18.6px;
  font-weight: 900;
  letter-spacing: .008em;
  line-height: 1.22;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.1vw, 30px);
  margin-left: auto;
}

.site-nav a {
  color: var(--za-chrome-ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--za-chrome-terracotta); }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 0;
  padding: 0 17px;
  color: #fff;
  background: var(--za-chrome-terracotta-dark);
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.header-cta:hover {
  background: var(--za-chrome-terracotta-hover);
  transform: translateY(-1px);
}

.mobile-header-actions,
.mobile-menu { display: none; }

.mobile-header-actions {
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mobile-diagnosis-cta,
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.mobile-diagnosis-cta {
  color: #fff;
  background: var(--za-chrome-terracotta-dark);
  box-shadow: none;
}

.mobile-diagnosis-icon {
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("../../icons/icon-chat-check.svg") center / contain no-repeat;
  mask: url("../../icons/icon-chat-check.svg") center / contain no-repeat;
}

.mobile-menu-toggle {
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(26, 43, 60, .16);
  background: linear-gradient(180deg, rgba(255, 253, 249, .98), rgba(250, 248, 243, .94));
  box-shadow: none;
  cursor: pointer;
}

.mobile-menu-toggle span,
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--za-chrome-navy);
  content: "";
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  left: 16px;
  border: 1px solid rgba(196, 98, 45, .18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 253, 249, .99) 0%, rgba(250, 248, 243, .98) 100%);
  box-shadow: 0 14px 30px rgba(26, 43, 60, .11), inset 0 1px 0 rgba(255, 255, 255, .8);
  padding: 12px;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  padding: 13px 15px;
  color: var(--za-chrome-navy);
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
}

.mobile-menu a:not(.mobile-menu-cta) { box-shadow: inset 0 -1px 0 rgba(26, 43, 60, .05); }
.mobile-menu a + a { margin-top: 3px; }
.mobile-menu a:hover { background: rgba(196, 98, 45, .08); }

.mobile-menu-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: rgba(26, 43, 60, .82);
  background: currentColor;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
  mask: var(--menu-icon) center / contain no-repeat;
}

.mobile-menu-text { min-width: 0; }

.mobile-menu .mobile-menu-cta {
  justify-content: center;
  margin-top: 12px;
  border-radius: 0;
  color: #fff;
  background: var(--za-chrome-terracotta-dark);
  text-align: center;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(26, 43, 60, .08);
}

.site-footer {
  background: var(--za-chrome-navy);
  color: #dbe2e5;
  padding: 72px 0 32px;
}

.site-footer .wrap { width: min(1120px, calc(100% - 48px)); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(180px, .55fr) minmax(220px, .65fr);
  gap: clamp(48px, 8vw, 136px);
  align-items: start;
  padding-bottom: 70px;
  border-bottom: 1px solid rgba(219, 226, 229, .18);
}

.footer-logo-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-service-name {
  display: grid;
  gap: 1px;
}

.footer-service-name .footer-brand-kicker {
  color: var(--za-chrome-terracotta-on-dark);
  font-size: 15.4px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.24;
}

.footer-service-name .footer-brand-service {
  color: #fff;
  font-size: 18.6px;
  font-weight: 900;
  letter-spacing: .008em;
  line-height: 1.22;
}

.footer-company {
  margin: 24px 0 0;
  color: #dbe2e5;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.footer-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.footer-column-title {
  margin: 0 0 4px;
  color: var(--za-chrome-terracotta-on-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
}

.footer-column a {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  text-decoration: none;
}

.footer-column a:hover { color: var(--za-chrome-terracotta-on-dark); }

.copyright {
  margin-top: 28px;
  color: #a9b8c1;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

:where(.site-header, .site-footer) :where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--za-chrome-terracotta);
  outline-offset: 4px;
}

.site-footer :where(a, button, summary, [tabindex]):focus-visible { outline-color: var(--za-chrome-surface); }

@media (max-width: 1080px) {
  .site-nav,
  .header-cta { display: none; }
  .mobile-header-actions { display: inline-flex; }
  .mobile-menu:not([hidden]) { display: block; }
}

@media (max-width: 900px) {
  .header-inner,
  .site-footer .wrap { width: min(100% - 32px, 1120px); }
}

@media (max-width: 640px) {
  .header-inner { min-height: 62px; gap: 9px; padding: 10px 0; }
  .brand { flex: 1 1 auto; gap: 7px; max-width: none; min-width: 0; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-text { max-width: 224px; gap: 1px; }
  .brand-kicker,
  .brand-service {
    color: var(--za-chrome-navy);
    font-size: 14.4px;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: .005em;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .mobile-header-actions { flex: 0 0 auto; gap: 7px; }
  .header-cta { min-height: 38px; padding: 0 10px; font-size: 14px; }
  .site-footer { padding: 52px 0 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; padding-bottom: 42px; }
  .footer-logo-line { gap: 7px; }
  .footer-logo { width: 36px; height: 36px; }
  .footer-service-name { gap: 1px; }
  .footer-service-name .footer-brand-kicker,
  .footer-service-name .footer-brand-service {
    font-size: 14.4px;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: .005em;
  }
  .footer-company { margin-top: 18px; font-size: 14px; }
}
