@import url("../../assets/site-shell.css");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.murphy-site,
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Rajdhani", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% -8%, rgba(99, 230, 255, 0.2) 0%, transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(255, 88, 208, 0.18) 0%, transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(99, 230, 255, 0.08) 0%, transparent 38%),
    linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-deep) 58%, var(--page-bg-accent) 100%);
}

body.murphy-site::before,
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 20%),
    repeating-linear-gradient(
      to right,
      rgba(99, 230, 255, 0.045) 0,
      rgba(99, 230, 255, 0.045) 1px,
      transparent 1px,
      transparent 112px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 14px
    );
  opacity: 0.38;
}

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

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

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

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

.page-shell main {
  display: grid;
  gap: 24px;
}

.site-frame {
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 22%, transparent 100%),
    var(--surface-strong);
  box-shadow: var(--shadow-glow);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 0%, rgba(99, 230, 255, 0.16) 0%, transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(255, 88, 208, 0.14) 0%, transparent 26%),
    linear-gradient(180deg, rgba(10, 17, 28, 0.96) 0%, rgba(5, 10, 18, 0.98) 100%);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(99, 230, 255, 0) 0%, rgba(99, 230, 255, 0.72) 35%, rgba(255, 88, 208, 0.52) 75%, rgba(255, 88, 208, 0) 100%);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.site-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 14px 18px;
}

.site-header .site-brand {
  display: none;
}

.site-header .site-brand-kicker {
  display: none;
}

.site-header .site-brand-name {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-header .site-brand-subtitle {
  margin: 0;
  max-width: 580px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}

.site-nav-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-width: 0;
}

.site-nav-label,
.site-header-foot,
.site-path-label {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 40, 0.86) 0%, rgba(10, 16, 24, 0.94) 100%);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.site-menu-toggle:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(23, 36, 52, 0.94) 0%, rgba(11, 18, 27, 0.98) 100%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 230, 255, 0.08);
  transform: translateY(-1px);
}

.site-menu-toggle[aria-expanded="true"] {
  border-color: rgba(99, 230, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(18, 32, 47, 0.96) 0%, rgba(10, 18, 27, 0.98) 100%),
    linear-gradient(90deg, rgba(99, 230, 255, 0.08) 0%, rgba(255, 88, 208, 0.06) 100%);
  box-shadow:
    0 0 0 1px rgba(99, 230, 255, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-menu-icon {
  display: grid;
  gap: 4px;
}

.site-menu-icon span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 140ms ease,
    opacity 140ms ease;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon span:nth-child(2) {
  opacity: 0;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-menu-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-menu-panel[hidden] {
  display: none !important;
}

.site-menu-link {
  width: 100%;
}

.site-link,
.site-button,
.route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 40, 0.86) 0%, rgba(10, 16, 24, 0.94) 100%);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.site-link:hover,
.site-button:hover,
.route-link:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(23, 36, 52, 0.94) 0%, rgba(11, 18, 27, 0.98) 100%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 230, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.site-link:focus-visible,
.site-button:focus-visible,
.route-link:focus-visible,
.site-menu-toggle:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(99, 230, 255, 0.18);
  color: var(--text);
}

.site-link[aria-current="page"] {
  border-color: rgba(99, 230, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(18, 32, 47, 0.96) 0%, rgba(10, 18, 27, 0.98) 100%),
    linear-gradient(90deg, rgba(99, 230, 255, 0.08) 0%, rgba(255, 88, 208, 0.06) 100%);
  color: var(--text);
}

.site-button.primary {
  border-color: rgba(99, 230, 255, 0.48);
  background: linear-gradient(135deg, rgba(25, 88, 112, 0.96) 0%, rgba(12, 38, 63, 0.98) 60%, rgba(31, 20, 57, 0.96) 100%);
  color: var(--text);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-button.primary:hover {
  border-color: rgba(99, 230, 255, 0.66);
  background: linear-gradient(135deg, rgba(31, 109, 136, 0.98) 0%, rgba(13, 45, 71, 1) 58%, rgba(39, 24, 69, 0.98) 100%);
}

.site-nav-block > .site-button {
  display: none;
}

.section-label,
.micro-label,
.summary-kicker,
.metric-label,
.route-tag,
.role-tag,
.flow-chip,
.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-label,
.micro-label,
.summary-kicker,
.metric-label {
  color: var(--accent);
}

.section-title {
  margin: 0;
  color: var(--text);
  font-family: "Rajdhani", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(46px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.section-copy,
.card-copy,
.artifact-copy,
.site-note,
.footer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.55;
}

.card-title,
.artifact-title,
.panel-title {
  margin: 0;
  color: var(--text);
  font-family: "Rajdhani", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.action-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 27, 40, 0.72);
  color: var(--text-muted);
}

.chip.is-warning,
.chip.role-developer {
  border-color: rgba(255, 211, 106, 0.24);
  background: rgba(255, 211, 106, 0.08);
  color: var(--warning);
}

.chip.is-success,
.chip.role-tribune {
  border-color: rgba(125, 255, 208, 0.2);
  background: rgba(125, 255, 208, 0.08);
  color: var(--success);
}

.chip.is-magenta,
.chip.role-worker {
  border-color: rgba(255, 88, 208, 0.24);
  background: rgba(255, 88, 208, 0.08);
  color: #ffc4ef;
}

.section-head,
.hero-copy,
.artifact-panel,
.summary-shell {
  display: grid;
  gap: 14px;
}

.footer-note {
  max-width: 760px;
  margin: 32px auto 0;
  text-align: center;
}

.site-path {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 13px;
}

.site-path-separator {
  color: rgba(113, 129, 151, 0.72);
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 20px, 1220px);
    padding-bottom: 56px;
  }

  .site-header-main {
    gap: 12px;
    padding: 10px 12px;
  }

  .site-nav-block {
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
  }

  .site-nav {
    display: none;
  }

  .site-menu-toggle {
    display: inline-flex;
  }

  .site-menu-panel {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .site-menu-link {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100vw - 16px);
    padding-top: 8px;
  }

  .site-header {
    top: 8px;
    margin-bottom: 14px;
    border-radius: 22px;
  }

  .site-header-main {
    gap: 10px;
    padding: 10px 12px;
  }

  .site-menu-toggle {
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
  }

  .site-menu-icon span {
    width: 16px;
  }

  .site-menu-panel {
    padding: 0 12px 12px;
  }

  .site-menu-link {
    min-height: 36px;
  }

  .site-header .site-brand-kicker,
  .site-header .site-brand-subtitle,
  .site-nav-block > .site-button {
    display: none;
  }

  .site-header .site-brand-name {
    font-size: 19px;
  }

  .site-link,
  .site-button,
  .route-link {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }

  .section-title {
    font-size: clamp(38px, 14vw, 54px);
  }

  .card-title,
  .artifact-title,
  .panel-title {
    font-size: clamp(24px, 8vw, 32px);
  }

  .section-copy,
  .card-copy,
  .artifact-copy,
  .site-note,
  .footer-note {
    font-size: 16px;
    line-height: 1.52;
  }
}
