/* layout.css
   - コンテナ
   - ヘッダー/モバイルナビ
   - セクションの余白
   - フッター
*/

.container {
  width: min(100% - 2rem, var(--max-width-content));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 4rem;
}

@media (min-width: 768px) {
  .header__inner {
    height: 5rem;
  }
}

.site-logo img {
  height: 2.6rem;
  width: auto;
}

.site-nav {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    gap: .25rem;
    align-items: center;
    font-weight: 500;
    font-size: .875rem;
    color: #475569;
  }
}

.nav__link {
  padding: .5rem .75rem;
  border-radius: .5rem;
  transition: background .15s ease, color .15s ease;
  position: relative;
}

.nav__link:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--color-primary);
}

/* アクティブなページ用 */
.nav__link--active {
  color: var(--color-primary);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: -1rem;
  height: 3px;
  background: var(--color-primary);
  border-radius: 9999px;
}

/* header cta */
.header__cta {
  display: none;
}

@media (min-width: 768px) {
  .header__cta {
    display: inline-flex;
  }
}

/* mobile button */
.header__toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: grid;
  place-items: center;
  color: #334155;
  background: #fff;
}

@media (min-width: 768px) {
  .header__toggle {
    display: none;
  }
}

/* mobile nav */
.mobile-nav {
  display: none;
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.mobile-nav--open {
  display: block;
}

.mobile-nav__inner {
  padding: .75rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.mobile-nav__link {
  display: block;
  padding: .5rem .75rem;
  border-radius: .5rem;
}

.mobile-nav__link:hover {
  background: rgba(148, 163, 184, .1);
}

.mobile-nav__cta {
  width: 100%;
  margin-top: .5rem;
}

/* spacer for fixed header */
.header-spacer {
  padding-top: 4.25rem;
}

@media (min-width: 768px) {
  .header-spacer {
    padding-top: 5.25rem;
  }
}

/* section base */
.section {
  padding: 4.5rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 5.5rem 0;
  }
}

.section--white {
  background: #fff;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.section--muted {
  background: #e2e8f0;
  background: #f1f5f9;
  border-top: 1px solid rgba(148, 163, 184, 0.05);
}

/* footer */
.site-footer {
  background: #0f172a;
  color: #fff;
  padding: 3.5rem 0 2.5rem;
}

.footer__inner {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1.2fr .5fr .5fr;
  }
}

.footer__logo {
  height: 2.35rem;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer__title {
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
}

.footer__list a {
  color: rgba(255, 255, 255, .7);
}

.footer__list a:hover {
  color: #fff;
}

.footer__bottom {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(15, 23, 42, .4);
  text-align: center;
  padding-top: 1.5rem;
  color: rgba(255, 255, 255, .45);
  font-size: .8rem;
}
