/* ==========================================================================
   Prumo 3D — site frame: container, header, menus, layer rail, footer, CTAs
   ========================================================================== */

.container {
    inline-size: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: calc(var(--z-editor) + 1);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-s);
    background: var(--hot-500);
    color: var(--ink-1000);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--dur-2) var(--ease-out);
}

.skip-link:focus {
    transform: none;
}

/* ---------------------------------------------------------------- print progress
   The page is a print job: a hot filament line runs across the top as you read it, with a glowing
   nozzle at its head. */
.print-progress {
    position: fixed;
    inset-inline: 0;
    inset-block-start: 0;
    z-index: calc(var(--z-header) + 1);
    block-size: 2px;
    pointer-events: none;
}

.print-progress__bar {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    background: linear-gradient(90deg, var(--hot-700), var(--hot-500) 70%, var(--hot-300));
    transform-origin: left center;
    transform: scaleX(var(--progress, 0));
}

.print-progress__bar::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 0;
    inline-size: 10px;
    block-size: 10px;
    border-radius: 50%;
    background: var(--hot-300);
    box-shadow: 0 0 12px 4px var(--hot-glow), 0 0 2px 1px #fff8;
    transform: translate(50%, -50%) scaleX(calc(1 / max(var(--progress, 1), 0.0001)));
    opacity: var(--progress-visible, 0);
}

/* ---------------------------------------------------------------- header */
.site-header {
    position: fixed;
    inset-inline: 0;
    inset-block-start: 0;
    z-index: var(--z-header);
    block-size: var(--header-h);
    transition: transform var(--dur-3) var(--ease-out);
}

/* The glass lives on a pseudo-element: backdrop-filter on the header itself would make it the
   containing block of every fixed descendant and re-anchor them. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(12 13 16 / 0.72);
    border-block-end: 1px solid var(--line);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    opacity: 0;
    transition: opacity var(--dur-3) var(--ease-out);
}

.site-header[data-scrolled="true"]::before {
    opacity: 1;
}

.site-header[data-hidden="true"] {
    transform: translateY(-110%);
}

.site-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    block-size: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-strong);
}

.brand__mark {
    inline-size: auto;
    block-size: 42px;
    flex: none;
    overflow: visible;
}

.brand__machine {
    fill: var(--brand-teal);
}

.brand__mark .slab {
    fill: var(--brand-teal);
    transform-box: fill-box;
    transform-origin: center;
}

.brand__mark .slab--hot {
    fill: var(--brand-orange);
}

/* Hovering the logo "prints" it: the drop leaves the nozzle, then the plumb bob is laid down from the
   tip up, one part after another. */
.brand:hover .brand__drop {
    animation: drop-pulse 900ms var(--ease-out) both;
}

.brand:hover .brand__mark .slab {
    animation: slab-settle 620ms var(--ease-out) both;
}

.brand:hover .brand__mark .slab:nth-child(5) { animation-delay: 0ms; }
.brand:hover .brand__mark .slab:nth-child(4) { animation-delay: 70ms; }
.brand:hover .brand__mark .slab:nth-child(3) { animation-delay: 140ms; }
.brand:hover .brand__mark .slab:nth-child(2) { animation-delay: 210ms; }
.brand:hover .brand__mark .slab:nth-child(1) { animation-delay: 280ms; }

@keyframes slab-settle {
    0% { transform: translateY(-35%); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: none; opacity: 1; }
}

@keyframes drop-pulse {
    0%, 100% { fill: var(--brand-teal); }
    30% { fill: var(--hot-300); }
}

.brand__word {
    inline-size: auto;
    block-size: 17px;
    flex: none;
}

.brand__word-name {
    fill: var(--brand-teal-bright);
}

.brand__word-3d {
    fill: var(--brand-orange);
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1.2vw, 1.4rem);
}

.site-nav a {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0.35rem;
    font-size: var(--step--1);
    font-weight: 500;
    color: var(--text-soft);
    text-decoration: none;
    transition: color var(--dur-2);
}

.site-nav a::after {
    content: "";
    position: absolute;
    inset-inline: 0.35rem;
    inset-block-end: 0.2rem;
    block-size: 2px;
    border-radius: 2px;
    background: var(--hot-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-3) var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
    color: var(--text-strong);
}

.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after {
    transform: scaleX(1);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.menu-toggle {
    display: none;
    position: relative;
    inline-size: 44px;
    block-size: 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: rgb(255 255 255 / 0.03);
}

.menu-toggle span {
    position: absolute;
    inset-inline: 13px;
    block-size: 2px;
    border-radius: 2px;
    background: var(--text-strong);
    transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2), inset var(--dur-3) var(--ease-out);
}

