/* Hero inline editor — edit mode chrome + modal */
.profile-menu-item--hero-color i.fa-solid {
  color: var(--gold-2, #f4d06f);
  opacity: 0.9;
}
.profile-menu-item--hero-color:hover {
  background: rgba(244, 208, 111, 0.1);
}
.profile-menu-item--hero-color:hover i.fa-solid {
  color: var(--gold-light, #fff3c4);
  opacity: 1;
}

.profile-menu-item--edit-hero {
  color: var(--gold-2, #f4d06f);
  font-weight: 600;
}
.profile-menu-item--edit-hero.is-active {
  background: rgba(244, 208, 111, 0.12);
}
.profile-menu-item--edit-hero i {
  color: var(--gold-2, #f4d06f);
}
.profile-menu-item--reset-hero {
  color: rgba(247, 234, 208, 0.92);
}
.profile-menu-item--reset-hero:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}
.profile-menu-item--reset-hero i {
  color: #f87171;
}

html.hero-edit-mode #home .home-first-screen {
  position: relative;
}
html.hero-edit-mode #home .hero,
html.hero-edit-mode #home .hero-copy,
html.hero-edit-mode #home .hero-panel,
html.hero-edit-mode #home .hero-balanced {
  overflow: visible;
}
html.hero-edit-mode #home .home-first-screen::before {
  content: "Hero edit mode — click the pencil on any highlighted block";
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(8, 10, 16, 0.92);
  color: #fff3c4;
  border: 1px solid rgba(244, 208, 111, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero-edit-wrap {
  position: relative;
  display: block;
  max-width: 100%;
}
.hero-edit-wrap.hero-edit-wrap--inline {
  display: inline-block;
}
.hero-edit-wrap.hero-edit-wrap--flex {
  display: inline-flex;
  max-width: 100%;
}

html.hero-edit-mode .hero-edit-wrap > [data-hero-edit-id],
html.hero-edit-mode .hero-edit-wrap.hero-edit-target {
  outline: 2px dashed rgba(244, 208, 111, 0.75);
  outline-offset: 4px;
  border-radius: 4px;
}

html.hero-edit-mode .hero-element-hidden,
body.site-edit-mode .hero-element-hidden {
  opacity: 0.38 !important;
  filter: grayscale(0.25);
}

html.hero-edit-mode .hero-edit-wrap:has(.hero-element-hidden)::after,
body.site-edit-mode .hero-edit-wrap:has(.hero-element-hidden)::after {
  content: "Hidden";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  z-index: 6;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.82);
  border: 1px solid rgba(248, 113, 113, 0.45);
  pointer-events: none;
}

.hero-edit-wrap.hero-edit-wrap--announcement {
  display: block;
  width: 100%;
  max-width: 100%;
}
html.hero-edit-mode .hero-edit-wrap--announcement > [data-hero-edit-id] {
  padding-right: 2.85rem !important;
  box-sizing: border-box;
}
.hero-edit-wrap--announcement .hero-edit-pencil {
  top: 50%;
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  left: auto;
  transform: translateY(-50%);
  z-index: 12;
}
.hero-edit-wrap--announcement .hero-edit-pencil:hover {
  transform: translateY(-50%) scale(1.06);
}

html.hero-edit-mode .hero-edit-wrap,
body.site-edit-mode .hero-edit-wrap {
  position: relative;
  z-index: 6;
}

.hero-edit-pencil {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  z-index: 8;
  pointer-events: auto;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #e8c547 0%, #f4d06f 100%);
  color: #141414;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-edit-pencil--compact {
  width: 0.95rem;
  height: 0.95rem;
  top: -0.2rem;
  right: -0.2rem;
}
.hero-edit-pencil--compact i {
  font-size: 0.45rem;
}
.hero-edit-wrap--stat-card {
  display: flex;
  width: 100%;
}
.hero-edit-wrap--stat-card > .hero-stat {
  flex: 1;
  min-width: 0;
}
.hero-edit-wrap--stat-card > .hero-edit-pencil {
  top: 0.35rem;
  right: 0.35rem;
}
.hero-edit-wrap--stat-icon > .hero-edit-pencil {
  top: -0.15rem;
  right: -0.15rem;
}
.hero-edit-wrap--compact.hero-edit-wrap--inline {
  margin: 0 0.15rem;
}
.hero-edit-pencil:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.hero-edit-pencil i {
  font-size: 0.52rem;
  pointer-events: none;
}

.site-editor-subsection-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(247, 234, 208, 0.72);
}

.hero-edit-modal__preview-inner--stat {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  min-width: min(100%, 220px);
  color: #f4d06f;
}
.hero-edit-modal__stat-preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #f4d06f;
}
.hero-edit-modal__stat-preview-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}
.hero-edit-modal__stat-preview-text strong {
  font-size: 1.05rem;
  line-height: 1.2;
}
.hero-edit-modal__stat-preview-text small {
  font-size: 0.72rem;
  opacity: 0.78;
}

.hero-edit-modal__stat-field {
  margin-bottom: 0.65rem;
}

