/*
 * Optimal Home — Urban Trust Premium 2.0 / static material layer.
 * Scope: homepage only. Version 0.2.46.
 * The static 0.2.44 design remains the fallback; precise desktop pointers may
 * progressively enhance the hero with compositor-only reactive light.
 */

body.oh-utp2-static {
  --oh-utp2-ink: #11191d;
  --oh-utp2-ink-deep: #081412;
  --oh-utp2-paper: #f4f1eb;
  --oh-utp2-paper-deep: #e6dfd4;
  --oh-utp2-gold: #d7b66f;
  --oh-utp2-copper: #b86f42;
  --oh-utp2-line-dark: rgba(255, 255, 255, 0.12);
  --oh-utp2-line-light: rgba(17, 25, 29, 0.09);
  --oh-utp2-mark-white: url("../brand/optimalhome-mark-white.svg");
  --oh-utp2-mark-ink: url("../brand/optimalhome-mark-ink.svg");
  --oh-utp2-radius-raised: 24px 24px 62px 24px;
  --oh-utp2-radius-floating: 30px 30px 30px 96px;
  --oh-utp2-shadow-recessed:
    inset 8px 8px 20px rgba(74, 67, 55, 0.1),
    inset -8px -8px 20px rgba(255, 255, 255, 0.68);
  --oh-utp2-shadow-raised:
    22px 26px 58px rgba(49, 43, 33, 0.13),
    -12px -12px 30px rgba(255, 255, 255, 0.62),
    inset 1px 1px 0 rgba(255, 255, 255, 0.78);
  --oh-utp2-shadow-dark:
    30px 38px 82px rgba(0, 0, 0, 0.3),
    -10px -10px 30px rgba(255, 255, 255, 0.025),
    inset 1px 1px 0 rgba(255, 255, 255, 0.1);
}

/* Owner-reviewed hero: keep reactive light, never place the mark on the photo. */
body.oh-utp2-static .oh-urban-hero {
  --oh-utp2-mark-x: 0px;
  --oh-utp2-mark-y: 0px;
  --oh-utp2-light-x: 0px;
  --oh-utp2-light-y: 0px;
  --oh-utp2-light-opacity: 0.72;
  isolation: isolate;
}

body.oh-utp2-static .oh-urban-hero::before {
  display: none;
  content: none;
}

body.oh-utp2-static .oh-urban-hero::after {
  display: none;
  content: none;
}

body.oh-utp2-static .oh-urban-hero__inner {
  position: relative;
  z-index: 2;
}

body.oh-utp2-static .oh-urban-hero__section-nav {
  z-index: 22;
}

body.oh-utp2-static .oh-urban-hero__signals span {
  border-radius: 12px 12px 24px 12px;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18),
    inset 1px 1px 0 rgba(255, 255, 255, 0.08);
}

body.oh-utp2-static .oh-urban-hero__facts article {
  border: 0;
  border-left: 1px solid rgba(215, 182, 111, 0.58);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.oh-utp2-static .oh-urban-hero__facts article:nth-child(2) {
  border-radius: 0;
}

body.oh-utp2-static .oh-urban-hero__facts article:nth-child(3) {
  border-radius: 0;
}

/* Authored light-to-dark transition: architectural notch, never a generic circle. */
body.oh-utp2-static .oh-urban-decision-strip {
  isolation: isolate;
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(215, 182, 111, 0.065), transparent 34%),
    linear-gradient(142deg, #10191c, #081412 72%);
  box-shadow:
    inset 0 1px 0 rgba(215, 182, 111, 0.24),
    inset 0 -18px 36px rgba(0, 0, 0, 0.14);
}

body.oh-utp2-static .oh-urban-decision-strip::before {
  position: absolute;
  z-index: -1;
  top: -36px;
  right: 0;
  left: 0;
  height: 38px;
  content: "";
  pointer-events: none;
  background: linear-gradient(102deg, #10191c, #081412 72%);
  clip-path: polygon(0 72%, 17% 72%, 23% 0, 75% 0, 81% 72%, 100% 72%, 100% 100%, 0 100%);
}

body.oh-utp2-static .oh-urban-decision-strip::after {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 8%;
  width: 48%;
  height: 1px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--oh-utp2-gold), rgba(184, 111, 66, 0.16));
  box-shadow: 0 8px 26px rgba(215, 182, 111, 0.2);
}

/* First light surface after the hero: recessed field, exact-mark watermark. */
body.oh-utp2-static #brxe-ueczcz {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.52), transparent 36%),
    linear-gradient(145deg, var(--oh-utp2-paper), var(--oh-utp2-paper-deep)) !important;
}

