/*
 * Kerawa Space public header, shared by every public page (home included).
 * Pixel units on purpose: the home theme sets html { font-size: 62.5% }.
 *
 * Light by default (portfolio pages). `.site-header--overlay` is the dark,
 * transparent variant laid over the home video.
 */

.site-header {
  --sh-text: oklch(14.5% 0 0);
  --sh-muted: oklch(43.9% 0 0);
  --sh-line: oklch(87% 0 0);
  --sh-frame: oklch(18% 0 0);
  --sh-bg: #ffffff;
  --sh-menu-bg: #ffffff;
  --sh-menu-hover: oklch(98.5% 0 0);
  --sh-menu-line: oklch(97% 0 0);

  position: relative;
  z-index: 50;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--sh-bg);
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sh-frame);
}

/* Full width so the header rule runs from edge to edge on large screens. */
.site-frame {
  margin: 0 auto;
  background: #fff;
}

.site-header__row {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
  padding: 0 16px;
}

.site-header a {
  text-decoration: none;
}

.site-header__brand a {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--sh-text);
  white-space: nowrap;
}
.site-header__brand em {
  font-style: italic;
  font-weight: 400;
  color: var(--sh-text);
}

.site-header__nav,
.site-header__actions {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 22px;
  border-left: 1px solid var(--sh-line);
}
.site-header__nav {
  flex: 1;
  gap: 22px;
}
.site-header__actions {
  gap: 20px;
  margin-left: auto;
}
.site-header__nav a,
.site-header__actions a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sh-text);
  white-space: nowrap;
}
.site-header__nav a:hover,
.site-header__actions a:hover {
  color: var(--sh-muted);
}
.site-header__divider {
  width: 1px;
  height: 14px;
  background: var(--sh-line);
}

/* Current page: underlined, same colour as the other links (not the brand) */
.site-header a.current {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.site-header__brand a.current {
  text-decoration: none;
}

/* Burger and dropdown menu: below 1024px on every page, at every width on
   the minimal header (home). */
.site-header__toggle,
.site-header__mobile-menu {
  display: none;
}

.site-header__toggle {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}
.site-header__toggle:focus-visible {
  outline: 2px solid var(--sh-text);
  outline-offset: 2px;
}
.site-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sh-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header__toggle.active span:nth-child(2) {
  opacity: 0;
}
.site-header__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* The menu drops over the page instead of pushing it down. */
.site-header__mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--sh-menu-bg);
  border-top: 1px solid var(--sh-line);
  border-bottom: 2px solid var(--sh-frame);
}
.site-header__mobile-menu.show-menu {
  display: block;
}
.site-header__mobile-links {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.site-header__mobile-links a {
  display: block;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sh-text);
  border-bottom: 1px solid var(--sh-menu-line);
}
.site-header__mobile-links a:last-child {
  border-bottom: none;
}
.site-header__mobile-links a:hover,
.site-header__mobile-links a.current {
  background: var(--sh-menu-hover);
}
.site-header__mobile-divider {
  height: 1px;
  background: var(--sh-line);
  margin: 6px 16px;
}

@media screen and (max-width: 1023px) {
  .site-header__row {
    justify-content: space-between;
    gap: 0;
  }
  .site-header__nav,
  .site-header__actions {
    display: none;
  }
  .site-header__toggle {
    display: flex;
  }
}

/* Minimal header (home): brand, "Our artworks" and the burger only. */
.site-header--minimal .site-header__row {
  gap: 20px;
}
.site-header--minimal .site-header__toggle {
  display: flex;
}
.site-header__quick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sh-text);
  white-space: nowrap;
}
.site-header__quick:hover {
  color: var(--sh-muted);
}
/* Kerawa planet before "Our artworks": KERAWA orbits the globe, the ring
   spins (its dashed inner line runs around) and craters drift across the
   surface so the planet seems to turn. */
.kw-orbit {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -6px 0;
  overflow: visible;
}
.kw-orbit__letters {
  transform-box: view-box;
  animation: kw-orbit 10s linear infinite;
}
.kw-orbit__ring-spin {
  animation: kw-ring-spin 1.6s linear infinite;
}
.kw-orbit__surface {
  animation: kw-surface 9s linear infinite;
}
@keyframes kw-orbit {
  to { transform: rotate(360deg); }
}
@keyframes kw-ring-spin {
  to { stroke-dashoffset: -76; }
}
@keyframes kw-surface {
  from { transform: translateX(-320px); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .kw-orbit__letters,
  .kw-orbit__ring-spin,
  .kw-orbit__surface {
    animation: none;
  }
}
@media screen and (min-width: 1024px) {
  /* On wide screens the minimal menu is a compact panel under the burger. */
  .site-header--minimal .site-header__mobile-menu {
    left: auto;
    width: 320px;
    border-left: 1px solid var(--sh-line);
  }
}

/* Dark, transparent variant over the home video */
.site-header--overlay {
  --sh-text: #ffffff;
  --sh-muted: rgba(255, 255, 255, 0.7);
  --sh-line: rgba(255, 255, 255, 0.25);
  --sh-frame: rgba(255, 255, 255, 0.15);
  --sh-bg: transparent;
  --sh-menu-bg: #0c0c0c;
  --sh-menu-hover: rgba(255, 255, 255, 0.06);
  --sh-menu-line: rgba(255, 255, 255, 0.08);

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.site-header--overlay::after {
  height: 1px;
}
