/* ============================================================
   glow.css - first-pass accent glow for in-page interactive
   elements. Loaded last so it only adds a halo on top of the
   component styles. The header is deliberately excluded: its
   controls keep the calm pill look.
   ============================================================ */

:root {
  /* One accent hue at three strengths. Plain rgba keeps the file
     compatible with browsers that do not support color-mix(). */
  --glow-accent-soft: rgba(232, 161, 60, 0.2);
  --glow-accent: rgba(232, 161, 60, 0.42);
  --glow-accent-strong: rgba(232, 161, 60, 0.62);
  --glow-danger-soft: rgba(255, 107, 90, 0.18);
  --glow-danger: rgba(255, 107, 90, 0.4);
  --glow-danger-strong: rgba(255, 107, 90, 0.6);

  /* How long a halo takes to appear and to fade away. One token
     keeps every glow in sync and makes retuning trivial. */
  --glow-fade: 0.25s;

  /* Reusable halos for quiet controls that should glow only while
     hovered or pressed. */
  --glow-filter: drop-shadow(0 0 6px var(--glow-accent))
    drop-shadow(0 0 16px var(--glow-accent-soft));
  --glow-filter-strong: drop-shadow(0 0 7px var(--glow-accent-strong))
    drop-shadow(0 0 22px var(--glow-accent));
  --glow-filter-danger: drop-shadow(0 0 6px var(--glow-danger))
    drop-shadow(0 0 16px var(--glow-danger-soft));
}

/* ----- Always-on halos around accent-filled controls -----
   These are the bright actions: primary buttons, active filter
   pills, the active up vote, the captcha thumb and the round
   search button. The original inset highlight and neutral drop
   shadow are kept, with the accent halo appended. */

.btn--primary:not(.header__contact-btn) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .btn--primary:not(.header__contact-btn):hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 6px 20px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }
}

/* Destructive confirmation keeps its red identity, so its halo is
   red too. The selector is more specific than the primary rule. */
.btn--primary.review-popup__danger {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 14px rgba(0, 0, 0, 0.3),
    0 0 12px var(--glow-danger),
    0 0 26px var(--glow-danger-soft);
}

@media (hover: hover) {
  .btn--primary.review-popup__danger:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 6px 20px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-danger-strong),
      0 0 36px var(--glow-danger);
  }
}

.sort-control__btn.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .sort-control__btn.is-active:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 6px 20px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }
}

.room-filters__btn.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .room-filters__btn.is-active:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 6px 20px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }
}

.vote-btn--active.vote-btn--up {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .vote-btn--active.vote-btn--up:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 4px 14px rgba(0, 0, 0, 0.35),
      0 0 18px var(--glow-accent-strong),
      0 0 34px var(--glow-accent);
  }
}

.calc-scale__item.is-active .calc-scale__pill {
  box-shadow:
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .calc-scale__item:hover .calc-scale__pill {
    box-shadow:
      0 0 16px var(--glow-accent-strong),
      0 0 32px var(--glow-accent);
  }
}

.calc-scale__item:focus-within .calc-scale__pill {
  box-shadow:
    0 0 16px var(--glow-accent-strong),
    0 0 32px var(--glow-accent);
}

.blog-search__submit {
  box-shadow:
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .blog-search__submit:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 6px 20px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }
}

.captcha-slider__thumb {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .captcha-slider__thumb:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 4px 14px rgba(0, 0, 0, 0.35),
      0 0 18px var(--glow-accent-strong),
      0 0 34px var(--glow-accent);
  }
}

/* Passed captcha: the thumb turns green, so the halo follows it. */
.captcha-slider.captcha--done .captcha-slider__thumb {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(88, 201, 138, 0.5),
    0 0 26px rgba(88, 201, 138, 0.25);
}

.calc-scale__tip-ok {
  box-shadow:
    0 0 12px var(--glow-accent),
    0 0 26px var(--glow-accent-soft);
}

@media (hover: hover) {
  .calc-scale__tip-ok:hover {
    box-shadow:
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }
}

/* ----- Hover halos for quiet controls -----
   These keep their existing neutral shadows and get a temporary
   drop-shadow halo instead of a rewritten box-shadow. */

