/* ==========================================================================
   Common — variables, header, footer, base typography
   ========================================================================== */

:root {
  --font-base: "Gen Interface JP", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Meiryo", sans-serif;
  --font-display: "Gen Interface JP Display", "Gen Interface JP", "Noto Sans JP", sans-serif;

  --color-text: #333333;
  --color-text-muted: #666666;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-border: #e5e5e0;
  --color-primary: #003288;
  --color-accent: #ffaf23;
  --color-accent-soft: #edb059;

  --container-max: 1200px;
  --header-height: 80px;
  --header-height-sp: 64px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);

  --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-base);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
}

a {
  color: var(--color-primary);
  transition: opacity 0.2s var(--easing);
}

a:hover {
  opacity: 0.7;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 767px) {
  .container {
    padding: 0 20px;
  }
}

.br-sp {
  display: none;
}

@media (max-width: 767px) {
  .br-sp {
    display: inline;
  }
}

/* Section spacing
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* Heading backdrop typography (large faint English text behind JP title) */
.section__title-en {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(255, 175, 35, 0.10);
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 -52px;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 1.2s var(--easing), filter 1.2s var(--easing), transform 1.2s var(--easing);
}

.section__title-en.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.4;
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

@media (max-width: 767px) {
  .section__title-en {
    margin-bottom: -36px;
  }
}

.section__lead {
  text-align: center;
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 48px;
}

@media (max-width: 767px) {
  .section {
    padding: 64px 0;
  }
  .section__title {
    font-size: 26px;
  }
  .section__lead {
    margin-bottom: 32px;
  }
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: background-color 0.25s var(--easing), color 0.25s var(--easing), border-color 0.25s var(--easing);
}

.btn:hover {
  opacity: 1;
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn--accent {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn--accent:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn::after {
  content: "→";
  font-weight: 400;
}

@media (max-width: 767px) {
  .btn {
    min-width: 200px;
    padding: 14px 28px;
    font-size: 16px;
  }
}

/* Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 32px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav-link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--color-text);
  transition: color 0.2s var(--easing);
}

.header__nav-link:not(.header__nav-link--cta).is-current {
  color: var(--color-primary);
  opacity: 1;
}

.header__nav-link:not(.header__nav-link--cta).is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background-color: var(--color-accent);
}

.header__nav-link--cta.is-current {
  background-color: var(--color-accent);
}

.header__nav-link--cta {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 4px;
  transition: background-color 0.2s var(--easing);
}

.header__nav-link--cta:hover {
  background-color: var(--color-accent);
  opacity: 1;
}

.header__menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.header__menu-btn span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s var(--easing), opacity 0.2s var(--easing);
}

.header__menu-btn span:nth-child(1) { top: 9px; }
.header__menu-btn span:nth-child(2) { top: 15px; }
.header__menu-btn span:nth-child(3) { top: 21px; }

body.is-menu-open .header__menu-btn span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.is-menu-open .header__menu-btn span:nth-child(2) {
  opacity: 0;
}
body.is-menu-open .header__menu-btn span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 767px) {
  .header {
    height: var(--header-height-sp);
    z-index: 200;
  }
  .header__logo {
    position: relative;
    z-index: 210;
  }
  .header__logo img {
    height: 28px;
  }
  .header__menu-btn {
    display: block;
    position: relative;
    z-index: 210;
  }

  /* Header becomes transparent while menu is open so the white panel feels full-screen */
  body.is-menu-open .header {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
  }

  .header__nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 150;
    transform: translateX(100%);
    transition: transform 0.35s var(--easing);
    will-change: transform;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.is-menu-open .header__nav {
    transform: translateX(0);
  }

  body.is-menu-open {
    overflow: hidden;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 28px;
    text-align: center;
    width: 100%;
    padding: 0 24px;
  }

  .header__nav-link {
    font-size: 20px;
    padding: 8px 0;
    display: inline-block;
    white-space: nowrap;
  }

  .header__nav-link--cta {
    display: inline-block;
    margin: 16px auto 0;
    padding: 14px 36px;
    white-space: nowrap;
  }
}

/* Footer
   ========================================================================== */
.footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 64px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
}

.footer__logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer__nav {
  display: flex;
  gap: 32px;
  justify-self: center;
}

.footer__nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #ffffff;
  transition: color 0.2s var(--easing);
}

.footer__nav-link.is-current {
  color: var(--color-accent);
  opacity: 1;
}

.footer__contact {
  justify-self: end;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.footer__copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  font-size: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

@media (max-width: 767px) {
  .footer {
    padding: 48px 0 24px;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
    margin-bottom: 32px;
  }
  .footer__nav,
  .footer__contact {
    justify-self: center;
  }
  .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }
}

/* Page header (under-page hero)
   ========================================================================== */
.page-header {
  background: linear-gradient(135deg, #f7f7f5 0%, #ffffff 100%);
  padding: 80px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.page-header__title-en {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(255, 175, 35, 0.12);
  text-transform: uppercase;
  margin: 0 0 -56px;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 1.2s var(--easing), filter 1.2s var(--easing), transform 1.2s var(--easing);
}

.page-header__title-en.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.page-header__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: 0.05em;
  margin: 0;
}

@media (max-width: 767px) {
  .page-header__title-en {
    margin-bottom: -40px;
  }
}

/* Photo MV variant for page-header */
.page-header--photo {
  background: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  border-bottom: none;
  padding: 120px 0 100px;
  position: relative;
}

.page-header--photo .container {
  position: relative;
  z-index: 1;
}

.page-header--photo .page-header__title {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.page-header--photo .page-header__title-en {
  color: rgba(255, 255, 255, 0.18);
}

.page-header--company {
  background-image:
    linear-gradient(135deg, rgba(0, 18, 50, 0.74) 0%, rgba(0, 36, 100, 0.58) 50%, rgba(0, 0, 0, 0.70) 100%),
    url("../img/company-mv@2x.jpg");
}

.page-header--contact {
  background-image:
    linear-gradient(135deg, rgba(0, 18, 50, 0.74) 0%, rgba(0, 36, 100, 0.58) 50%, rgba(0, 0, 0, 0.70) 100%),
    url("../img/cta-bg@2x.jpg");
}

@media (max-width: 767px) {
  .page-header--photo {
    padding: 80px 0 64px;
  }
}

@media (max-width: 767px) {
  .page-header {
    padding: 56px 0 40px;
  }
  .page-header__title {
    font-size: 28px;
  }
}

/* Utility
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
