/**
 * Royal Amethyst accent palette — LIVE (approved by Larry, Nov 20, 2026).
 * Always loaded on the front end. Buttons, header, and layout stay as they
 * were. The homepage hero uses one smooth vertical gradient
 * (lavender → pale sapphire → warm peach) flowing into the cityscape,
 * with no hard color bands between the hero and the next light sections.
 *
 * Tokens:
 *   Sapphire     #0F52BA
 *   Topaz        #FFC87C
 *   Chalcedony   #B8C6D9  (borders; large surfaces use the light tint)
 *   Tint         #E8EEF8
 *   Amethyst     #9966CC  (decorative only; not small text on white)
 *   Page gradient #F3EAF8 → #E8EEF8 → #FFF6E8 → #FFF
 */

html body.otg-palette-royal {
  --otg-sapphire: #0F52BA;
  --otg-sapphire-hover: #0C4499;
  --otg-topaz: #FFC87C;
  --otg-chalcedony: #B8C6D9;
  --otg-chalcedony-tint: #E8EEF8;
  --otg-amethyst: #9966CC;
  --otg-ink: #140217;
  --otg-grad-1: #F3EAF8;
  --otg-grad-2: #E8EEF8;
  --otg-grad-3: #FFF6E8;
  --otg-blend: linear-gradient(180deg, #F3EAF8 0%, #E8EEF8 42%, #FFF6E8 78%, #FFF6E8 100%);
}

/* Thin Sapphire → Topaz bar at the very top. Fixed overlay; does not shift layout. */
html body.otg-palette-royal::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0F52BA 0%, #FFC87C 100%) !important;
  z-index: 100000;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Homepage: one continuous blend behind the hero and the following
   light sections, so the cityscape sits on warm peach with no hard edge.
   Buttons, header, search, stamp, and layout are not restyled.
   --------------------------------------------------------------------------- */
html body.otg-palette-royal.page-id-62 .site-main,
html body.otg-palette-royal.page-id-62 .page-content {
  background: transparent !important;
}

html body.otg-palette-royal.page-id-62 .otg-fullhero {
  background-color: #F3EAF8 !important;
  background-image: linear-gradient(180deg, #F3EAF8 0%, #E8EEF8 42%, #FFF6E8 78%, #FFF6E8 100%) !important;
  background-blend-mode: normal !important;
}

/*
  The hero art is a flat #EADCF0 fill with the cityscape only in the bottom
  ~16%. Hide that baked-in lilac (mask + chroma-key filter) so the CSS
  gradient shows through and the buildings sit on the peach.
*/
html body.otg-palette-royal.page-id-62 .otg-fullhero .otg-fullhero-img {
  background: transparent !important;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 76%, #000 84%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, transparent 76%, #000 84%, #000 100%);
  filter: url(#otg-key-lilac);
}

/* Counties continues the same peach, then eases to white — no lilac restart. */
html body.otg-palette-royal.page-id-62 .otg-counties {
  background: transparent !important;
}

html body.otg-palette-royal.page-id-62 .otg-counties::before {
  height: 100% !important;
  background-image: linear-gradient(180deg, #FFF6E8 0%, #FFFCF7 40%, #ffffff 100%) !important;
}

@media (max-width: 960px) {
  html body.otg-palette-royal.page-id-62 .otg-counties::before {
    height: 100% !important;
  }
}

/* Keep homepage county cards white, as on the live site, so they sit on the blend. */
html body.otg-palette-royal.page-id-62 .otg-county-card {
  background: #fff !important;
}

/* ---------------------------------------------------------------------------
   Other pages: keep the earlier soft panel tints (these are not button changes)
   --------------------------------------------------------------------------- */
html body.otg-palette-royal .otg-comm-band {
  background: linear-gradient(180deg, #E8EEF8 0%, #F4F7FB 58%, #fff 100%) !important;
}

html body.otg-palette-royal .otg-comm-soon {
  background: linear-gradient(180deg, #E8EEF8 0%, #fff 100%) !important;
}

html body.otg-palette-royal .otg-comm-jump a {
  background: #E8EEF8 !important;
}

html body.otg-palette-royal .otg-comm-jump a:hover,
html body.otg-palette-royal .otg-comm-jump a:focus-visible {
  background: #703996 !important;
  color: #fff !important;
}

html body.otg-palette-royal .otg-blog-card,
html body.otg-palette-royal .otg-feed-card,
html body.otg-palette-royal .otg-blog-empty,
html body.otg-palette-royal .otg-git-card {
  background: linear-gradient(180deg, #E8EEF8 0%, #F4F7FB 58%, #fff 100%) !important;
}

html body.otg-palette-royal .otg-blog-media {
  background: #E8EEF8 !important;
}

html body.otg-palette-royal .otg-card {
  background: #E8EEF8 !important;
  border-left-color: #9966CC !important;
}

html body.otg-palette-royal .otg-placeholder {
  background: #E8EEF8 !important;
  border-color: #9966CC !important;
}

/* ---------------------------------------------------------------------------
   Badges: Topaz #FFC87C with dark text (not a button change).
   IDX listing badges are not live yet; hours open/on-call use the same gold.
   --------------------------------------------------------------------------- */
html body.otg-palette-royal .otg-listing-badge,
html body.otg-palette-royal .new-listing,
html body.otg-palette-royal .just-sold,
html body.otg-palette-royal .badge-new-listing,
html body.otg-palette-royal .badge-just-sold {
  background: #FFC87C !important;
  color: #140217 !important;
  border-color: transparent !important;
}

html body.otg-palette-royal [data-state="open"] .otg-badge {
  background: #FFC87C !important;
  color: #140217 !important;
  border-color: transparent !important;
}

html body.otg-palette-royal [data-state="oncall"] .otg-badge {
  color: #FFC87C !important;
  border-color: #FFC87C !important;
}

/* Amethyst decorative touches only — never small text on white (4.1:1). */
html body.otg-palette-royal .otg-hours-row {
  border-bottom-color: rgba(153, 102, 204, 0.28) !important;
}
