/*
Theme Name: Chomorrow
Description: ちょっと先のおもしろい未来 公式テーマ
Version: 1.0.0
*/

/* =========================================
   CSS Custom Properties
   ========================================= */
:root {
  --color-header: #29a1e9;
  --color-footer: rgb(50, 50, 50);
  --color-accent: #050f77;
  --color-text: rgb(50, 50, 50);
  --font-heading: Inter, sans-serif;
  --font-body: Inter, sans-serif;
  --font-en: Rubik, sans-serif;
}

/* =========================================
   Reset / Base
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #fff; font-family: var(--font-body); transition: background 0.5s cubic-bezier(0.4, 0.4, 0, 1); }
a { text-decoration: none; }
img { display: block; }

.site-wrapper { position: relative; width: 100%; min-height: 100vh; display: flex; flex-direction: column; }

/* =========================================
   HEADER
   ========================================= */
.site-header {
  align-items: center;
  background: var(--color-header);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: 251px;
  justify-content: space-between;
  overflow: visible;
  padding: 30px 0 20px 0;
  position: relative;
  width: 100%;
}

.header-logo {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0 0 35px 0;
  width: 284px;
  max-width: 100%;
}

.logo-img {
  height: auto;
  width: 100%;
  max-width: 100%;
}

.header-nav {
  align-items: flex-start;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 33px;
  height: 50%;
  justify-content: space-between;
  padding: 5px;
  width: auto;
  max-width: 100%;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 33px;
  justify-content: center;
  padding: 0;
  width: 563px;
  max-width: 100%;
}

.nav-link {
  border-bottom: 2px solid transparent;
  color: #fff;
  font-family: var(--font-heading);
  font-feature-settings: 'palt' 1;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.nav-link:hover {
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.nav-link--highlight { font-weight: 600; }

.nav-social {
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 15px;
  width: auto;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  background: #000;
  border-radius: 50%;
  position: relative;
}

.social-link::before {
  content: '';
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.social-link--twitter::before {
  background-image: url("assets/image/sns-icon/x.webp");
}

.social-link--instagram::before {
  background-image: url("assets/image/sns-icon/instagram.webp");
}

/* =========================================
   HAMBURGER (mobile only)
   ========================================= */
.hamburger-wrapper {
  display: none;
  position: fixed;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  z-index: 200;
}

.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  height: 32px;
  padding: 0;
  position: relative;
  width: 32px;
}

.hamburger-line {
  background: #000;
  display: block;
  height: 2px;
  left: 0;
  position: absolute;
  transition: top 0.3s ease, transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  width: 100%;
}

.hamburger-line:nth-child(1) { top: 5px; }
.hamburger-line--mid          { top: 15px; width: 80%; }
.hamburger-line--short        { top: 25px; width: 60%; }

.hamburger-btn.is-open .hamburger-line:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
  width: 100%;
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
  top: 15px;
  transform: rotate(-45deg);
  width: 100%;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  align-items: center;
  background: var(--color-footer);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: auto;
  justify-content: center;
  padding: 16px 0;
  width: 100%;
  z-index: 4;
}

.footer-nav {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 48px 0 32px 0;
  padding: 0;
  width: auto;
  max-width: 100%;
}

.footer-nav__link {
  color: #fff;
  font-family: var(--font-heading);
  font-feature-settings: 'palt' 1;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  margin: 0 48px 0 0;
  max-width: calc(100% - 48px);
}

.footer-nav__link:hover { opacity: 0.5; }
.footer-nav__link:last-child { margin-right: 0; }

.footer-logo {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: auto;
  justify-content: center;
  margin: 0 0 76px 0;
  width: auto;
  max-width: 100%;
}

.footer-logo:hover { opacity: 0.5; }

.footer-logo__img {
  height: auto;
  width: 274px;
  max-width: 100%;
}

.footer-meta {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: auto;
  max-width: 100%;
}

.footer-privacy-link {
  color: #fff;
  font-family: var(--font-heading);
  font-feature-settings: 'palt' 1;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.footer-privacy-link:hover { opacity: 0.5; }

.footer-copyright {
  color: #eee;
  font-family: var(--font-en);
  font-feature-settings: 'palt' 1;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

/* =========================================
   RESPONSIVE - TABLET (max 840px)
   ========================================= */
@media screen and (max-width: 840px) {
  .site-header { height: auto; width: 100%; }
  .header-nav { flex-wrap: wrap; gap: 25px; width: auto; }
  .nav-links { flex-direction: row; gap: 25px; }
  .nav-link { font-size: 15px; }
  .nav-social { align-items: flex-end; gap: 10px; }
  .footer-nav__link { font-size: 14px; margin: 0 32px 0 0; max-width: calc(100% - 32px); }
  .footer-privacy-link { margin: 0 0 0 14px; width: 127px; max-width: calc(100% - 14px); }
}

/* =========================================
   RESPONSIVE - MOBILE (max 540px)
   ========================================= */
@media screen and (max-width: 540px) {
  .site-header { align-content: flex-start; align-items: flex-start; height: auto; justify-content: center; padding: 0 0 0 14px; }
  .header-logo { margin: 0; padding: 10px 0; }
  .logo-img { height: 67px; width: auto; }
  .header-nav {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.8);
    bottom: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    height: auto;
    justify-content: center;
    left: 0;
    max-width: 100%;
    min-height: 100vh;
    opacity: 0;
    padding: 80px 40px 40px;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    width: 100%;
    z-index: 100;
  }
  .header-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav-links { flex-direction: column; gap: 24px; width: 100%; }
  .nav-link { color: var(--color-text); font-size: 18px; }
  .nav-social { flex-direction: row; gap: 20px; margin-top: 32px; width: 100%; justify-content: center; }
  .hamburger-wrapper { display: flex; }
  .site-footer { height: auto; justify-content: flex-start; }
  .footer-nav { justify-content: space-around; margin: 35px 0 38px 0; width: 300px; max-width: 100%; }
  .footer-nav__link { margin: 0 10px 20px 10px; max-width: calc(100% - 20px); }
  .footer-logo__img { width: 215px; }
  .footer-meta { align-items: center; }
  .footer-privacy-link { margin: 0 0 13px 0; text-align: center; width: auto; max-width: 100%; }
  .footer-copyright { margin: 0 0 5px 0; }
}