body.oh-utp2-static #brxe-ueczcz::before {
  position: absolute;
  z-index: 0;
  right: clamp(-190px, -8vw, -70px);
  bottom: clamp(-250px, -12vw, -120px);
  width: clamp(420px, 46vw, 690px);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  opacity: 0.038;
  background: var(--oh-utp2-mark-ink) center / contain no-repeat;
  transform: rotate(9deg);
}

body.oh-utp2-static #brxe-ueczcz::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: min(58%, 820px);
  height: 2px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--oh-utp2-copper), var(--oh-utp2-gold));
  box-shadow: 0 14px 42px rgba(184, 111, 66, 0.18);
}

body.oh-utp2-static #brxe-mpjqsj {
  position: relative;
  z-index: 1;
}

/* Give the verified company panel a restrained embossed mark, not another badge. */
body.oh-utp2-static .oh-home-credibility__lead {
  border-radius: var(--oh-utp2-radius-floating);
  box-shadow: var(--oh-utp2-shadow-dark);
}

body.oh-utp2-static .oh-home-credibility__company {
  position: relative;
  overflow: hidden;
  border-radius: var(--oh-utp2-radius-raised);
  box-shadow:
    inset 7px 7px 20px rgba(0, 0, 0, 0.2),
    inset -1px -1px 0 rgba(255, 255, 255, 0.055);
}

body.oh-utp2-static .oh-home-credibility__company::before {
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 190px;
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  opacity: 0.04;
  background: var(--oh-utp2-mark-white) center / contain no-repeat;
  transform: rotate(8deg);
}

body.oh-utp2-static .oh-home-credibility__company > * {
  position: relative;
  z-index: 1;
}

/*
 * Reactive Light 1.0. The glow is a rasterizable gradient layer moved only by
 * transform and opacity. No background-position, filter or shadow animation.
 */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.oh-utp2-static.oh-utp2-reactive-ready .oh-urban-hero__inner::before {
    position: absolute;
    z-index: -1;
    top: -7%;
    right: -9%;
    width: min(66vw, 920px);
    height: min(72vh, 690px);
    content: "";
    pointer-events: none;
    opacity: 0;
    background:
      radial-gradient(ellipse at 56% 44%, rgba(224, 190, 116, 0.2) 0%, rgba(184, 111, 66, 0.105) 28%, rgba(30, 47, 49, 0.04) 52%, transparent 72%);
    transform: translate3d(var(--oh-utp2-light-x), var(--oh-utp2-light-y), 0) scale(1.02);
    transition: opacity 300ms ease, transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
    contain: paint;
  }

  body.oh-utp2-static.oh-utp2-reactive-ready .oh-urban-hero.is-oh-utp2-reactive-active .oh-urban-hero__inner::before {
    will-change: transform, opacity;
  }

  body.oh-utp2-static.oh-utp2-reactive-ready .oh-urban-hero.is-oh-utp2-reactive-active .oh-urban-hero__inner::before {
    opacity: var(--oh-utp2-light-opacity);
  }
}

@media (max-width: 767px) {
  body.oh-utp2-static .oh-urban-hero__facts article,
  body.oh-utp2-static .oh-urban-hero__facts article:nth-child(2),
  body.oh-utp2-static .oh-urban-hero__facts article:nth-child(3) {
    border-radius: 0;
  }

  body.oh-utp2-static .oh-urban-decision-strip::before {
    top: -25px;
    height: 27px;
    clip-path: polygon(0 74%, 12% 74%, 20% 0, 78% 0, 88% 74%, 100% 74%, 100% 100%, 0 100%);
  }

  body.oh-utp2-static #brxe-ueczcz::before {
    right: -150px;
    bottom: -110px;
    width: 360px;
    opacity: 0.03;
  }

  body.oh-utp2-static .oh-home-credibility__lead {
    border-radius: 20px 20px 20px 54px;
  }

  body.oh-utp2-static .oh-home-credibility__company {
    border-radius: 20px 20px 48px 20px;
  }

  /* Keep the verified address clear of the fixed privacy trigger. */
  body.oh-utp2-static .oh-home-credibility__company dl > div:first-child {
    padding-right: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.oh-utp2-static .oh-urban-hero::before,
  body.oh-utp2-static #brxe-ueczcz::before,
  body.oh-utp2-static .oh-home-credibility__company::before {
    transform: none;
  }
}

/*
 * 0.2.57 / Cinematic material continuity.
 * Replace generic decorative rings with owned brand geometry and carry one
 * restrained copper-gold light seam through the main decision sequence.
 */
