/* Canonical navigation: Figma 12267:38123 / 12274:40179.
 * The mobile composition is content-led; no final mobile master exists in Design.
 * Platform adapters supply the base font scale and overlay placement only. */
.koshi-header {
  --header-ink: var(--koshi-ink, #322a22);
  --header-paper: var(--koshi-mist, #f4f1e7);
  --header-line: var(--koshi-beige, #d9cfbb);
  --header-divider: var(--header-line);
  --header-accent: var(--koshi-clay, #a4493d);
  container: koshi-header / inline-size;
  position: relative;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid var(--header-divider);
  background: var(--header-paper);
  color: var(--header-ink);
  font-family: var(--koshi-sans, "Instrument Sans", sans-serif);
  font-size: var(--koshi-header-font-size, 1rem);
  font-weight: 400;
  line-height: 1.5;
}
.koshi-header, .koshi-header * { box-sizing: border-box; }
.koshi-header [hidden] { display: none !important; }
.koshi-header :where(a, button) {
  color: inherit;
  font-family: inherit;
  text-decoration: none;
  box-shadow: none;
}
.koshi-header a:visited, .koshi-header a:hover, .koshi-header a:active { color: inherit; text-decoration: none; }
.koshi-header button { cursor: pointer; }
.koshi-header :where(a, button, input):focus-visible {
  outline: 2px solid var(--header-accent);
  outline-offset: 3px;
}
.koshi-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(1em, 3.2cqi, 2.875em);
  width: min(100%, 90em);
  min-height: 5.25em;
  margin-inline: auto;
  padding-inline: clamp(1em, 5.5556cqi, 5em);
}
.koshi-header__brand { display: block; flex: 0 0 7.75em; min-width: 0; }
.koshi-header__logo { display: block; width: 100%; height: auto; aspect-ratio: 124 / 53; object-fit: contain; }
.koshi-header__logo--light { display: none; }
.koshi-header__nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: 1 1 auto;
  gap: clamp(.75em, 2.2222cqi, 2em);
  margin: 0;
  padding: 0 0 0 clamp(1em, 4.4444cqi, 4em);
  border-inline-start: 1px solid var(--header-divider);
  min-width: 0;
}
.koshi-header__nav > a, .koshi-header__about-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1429em;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: .875em;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.koshi-header__about { position: relative; display: flex; }
.koshi-header__about-toggle { gap: .6em; }
.koshi-header__about-toggle::after, .koshi-header .koshi-language-toggle::after {
  content: "";
  width: .45em;
  height: .45em;
  flex: 0 0 .45em;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-.12em) rotate(45deg);
}
.koshi-header__submenu, .koshi-header .koshi-language-menu {
  display: none;
  position: absolute;
  z-index: 2;
  top: 100%;
  inset-inline-start: 0;
  min-width: 14em;
  width: max-content;
  max-width: min(24em, 90cqi);
  padding: .5em;
  background: var(--header-paper);
  color: var(--header-ink);
  border: 1px solid var(--header-line);
  box-shadow: 0 .2em .5em rgb(50 42 34 / 10%);
}
.koshi-header__about-toggle[aria-expanded="true"] + .koshi-header__submenu,
.koshi-header .koshi-language-toggle[aria-expanded="true"] + .koshi-language-menu { display: grid; }
.koshi-header__submenu a, .koshi-header .koshi-language-menu a {
  display: flex;
  align-items: center;
  min-height: 3.1429em;
  padding: .75em 1em;
  color: var(--header-ink);
  font-size: .875em;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.koshi-header__tools { display: flex; align-items: center; align-self: stretch; gap: clamp(.25em, 1.1111cqi, 1em); margin-inline-start: auto; }
.koshi-header__control, .koshi-header .koshi-language-toggle {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  min-width: 2.75em;
  min-height: 2.75em;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: .5em;
  background: transparent;
  color: inherit;
  font-size: 1em;
  font-weight: 500;
  line-height: 1;
}
.koshi-header__icon {
  display: block;
  width: 1.625em;
  height: 1.625em;
  flex: 0 0 1.625em;
  background: currentColor;
  mask: var(--header-icon) center / contain no-repeat;
  -webkit-mask: var(--header-icon) center / contain no-repeat;
}
.koshi-header__icon--account { --header-icon: url("../images/koshi-nav-account-figma.svg"); }
.koshi-header__icon--cart { --header-icon: url("../images/koshi-nav-cart-figma.svg"); }
.koshi-header__icon--search { --header-icon: url("../images/koshi-nav-search-figma.svg"); }
.koshi-header__account-label { display: none; }
.koshi-header__language { position: relative; display: flex; align-items: center; align-self: stretch; border-inline-start: 1px solid var(--header-divider); padding-inline-start: .75em; }
.koshi-header .koshi-language-toggle { gap: .65em; letter-spacing: .08em; }
.koshi-header .koshi-language-menu { inset-inline-start: auto; inset-inline-end: 0; min-width: 5em; }
.koshi-header [data-koshi-cart-count] {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  min-width: 1.5em;
  min-height: 1.5em;
  padding: .15em;
  border-radius: 50%;
  color: var(--header-paper);
  background: var(--header-accent);
  font-size: .6875em;
  line-height: 1;
}
.koshi-header__menu-toggle { display: none; }
.koshi-header__burger { position: relative; width: 1.5em; height: 1em; border-block: 1px solid currentColor; }
.koshi-header__burger::before { content: ""; position: absolute; top: calc(50% - .5px); inset-inline: 0; border-top: 1px solid currentColor; }
.koshi-header.is-menu-open .koshi-header__burger { border: 0; }
.koshi-header.is-menu-open .koshi-header__burger::before,
.koshi-header.is-menu-open .koshi-header__burger::after { content: ""; position: absolute; top: 50%; inset-inline: 0; border-top: 1px solid currentColor; transform: rotate(45deg); }
.koshi-header.is-menu-open .koshi-header__burger::after { transform: rotate(-45deg); }
.koshi-header__search {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  top: 100%;
  border-bottom: 1px solid var(--header-line);
  background: var(--header-paper);
  color: var(--header-ink);
  padding: 1.5em max(1em, calc((100% - 80em) / 2));
}
.koshi-header__search form { display: flex; flex-wrap: wrap; align-items: center; gap: .75em; margin: 0; }
.koshi-header__search input[type="search"] { flex: 1 1 16em; min-width: 0; width: 100%; height: auto; min-height: 2.75em; margin: 0; padding: .65em .75em; border: 1px solid var(--header-line); background: #fffcf4; color: var(--header-ink); font: inherit; }
.koshi-header__search-close { font: inherit; border: 0; background: transparent; padding: .75em; min-height: 2.75em; }
.koshi-header .koshi-search-suggestions { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 1em; font-size: .875em; }
.koshi-header--transparent { --header-divider: rgb(255 255 255 / 20%); color: #fff; background: transparent; }
.koshi-header--transparent .koshi-header__logo--dark { display: none; }
.koshi-header--transparent .koshi-header__logo--light { display: block; }
.koshi-header.is-compact { --header-divider: var(--header-line); }
.koshi-header:is(.is-menu-open, .is-search-open, :focus-within) { --header-divider: var(--header-line); color: var(--header-ink); background: var(--header-paper); }
.koshi-header:is(.is-menu-open, .is-search-open, :focus-within) .koshi-header__logo--dark { display: block; }
.koshi-header:is(.is-menu-open, .is-search-open, :focus-within) .koshi-header__logo--light { display: none; }
@media (hover: hover) and (pointer: fine) {
  .koshi-header:hover { --header-divider: var(--header-line); color: var(--header-ink); background: var(--header-paper); }
  .koshi-header:hover .koshi-header__logo--dark { display: block; }
  .koshi-header:hover .koshi-header__logo--light { display: none; }
  .koshi-header :is(a, button):hover { color: var(--header-accent); }
}
@container koshi-header (width < 64em) {
  .koshi-header__inner { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); grid-template-rows: minmax(4.5em, auto); gap: 0 .25em; min-height: 4.5em; padding-inline: .75em; background: var(--header-paper); color: var(--header-ink); }
  .koshi-header__brand { grid-column: 1; grid-row: 1; width: min(7.75em, 100%); }
  .koshi-header .koshi-header__logo--dark { display: block; }
  .koshi-header .koshi-header__logo--light { display: none; }
  .koshi-header__menu-toggle { display: inline-flex; grid-column: 4; grid-row: 1; }
  .koshi-header__tools { display: contents; }
  .koshi-header__search-toggle { grid-column: 2; grid-row: 1; }
  .koshi-header__cart { grid-column: 3; grid-row: 1; }
  .koshi-header__account, .koshi-header__language { display: none; }
  .koshi-header__nav { display: none; grid-column: 1 / -1; grid-row: 2; padding: .5em 0; border: 0; }
  .koshi-header.is-menu-open .koshi-header__nav { display: grid; gap: 0; }
  .koshi-header__nav > a, .koshi-header__about-toggle { width: 100%; min-height: 3.5em; justify-content: flex-start; white-space: normal; text-align: start; }
  .koshi-header__nav > a, .koshi-header__about { border-bottom: 1px solid var(--header-line); }
  .koshi-header__about { display: block; }
  .koshi-header__submenu { position: static; width: 100%; max-width: none; min-width: 0; border: 0; box-shadow: none; padding: 0 0 .5em .75em; }
  .koshi-header.is-menu-open .koshi-header__account { display: flex; grid-column: 1 / 3; grid-row: 3; justify-self: start; gap: .5em; margin-block: .5em; }
  .koshi-header.is-menu-open .koshi-header__language { display: block; grid-column: 3 / 5; grid-row: 3; justify-self: end; border: 0; padding: 0; }
  .koshi-header__account-label { display: inline; font-size: .875em; }
}
@container koshi-header (width < 20em) {
  .koshi-header__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .koshi-header__menu-toggle { grid-column: 2; }
  .koshi-header__search-toggle, .koshi-header__cart { display: none; }
  .koshi-header.is-menu-open .koshi-header__search-toggle { display: flex; grid-column: 1; grid-row: 3; justify-self: start; }
  .koshi-header.is-menu-open .koshi-header__cart { display: flex; grid-column: 2; grid-row: 3; }
  .koshi-header.is-menu-open .koshi-header__account { grid-column: 1; grid-row: 4; }
  .koshi-header.is-menu-open .koshi-header__language { grid-column: 2; grid-row: 4; }
}
