/*
 * 岸本国際社労士事務所 — レイアウト
 * :root / base typography / header / footer
 */

/* =========================
:root
========================= */

:root {
  /* color */
  --c-main: #0a5bc8;
  --c-accent: #d8b04c;
  --c-text: #222222;
  --c-text-sub: #666666;
  --c-border: #e6eaf0;
  --c-bg-white: #ffffff;
  --c-bg-gray: #f2f2f2;
  --c-bg-blue: #ecf2fa;
  --c-white: #ffffff;
  --c-white-muted: rgba(255, 255, 255, 0.92);
  --c-profile-bg: #084a9f;

  /* layout */
  --container-width: 1140px;
  --header-height: 70px;
  --section-padding-sp: 64px;
  --section-padding-pc: 100px;

  /* typography */
  --font-family: "Noto Sans JP", sans-serif;
  --font-family-en: "Inter", "Noto Sans JP", sans-serif;
  --fz-body: 16px;
  --fz-small: 14px;
  --fz-h1: clamp(42px, 4vw, 64px);
  --fz-h2: clamp(22px, 3vw, 36px);
  --fz-h2-md: clamp(28px, 3vw, 36px);
  --fz-h2-lg: clamp(24px, 3vw, 40px);
  --fz-h2-lg-md: clamp(28px, 3vw, 40px);
  --fz-h3: clamp(18px, 2vw, 22px);
  --fz-h3-sm: 16px;
  --fz-h3-md: 18px;
  --lh-body: 2;
  --lh-h2: 1.4;
  --lh-h3: 1.5;
  --ls-heading: 0.02em;
}

/* =========================
Base
========================= */

html {
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  font-size: var(--fz-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--c-text);
  background-color: var(--c-bg-white);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  color: var(--c-text);
}

h1 {
  font-size: var(--fz-h1);
  line-height: 1.3;
  letter-spacing: var(--ls-heading);
}

h2 {
  font-size: var(--fz-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-heading);
}

h3 {
  font-size: var(--fz-h3);
  line-height: var(--lh-h3);
}

@media (min-width: 768px) {
  h2 {
    font-size: var(--fz-h2-md);
  }
}

/* =========================
Header
========================= */

.l-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: rgba(236, 242, 250, 0.6);
  border-bottom: 1px solid rgba(230, 234, 240, 0.8);
}

.l-header .container {
  position: relative;
  z-index: 2;
}

.l-header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.l-header__logo,
.l-header__toggler {
  position: relative;
  z-index: 3;
}

.l-header__logo {
  display: block;
  flex-shrink: 0;
  margin-right: 0;
  padding: 0;
}

.l-header__logo-img {
  display: block;
  width: auto;
  height: 22px;
  max-width: min(220px, 60vw);
}

@media (min-width: 768px) {
  .l-header__logo-img {
    height: 27px;
    max-width: none;
  }
}

.l-header__toggler {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background-color: transparent;
}

.l-header__toggler:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(10, 91, 200, 0.2);
}

.l-header__toggler-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--c-text);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.l-header.is-active .l-header__toggler-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.l-header.is-active .l-header__toggler-bar:nth-child(2) {
  opacity: 0;
}

.l-header.is-active .l-header__toggler-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.l-header__panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .l-header__nav {
    gap: 24px;
  }

  .l-header__panel {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    width: auto;
  }

  .l-header__panel .c-btn--primary {
    flex-shrink: 0;
  }
}

@media (max-width: 767.98px) {
  .l-header.is-active {
    background-color: rgba(236, 242, 250, 0.98);
  }

  .l-header__panel {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 70px);
    padding: 24px 24px 40px;
    background-color: rgba(236, 242, 250, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8%);
    transition:
      transform 0.35s ease,
      opacity 0.35s ease,
      visibility 0.35s ease;
    overflow-y: auto;
    z-index: 1;
    justify-content: flex-start;
  }

  .l-header.is-active .l-header__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .l-header__panel {
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;
  }

  .l-header__toggler-bar {
    transition: none;
  }
}

body.is-scroll-lock {
  overflow: hidden;
}

/* =========================
Footer
========================= */

.l-footer {
  padding: 48px 0;
  background-color: var(--c-bg-gray);
}

.l-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.l-footer__brand {
  margin: 0;
}

.l-footer__brand-link {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.l-footer__brand-link:hover,
.l-footer__brand-link:focus {
  opacity: 0.8;
}

.l-footer__logo-img {
  display: block;
  width: auto;
  height: 22px;
  max-width: min(280px, 70vw);
}

.l-footer__nav {
  width: 100%;
}

.l-footer__copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-sub);
}

@media (min-width: 768px) {
  .l-footer {
    padding: 64px 0;
  }

  .l-footer__inner {
    gap: 32px;
  }

  .l-footer__logo-img {
    height: 27px;
    max-width: none;
  }
}