.menu-toggle span:nth-child(1) { inset-block-start: 15px; }
.menu-toggle span:nth-child(2) { inset-block-start: 21px; inset-inline-end: 18px; }
.menu-toggle span:nth-child(3) { inset-block-start: 27px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1060px) {
    .site-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
    }
}

@media (max-width: 520px) {
    .site-header__actions .button {
        display: none;
    }
}

/* ---------------------------------------------------------------- mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: calc(var(--header-h) + var(--space-5)) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom));
    background:
        radial-gradient(120% 60% at 100% 0%, rgb(236 121 37 / 0.16), transparent 60%),
        var(--ink-950);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
}

.mobile-menu[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur-3) var(--ease-out), visibility 0s;
}

.mobile-menu__eyebrow {
    margin-block-end: var(--space-4);
}

.mobile-menu ol {
    display: grid;
    align-content: start;
    gap: 0.2rem;
    counter-reset: layer;
}

.mobile-menu li {
    counter-increment: layer;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}

.mobile-menu[data-open="true"] li {
    opacity: 1;
    transform: none;
}

.mobile-menu[data-open="true"] li:nth-child(2) { transition-delay: 40ms; }
.mobile-menu[data-open="true"] li:nth-child(3) { transition-delay: 80ms; }
.mobile-menu[data-open="true"] li:nth-child(4) { transition-delay: 120ms; }
.mobile-menu[data-open="true"] li:nth-child(5) { transition-delay: 160ms; }
.mobile-menu[data-open="true"] li:nth-child(6) { transition-delay: 200ms; }

.mobile-menu a:not(.button) {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding-block: 0.55rem;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: -0.03em;
    color: var(--text-strong);
    text-decoration: none;
    border-block-end: 1px solid var(--line);
}

.mobile-menu a:not(.button)::before {
    content: "L" counter(layer, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0.08em;
    color: var(--hot-400);
}

.mobile-menu__foot {
    display: grid;
    gap: var(--space-4);
}

.mobile-menu__foot .button {
    justify-content: center;
}

.mobile-menu__social {
    display: flex;
    gap: var(--space-3);
}

body[data-menu-open="true"] {
    overflow: hidden;
}

/* ---------------------------------------------------------------- layer rail
   A slicer's layer slider on the right edge: one tick per band, a handle that follows the reading
   position, the band's name on hover. Built by header.js from the page's own [data-layer] sections. */
.layer-rail {
    position: fixed;
    inset-inline-end: clamp(12px, 1.6vw, 26px);
    inset-block-start: 50%;
    z-index: var(--z-rail);
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-3) var(--ease-out);
}

.layer-rail[data-visible="true"] {
    opacity: 1;
    pointer-events: auto;
}

.layer-rail ol {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 12px 0;
}

.layer-rail ol::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 9px;
    inline-size: 1px;
    background: linear-gradient(transparent, var(--line-strong) 10%, var(--line-strong) 90%, transparent);
}

.layer-rail a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    block-size: 14px;
    text-decoration: none;
}

.layer-rail__tick {
    inline-size: 12px;
    block-size: 2px;
    margin-inline-end: 4px;
    border-radius: 2px;
    background: var(--text-mute);
    transition: inline-size var(--dur-3) var(--ease-out), background var(--dur-2), box-shadow var(--dur-2);
}

.layer-rail__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-strong);
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    background: rgb(12 13 16 / 0.85);
    border: 1px solid var(--line);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity var(--dur-2), transform var(--dur-3) var(--ease-out);
}

.layer-rail a:hover .layer-rail__label,
.layer-rail a:focus-visible .layer-rail__label {
    opacity: 1;
    transform: none;
}

.layer-rail a:hover .layer-rail__tick {
    inline-size: 18px;
    background: var(--text-strong);
}

.layer-rail a[aria-current="true"] .layer-rail__tick {
    inline-size: 20px;
    background: var(--hot-500);
    box-shadow: 0 0 10px var(--hot-glow);
}

.layer-rail__readout {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: calc(100% + 8px);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: var(--hud-dim);
    white-space: nowrap;
}

@media (max-width: 1180px), (pointer: coarse) {
    .layer-rail {
        display: none;
    }
}

/* ---------------------------------------------------------------- footer */
.site-footer {
    position: relative;
    padding-block: var(--space-9) calc(var(--space-7) + env(safe-area-inset-bottom));
    background: var(--ink-1000);
    border-block-start: 1px solid var(--line);
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    block-size: 1px;
    background: linear-gradient(90deg, transparent, var(--hot-500), transparent);
    opacity: 0.6;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-7);
}

.site-footer__brand p {
    margin-block-start: var(--space-4);
    max-width: 34ch;
    color: var(--text-soft);
}