@media (hover: hover) {
  .sort-control__btn:hover,
  .room-filters__btn:hover,
  .vote-btn:hover,
  .blog-comments-btn:hover,
  .about__flip-btn:hover,
  .contact-card__btn:hover,
  .btn:not(.btn--primary):hover,
  .review-form__cancel:hover,
  .calc-result__reset:hover,
  .best-works__more-link:hover,
  .reviews-head__link:hover,
  .contact-popup__item:hover,
  .contact-popup__cancel:hover,
  .contact-popup__close:hover,
  .blog-comments-popup__close:hover,
  .blog-comment__reply:hover,
  .blog-comment__edit:hover,
  .review-card__edit:hover,
  .lightbox__close:hover,
  .how-we-work__step:hover,
  .social:hover {
    filter: var(--glow-filter);
  }

  .review-card__delete:hover,
  .blog-comment__delete:hover,
  .review-media-chip__remove:hover {
    filter: var(--glow-filter-danger);
  }

  .star:hover {
    text-shadow:
      0 0 10px var(--glow-accent),
      0 0 20px var(--glow-accent-soft);
  }

  .blog-post__content a:hover,
  .calc-drop__option:hover {
    text-shadow:
      0 0 10px var(--glow-accent),
      0 0 20px var(--glow-accent-soft);
  }
}

/* ----- Clickable cards -----
   A soft accent rim joins the existing neutral hover shadow, so the
   cards read as interactive without turning into lamps. */

@media (hover: hover) {
  .best-work:hover,
  .work-card:hover,
  .blog-card:hover,
  .contact-card:hover,
  .callout:hover {
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.45),
      0 0 22px var(--glow-accent-soft),
      0 0 42px rgba(232, 161, 60, 0.1);
  }

  .work-gallery__img:hover,
  .work-gallery__item--video:hover {
    box-shadow:
      0 10px 24px rgba(0, 0, 0, 0.35),
      0 0 20px var(--glow-accent-soft),
      0 0 38px rgba(232, 161, 60, 0.1);
  }

  .about__photo:hover {
    box-shadow:
      0 0 0 1px rgba(232, 161, 60, 0.2),
      0 0 24px var(--glow-accent-soft),
      0 0 44px rgba(232, 161, 60, 0.08);
  }
}

/* Keyboard focus on a card that contains its own controls, and the
   open state of an accordion card. */
.work-card:focus-within,
.contact-card:focus-within,
.callout:focus-within,
.callout.is-open,
.about__photo:focus-within {
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 0 20px var(--glow-accent-soft),
    0 0 38px rgba(232, 161, 60, 0.1);
}

/* The summary is focusable but its outline would be clipped by the
   card's overflow: hidden, so the focus ring is drawn inside it. */
.callout:focus-within {
  outline: 2px solid rgba(232, 161, 60, 0.9);
  outline-offset: -2px;
}

.blog-card:focus-visible,
.best-work:focus-visible,
.contact-card:focus-visible {
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    0 0 22px var(--glow-accent-soft),
    0 0 42px rgba(232, 161, 60, 0.1);
}

/* ----- Form fields and dropdowns -----
   The accent border already exists in the component files; these
   rules add the halo that goes with it. */

.calc__input:focus-within,
.blog-search__field:focus-within,
.captcha-slider__track:focus-within {
  box-shadow:
    0 0 14px var(--glow-accent),
    0 0 28px var(--glow-accent-soft);
}

.blog-search__field:focus-within {
  border-color: var(--accent);
}

.review-form input:focus,
.review-form textarea:focus,
.review-form__media input:focus {
  box-shadow:
    0 0 14px var(--glow-accent),
    0 0 28px var(--glow-accent-soft);
}

.review-form__media input:focus {
  border-color: var(--accent);
}

@media (hover: hover) {
  .review-form__media input:hover {
    box-shadow:
      0 0 12px var(--glow-accent),
      0 0 24px var(--glow-accent-soft);
  }
}

.calc-drop.is-open .calc-drop__trigger {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px var(--glow-accent),
    0 0 28px var(--glow-accent-soft);
}

@media (hover: hover) {
  .calc-drop__trigger:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 14px var(--glow-accent),
      0 0 28px var(--glow-accent-soft);
  }

  .calc__step:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 12px var(--glow-accent),
      0 0 24px var(--glow-accent-soft);
  }
}

/* ----- Timeline steps -----
   The whole step glows through one filter on the list item: the
   accent dot and the label both get their halo from that rule,
   so nothing is doubled up here. The fade lives in the motion
   block at the bottom of the file. */

/* ----- Back link and lightbox chrome ----- */

@media (hover: hover) {
  .back-link:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 8px 24px rgba(0, 0, 0, 0.45),
      0 0 18px var(--glow-accent-strong),
      0 0 36px var(--glow-accent);
  }

  .lightbox__center:hover,
  .lightbox__seek:hover {
    box-shadow:
      0 0 16px var(--glow-accent-strong),
      0 0 32px var(--glow-accent);
  }

  .lightbox__play:hover,
  .lightbox__fs:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 16px var(--glow-accent-strong),
      0 0 32px var(--glow-accent);
  }

  .lightbox__nav:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 0 18px var(--glow-accent-strong),
      0 0 34px var(--glow-accent);
  }
}

