/* ==========================================================================
   /services/infrastructure — page styles (Infrastructure.dc.html)
   Loaded after service.css (shared service-page pieces). Everything that
   moves is a CSS animation, and all of it stops for reduced motion (end of
   file).
   ========================================================================== */

/* ---------- Hero ---------- */
.infra-hero { align-items: end; }
.infra-hero__copy { align-self: center; }

/* "Enterprise infrastructure": a cream pill in a hazard-tape border */
.infra-tape {
    align-self: flex-start;
    background: repeating-linear-gradient(135deg, var(--c-yellow) 0 12px, var(--c-ink) 12px 24px);
    padding: 3px; border-radius: var(--r-pill);
}
.infra-tape__label {
    display: block; background: var(--c-cream);
    padding: 5px 14px; border-radius: var(--r-pill);
    font-weight: 700; font-size: 13px;
}

.infra-h1 {
    font-family: var(--f-display); font-weight: 800;
    font-size: clamp(44px, 6vw, 84px); line-height: 0.95; letter-spacing: -0.03em;
    text-wrap: balance;
}
.infra-lede { max-width: 560px; }

/* ---------- Hero art: the building site ---------- */
.bld {
    position: relative;
    width: min(100%, 400px);
    justify-self: center;
    padding-top: 96px;
    margin-right: 40px;
}

/* site.css caps svg at 100% of its parent; the crane's parts hang off a
   zero-width pivot, so they need their natural size. */
.bld svg { max-width: none; }

.bld__cloud {
    position: absolute; left: -8px; top: -6px; width: 150px; height: 84px;
    pointer-events: none;
    animation: hdCloud 9s ease-in-out infinite;
}
.bld__cloud svg { display: block; overflow: visible; }

.bld__route { position: absolute; left: 60px; top: 40px; display: block; overflow: visible; pointer-events: none; }

/* Data packets riding the dotted route into the building */
.bld__packet {
    position: absolute; left: 60px; top: 40px;
    width: 26px; height: 20px; border-radius: 6px;
    border: 3px solid var(--c-ink);
    offset-path: path('M160 120C160 60 120 40 40 34');
    offset-rotate: 0deg;
    animation: hdPacket 4.8s cubic-bezier(.5, 0, .4, 1) 0s infinite both;
    display: flex; align-items: center; justify-content: center; gap: 2px;
}
.bld__packet > span { width: 4px; height: 4px; border-radius: 1px; background: var(--c-ink); }
.bld__packet--teal   { background: var(--c-teal); }
.bld__packet--pink   { background: var(--c-pink); animation-delay: 1.6s; }
.bld__packet--yellow { background: var(--c-yellow); animation-delay: 3.2s; }
@supports not (offset-path: path('M0 0')) {
    .bld__packet { display: none !important; }
}

/* The crane */
.crane { position: absolute; right: -40px; top: 0; bottom: 8px; width: 150px; pointer-events: none; }
.crane__mast {
    position: absolute; right: 20px; top: 0; bottom: 0; width: 16px;
    background:
        repeating-linear-gradient(45deg, var(--c-ink) 0 3px, transparent 3px 10px),
        repeating-linear-gradient(-45deg, var(--c-ink) 0 3px, transparent 3px 10px);
    border-left: 3px solid var(--c-ink); border-right: 3px solid var(--c-ink);
}
.crane__jib {
    position: absolute; right: 0; top: 0; width: 150px; height: 14px;
    background: var(--c-yellow); border: 3px solid var(--c-ink); border-radius: 6px;
}
.crane__base {
    position: absolute; right: 10px; bottom: 0; width: 36px; height: 12px;
    background: var(--c-yellow); border: 3px solid var(--c-ink); border-radius: 4px 4px 0 0;
}
.crane__swing {
    position: absolute; left: 30px; top: 11px; width: 0; height: 0;
    transform-origin: 0 0;
    animation: hdSwing 4.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
.crane__trolley { position: absolute; left: -12px; top: 0; width: 24px; height: 10px; background: var(--c-ink); border-radius: 4px; }
.crane__cable { position: absolute; left: -1.5px; top: 8px; width: 3px; height: 40px; background: var(--c-ink); }
.crane__hook { position: absolute; left: -7px; top: 44px; display: block; }
.crane__sling { position: absolute; left: -60px; top: 58px; display: block; overflow: visible; }
.crane__sign {
    position: absolute; left: -66px; top: 82px; width: 132px;
    padding: 4px; border-radius: 12px;
    background: repeating-linear-gradient(135deg, var(--c-yellow) 0 8px, var(--c-ink) 8px 16px);
    border: 3px solid var(--c-ink);
}
.crane__sign-in {
    background: var(--c-white); border-radius: 7px; padding: 6px 4px; text-align: center;
    font-family: var(--f-display); font-weight: 800; font-size: 13px; line-height: 1.05; color: var(--c-ink);
}
.crane__sign-in span { font-size: 11px; font-weight: 600; font-family: var(--f-body); }

/* The tower: roof, five floors and the ground floor, dropping in bottom-up */
.tower { display: flex; flex-direction: column; position: relative; }

.tower__roof {
    width: 100%; height: 84px;
    display: flex; justify-content: center;
    position: relative;
    animation: hdDrop .7s cubic-bezier(.34, 1.5, .5, 1) .9s both;
}
.tower__roof-svg { display: block; position: relative; z-index: 1; }
.tower__sun {
    position: absolute; left: 50%; top: 38px; width: 30px; height: 30px; margin-left: -15px;
    border-radius: 50%; background: var(--c-yellow); border: 3px solid var(--c-cream);
}

/* The little robot peeking over the roof */
.tower__bot {
    position: absolute; left: 21%; top: -26px; width: 30px; height: 72px;
    display: flex; flex-direction: column; align-items: center; z-index: 0;
}
.tower__bot-cap {
    width: 18px; height: 12px;
    border: 3px solid var(--c-ink); border-bottom: 0; border-radius: 9px 9px 0 0;
    background: var(--c-yellow);
}
.tower__bot-body {
    width: 30px; flex: 1;
    background: var(--c-teal-tint); border: 3px solid var(--c-ink); border-radius: 6px 6px 3px 3px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px;
}
.tower__bot-eyes { display: flex; gap: 3px; }
.tower__bot-eyes span { width: 7px; height: 7px; border-radius: 2px; background: var(--c-ink); }
.tower__bot-line { width: 14px; height: 3px; border-radius: 2px; background: var(--c-ink); }
.tower__bot-led {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--c-pink); border: 2px solid var(--c-ink);
    animation: hdBlink 1.6s infinite;
}