.site-footer h2 {
    font-family: var(--font-mono);
    font-size: var(--step--2);
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-block-end: var(--space-4);
}

.site-footer ul {
    display: grid;
    gap: 0.55rem;
}

.site-footer a:not(.button):not(.social) {
    color: var(--text);
    text-decoration: none;
    transition: color var(--dur-2);
}

.site-footer a:not(.button):not(.social):hover {
    color: var(--hot-400);
}

.site-footer__contact {
    display: grid;
    gap: var(--space-3);
    justify-items: start;
    color: var(--text-soft);
}

.site-footer__phone {
    font-family: var(--font-mono);
    font-size: var(--step-1);
    color: var(--text-strong) !important;
    letter-spacing: 0.02em;
}

.social-row {
    display: flex;
    gap: var(--space-2);
    margin-block-start: var(--space-2);
}

.social {
    display: inline-grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--text);
    transition: border-color var(--dur-2), color var(--dur-2), transform var(--dur-3) var(--ease-spring);
}

.social svg {
    inline-size: 20px;
    block-size: 20px;
}

.social:hover {
    color: var(--hot-400);
    border-color: var(--hot-500);
    transform: translateY(-2px);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    margin-block-start: var(--space-8);
    padding-block-start: var(--space-5);
    border-block-start: 1px solid var(--line);
    font-size: var(--step--1);
    color: var(--text-mute);
}

.site-footer__bottom .mono {
    letter-spacing: 0.06em;
}

/* The name, huge and hollow, as if outlined by the first perimeter of a print; the scan lines are layers. */
.site-footer__giant {
    position: relative;
    margin-block-start: var(--space-7);
    user-select: none;
}

.site-footer__giant::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.05) 0 2px, transparent 2px 7px);
    -webkit-mask: url("/images/brand/nome.svg") center / 100% 100% no-repeat;
    mask: url("/images/brand/nome.svg") center / 100% 100% no-repeat;
}

.site-footer__giant .brand__word {
    display: block;
    inline-size: 100%;
    block-size: auto;
    overflow: visible;
}

.site-footer__giant .brand__word path {
    fill: none;
    stroke: rgb(255 255 255 / 0.1);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

@media (max-width: 860px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding-block-end: calc(96px + env(safe-area-inset-bottom));
    }
}

/* ---------------------------------------------------------------- floating WhatsApp (desktop) */
.fab {
    position: fixed;
    inset-inline-end: clamp(16px, 2.4vw, 32px);
    inset-block-end: clamp(16px, 2.4vw, 32px);
    z-index: var(--z-fab);
    display: inline-flex;
    align-items: center;
    gap: 0;
    block-size: 60px;
    padding-inline: 16px;
    border-radius: var(--radius-pill);
    background: var(--wa-500);
    color: #062b14;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 40px -10px rgb(37 211 102 / 0.55), 0 2px 0 rgb(255 255 255 / 0.25) inset;
    transform: translateY(140%) scale(0.9);
    opacity: 0;
    transition: transform var(--dur-3) var(--ease-spring), opacity var(--dur-2), gap var(--dur-3) var(--ease-out);
}

.fab[data-visible="true"] {
    transform: none;
    opacity: 1;
}

.fab svg {
    inline-size: 28px;
    block-size: 28px;
    flex: none;
}

.fab__label {
    max-inline-size: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-inline-size var(--dur-3) var(--ease-out);
}

.fab:hover,
.fab:focus-visible {
    gap: 10px;
}

.fab:hover .fab__label,
.fab:focus-visible .fab__label {
    max-inline-size: 16rem;
}

/* The pulse is a ring, not the button: a moving CTA is hard to press. */
.fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--wa-500);
    animation: fab-ring 2.6s var(--ease-out) infinite;
    pointer-events: none;
}

@keyframes fab-ring {
    0% { transform: scale(1); opacity: 0.7; }
    80%, 100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 860px) {
    .fab {
        display: none;
    }
}

/* ---------------------------------------------------------------- mobile CTA bar */
.mobile-cta {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: var(--z-fab);
    display: none;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgb(8 9 11 / 0.92) 38%);
    transform: translateY(110%);
    transition: transform var(--dur-3) var(--ease-out);
}

.mobile-cta[data-visible="true"] {
    transform: none;
}

.mobile-cta .button {
    inline-size: 100%;
    justify-content: center;
    block-size: 56px;
}

.mobile-cta__note {
    margin-block-start: 6px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-mute);
}

@media (max-width: 860px) {
    .mobile-cta {
        display: block;
    }
}

/* The header (and its close button) stays above the open menu. */
body[data-menu-open="true"] .site-header {
    z-index: calc(var(--z-menu) + 1);
}

body[data-menu-open="true"] .site-header::before {
    opacity: 0;
}
