.sg-intro { display: none; }
.sg-present .sg-intro {
  display: grid; position: relative; isolation: isolate; overflow: hidden; height: 100svh;
  align-items: center; color: #f5f7f9; background: #0a1015;
}
.sg-present .site-header { top: 100svh; }
.sg-on-cover .whatsapp { visibility: hidden; }
.sg-identity { position: relative; z-index: 1; width: min(1440px, 87%); margin: auto; pointer-events: none; }
.sg-lockup {
  display: inline-flex; align-items: center; gap: .12em; font-size: clamp(77px, 11vw, 190px);
  color: #f3f6f9; line-height: 1; white-space: nowrap;
}
.sg-lockup img { width: 1.6em; height: auto; }
.sg-lockup i { width: 1px; height: .31em; background: #9ba8b5; }
.sg-lockup span { font-size: .19em; letter-spacing: .15em; font-weight: 600; }
.sg-identity p {
  margin: clamp(16px, 2.4vw, 37px) 0 0; max-width: 32ch; text-wrap: balance;
  line-height: 1.5; font-size: clamp(17px, 1.55vw, 26px); color: #c4cfd7;
}
.sg-down {
  position: absolute; z-index: 2; bottom: max(22px, calc(var(--sg-notice, 0px) + 12px));
  left: calc(50% - 23px); width: 46px; height: 46px; display: grid; place-items: center; color: #edf5fa;
}
.sg-down span { width: 13px; height: 13px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sg-down:focus-visible, .sg-review input:focus-visible { outline: 2px solid #b8ddfa; outline-offset: 3px; }
.sg-firma { text-align: center; }
.sg-present .sg-firma { background: radial-gradient(ellipse at 50% 41%, #1e3850 0%, #14283c 38%, #091522 91%); }
.sg-firma .sg-identity p { margin-inline: auto; max-width: 42ch; }
.sg-optic { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: linear-gradient(110deg,#080c10 12%,#0c141a 48%,#17232a); }
.sg-optic-plate {
  position: absolute; width: min(100vw, 1900px); aspect-ratio: 3/2; left: 34%; top: 50%; transform: translateY(-50%);
  isolation: isolate; mask-image: radial-gradient(ellipse 42% 63% at 45% 44%, black 28%, rgba(0,0,0,.96) 46%, rgba(0,0,0,.42) 76%, transparent 99%);
}
.sg-optic-plate::before {
  content: ''; position: absolute; inset: 0; background: url('/seguridad/assets/hero-security-camera-modern.jpg') center / 100% 100%;
  filter: grayscale(1) brightness(.72) contrast(1.13);
}
.sg-optic-plate::after { content:''; position:absolute; inset:0; background: #315063; mix-blend-mode: color; opacity:.53; }
.sg-reflection {
  position: absolute; left: 26.8%; top: 17%; width: 30%; height: 50%; border-radius: 50%; transform: rotate(14deg);
  background: url('/seguridad/assets/real-work/sel1.jpeg') 73% 47% / cover; mix-blend-mode: screen; opacity:.54;
  mask-image: radial-gradient(ellipse 50% 49%,black 12%,rgba(0,0,0,.87) 52%,transparent 96%);
}
.sg-present .sg-flying { position: fixed; top: 0; left: 0; z-index: 105; pointer-events: none; transform-origin: 0 0; }
.sg-flying[hidden] { display:none; }
.sg-brand-moving .sg-identity .sg-lockup, .sg-brand-moving .site-header .brand { opacity: 0; }
.sg-arrival {
  position:absolute; inset:0; background-position: right 40%; background-repeat:no-repeat; background-size:auto 118%;
  mask-image: linear-gradient(90deg, transparent 25%, black 81%); opacity:.84;
}
body[data-sg-opening][data-service="general"] .hero { background: #0b141c; }
body[data-sg-opening][data-service="general"] .hero::before { z-index:1; background:linear-gradient(90deg,rgba(8,17,25,.96) 12%,rgba(8,17,25,.65) 49%,rgba(8,17,25,.05) 100%); }
body[data-sg-opening] .hero .breadcrumbs { position:relative; z-index:3; }
body[data-sg-opening] #contenido:focus { outline: none; }

/* A service page opens directly on its offer, with the illustration in the same grid. */
body[data-sg-opening]:not([data-service="general"]) .hero {
  background:#101c24; min-height: 0; isolation: isolate;
}
body[data-sg-opening]:not([data-service="general"]) .hero::before {
  background: radial-gradient(ellipse at 84% 52%,#21313a 0%,transparent 60%),linear-gradient(110deg,#080f15,#12212c);
}
body[data-sg-opening]:not([data-service="general"]) .hero-grid {
  display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);
  align-items:center; gap:clamp(28px,4.8vw,80px); min-height:clamp(450px,72svh,760px); padding-block:32px 66px;
}
body[data-sg-opening]:not([data-service="general"]) .hero-copy { width:auto; min-width:0; }
body[data-sg-opening]:not([data-service="general"]) .hero .hero-index { display:none; }
body[data-sg-opening]:not([data-service="general"]) .hero-actions { gap:8px; }
body[data-sg-opening]:not([data-service="general"]) .hero-actions .btn { min-width:0; padding-inline: clamp(13px,1.5vw,23px); }
.sg-figure { min-width:0; margin:0; position:relative; color:#d7e3ea; }
.sg-window { position:relative; overflow:hidden; background:#0c1116; aspect-ratio:3/2; }
.sg-window > img { width:100%; height:100%; object-fit:cover; }
.sg-figure figcaption {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; align-items:baseline;
  padding:12px 0 0; font:500 .75rem/1.45 'Work Sans',sans-serif; letter-spacing:.02em; color:#c1cdd4;
}
.sg-business .sg-window > img { filter:brightness(1.24) saturate(.78); }
.sg-zone {
  position:absolute; border:1px solid rgba(196,227,226,.76);
  background:rgba(119,190,191,.09); color:#f4f8fa;
}
.sg-zone span {
  position:absolute; left:-1px; bottom:100%; padding:3px 7px;
  background:#162c34; font:600 clamp(10px,.85vw,13px)/1.4 'Work Sans',sans-serif;
}
.sg-access { left:38.5%; top:28.5%; width:26.7%; height:50%; }
.sg-load { left:55%; top:76%; width:27%; height:20%; }
@media (prefers-reduced-motion:no-preference) {
  .sg-reflection { animation:sg-focus 1.55s ease-out both; }
  .sg-down span { animation:sg-cue 1.4s ease-in-out .2s 1; }
  .sg-access, .sg-load { animation:sg-frame .62s ease-out .18s backwards; }
  .sg-load { animation-delay:.74s; }
  .sg-observed:not(.sg-in) .sg-zone { animation-play-state:paused; }
  @keyframes sg-focus { from {opacity:.04;filter:blur(8px)} to {opacity:.54;filter:blur(0)} }
  @keyframes sg-cue { 50% {transform:translateY(4px) rotate(45deg)} }
  @keyframes sg-frame { from {clip-path:inset(-30px 100% 0 0)} to {clip-path:inset(-30px 0 0 -2px)} }
}
@media (max-width:900px) {
  body[data-sg-opening]:not([data-service="general"]) .hero-grid { grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:22px; }
}
@media (max-width:760px) {
  .sg-identity { width:88%; }
  .sg-lente .sg-identity { align-self:end; margin:0 auto max(22svh,calc(var(--sg-notice,0px) + 86px)); }
  .sg-optic-plate { width:138vw; left:2%; top:30%; mask-image:radial-gradient(ellipse 50% 50% at 46% 48%,black 30%,rgba(0,0,0,.95) 51%,transparent 97%); }
  .sg-identity p { font-size:17px; max-width:30ch; }
  .sg-firma .sg-identity { padding-bottom:var(--sg-notice,0px); }
  .sg-arrival { background-size:auto 100%; opacity:.52; }
  body[data-sg-opening]:not([data-service="general"]) .hero-grid { display:flex; align-items:stretch; flex-direction:column; gap:0; min-height:0; padding:22px 0 36px; }
  body[data-sg-opening]:not([data-service="general"]) .hero-copy { display:contents; }
  .hero-grid:has(.sg-figure) .hero-actions { order:1; }
  .hero-grid:has(.sg-figure) .sg-figure { order:2; margin-top:24px; }
  .hero-grid:has(.sg-figure) :is(.notice,.kicker-box,.trust-row) { order:3; margin:20px 0 0; }
  .sg-figure { width:100%; max-width:560px; }
  .sg-review input { height:44px; }
}
@media (max-width:760px) and (max-height:670px) {
  body[data-sg-opening] .hero-grid { padding-top:12px; }
  body[data-sg-opening]:not([data-service="general"]) .hero-copy > p { order:2; margin:16px 0 0; }
  .hero-grid:has(.sg-figure) .sg-figure { order:3; }
  .hero-grid:has(.sg-figure) :is(.notice,.kicker-box,.trust-row) { order:4; }
  body[data-sg-opening][data-service="general"] .hero-grid { display:flex; align-items:stretch; gap:0; }
  body[data-sg-opening][data-service="general"] .hero-copy { display:flex; flex-direction:column; }
  body[data-sg-opening][data-service="general"] .hero-actions { order:1; }
  body[data-sg-opening][data-service="general"] .hero-copy > p { order:2; }
  body[data-sg-opening][data-service="general"] .trust-row { order:3; }
}
@media (min-width:761px) and (max-height:760px) {
  body[data-sg-opening]:not([data-service="general"]) .hero .breadcrumbs { padding-top:110px; }
  body[data-sg-opening]:not([data-service="general"]) .hero-grid { padding-top:12px; }
  body[data-sg-opening][data-service="mantenimiento"] .hero-copy { display:flex; flex-direction:column; }
  body[data-sg-opening][data-service="mantenimiento"] .notice { order:1; margin-bottom:0; }
}
@media (max-height:480px) and (min-width:600px) {
  .sg-identity { padding-bottom:1.5rem; }
  .sg-down { left:auto; right:4%; }
}

.sg-service-routes { display:inline-flex; flex-wrap:wrap; gap:0 20px; align-items:center; border-block:1px solid #71818b; }
.sg-service-routes a { display:inline-flex; gap:9px; align-items:center; min-height:45px; color:white; font-weight:650; }
.sg-service-routes a::after, .sg-case-copy a::after { content:'↗'; font-size:.85em; }
.sg-service-routes a:hover, .sg-case-copy a:hover { text-decoration:underline; text-underline-offset:4px; }
.sg-home-stage { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); position:relative; background:#e9ebe3; color:#17362e; }
.sg-home-photo { position:relative; min-height:230px; overflow:hidden; }
.sg-home-photo img { position:absolute; width:100%; height:100%; object-fit:cover; object-position:57% 33%; }
.sg-equipment .sg-home-photo img { transform:scale(1.26); transform-origin:55% 38%; }
.sg-equipment:not(.sg-single) .sg-home-photo img { transform:scale(1.8); }
.sg-entry-plan { display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; align-content:center; min-width:0; padding:15px; color:#19392f; }
.sg-plan-label { display:flex; justify-content:space-between; gap:5px; margin:0; font-size:12px; font-weight:650; }
.sg-plan-label span { color:#52695e; font-weight:500; }
.sg-entry-plan svg { align-self:center; width:100%; min-height:0; max-height:230px; }
.sg-plan-key { display:flex; border-block:1px solid #a9b6aa; }
.sg-plan-key button { flex:1; padding:0 3px; min-height:44px; border:0; background:transparent; color:#375247; font:inherit; font-size:12px; font-weight:600; line-height:1.3; cursor:pointer; }
.sg-plan-key button[aria-pressed="true"] { color:#103c32; box-shadow:inset 0 -3px #21695e; font-weight:700; }
.sg-plan-note { font-size:12px; line-height:1.4; margin:9px 0 0; min-height:2.8em; }
.sg-entry-plan[data-feature="porton"] .sg-gate { stroke:#005f4d; stroke-width:3; }
.sg-entry-plan[data-feature="camara"] .sg-pin { stroke:#005f4d; stroke-width:3; }
.sg-entry-plan:not([data-feature="area"]) .sg-cone { opacity:.42; }
.sg-home-switch, .sg-case-photo span { padding:9px 14px; color:white; background:#11232df2; border:1px solid #a5bdc4; font:inherit; font-weight:600; font-size:13px; line-height:1.25; }
.sg-home-switch { position:absolute; z-index:1; left:12px; top:12px; min-height:44px; cursor:pointer; }
.sg-home-switch[hidden] { display:none; }
.sg-single .sg-home-stage { display:block; height:clamp(272px,28vw,396px); }
.sg-single .sg-home-photo, .sg-single .sg-entry-plan { height:100%; }
.sg-single .sg-home-photo { min-height:0; }
.sg-single:not(.sg-show-plan) .sg-entry-plan, .sg-single.sg-show-plan .sg-home-photo { display:none; }
.sg-single.sg-show-plan .sg-plan-label { min-height:41px; padding-left:120px; justify-content:flex-end; align-items:center; }
.sg-single .sg-plan-label span { display:none; }
.sg-single .sg-entry-plan svg { height:100%; }
.sg-home-view figcaption span { color:#b6c6cd; }
.sg-case { scroll-margin-top:80px; padding-block:clamp(44px,5vw,80px); background:#f1f3ee; color:#142a24; }
.sg-case-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px, .8fr); gap:clamp(28px,7vw,110px); align-items:center; }
.sg-case-copy { max-width:490px; }
.sg-case-copy h2 { margin:18px 0 12px; color:#102820; font-size:clamp(32px,4.2vw,64px); line-height:1.04; letter-spacing:-.045em; text-wrap:balance; }
.sg-case-copy p { margin:0 0 14px; max-width:42ch; line-height:1.55; }
.sg-case-copy a { display:inline-flex; gap:8px; align-items:center; min-height:44px; font-weight:650; text-decoration:underline; text-underline-offset:4px; }
.sg-case-photo { display:block; position:relative; overflow:hidden; border:0; background:#454742; padding:0; width:min(100%,340px); justify-self:center; aspect-ratio:963/1280; cursor:zoom-in; }
.sg-case-photo img { width:100%; height:100%; display:block; object-fit:cover; transform-origin:62.8% 24.5%; }
.sg-case-photo i { position:absolute; left:62.8%; top:24.5%; width:28px; height:28px; border:1.5px solid white; box-shadow:0 0 0 1px #152e2c,0 0 0 5px #11282838; border-radius:50%; transform:translate(-50%,-50%); }
.sg-case-photo[aria-pressed="true"] { cursor:zoom-out; }
.sg-case-photo[aria-pressed="true"] img { transform:scale(2.8); }
.sg-case-photo[aria-pressed="true"] i { visibility:hidden; }
.sg-case-photo span { position:absolute; inset:auto auto 14px 14px; }
.sg-room-list button { display:flex; align-items:center; gap:12px; padding:9px 6px; min-height:48px; background:transparent; color:#263d44; border:0; border-bottom:1px solid #a3aea9; text-align:left; font:inherit; cursor:pointer; }
.sg-room-list button[aria-pressed="true"] { background:#dce7e1; font-weight:700; }
body[data-sg-opening] .plan-canvas .coverage-cone { animation:none; }
:is(.sg-plan-key,.sg-service-routes,.sg-room-list) :focus-visible,.sg-home-switch:focus-visible,.sg-case-photo:focus-visible,.sg-gap-toggle:focus-visible { outline:3px solid #009dea; outline-offset:2px; z-index:2; }
.sg-review .sg-window > img { filter:saturate(.63) brightness(1.15); }
.sg-shutter { position:absolute; left:38.6%; top:28%; width:26.2%; height:51%; overflow:hidden; }
.sg-shutter i {
  position:absolute; inset:0; transform:translateY(calc(-100% + var(--sg-shut, 0%)));
  background:repeating-linear-gradient(180deg,#505550 0px,#555a55 3px,#343c3a 4px,#373c38 5px);
  border-bottom:3px solid #323633; box-shadow:0 2px 4px #0008;
}
.sg-review figcaption { padding-block:13px 4px; }
.sg-review output { font:500 .8rem/1.45 ui-monospace,Consolas,monospace; color:#dcf4f9; }
.sg-review input { display:block; width:100%; margin:0; height:44px; cursor:ew-resize; accent-color:#a7d8e0; }
@media (prefers-reduced-motion:no-preference) { .sg-shutter i { transition:transform .2s linear; } }
@media (prefers-reduced-motion:no-preference) {
  .sg-traced:not(.sg-drawn) .sg-walls path { stroke-dasharray:1; animation:sg-draw .72s ease-out both; }
  .sg-traced:not(.sg-drawn) .sg-gate { animation:sg-develop .38s .35s ease-out backwards; }
  .sg-traced:not(.sg-drawn) .sg-pin { animation:sg-develop .32s .64s ease-out backwards; }
  .sg-traced:not(.sg-drawn) .sg-cone { animation:sg-develop .45s .82s ease-out backwards; }
  @keyframes sg-develop { from {opacity:0} }
  @keyframes sg-draw { from {stroke-dashoffset:1} to {stroke-dashoffset:0} }
  .sg-case-photo img { transition:transform .38s ease; }
}
@media (max-width:760px) {
  .sg-service-routes { display:flex; width:fit-content; max-width:100%; gap:0 clamp(8px,3vw,18px); }
  .sg-service-routes a { font-size:clamp(12px,3.2vw,15px); gap:3px; }
  body[data-sg-opening][data-service="hogares"] .hero h1 { font-size:clamp(32px,8.8vw,44px); margin:12px 0; }
  body[data-sg-opening][data-service="hogares"] .hero-copy>p { margin:0 0 14px; font-size:15px; }
  body[data-sg-opening][data-service="hogares"] .hero-actions { display:grid; grid-template-columns:minmax(0,1.22fr) minmax(0,1fr); align-items:stretch; gap:6px; }
  body[data-sg-opening][data-service="hogares"] .hero-actions .btn { min-height:50px; padding:6px 8px; text-align:center; line-height:1.25; }
  body[data-sg-opening][data-service="hogares"] .sg-figure { margin-top:14px; }
  .sg-single .sg-home-stage { height:clamp(282px,76vw,318px); }
  .sg-single .sg-plan-note { min-height:1.5em; }
  .sg-case-layout { grid-template-columns:1fr; gap:16px; }
  .sg-case-photo { justify-self:start; width:min(100%,330px); }
}
@media (max-width:760px) and (max-height:670px) {
  body[data-sg-opening][data-service="hogares"] .hero-copy>p { order:3; margin:14px 0 0; }
  body[data-sg-opening][data-service="hogares"] .sg-figure { order:2; }
}
@media (max-width:360px) and (max-height:640px) {
  body[data-sg-opening][data-service="hogares"] .breadcrumbs { padding-top:79px; }
  body[data-sg-opening][data-service="hogares"] .hero-grid { padding-top:12px; }
  body[data-sg-opening][data-service="hogares"] .hero-copy>.eyebrow { order:3; margin-top:16px; }
  body[data-sg-opening][data-service="hogares"] .hero h1 { font-size:30px; margin:4px 0 10px; }
  body[data-sg-opening][data-service="hogares"] .hero-actions .btn { font-size:13px; }
  .sg-equipment .sg-home-photo img { object-position:55% 82%; }
}
