/* Layout CSS — Header, Footer, and Common Layout
 * HPP HP — Exact values from Figma file hTk2UtIZPusbWScukKNgMV
 */

/* =====================
 * Responsive line-break utilities
 * <br class="br-sp"> ... SP (<1024px) のみ改行
 * <br class="br-pc"> ... PC (>=1024px) のみ改行
 * 既定 (1024px 以上) では br-sp を消し、br-pc を活かす。
 * 1024px 未満の指定は responsive.css で逆転させる。
 * ===================== */
.br-sp { display: none; }
.br-pc { display: inline; }

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

html,
body {
  min-height: 100vh;
  background-color: var(--color-navy-primary);
  color: var(--color-white);
  overflow-x: hidden;
}

/* Common content wrapper: PC 表示時 (≥1024px viewport) の中身を 1024px に収め、
 * それ以上広くなっても背景はセクション側で full-width のまま。
 * 1024px 未満では responsive.css が padding を調整する。 */
.container {
  width: 100%;
  max-width: var(--layout-content-width); /* 1024px */
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.content-width {
  max-width: var(--layout-content-width);
  margin: 0 auto;
}

main {
  /* No top padding here — the hero section itself uses a negative margin-top
     to extend behind the fixed header. Sections after the hero start naturally. */
  padding-top: 0;
  /* Section backgrounds are full-width; each section's inner wrapper caps its
     content at --layout-content-width. Do NOT cap main itself. */
  width: 100%;
}

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

/* Header: always full-width fixed bar.
 * Inner content stays 1200px in both states.
 * Only background, height, and padding change for smooth transition. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Initial: 32px top padding to match Figma y=32, 56px content = 88px total */
  padding: 32px 120px 0;
  transition: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--layout-content-header); /* 1200px on very wide viewports */
  max-width: 100%;
}

/* 段階レスポンシブ: ビューポート ≤ 1279px のときは 1024px に揃える
 * (responsive.css 側の 1024–1279px ブロックと境界を一致させる) */
@media (max-width: 1279px) {
  .site-header__inner {
    width: var(--layout-content-width); /* 1024px */
  }
}

.site-header.is-scrolled {
  /* Scrolled: white bar, centered content, 100px total height */
  padding: 0 120px;
  height: 100px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Scrolled state: dark text */
.site-header.is-scrolled .site-header__nav-link {
  color: var(--color-navy-primary);
}

/* Scrolled state: swap logo to dark version */
.site-header.is-scrolled .site-header__logo-light {
  display: none;
}

.site-header.is-scrolled .site-header__logo-dark {
  display: block;
}

/* Default: hide dark logo */
.site-header__logo-dark {
  display: none;
}

/* Logo */
.site-header__logo {
  display: block;
  flex-shrink: 0;
  width: 179px;
  height: 45px;
}

.site-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nav */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg); /* 32px — from Figma gap-[32px] */
}

.site-header__nav-link {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);    /* 14px */
  line-height: var(--line-height-tight); /* 1.5 */
  letter-spacing: 0.7px;             /* tracking-[0.7px] from Figma */
  color: var(--color-white);
  white-space: nowrap;
  text-align: center;
  transition: opacity var(--transition-base);
}

.site-header__nav-link:hover {
  opacity: 0.75;
}

/* Contact CTA button */
.site-header__cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);            /* 8px — from Figma gap-[8px] */
  padding: 16px 32px;                /* py-[16px] px-[32px] from Figma */
  border-radius: var(--radius-pill); /* rounded-[48px] from Figma */
  background: var(--gradient-gold);  /* Gradients/Gold from Figma */
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);    /* 14px */
  line-height: var(--line-height-tight); /* 1.5 */
  letter-spacing: 0.7px;
  color: var(--color-navy-primary);  /* #1a2332 from Figma */
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  transition: opacity var(--transition-base);
  border: none;
  cursor: pointer;
}

.site-header__cta:hover {
  opacity: 0.9;
}

.site-header__cta-icon {
  width: 24px;   /* size-[24px] from Figma */
  height: 24px;
  flex-shrink: 0;
}

/* Hamburger menu button — hidden on desktop, shown on mobile */
.site-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.site-header__hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: background-color var(--transition-base);
}

