/* ═══════════════════════════════════════════════
   AI節約副業LABO — Brass Plate Header CSS
   ※ デモ用のスタイル（.demo-page / .demo-hero / .demo-spacer）は除去済み
   ═══════════════════════════════════════════════ */

:root {
  --brass-light:  #E8C77E;
  --brass:        #D4A95A;
  --brass-mid:    #B8893A;
  --brass-deep:   #8B6F2E;
  --brass-shadow: #6B5220;
  --cream:        #FAF3E3;
  --ivory:        #F4EBD8;
  --ink:          #3D2817;
  --ink-soft:     #5A3F22;
  --neon:         #4FC3F7;
  --neon-glow:    rgba(79, 195, 247, 0.45);
  --header-h:     84px;
}

/* ─── Header ─── */
.brass-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  overflow: visible;
  background: linear-gradient(180deg,
    rgba(244, 220, 158, 0.92) 0%,
    rgba(232, 199, 126, 0.90) 40%,
    rgba(212, 169, 90,  0.92) 100%);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(107, 82, 32, 0.5);
  box-shadow:
    0 1px 0 rgba(255, 240, 200, 0.7) inset,
    0 -1px 0 rgba(107, 82, 32, 0.3) inset,
    0 2px 6px rgba(107, 82, 32, 0.15);
  transition: box-shadow 0.35s ease, background 0.35s ease;
  font-family: 'Noto Serif JP', 'Yu Mincho', serif;
}
.brass-header.scrolled {
  box-shadow:
    0 1px 0 rgba(255, 240, 200, 0.7) inset,
    0 -1px 0 rgba(107, 82, 32, 0.3) inset,
    0 6px 20px rgba(107, 82, 32, 0.30),
    0 2px 6px rgba(107, 82, 32, 0.15);
}

/* ─── Plate textures ─── */
.plate-texture {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 60px,
      rgba(255, 248, 220, 0.06) 60px 61px,
      transparent 61px 120px,
      rgba(107, 82, 32, 0.05) 120px 121px),
    linear-gradient(180deg,
      rgba(255, 250, 220, 0.25) 0%,
      transparent 30%, transparent 70%,
      rgba(107, 82, 32, 0.10) 100%);
  mix-blend-mode: overlay;
}
.plate-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 30% 50%,
    rgba(255, 230, 160, 0.35), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.7;
}
.plate-trim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(180deg,
    rgba(107, 82, 32, 0.4) 0%,
    rgba(61, 40, 23, 0.6)  100%);
  box-shadow: 0 1px 0 rgba(255, 240, 200, 0.4) inset;
}

/* ─── Rivets ─── */
.rivets-top {
  position: absolute;
  top: 5px; left: 24px; right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}
