:root {
  --ink: #171717;
  --muted: #6d6d68;
  --paper: #f5f3ed;
  --white: #ffffff;
  --line: #d8d5cc;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 237, 0.96);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(1500px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  gap: 30px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 6px);
  align-items: end;
  gap: 2px;
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.brand-mark i { display: block; width: 100%; border-radius: 4px; background: var(--paper); }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; }

.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 0.9rem; letter-spacing: -0.03em; }
.brand small { margin-top: 5px; font-size: 0.5rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; }

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(11px, 1.3vw, 25px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-block;
  padding: 8px 0;
  font-size: clamp(0.68rem, 0.78vw, 0.8rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  margin-top: 4px;
  background: var(--ink);
  transition: width 160ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after { width: 100%; }

.menu-toggle { display: none; }

.manager-home {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 83px);
  padding: 40px 20px;
  text-align: center;
}

.manager-home p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.manager-home h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.manager-home span {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav a:focus-visible,
.brand:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; padding: 16px 0; }
  .main-nav { flex-basis: 100%; order: 3; }
  .main-nav ul { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 700px) {
  .header-inner {
    position: relative;
    flex-wrap: nowrap;
    width: calc(100% - 28px);
    min-height: 70px;
    padding: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 10px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .menu-toggle-icon { position: relative; display: block; width: 23px; height: 16px; }
  .menu-toggle-icon i { position: absolute; left: 0; display: block; width: 23px; height: 2px; background: currentColor; transition: top 180ms ease, transform 180ms ease; }
  .menu-toggle-icon i:first-child { top: 3px; }
  .menu-toggle-icon i:last-child { top: 11px; }

  .menu-toggle[aria-expanded='true'] .menu-toggle-icon i:first-child { top: 7px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded='true'] .menu-toggle-icon i:last-child { top: 7px; transform: rotate(-45deg); }

  .main-nav {
    position: absolute;
    top: 70px;
    right: -14px;
    left: -14px;
    display: none;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }

  .main-nav.is-open { display: block; }

  .main-nav ul { display: block; }
  .main-nav li + li { border-top: 1px solid #eceae4; }
  .main-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 53px;
    padding: 0 18px;
    font-size: 0.9rem;
  }
  .main-nav a::before { content: '↗'; order: 2; color: var(--muted); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .manager-home { min-height: calc(100vh - 71px); }
  body.menu-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
