/* ============================================
   YANAGASE TECH INC. - Common Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #012010;
  --color-heading: #012010;
  --color-text: #333333;
  --color-text-light: #999;
  --color-bg: #fff;
  --color-bg-light: #f5f5f3;
  --color-border: #ddd;
  --font-serif: 'Zen Old Mincho', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-en: 'Cormorant Garamond', 'Times New Roman', serif;
  --max-width: 1080px;
  --header-height: 72px;
  --header-height-sp: 56px;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 80px 0;
}

/* --- Top Header (first view, top page only) --- */
.top-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 24px;
  background: var(--color-bg);
}

.top-header-logo {
  margin-bottom: 12px;
}

.top-header-logo .logo-symbol {
  height: 64px;
  width: auto;
}

.top-header-name .logo-type {
  height: 32px;
  width: auto;
}

.top-header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 20px;
}

.top-header-nav a {
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: 0;
  color: var(--color-text);
  transition: opacity 0.3s;
}

.top-header-nav a:hover {
  opacity: 0.6;
}

/* --- Compact Header (scroll / sub pages) --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hidden by default on top page; shown via JS */
.is-top .site-header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.is-top .site-header.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img.logo-symbol {
  height: 40px;
  width: auto;
}

.header-logo img.logo-type {
  height: 28px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-nav a {
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: 0;
  color: var(--color-text);
  transition: opacity 0.3s;
}

.header-nav a:hover {
  opacity: 0.6;
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1100;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  position: absolute;
  left: 4px;
  transition: all 0.3s;
}

.hamburger span:nth-child(1) {
  top: 4px;
}

.hamburger span:nth-child(2) {
  top: 11px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger.is-active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--color-bg-light);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.mobile-menu-logo img.logo-symbol {
  height: 64px;
  width: auto;
}

.mobile-menu-logo img.logo-type {
  height: 36px;
  width: auto;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-menu-nav a {
  font-family: var(--font-en);
  font-size: 20px;
  letter-spacing: 0;
  color: var(--color-text);
  transition: opacity 0.3s;
}

.mobile-menu-nav a:hover {
  opacity: 0.6;
}

/* --- Footer --- */
.site-footer {
  padding: 48px 0;
  text-align: center;
}

.footer-privacy {
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.footer-privacy a {
  color: var(--color-text);
  transition: opacity 0.3s;
}

.footer-privacy a:hover {
  opacity: 0.6;
}

.footer-copyright {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--color-text-light);
  letter-spacing: 0;
}

/* --- Page Top Padding (for fixed header on sub pages) --- */
.page-body {
  padding-top: var(--header-height);
}

.is-top .page-body,
.is-top main {
  padding-top: 0;
}

/* --- Section Title --- */
.section-title {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 40px;
  color: var(--color-heading);
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  html {
    scroll-padding-top: var(--header-height-sp);
  }

  body {
    font-size: 14px;
  }

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 56px 0;
  }

  .site-header {
    height: var(--header-height-sp);
  }

  .header-inner {
    padding: 0 16px;
  }

  .header-logo img.logo-symbol {
    height: 32px;
  }

  .header-logo img.logo-type {
    height: 22px;
  }

  .header-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .page-body {
    padding-top: var(--header-height-sp);
  }

  /* Top header SP */
  .top-header {
    padding: 28px 0 20px;
  }

  .top-header-logo .logo-symbol {
    height: 48px;
  }

  .top-header-name .logo-type {
    height: 24px;
  }

  .top-header-nav {
    display: none;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 32px;
  }
}