.hero-edit-modal__stat-input-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.hero-edit-modal__stat-input-row .site-editor-input {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-edit-modal__inline-color-swatch {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: auto;
  min-height: 2.5rem;
  padding: 3px;
  border: 1px solid rgba(244, 208, 111, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-edit-modal__inline-color-swatch:hover,
.hero-edit-modal__inline-color-swatch:focus-visible {
  border-color: rgba(244, 208, 111, 0.75);
  box-shadow: 0 0 0 1px rgba(244, 208, 111, 0.25);
  outline: none;
}

.hero-edit-modal__inline-color-swatch__fill {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 1.85rem;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hero-edit-modal[hidden] {
  display: none !important;
}
body.hero-edit-modal-open {
  overflow: hidden;
}
.hero-edit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(4px);
}
.hero-edit-modal__panel {
  position: relative;
  width: min(100%, 580px);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #141820 0%, #0a0c12 100%);
  color: #f7ead0;
  border-radius: 12px;
  border: 1px solid rgba(244, 208, 111, 0.45);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 48px rgba(244, 208, 111, 0.1);
}
.hero-edit-modal__head {
  padding: 1.1rem 1.2rem 0.55rem;
  padding-right: 3rem;
  border-bottom: 1px solid rgba(244, 208, 111, 0.12);
}
.hero-edit-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f4d06f;
}
.hero-edit-modal__sub {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: rgba(247, 234, 208, 0.65);
  line-height: 1.45;
}
.hero-edit-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 208, 111, 0.35);
  border-radius: 6px;
  background: rgba(12, 14, 20, 0.9);
  color: #f4d06f;
  cursor: pointer;
}
.hero-edit-modal__body {
  overflow: auto;
  padding: 0.9rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #1a1c24 #000000;
}
.hero-edit-modal__styles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.hero-edit-modal__field--full {
  grid-column: 1 / -1;
}
.hero-edit-modal__preview {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: linear-gradient(165deg, #141820 0%, #080a10 100%);
  border: 1px dashed rgba(244, 208, 111, 0.28);
  min-height: 3.5rem;
  transition: opacity 0.2s ease;
}

.hero-edit-modal__preview.hero-edit-modal__preview--hidden {
  opacity: 0.4;
  border-color: rgba(248, 113, 113, 0.35);
}
.hero-edit-modal__preview-inner {
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.55;
}
.hero-edit-modal__preview-inner[data-preview-variant="title"] {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 600;
}
.hero-edit-modal__preview-inner[data-preview-variant="eyebrow"] {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-edit-modal__preview-inner[data-preview-variant="lead"] {
  font-size: 0.92rem;
  line-height: 1.65;
}
.hero-edit-modal__preview-inner[data-preview-variant="btn-primary"],
.hero-edit-modal__preview-inner[data-preview-variant="btn-secondary"] {
  font-size: 0.88rem;
  font-weight: 600;
}
.hero-edit-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px solid rgba(244, 208, 111, 0.12);
}
.hero-edit-modal__btn {
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.hero-edit-modal__btn--ghost {
  border: 1px solid rgba(244, 208, 111, 0.35);
  background: rgba(12, 14, 20, 0.85);
  color: #f7ead0;
}
.hero-edit-modal__btn--primary {
  border: 1px solid rgba(244, 208, 111, 0.55);
  background: rgba(244, 208, 111, 0.18);
  color: #f4d06f;
}
.hero-edit-modal--title .hero-edit-modal__panel {
  width: min(100%, 600px);
}

.hero-edit-modal__word-colors-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.hero-edit-modal__word-colors-add input[type="color"] {
  width: 2.5rem;
  height: 2.1rem;
  padding: 0.15rem;
  border: 1px solid rgba(244, 208, 111, 0.28);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  background: rgba(8, 10, 16, 0.85);
}
.hero-edit-modal__mini-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 7px;
  border: 1px solid rgba(244, 208, 111, 0.35);
  background: rgba(244, 208, 111, 0.1);
  color: #f4d06f;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.hero-edit-modal__word-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hero-edit-modal__word-empty {
  font-size: 0.8rem;
  color: rgba(247, 234, 208, 0.55);
  padding: 0.35rem 0;
}
.hero-edit-modal__word-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  background: rgba(8, 10, 16, 0.55);
  border: 1px solid rgba(244, 208, 111, 0.18);
  border-radius: 8px;
  font-size: 0.82rem;
}
.hero-edit-modal__word-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.hero-edit-modal__word-label {
  flex: 1;
  font-weight: 600;
  color: #f7ead0;
}
.hero-edit-modal__word-hex {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: rgba(247, 234, 208, 0.55);
}
.hero-edit-modal__word-remove {
  border: none;
  background: transparent;
  color: rgba(247, 234, 208, 0.55);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.hero-edit-modal__word-remove:hover {
  color: #ef4444;
}

.hero-edit-modal__icon-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  margin-bottom: 0.65rem;
  border-radius: 10px;
  border: 1px dashed rgba(244, 208, 111, 0.35);
  background: rgba(8, 10, 16, 0.55);
  font-size: 1.75rem;
  color: #f4d06f;
}
.hero-edit-modal__icon-empty {
  font-size: 0.82rem;
  color: rgba(247, 234, 208, 0.55);
}
.hero-edit-modal__icon-quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.hero-edit-modal__icon-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(244, 208, 111, 0.22);
  background: rgba(12, 14, 20, 0.85);
  color: #f4d06f;
  cursor: pointer;
  font-size: 1rem;
}
.hero-edit-modal__icon-quick:hover,
.hero-edit-modal__icon-quick:focus-visible {
  border-color: rgba(244, 208, 111, 0.55);
  background: rgba(244, 208, 111, 0.08);
}
.hero-edit-modal__icon-browse {
  width: 100%;
  justify-content: center;
  gap: 0.45rem;
}
.hero-edit-modal__preview-inner--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  font-size: 1.5rem;
}