.rivets-bottom {
  position: absolute;
  left: 32px; right: 32px;
  bottom: 4px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.rivet {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4D88A, #B8893A 55%, #6B5220 100%);
  box-shadow:
    inset 0 -1px 1px rgba(0,0,0,0.4),
    0 1px 1px rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.nav-rivet { width: 4px; height: 4px; }

/* ─── Corner gears ─── */
.gear-corner {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.gear-left {
  left: -10px;
  top: 50%;
  transform: translateY(-50%) translateX(-30%);
}
.gear-right {
  right: -8px;
  bottom: -8px;
}
.gear-svg {
  display: block;
  animation: gear-spin 9s linear infinite;
}
.gear-svg.reverse {
  animation-direction: reverse;
  animation-duration: 7s;
}
@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Inner layout ─── */
.header-inner {
  position: relative;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

/* ─── Logo ─── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.logo-mark { display: flex; align-items: center; justify-content: center; }
.logo-mark .gear-svg { animation-duration: 9s; }
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-title {
  font-family: 'Cinzel', 'Noto Serif JP', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3D2817;
  font-size: 22px;
  text-shadow:
    0 1px 0 rgba(255, 240, 200, 0.65),
    0 0 1px rgba(107, 82, 32, 0.3);
}
.logo-amp {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 0.78em;
  color: #5A3F1C;
}
.logo-labo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3D2817;
}
.logo-sub {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.32em;
  color: #5A3F1C;
  margin-top: 4px;
  font-weight: 600;
  font-size: 11px;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}

/* ─── Desktop Nav ─── */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.8vw, 20px);
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-rivet-wrap {
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.3s ease;
  display: inline-flex;
}
.nav-underline {
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, var(--neon) 30%, var(--neon) 70%, transparent 100%);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
  box-shadow: 0 0 8px var(--neon-glow);
}
.nav-item:hover,
.nav-item:focus-visible,
.nav-item[aria-current="page"] {
  color: #1B6FA0;
  outline: none;
}
.nav-item:hover .nav-rivet-wrap {
  opacity: 1;
  transform: rotate(45deg);
}
.nav-item:hover .nav-underline,
.nav-item:focus-visible .nav-underline,
.nav-item[aria-current="page"] .nav-underline {
  transform: scaleX(1);
}

/* ─── Hamburger ─── */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: linear-gradient(180deg, #F4D88A 0%, #D4A95A 50%, #B8893A 100%);
  border: 1.5px solid var(--brass-deep);
  border-radius: 6px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(107,82,32,0.3),
    0 2px 4px rgba(107,82,32,0.2);
  padding: 0;
}
.hamburger span {
  display: block;
  width: 22px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

/* ─── Mobile drawer ─── */
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(61, 40, 23, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: linear-gradient(180deg, #FAF3E3 0%, #F0E2C0 100%);
  border-left: 2px solid var(--brass-deep);
  box-shadow: -8px 0 24px rgba(61, 40, 23, 0.3);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-header {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #E8C77E, #D4A95A);
  border-bottom: 1px solid var(--brass-deep);
}
.drawer-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.drawer-close {
  width: 36px; height: 36px;
  border: 1.5px solid var(--brass-deep);
  background: var(--cream);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.drawer-list {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}
.drawer-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px dashed rgba(139, 111, 46, 0.3);
  transition: background 0.2s ease;
}
.drawer-list a:hover { background: rgba(212, 169, 90, 0.15); }
.drawer-en {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--brass-deep);
  width: 70px;
}
.drawer-jp {
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}
.drawer-arrow {
  color: var(--brass-deep);
  font-size: 22px;
  line-height: 1;
}
.drawer-list a:hover .drawer-arrow { color: var(--neon); }
.drawer-footer {
  padding: 18px 24px;
  border-top: 1px solid rgba(139, 111, 46, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brass-deep);
}

/* ─── Omochi Mascot ─── */
.omochi-mascot {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--brass-deep);
  box-shadow:
    0 0 0 1px rgba(244, 216, 138, 0.6),
    0 0 0 4px var(--brass-mid),
    0 0 0 5.5px var(--brass-deep),
    0 3px 10px rgba(61, 40, 23, 0.4);
  background: var(--cream);
  overflow: hidden;
}
.omochi-mascot::before,
.omochi-mascot::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4D88A, #B8893A 55%, #6B5220 100%);
  box-shadow: inset 0 -1px 1px rgba(0,0,0,0.4), 0 1px 1px rgba(255,255,255,0.5);
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
}
.omochi-mascot::before { top: -2px; }
.omochi-mascot::after  { bottom: -2px; }
.omochi-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .logo-sub { display: none; }
  .nav-item { font-size: 14px; padding: 10px 8px; }
  .nav-rivet-wrap { display: none; }
}
@media (max-width: 1024px) {
  :root { --header-h: 66px; }
  .nav { display: none; }
  .hamburger { display: flex; }
  .omochi-mascot { display: none; }
  .logo-title { font-size: 19px; }
  .gear-corner { display: none; }
  .rivets-top { left: 12px; right: 12px; }
  .rivets-bottom { left: 16px; right: 16px; }
  .header-inner { padding: 0 14px; gap: 10px; }
}
@media (max-width: 420px) {
  .logo-title { font-size: 16px; }
}