.tower__floor {
    --d: 0s;    /* status-light offset */
    width: 94%; align-self: center;
    border: 3px solid var(--c-ink); border-radius: 14px;
    padding: 10px 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: -3px;
    animation: hdDrop .7s cubic-bezier(.34, 1.5, .5, 1) .15s both;
}
/* Drop delays .15s → .71s from the bottom floor up; lights .3s apart */
.tower__floor--d1 { --d: .3s; animation-delay: .29s; }
.tower__floor--d2 { --d: .6s; animation-delay: .43s; }
.tower__floor--d3 { --d: .9s; animation-delay: .57s; }
.tower__floor--d4 { --d: 1.2s; animation-delay: .71s; }
.tower__label { font-weight: 800; font-size: 15px; font-family: var(--f-display); }
.tower__leds { display: flex; gap: 5px; }
.tower__led {
    width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--c-ink);
    animation: hdBlink 2.4s var(--d) infinite;
}
.tower__led:nth-child(2) { animation-delay: calc(var(--d) + .8s); }
.tower__led:nth-child(3) { animation-delay: calc(var(--d) + 1.5s); }

.tower__ground {
    width: 100%; margin-top: -3px; height: 64px;
    background: var(--c-pink); border: 3px solid var(--c-ink); border-radius: 14px 14px 6px 6px;
    display: flex; align-items: flex-end; justify-content: center;
    animation: hdDrop .7s cubic-bezier(.34, 1.5, .5, 1) 0s both;
}
.tower__door {
    width: 44px; height: 44px;
    background: var(--c-cream); border: 3px solid var(--c-ink); border-bottom: 0;
    border-radius: 22px 22px 0 0;
}
.tower__base { width: calc(106% + 44px); margin-left: -6%; height: 8px; background: var(--c-ink); border-radius: 4px; }

/* Phones: shrink the whole building rather than reflow it */
@media (max-width: 700px) {
    .bld { zoom: .68; margin-top: -24px; }
    @supports not (zoom: 1) {
        .bld { zoom: 1; transform: scale(.68); transform-origin: top center; margin-bottom: -170px; }
    }
}

/* ---------- "Your estate, floor by floor." ---------- */


.estate { width: 100%; max-width: 980px; align-self: center; display: flex; flex-direction: column; }
.estate__roof { height: clamp(70px, 9vw, 110px); margin: 0 -2% -3px; position: relative; line-height: 0; }
.estate__roof svg { display: block; }
.estate__floors { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.estate__base { height: 10px; background: var(--c-ink); border-radius: 5px; margin: 0 -3%; }

.storey {
    border: 3px solid var(--c-ink); border-top-width: 0;
    padding: 22px clamp(18px, 3vw, 32px);
    display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); flex-wrap: wrap;
}
.storey:first-child { border-top-width: 3px; }
.storey--ground { border-radius: 0 0 12px 12px; }

