*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-chalk);
  background:
    radial-gradient(1100px 700px at 78% 8%, var(--iris-08), transparent 62%),
    var(--color-void);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
figure,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(185, 160, 126, 0.3);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--accent-iris);
  outline-offset: 2px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 75;
  height: var(--header-h);
  background: rgba(8, 8, 12, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  width: 172px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-nav);
  background: linear-gradient(180deg, var(--color-graphite), var(--color-carbon));
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.identity:hover {
  border-color: var(--color-hairline-strong);
  box-shadow: 0 0 0 1px rgba(185, 160, 126, 0.08);
}

.identity-mark {
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid var(--accent-iris);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(185, 160, 126, 0.45);
}

.identity-word {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.identity-word span {
  display: block;
  height: 4px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(236, 236, 241, 0.34), rgba(236, 236, 241, 0.08));
}

.identity-word span:first-child {
  width: 78px;
}

.identity-word span:last-child {
  width: 48px;
  background: linear-gradient(90deg, rgba(166, 166, 182, 0.24), rgba(166, 166, 182, 0.05));
}

.identity--sm {
  width: 152px;
  height: 34px;
}

.identity--sm .identity-word span:first-child {
  width: 64px;
}

.identity--sm .identity-word span:last-child {
  width: 40px;
}

.nav {
  min-width: 0;
}

.nav-menu {
  position: relative;
}

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-nav);
  background: transparent;
  color: var(--color-ash);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.nav-trigger:hover,
.nav-trigger[aria-expanded="true"] {
  background: var(--color-graphite);
  color: var(--color-chalk);
  border-color: var(--color-hairline);
}

.nav-trigger .chevron {
  opacity: 0.7;
  transition: transform 0.18s var(--ease);
}

.nav-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 90;
  min-width: 320px;
  padding: 6px;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-window);
  background: rgba(14, 14, 20, 0.98);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: dropIn 0.16s var(--ease);
}

.nav-dropdown[hidden] {
  display: none;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-chip);
  transition: background 0.14s var(--ease);
}

.menu-item:hover {
  background: var(--color-graphite);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-chip);
  background: var(--color-carbon);
  color: var(--accent-iris);
}

.menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.menu-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-chalk);
}

.menu-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-slate);
}

.menu-count {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-pill);
  background: var(--color-graphite);
  color: var(--color-ash);
  font-family: var(--font-mono);
  font-size: 11px;
}

.menu-foot {
  margin-top: 6px;
  padding: 10px;
  border-top: 1px solid var(--color-hairline);
}

.menu-foot a {
  font-size: 13px;
  color: var(--color-ash);
  transition: color 0.15s var(--ease);
}

.menu-foot a:hover {
  color: var(--accent-iris);
}

.header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.header-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-slate);
  transition: color 0.15s var(--ease);
}

.header-link:hover {
  color: var(--color-chalk);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  transition:
    transform 0.15s var(--ease),
    background 0.15s var(--ease),
    color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-chalk);
  color: var(--color-void);
}

.btn-primary:hover {
  background: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-chalk);
  box-shadow: inset 0 0 0 1px var(--color-hairline-strong);
}

.btn-secondary:hover {
  background: var(--color-graphite);
  box-shadow: inset 0 0 0 1px #454554;
}

.btn svg {
  opacity: 0.7;
}

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: var(--color-ash);
}

.eyebrow-mark {
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid var(--accent-iris);
  border-radius: 1px;
  box-shadow: 0 0 9px rgba(185, 160, 126, 0.5);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--color-void);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-note {
  font-size: 13px;
  color: var(--color-slate);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-nav);
  color: var(--color-ash);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.social:hover {
  border-color: var(--color-hairline-strong);
  background: var(--color-graphite);
  color: var(--color-chalk);
}

.social svg {
  color: var(--color-slate);
  transition: color 0.15s var(--ease);
}

.social:hover svg {
  color: var(--accent-iris);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-dim);
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-dim);
}

/* ---------- Scrollbars ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: #2c2c38 transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: #2c2c38;
  border: 3px solid var(--color-carbon);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #3a3a48;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .header-link {
    display: none;
  }

  .footer-note {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  .identity {
    width: 148px;
  }

  .identity--sm {
    display: none;
  }

  .footer-inner {
    flex-wrap: wrap;
  }

  .footer-tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