body.oh-utp2-static .oh-decision-compass {
  background:
    radial-gradient(ellipse at 86% 12%, rgba(215, 182, 111, 0.22), transparent 36%),
    radial-gradient(ellipse at 18% 78%, rgba(61, 104, 91, 0.08), transparent 42%),
    linear-gradient(145deg, #f2eee6 0%, #e5dfd4 54%, #dad4c8 100%);
}

body.oh-utp2-static .oh-decision-compass::before {
  top: -170px;
  left: -150px;
  width: 520px;
  height: 520px;
  border: 0;
  border-radius: 0;
  opacity: 0.026;
  background: var(--oh-utp2-mark-ink) center / contain no-repeat;
  box-shadow: none;
  transform: rotate(-8deg);
}

body.oh-utp2-static .oh-decision-compass::after {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: 7%;
  width: min(68vw, 940px);
  height: 42%;
  content: "";
  pointer-events: none;
  opacity: 0.16;
  background:
    repeating-linear-gradient(90deg, rgba(13, 39, 35, 0.22) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(13, 39, 35, 0.15) 0 1px, transparent 1px 58px);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  transform: perspective(800px) rotateX(58deg) rotateZ(-5deg);
  transform-origin: 50% 100%;
}

body.oh-utp2-static #brxe-pjzhuv {
  position: relative;
  isolation: isolate;
}

body.oh-utp2-static #brxe-pjzhuv::before {
  position: absolute;
  z-index: 2;
  top: -1px;
  right: 0;
  left: 0;
  height: 34px;
  content: "";
  pointer-events: none;
  background: linear-gradient(104deg, #e1dbcf, #172328 38%, #102025 72%, #d9d2c7);
  clip-path: polygon(0 0, 17% 0, 23% 72%, 76% 72%, 82% 0, 100% 0, 100% 8%, 0 8%);
  filter: drop-shadow(0 13px 18px rgba(10, 20, 24, 0.14));
}

body.oh-utp2-static #brxe-nstjxx.oh-process-story::before {
  top: 8%;
  left: -8vw;
  width: min(52vw, 760px);
  aspect-ratio: 1.3;
  border: 0;
  border-radius: 0;
  opacity: 0.34;
  background:
    repeating-linear-gradient(90deg, rgba(215, 182, 111, 0.14) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 58px);
  box-shadow: inset 0 0 100px rgba(215, 182, 111, 0.025);
  clip-path: polygon(7% 0, 100% 12%, 82% 100%, 0 86%);
  transform: perspective(900px) rotateY(28deg) rotateZ(-7deg);
  transform-origin: 50% 50%;
}

body.oh-utp2-static .oh-process-story__intro {
  isolation: isolate;
}

body.oh-utp2-static .oh-process-story__intro > * {
  position: relative;
  z-index: 2;
}

/* Authored inter-section boundaries: copper-gold light, visible while scrolling, never content overlays. */
body.oh-utp2-static .oh-section-seam {
  --oh-seam-angle: -1.55deg;
  position: relative;
  z-index: 4;
  isolation: isolate;
  height: clamp(62px, 6.6vw, 98px);
  margin-block: -1px;
  overflow: hidden;
  pointer-events: none;
}

body.oh-utp2-static .oh-section-seam::before,
body.oh-utp2-static .oh-section-seam::after,
body.oh-utp2-static .oh-section-seam__trace {
  position: absolute;
  content: "";
}

