/*
 * UniGaku shared chrome — the page furniture both apps put on screen.
 *
 * tokens.css says what the colours and faces are; this file says what the bar,
 * the measure and the buttons look like, so the marketing pages and the
 * Kawamirai runtime (a separate Next app, mounted at /hymeko) render the same
 * furniture from one definition instead of two lookalike copies.
 *
 * Consumers:
 *   app/globals.css                      @import (main site, /arc)
 *   web-next/app/layout.tsx              <link href="/brand/chrome.css">
 *
 * Requires tokens.css to have been loaded first.
 */

/* ---------- measure ---------- */

.site-wrap {
  margin-inline: auto;
  width: 100%;
  max-width: 1120px;
  padding-inline: 24px;
}

@media (min-width: 640px) {
  .site-wrap {
    padding-inline: 28px;
  }
}

/* ---------- top bar ---------- */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
}

.site-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-block: 10px;
}

/* The mark and the wordmark are masked in tokens.css; only the size is here. */
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.site-brand .brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-brand .brand-word {
  width: 59px;
  height: 15px;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-nav a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* The page you are already on is named, not linked away from. */
.site-nav a[aria-current='page'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- language switch ---------- */

.site-lang {
  display: flex;
  gap: 4px;
}

.site-lang button {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.site-lang button:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

.site-lang button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}
