@charset "UTF-8";

/* =========================================
   実用ペン字技能検定IBT — header.css
   ========================================= */

/* ---------- HEADER ---------- */
.c-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--h-header);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.c-header.is-scrolled {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 0 rgba(10, 31, 68, .06), 0 4px 20px rgba(10, 31, 68, .05);
  border-bottom-color: var(--c-line);
}

.c-header__inner {
  height: 100%;
  max-width: var(--w-inner-wide);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ---------- LOGO ---------- */
.c-header__logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  flex-shrink: 0;
}
.c-header__logo-main {
  font-family: var(--ff-mincho);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-brand);
  letter-spacing: .04em;
}
.c-header__logo-sub {
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--c-text-sub);
  letter-spacing: .12em;
}

/* ---------- PC NAV ---------- */
.c-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 24px;
}
.c-header__nav-item { position: relative; }
.c-header__nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: .06em;
  position: relative;
  transition: color .25s var(--ease);
}
.c-header__nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0;
  height: 1px;
  background: var(--c-cta);
  transition: width .3s var(--ease), left .3s var(--ease);
}
.c-header__nav-link:hover {
  color: var(--c-brand);
}
.c-header__nav-link:hover::after {
  width: calc(100% - 28px);
  left: 14px;
}

/* ---------- CTA BUTTONS (header) ---------- */
.c-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.c-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  border-radius: var(--radius);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.c-header__btn--primary {
  background: var(--c-cta);
  color: var(--c-brand);
}
.c-header__btn--primary:hover {
  background: var(--c-cta-hover);
  transform: translateY(-1px);
}

/* ---------- BURGER (SP only) ---------- */
.c-header__burger {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
}
.c-header__burger-line {
  position: absolute;
  left: 4px; right: 4px;
  height: 1.5px;
  background: var(--c-brand);
  transition: transform .3s var(--ease), opacity .3s var(--ease), top .3s var(--ease);
}
.c-header__burger-line:nth-child(1) { top: 9px; }
.c-header__burger-line:nth-child(2) { top: 15px; }
.c-header__burger-line:nth-child(3) { top: 21px; }
.c-header__burger.is-open .c-header__burger-line:nth-child(1) {
  top: 15px; transform: rotate(45deg);
}
.c-header__burger.is-open .c-header__burger-line:nth-child(2) { opacity: 0; }
.c-header__burger.is-open .c-header__burger-line:nth-child(3) {
  top: 15px; transform: rotate(-45deg);
}

/* ---------- OVERLAY MENU (SP) ---------- */
.c-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--c-brand);
  color: #fff;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
  padding: calc(var(--h-header) + 40px) 32px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.c-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.c-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.c-overlay__nav a {
  display: block;
  padding: 18px 0;
  font-family: var(--ff-mincho);
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  transition: color .25s var(--ease), padding .25s var(--ease);
}
.c-overlay__nav a:hover {
  color: var(--c-cta);
  padding-left: 8px;
}
.c-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.c-overlay__actions .c-btn {
  width: 100%;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .c-header__nav { display: none; }
  .c-header__actions { display: none; }
  .c-header__burger { display: block; }
  .c-header__inner { padding: 0 20px; }
  .c-header__logo-main { font-size: 16px; }
  .c-header__logo-sub { font-size: 9px; }
}
@media (max-width: 600px) {
  .c-header__logo-main { font-size: 14px; }
  .c-header__logo-sub { font-size: 8px; letter-spacing: .08em; }
}

/* ---------- BODY OFFSET FOR FIXED HEADER ---------- */
body { padding-top: 0; } /* ヒーローはheaderにかぶせる設計のため0 */