.lightbox__center:active,
.lightbox__seek:active,
.lightbox__play:active,
.lightbox__fs:active,
.lightbox__nav:active {
  box-shadow:
    0 0 18px var(--glow-accent-strong),
    0 0 36px var(--glow-accent);
}

/* ----- Keyboard focus and press feedback -----
   One rule covers every in-page link and button. The header is not
   in these scopes, so its controls stay glow-free. */

.section :is(a, button, [tabindex]):focus-visible,
.footer :is(a, button):focus-visible,
.contact-popup :is(a, button, [tabindex]):focus-visible,
.review-popup :is(button, [tabindex]):focus-visible,
.vote-popover :is(button, [tabindex]):focus-visible,
.lightbox :is(button, [tabindex]):focus-visible,
.blog-comments-popup :is(a, button, [tabindex]):focus-visible {
  outline: 2px solid rgba(232, 161, 60, 0.9);
  outline-offset: 3px;
  filter: var(--glow-filter);
}

.section :is(a, button, [tabindex]):active,
.footer :is(a, button):active,
.contact-popup :is(a, button, [tabindex]):active,
.review-popup :is(button, [tabindex]):active,
.vote-popover :is(button, [tabindex]):active,
.lightbox :is(button, [tabindex]):active,
.blog-comments-popup :is(a, button, [tabindex]):active {
  filter: var(--glow-filter-strong);
}

/* Destructive actions keep the red halo on focus and press. */
.section .review-card__delete:focus-visible,
.section .blog-comment__delete:focus-visible,
.section .review-media-chip__remove:focus-visible,
.section .review-card__delete:active,
.section .blog-comment__delete:active,
.section .review-media-chip__remove:active,
.review-popup .review-popup__danger:focus-visible,
.review-popup .review-popup__danger:active {
  outline-color: rgba(255, 107, 90, 0.9);
  filter: var(--glow-filter-danger);
}

/* Active stars already carry the accent fill; the halo makes the
   chosen rating readable at a glance. */
.star--active {
  text-shadow:
    0 0 10px var(--glow-accent),
    0 0 20px var(--glow-accent-soft);
}

/* ============================================================
   Glow motion - halos fade in and out instead of popping.
   Everything here lives inside prefers-reduced-motion, so
   users who opt out of animation keep the instant feedback
   the component files give them.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  /* Every interactive element inside the glow scopes: the halo
     properties fade, while color, background, border and
     transform keep their usual timing in the same list. The
     back-link is excluded: it animates padding, gap and radius
     while folding, and its own transition list already fades
     the box-shadow halo. */
  .section :is(a, button, [tabindex]):not(.back-link),
  .footer :is(a, button),
  .contact-popup :is(a, button, [tabindex]),
  .review-popup :is(button, [tabindex]),
  .vote-popover :is(button, [tabindex]),
  .lightbox :is(button, [tabindex]),
  .blog-comments-popup :is(a, button, [tabindex]) {
    transition:
      color 0.2s,
      background 0.2s,
      border-color 0.2s,
      box-shadow var(--glow-fade) ease,
      filter var(--glow-fade) ease,
      text-shadow var(--glow-fade) ease,
      transform 0.25s ease,
      opacity 0.25s ease;
  }

  /* Halo carriers that are plain divs or the captcha thumb, so
     they miss the interactive rule above. */
  .about__photo,
  .calc__input,
  .blog-search__field,
  .captcha-slider__track,
  .calc-scale__pill,
  .captcha-slider__thumb {
    transition:
      background 0.2s,
      border-color 0.2s,
      box-shadow var(--glow-fade) ease,
      filter var(--glow-fade) ease,
      text-shadow var(--glow-fade) ease;
  }

  /* The whole timeline step glows through a filter on the list
     item, so the dot and the label fade as one shape. */
  .how-we-work__step {
    transition: filter var(--glow-fade) ease;
  }

  /* Form fields had no transitions before; the halo and the
     accent border now appear and fade together. */
  .review-form input,
  .review-form textarea,
  .review-form__media input {
    transition:
      color 0.2s,
      background 0.2s,
      border-color 0.2s,
      box-shadow var(--glow-fade) ease,
      filter var(--glow-fade) ease,
      text-shadow var(--glow-fade) ease;
  }
}