.site-header.is-scrolled .site-header__hamburger-line {
  background-color: var(--color-navy-primary);
}

/* =====================
 * Mobile Menu Overlay
 * Figma node: 136:1287
 * ===================== */

.mobile-menu {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-navy-primary);
    z-index: 200;
    padding: 64px 20px 24px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .mobile-menu__logo {
    width: 199px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .mobile-menu__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    margin-top: 56px;
  }

  .mobile-menu__link {
    font-family: var(--font-jp-sans);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-tight);
    letter-spacing: 0.7px;
    color: var(--color-white);
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
  }

  .mobile-menu__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    width: 100%;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    background: var(--gradient-gold);
    font-family: var(--font-jp-sans);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-tight);
    letter-spacing: 0.7px;
    color: var(--color-navy-primary);
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin-top: 24px;
  }
}

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

.site-footer {
  background-color: var(--color-navy-primary); /* bg-[#1a2332] from Figma */
  padding: var(--spacing-2xl) var(--layout-padding-x) var(--spacing-md); /* pt-[64px] pb-[24px] px-[180px] */
  width: 100%;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;  /* gap-[20px] from Figma — between divider-group and copyright */
  width: 100%;
}

/* Wrapper around top content + divider: gap-[40px] from Figma */
.site-footer__content-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

/* Top row: logo+info on left, sitemap+links on right */
.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: var(--layout-content-width); /* 1024px (PC コンテンツ最大幅) */
}

/* Left column: logo + company info */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);   /* gap-[24px] from Figma */
  width: 625px;             /* w-[625px] from Figma */
}

.site-footer__logo {
  display: block;
  width: 240px;   /* w-[240px] from Figma */
  height: 60px;   /* h-[60px] from Figma */
}

.site-footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-footer__company-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);   /* gap-[8px] from Figma */
  color: var(--color-white);
  white-space: nowrap;
}

.site-footer__company-name {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);  /* 16px — txt/16pt */
  line-height: var(--line-height-base); /* 1.75 */
}

.site-footer__company-address {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-xs);   /* 12px — txt/12pt */
  line-height: var(--line-height-base); /* 1.75 */
  letter-spacing: 0.6px;            /* letterSpacing: 5 → 0.05em * 12px ≈ 0.6px */
}

/* Right column: site map + related sites */
.site-footer__nav-columns {
  display: flex;
  gap: var(--spacing-3xl);   /* gap-[80px] from Figma */
  align-items: flex-start;
  line-height: var(--line-height-base);
}

.site-footer__nav-column {
  display: flex;
  flex-direction: column;
  gap: 16px;    /* gap-[16px] from Figma — サイトマップ column */
}

/* 関連サイト column has gap-[24px] from Figma */
.site-footer__nav-column--related {
  gap: 24px;
}

.site-footer__nav-heading {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);  /* 16px */
  line-height: var(--line-height-base);
  color: var(--color-white);
  white-space: nowrap;
}

.site-footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: 11px;  /* gap-[11px] from Figma */
}

.site-footer__nav-list a {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-sm);    /* 14px — txt/14pt */
  line-height: var(--line-height-base);
  color: var(--color-white-ethereal); /* #e0e7ff from Figma */
  white-space: nowrap;
  transition: opacity var(--transition-base);
}

.site-footer__nav-list a:hover {
  opacity: 0.75;
}

/* Horizontal divider */
.site-footer__divider {
  width: 100%;
  max-width: var(--layout-content-width); /* 1024px (PC コンテンツ最大幅) */
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  margin: 0;
}

/* Copyright bar */
.site-footer__copyright {
  font-family: var(--font-jp-sans);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-xs);    /* 12px — txt/12pt */
  line-height: var(--line-height-base);
  letter-spacing: 0.6px;
  color: var(--color-white);
  text-align: center;
  width: 100%;
  white-space: normal;
}

.site-footer__copyright a {
  color: var(--color-white);
  transition: opacity var(--transition-base);
}

.site-footer__copyright a:hover {
  opacity: 0.75;
}

/* =====================
 * Side vertical text (moved to hero section)
 * ===================== */
}

/* =====================
 * Section placeholders (shared)
 * ===================== */

.section {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  overflow: hidden;
}

/* Contact section needs overflow visible for the card that extends below */
.section.contact {
  overflow: visible;
}