.storey__num {
    flex: none; width: 56px; height: 56px; border-radius: 50%;
    background: var(--c-white); border: 3px solid var(--c-ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-family: var(--f-display); font-weight: 800; line-height: 1;
}
.storey__num-label { font-size: 9px; letter-spacing: .08em; }
.storey__num-n { font-size: 22px; }

.storey__text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.storey__title { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1.1; }
.storey__desc { font-size: 16px; line-height: 1.5; }

/* Three lit windows — servers with status LEDs that flicker on hover */
.storey__wins { flex: none; display: flex; gap: 10px; }
.storey__win {
    position: relative; width: 34px; height: 32px; border-radius: 8px;
    background: var(--c-cream); border: 3px solid var(--c-ink);
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px;
}
.storey__led, .storey__led2 {
    position: absolute; top: 3px; width: 6px; height: 4px; border-radius: 2px; background: var(--c-ink);
}
.storey__led  { left: 4px; }
.storey__led2 { right: 4px; }
.storey__screen {
    width: 20px; height: 16px; background: var(--c-ink); border-radius: 3px;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 72%, 72% 100%, 28% 100%, 28% 72%, 0 72%);
}
.storey:hover .storey__led  { background: var(--c-teal); animation: hdLed .5s steps(2) infinite; }
.storey:hover .storey__led2 { background: var(--c-yellow); animation: hdLed .7s steps(2) infinite .2s; }
.storey:hover .storey__win  { background: var(--c-white); }

/* The front door on the ground floor */
.storey__door {
    width: 44px; height: 52px; border-radius: 22px 22px 0 0;
    background: var(--c-cream); border: 3px solid var(--c-ink); border-bottom: 0;
    margin-bottom: -25px;
}

@media (max-width: 700px) {
    .storey__wins { display: none !important; }
    .storey { padding: 16px 18px; gap: 14px; }
    .storey__desc { font-size: 15px; }
}

/* ---------- "Built in four stages." — the blueprint ---------- */
.blueprint {
    background-color: var(--c-ink);
    background-image:
        linear-gradient(rgba(255, 248, 241, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 248, 241, .09) 1px, transparent 1px),
        linear-gradient(rgba(255, 248, 241, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 248, 241, .04) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
    color: var(--c-cream);
    border-radius: var(--r-hero);
    padding: clamp(28px, 5vw, 64px);
    display: flex; flex-direction: column; gap: 40px;
    position: relative; overflow: hidden;
}
.blueprint__top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.blueprint__eyebrow { color: var(--c-yellow); }

/* The drawing's title block */
.blueprint__titleblock {
    border: 2px solid var(--c-cream); border-radius: 14px;
    font-family: var(--f-mono); font-size: 12px; line-height: 1.5;
    display: grid; grid-template-columns: auto auto;
}
.blueprint__titleblock span { padding: 6px 12px; border-bottom: 2px solid var(--c-cream); }
.blueprint__titleblock span:nth-child(odd) { border-right: 2px solid var(--c-cream); }
.blueprint__titleblock span:nth-last-child(-n+2) { border-bottom: 0; }

.blueprint__sheets { margin: 0; padding: 0; list-style: none; gap: 20px; position: relative; }
.sheet {
    border: 2px dashed var(--c-cream); border-radius: 24px; padding: 24px;
    display: flex; flex-direction: column; gap: 12px; position: relative;
}
.sheet:hover { border-style: solid; background: rgba(255, 248, 241, .06); }
.sheet__top { display: flex; justify-content: space-between; align-items: center; }
.sheet__num {
    width: 48px; height: 48px; border-radius: 50%; color: var(--c-ink);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-display); font-weight: 800; font-size: 22px;
    border: 3px solid var(--c-cream);
}
.sheet__ref { font-family: var(--f-mono); font-size: 12px; opacity: .85; }
.sheet__title { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.sheet__desc { font-size: 16px; line-height: 1.5; }

/* ---------- Keyframes ---------- */
@keyframes hdDrop { 0% { opacity: 0; transform: translateY(-140px); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes hdBlink { 0%, 100% { opacity: 1; } 45% { opacity: 1; } 50% { opacity: .25; } 55% { opacity: 1; } }
@keyframes hdSwing { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-5deg); } }
@keyframes hdCloud { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -6px); } }
@keyframes hdPacket {
    0%   { offset-distance: 0%; opacity: 0; transform: scale(.6); }
    12%  { opacity: 1; transform: scale(1); }
    80%  { opacity: 1; transform: scale(1); }
    100% { offset-distance: 100%; opacity: 0; transform: scale(.4); }
}
@keyframes hdLed { 50% { opacity: .3; } }

/* Reduced motion: everything rests in its final place. The packets have no
   resting place on their route, so they're hidden rather than stacked. */
@media (prefers-reduced-motion: reduce) {
    .bld *, .storey * { animation: none !important; }
    .bld__packet { display: none !important; }
}