body.oh-utp2-static .oh-section-seam--ink {
  background:
    radial-gradient(ellipse at 78% 18%, rgba(215, 182, 111, 0.08), transparent 33%),
    linear-gradient(180deg, #0f191d 0%, #0f191d 43%, #11191d 72%, #11191d 100%);
}

body.oh-utp2-static .oh-section-seam--ink::before {
  z-index: 1;
  inset: -42% -7% -48% 7%;
  border: 1px solid rgba(215, 182, 111, 0.12);
  border-radius: 0 0 18px 64px;
  opacity: 0.78;
  background: linear-gradient(171deg, transparent 0 43%, rgba(4, 10, 12, 0.42) 43.5% 68%, transparent 68.5%);
  box-shadow: 0 22px 48px rgba(1, 6, 8, 0.27), inset 0 -1px 0 rgba(255, 255, 255, 0.035);
  transform: rotate(var(--oh-seam-angle));
}

body.oh-utp2-static .oh-section-seam--paper {
  background: linear-gradient(169deg, #10171a 0 48%, #f7f5ef 48.7% 100%);
}

body.oh-utp2-static .oh-section-seam--paper::before {
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(169deg, transparent 0 47.3%, rgba(215, 182, 111, 0.54) 47.65% 48.05%, rgba(5, 11, 13, 0.34) 48.25% 49.3%, transparent 49.65%),
    radial-gradient(ellipse at 82% 42%, rgba(215, 182, 111, 0.16), transparent 25%);
  filter: drop-shadow(0 12px 18px rgba(4, 10, 12, 0.16));
}

body.oh-utp2-static .oh-section-seam::after {
  z-index: 2;
  top: 50%;
  right: 6%;
  width: min(33vw, 470px);
  height: 1px;
  opacity: 0.68;
  background: linear-gradient(90deg, transparent, rgba(215, 182, 111, 0.94) 36%, rgba(173, 94, 52, 0.66) 76%, transparent);
  box-shadow: 0 0 22px rgba(215, 182, 111, 0.22);
  transform: rotate(var(--oh-seam-angle));
}

body.oh-utp2-static .oh-section-seam__trace {
  z-index: 3;
  top: 25%;
  left: 8%;
  width: min(41vw, 590px);
  height: 42%;
  border-top: 1px solid rgba(215, 182, 111, 0.52);
  border-right: 1px solid rgba(215, 182, 111, 0.22);
  border-radius: 0 26px 0 0;
  opacity: 0.72;
  filter: drop-shadow(0 0 12px rgba(215, 182, 111, 0.14));
  transform: skewX(-18deg);
  transform-origin: left center;
}

body.oh-utp2-static .oh-section-seam--paper .oh-section-seam__trace {
  top: 17%;
  left: 12%;
  width: min(29vw, 420px);
  border-color: rgba(215, 182, 111, 0.58) rgba(13, 39, 35, 0.18) transparent transparent;
  opacity: 0.62;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    body.oh-utp2-static .oh-section-seam__trace {
      animation: oh-section-seam-trace linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }

    @keyframes oh-section-seam-trace {
      from { opacity: 0.14; transform: translate3d(-10%, 0, 0) skewX(-18deg) scaleX(0.72); }
      to { opacity: 0.72; transform: translate3d(0, 0, 0) skewX(-18deg) scaleX(1); }
    }
  }
}

/* Skip distant paint work while preserving remembered intrinsic dimensions. */
@supports (content-visibility: auto) {
  body.oh-utp2-static .oh-home-credibility,
  body.oh-utp2-static .oh-home-knowledge,
  body.oh-utp2-static .oh-pro-home-bridge,
  body.oh-utp2-static #brxe-ohcsec {
    content-visibility: auto;
    contain-intrinsic-size: auto 1080px;
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  body.oh-utp2-static .oh-decision-compass.oh-compass-ready::after {
    animation: oh-utp2-breathe-grid 18s ease-in-out infinite alternate;
  }

  @keyframes oh-utp2-breathe-grid {
    from { opacity: 0.12; transform: perspective(800px) rotateX(58deg) rotateZ(-5deg) translate3d(-8px, 5px, 0); }
    to { opacity: 0.2; transform: perspective(800px) rotateX(58deg) rotateZ(-5deg) translate3d(14px, -5px, 0); }
  }
}

@media (max-width: 899px) {
  body.oh-utp2-static .oh-decision-compass::before {
    top: -92px;
    left: -96px;
    width: 320px;
    height: 320px;
    opacity: 0.02;
  }

  body.oh-utp2-static .oh-decision-compass::after {
    right: -44%;
    bottom: 3%;
    width: 110%;
    opacity: 0.08;
  }

  body.oh-utp2-static #brxe-pjzhuv::before {
    height: 24px;
    clip-path: polygon(0 0, 11% 0, 20% 66%, 80% 66%, 89% 0, 100% 0, 100% 8%, 0 8%);
  }

  body.oh-utp2-static #brxe-nstjxx.oh-process-story::before {
    left: -44%;
    width: 120%;
    opacity: 0.16;
    transform: perspective(900px) rotateY(18deg) rotateZ(-5deg);
  }

  body.oh-utp2-static .oh-section-seam {
    --oh-seam-angle: -1deg;
    height: 54px;
  }

  body.oh-utp2-static .oh-section-seam::after {
    right: 2%;
    width: 48%;
  }

  body.oh-utp2-static .oh-section-seam__trace {
    left: 4%;
    width: 52%;
    height: 36%;
    opacity: 0.52;
  }

  body.oh-utp2-static .oh-section-seam--paper .oh-section-seam__trace {
    left: 8%;
    width: 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.oh-utp2-static .oh-decision-compass::after,
  body.oh-utp2-static #brxe-nstjxx.oh-process-story::before,
  body.oh-utp2-static .oh-section-seam__trace {
    animation: none !important;
    transition: none !important;
  }
}
