/* ============================================================
   Custard Nakamura — shared site header (self-contained)
   Fluidly scales the nav down across tablet widths; only
   collapses to a hamburger menu at phone sizes (<= 720px).
   Palette matches the Heritage homepage design.
   ============================================================ */

.cn-ic {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.cn-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 249, 245, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #d3c3c0;
}

.cn-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.6rem, 1.2vw, 1.75rem);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.7rem clamp(0.75rem, 2vw, 2rem);
}

/* ---- Brand ---- */
.cn-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  line-height: 1.15;
}
.cn-brand__logo {
  height: clamp(38px, 4vw, 48px);
  width: auto;
  flex-shrink: 0;
}
.cn-brand__text { display: flex; flex-direction: column; min-width: 0; }
.cn-brand__en {
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-weight: 700;
  color: #271310;
  font-size: clamp(0.86rem, 1.3vw, 1.18rem);
  letter-spacing: clamp(0.05em, 0.12vw, 0.2em);
  white-space: nowrap;
}
.cn-brand__jp,
.cn-brand__th {
  color: #504442;
  font-family: 'Noto Sans JP', 'Noto Serif JP', system-ui, sans-serif;
  white-space: nowrap;
}
.cn-brand__jp { font-size: 0.625rem; letter-spacing: 0.35em; margin-top: 0.12rem; }
.cn-brand__th { font-size: 0.5625rem; letter-spacing: 0.15em; }

/* ---- Desktop / tablet nav (scales fluidly) ---- */
.cn-nav {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.45rem, 0.95vw, 1.25rem);
  flex-wrap: nowrap;
}
.cn-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
  transition: border-color 0.25s;
}
.cn-nav a .en {
  font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  color: #271310;
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: clamp(0.04em, 0.1vw, 0.14em);
  transition: color 0.25s;
}
.cn-nav a .jp {
  font-family: 'Noto Sans JP', 'Noto Serif JP', system-ui, sans-serif;
  color: #504442;
  font-size: clamp(8px, 0.7vw, 9px);
  letter-spacing: 0.2em;
  margin-top: 0.28rem;
}
.cn-nav a:hover { border-bottom-color: #705d00; }
.cn-nav a:hover .en { color: #705d00; }
.cn-nav a[aria-current="page"] { border-bottom-color: #3b0003; }
.cn-nav a[aria-current="page"] .en { color: #3b0003; }

/* ---- Call Ahead button ---- */
.cn-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.cn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #705d00;
  color: #271310;
  padding: 0.6rem 1.15rem;
  font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.cn-call .cn-ic { font-size: 16px; }
.cn-call:hover { background: #271310; color: #ffffff; border-color: #271310; }

/* ---- Hamburger (phones only) ---- */
.cn-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #271310;
  cursor: pointer;
  padding: 0.25rem;
}
.cn-toggle .cn-ic { font-size: 28px; }

/* ---- Mobile dropdown ---- */
.cn-mobile { display: none; flex-direction: column; gap: 0.15rem; border-top: 1px solid #d3c3c0; background: #fbf9f5; padding: 0.5rem clamp(1rem, 2.2vw, 2rem) 1rem; }
.cn-mobile.open { display: flex; }
.cn-mobile a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid #ece3d6;
  font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #271310;
}
.cn-mobile a[aria-current="page"] { color: #3b0003; }
.cn-mobile a .jp {
  font-family: 'Noto Sans JP', 'Noto Serif JP', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: none;
  color: #504442;
}

/* ---- Responsive steps (scale down before collapsing) ---- */
/* Hide the Call Ahead button once things get tight */
@media (max-width: 1180px) {
  .cn-call { display: none; }
}
/* Compact the nav to English-only single-line labels on mid widths */
@media (max-width: 1024px) {
  .cn-nav { align-items: center; }
  .cn-nav a { padding-bottom: 0.1rem; border-bottom-width: 2px; }
  .cn-nav a .jp { display: none; }
}
/* Drop the brand subtitles to free up room */
@media (max-width: 940px) {
  .cn-brand__jp, .cn-brand__th { display: none; }
}
/* Only now, on phones/small tablets, switch to the hamburger */
@media (max-width: 800px) {
  .cn-nav { display: none; }
  .cn-toggle { display: inline-flex; }
}
