/* ============================================================
   STEINRAISER — VERSION B · "EXPEDIENTE"
   Dark editorial design system for a labor-law practice.
   Fraunces (display serif) · Archivo (text) · IBM Plex Mono (meta)
   Single accent: wax-seal red. Hairline rules. Printed-paper moments.
   ============================================================ */

:root {
    /* Ink — warm ebony scale */
    --ink-0: #100F0C;
    --ink-1: #14130F;
    --ink-2: #1A1914;
    --ink-3: #23211A;
    --ink-4: #2D2A21;

    /* Paper — aged-document scale */
    --paper-0: #EFEAE0;
    --paper-1: #C9C3B5;
    --paper-2: #8E8A7D;
    --paper-3: #5F5C52;

    /* Wax seal — the only accent */
    --lacre: #AC3F2C;
    --lacre-hi: #C9502F;
    --lacre-deep: #6E2418;
    --lacre-ghost: rgba(172, 63, 44, 0.14);

    /* Paper-printed moments (inverted blocks) */
    --print-bg: #EDE7DA;
    --print-ink: #191813;
    --print-muted: #5C594E;
    --print-rule: rgba(25, 24, 19, 0.16);

    /* Hairlines */
    --rule: rgba(239, 234, 224, 0.12);
    --rule-strong: rgba(239, 234, 224, 0.26);

    /* Type */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-text: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    /* Fluid type scale */
    --fs-hero: clamp(2.875rem, 7.2vw, 6.75rem);
    --fs-h2: clamp(2.125rem, 4.6vw, 3.75rem);
    --fs-h3: clamp(1.375rem, 2.4vw, 1.875rem);
    --fs-body: 1.0625rem;
    --fs-small: 0.9375rem;
    --fs-meta: 0.6875rem;

    /* Rhythm */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.25rem;
    --space-5: 3.5rem;
    --space-6: 5.5rem;
    --space-7: 8.5rem;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --container: 1280px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
    --t-fast: 0.28s var(--ease-out);
    --t-mid: 0.55s var(--ease-out);
    --t-slow: 0.9s var(--ease-out);

    /* Layers */
    --z-header: 100;
    --z-menu: 110;
    --z-whatsapp: 90;
    --z-toast: 200;
    --z-cursor: 300;
    --z-grain: 250;

    color-scheme: dark;
}

/* ============================================================
   BASE
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    background: var(--ink-1);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--paper-1);
    background: var(--ink-1);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--lacre);
    color: var(--paper-0);
}

/* Thin editorial scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb {
    background: var(--ink-4);
    border: 2px solid var(--ink-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--paper-3); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 550;
    line-height: 1.08;
    color: var(--paper-0);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

p { text-wrap: pretty; }

strong { color: var(--paper-0); font-weight: 600; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    background: var(--lacre);
    color: var(--paper-0);
    padding: 0.875rem 1.5rem;
    z-index: calc(var(--z-cursor) + 1);
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: top var(--t-fast);
}

.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--lacre-hi);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   GLOBAL TEXTURE — single fixed grain overlay
   ============================================================ */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: var(--z-grain);
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
}

/* legacy hook from markup — texture now lives on body */
.has-grain { position: relative; }

/* ============================================================
   CUSTOM CURSOR (fine pointers only — injected by JS)
   ============================================================ */

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-cursor);
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: #fff;
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), opacity 0.3s;
}

.cursor-ring.is-pressing { width: 22px; height: 22px; }
.cursor-ring.is-link { width: 52px; height: 52px; opacity: 0.9; }

/* Hide the native pointer while the custom cursor is live (the JS only
   adds this class on fine pointers with GSAP available). The blinking
   text caret inside inputs is unaffected — only the mouse arrow goes. */
html.has-custom-cursor,
html.has-custom-cursor * { cursor: none !important; }

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section--compact { padding-block: var(--space-6); }
.section--generous { padding-block: var(--space-7); }

/* Section heads — mono eyebrow with roman counter + rule */
body { counter-reset: dossier; }

.section-head { margin-bottom: var(--space-5); }

.section-head__label {
    counter-increment: dossier;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--paper-2);
    margin-bottom: var(--space-3);
}

.section-head__label::before {
    content: counter(dossier, upper-roman) ".";
    color: var(--lacre-hi);
    letter-spacing: 0.1em;
}

.section-head__label::after {
    content: '';
    height: 1px;
    width: 72px;
    background: var(--rule-strong);
}

.section-head__title {
    font-size: var(--fs-h2);
    max-width: 18ch;
}

.section-head__label--light { color: var(--paper-2); }
.section-head__title--light { color: var(--paper-0); }

.section-description,
.section-subtitle {
    margin-top: var(--space-3);
    max-width: 56ch;
    color: var(--paper-2);
    font-size: var(--fs-small);
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: transform var(--t-mid), background var(--t-mid), border-color var(--t-mid);
}

.header.is-scrolled {
    background: rgba(16, 15, 12, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--rule);
}

.header.is-hidden { transform: translateY(-101%); }

.navbar { width: 100%; }

.nav-container {
    max-width: var(--container);
    margin-inline: auto;
    padding: 0.875rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 44px;
}

.brand-icon img {
    width: 40px !important;
    height: 40px !important;
    filter: grayscale(1) brightness(2.4) contrast(0.86) sepia(0.22);
    opacity: 0.9;
    transition: opacity var(--t-fast);
}

.nav-brand:hover .brand-icon img { opacity: 1; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--paper-2);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 560;
    color: var(--paper-0);
    letter-spacing: 0.01em;
}

.brand-suffix {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.8125rem;
    color: var(--lacre-hi);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.6vw, 2.5rem);
    counter-reset: navindex;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--paper-1);
    counter-increment: navindex;
    transition: color var(--t-fast);
}

.nav-link::before {
    content: counter(navindex, decimal-leading-zero);
    font-size: 0.5625rem;
    color: var(--paper-3);
    transform: translateY(-0.45em);
    transition: color var(--t-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 100%;
    height: 1px;
    background: var(--lacre-hi);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.45s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active { color: var(--paper-0); }
.nav-link:hover::before,
.nav-link.is-active::before { color: var(--lacre-hi); }
.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* Hamburger */
.nav-toggle {
    display: none;
    position: relative;
    z-index: calc(var(--z-menu) + 1);
    width: 48px;
    height: 48px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--paper-0);
    transition: transform var(--t-mid), opacity var(--t-fast);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.9rem 1.9rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border-radius: 2px;
    overflow: hidden;
    isolation: isolate;
    /* color swap is instant, delayed to the curtain's midpoint so the
       label never sits on a same-color background during the transition */
    transition: color 0s linear 0.08s, border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
    will-change: transform;
}

.btn i {
    font-size: 0.8125rem;
    transition: transform var(--t-fast);
}

.btn:hover i { transform: translateX(3px); }
.btn:active { transform: scale(0.975); }

/* sliding-ink fill — sits behind ALL button content (including bare
   text nodes, which `.btn > *` cannot lift) via negative z-index inside
   the button's own stacking context */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--paper-0);
    transform: translateY(101%);
    transition: transform 0.5s var(--ease-out);
    z-index: -1;
}

.btn:hover::before { transform: translateY(0); }

.btn-primary {
    background: var(--lacre);
    color: var(--paper-0);
}

.btn-primary:hover { color: var(--ink-0); }

.btn-secondary {
    background: transparent;
    color: var(--paper-0);
    border: 1px solid var(--rule-strong);
}

.btn-secondary:hover { color: var(--ink-0); border-color: var(--paper-0); }

.btn-outline-primary {
    background: transparent;
    color: var(--paper-1);
    border: 1px solid var(--rule-strong);
}

.btn-outline-primary:hover { color: var(--ink-0); border-color: var(--paper-0); }

.btn-sm {
    min-height: 44px;
    padding: 0.65rem 1.4rem;
    font-size: 0.6875rem;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-block: calc(var(--space-7) + 2rem) var(--space-6);
    background:
        radial-gradient(110% 75% at 78% 18%, rgba(172, 63, 44, 0.07) 0%, transparent 55%),
        radial-gradient(90% 65% at 12% 88%, rgba(239, 234, 224, 0.035) 0%, transparent 50%),
        var(--ink-1);
    overflow: hidden;
}

/* Giant legal section-sign watermark */
.hero::before {
    content: '§' / '';
    position: absolute;
    top: 50%;
    right: -4vw;
    transform: translateY(-52%);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(20rem, 46vw, 52rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(239, 234, 224, 0.05);
    pointer-events: none;
    user-select: none;
}

/* faint ruled-paper lines */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 119px,
        rgba(239, 234, 224, 0.028) 119px,
        rgba(239, 234, 224, 0.028) 120px
    );
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--paper-2);
    margin-bottom: var(--space-4);
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--rule);
    max-width: max-content;
}

.hero-badge i {
    color: var(--lacre-hi);
    font-size: 0.8125rem;
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 580;
    line-height: 0.98;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
}

/* SEO line restyled as small italic overline inside the h1 */
.hero-title .highlight {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 420;
    font-size: clamp(1.0625rem, 1.8vw, 1.5rem);
    letter-spacing: 0.01em;
    line-height: 1.4;
    color: var(--lacre-hi);
    margin-bottom: 1.25rem;
}

.hero-description {
    font-size: clamp(1rem, 1.4vw, 1.1875rem);
    line-height: 1.75;
    color: var(--paper-1);
    max-width: 54ch;
    margin-bottom: var(--space-4);
}

/* Oversized stat — the verdict number */
.hero-stat {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 380;
    font-size: clamp(4.5rem, 9vw, 8.5rem);
    line-height: 0.9;
    color: var(--paper-0);
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: var(--space-5);
    font-variant-numeric: tabular-nums;
}

.hero-stat__label {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: var(--fs-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--paper-2);
    max-width: 9ch;
    line-height: 1.6;
    padding-left: 1.25rem;
    border-left: 1px solid var(--lacre);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.cta-descriptions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
}

.cta-help {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--paper-3);
}

/* Hero portrait — evidence-tag frame */
.hero-visual { position: relative; }

.hero-image { position: relative; }

.image-frame {
    position: relative;
    background: linear-gradient(168deg, var(--ink-3) 0%, var(--ink-2) 70%);
    border: 1px solid var(--rule);
    padding: clamp(1rem, 2vw, 1.75rem);
    overflow: hidden;
}

/* offset double frame */
.image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--rule);
    transform: translate(14px, 14px);
    pointer-events: none;
}

/* case-file label etched on the frame */
.image-frame::after {
    content: 'STEINRAISER · CPACF T° 122 F° 302' / '';
    position: absolute;
    left: 50%;
    bottom: 0.65rem;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--paper-3);
    white-space: nowrap;
}

.profile-image {
    width: 100%;
    height: auto;
    filter: grayscale(0.28) sepia(0.1) contrast(1.05) brightness(1.02);
    transform-origin: center top;
}

.floating-elements { position: absolute; inset: 0; pointer-events: none; }

/* "Protección Legal" tag — evidence sticker */
.floating-card {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--print-bg);
    color: var(--print-ink);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 0.7rem 1.1rem;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

.floating-card i { color: var(--lacre); font-size: 0.75rem; }

.floating-card.card-2 {
    left: -1.5rem;
    bottom: 3.5rem;
    transform: rotate(-3deg);
}

/* hidden legacy stat group stays hidden */
.hero-stats { display: none; }

/* ============================================================
   TRUST STRIP — letterhead line
   ============================================================ */

.trust-signals {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--ink-0);
    padding-block: 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 1.25rem;
    border-left: 1px solid var(--rule);
}

.trust-item:first-child { border-left: none; }

.trust-icon-wrap {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule);
    color: var(--lacre-hi);
    font-size: 0.75rem;
}

.trust-item-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--paper-0);
    line-height: 1.5;
}

.trust-item-sub {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    color: var(--paper-3);
    line-height: 1.5;
}

/* ============================================================
   SERVICES — the index of the dossier
   ============================================================ */

.services {
    position: relative;
    background: var(--ink-1);
}

.services-list {
    border-top: 1px solid var(--rule-strong);
    counter-reset: serviceindex;
}

.service-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(120px, 2fr) minmax(0, 7fr) minmax(0, 3fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
    border-bottom: 1px solid var(--rule);
    transition: background-color var(--t-mid);
}

.service-row:hover { background: rgba(239, 234, 224, 0.015); }

.service-num {
    font-family: var(--font-display);
    font-weight: 380;
    font-size: clamp(4rem, 8vw, 7.5rem);
    line-height: 0.85;
    color: transparent;
    -webkit-text-stroke: 1px var(--paper-3);
    transition: color var(--t-slow), -webkit-text-stroke-color var(--t-slow);
    font-variant-numeric: tabular-nums;
    align-self: start;
}

.service-row:hover .service-num {
    color: var(--lacre);
    -webkit-text-stroke-color: var(--lacre);
}

.service-row__body {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 2 / 4;
    gap: inherit;
    align-items: start;
}

.service-title {
    font-size: var(--fs-h3);
    font-weight: 540;
    line-height: 1.18;
    margin-bottom: var(--space-2);
    max-width: 24ch;
}

.service-description {
    color: var(--paper-2);
    font-size: var(--fs-small);
    max-width: 58ch;
    margin-bottom: var(--space-3);
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.service-features li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.875rem;
    color: var(--paper-1);
    line-height: 1.6;
}

.service-features li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--lacre-hi);
}

.service-cta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}

/* keep description + features in first column of the body subgrid */
.service-title, .service-description, .service-features { grid-column: 1; }

/* row 02 — printed-paper interleaf */
.service-row--inverted {
    background: var(--print-bg);
    border-bottom: 1px solid var(--print-rule);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
}

.service-row--inverted:hover { background: var(--print-bg); }

.service-row--inverted .service-title { color: var(--print-ink); }
.service-row--inverted .service-description { color: var(--print-muted); }
.service-row--inverted .service-features li { color: var(--print-ink); }
.service-row--inverted .service-features li::before { color: var(--lacre); }

.service-row--inverted .service-num {
    -webkit-text-stroke-color: rgba(25, 24, 19, 0.35);
}

.service-row--inverted:hover .service-num {
    color: var(--lacre);
    -webkit-text-stroke-color: var(--lacre);
}

.service-row--inverted .btn-outline-primary {
    color: var(--print-ink);
    border-color: rgba(25, 24, 19, 0.35);
}

.service-row--inverted .btn-outline-primary::before { background: var(--print-ink); }
.service-row--inverted .btn-outline-primary:hover { color: var(--print-bg); border-color: var(--print-ink); }

/* ============================================================
   ABOUT — the attorney's record
   ============================================================ */

.about {
    position: relative;
    background: var(--ink-0);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}

.about::before {
    content: '§' / '';
    position: absolute;
    bottom: -12vw;
    left: -3vw;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(16rem, 34vw, 38rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(239, 234, 224, 0.045);
    pointer-events: none;
    user-select: none;
}

.about-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}

.about-text .lead {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    font-weight: 440;
    line-height: 1.5;
    color: var(--paper-0);
    margin-bottom: var(--space-3);
}

.about-text .lead::first-letter {
    font-size: 3.1em;
    font-style: italic;
    font-weight: 500;
    float: left;
    line-height: 0.78;
    padding-right: 0.12em;
    color: var(--lacre-hi);
}

.about-text p:not(.lead) {
    color: var(--paper-1);
    font-size: var(--fs-small);
    max-width: 60ch;
}

/* Credentials — court-record timeline */
.credentials {
    margin-top: var(--space-5);
    border-top: 1px solid var(--rule-strong);
}

.credential {
    display: grid;
    grid-template-columns: 110px 24px 1fr;
    gap: 1.25rem;
    align-items: start;
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--rule);
}

.credential-year {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 420;
    font-size: 1.75rem;
    color: var(--lacre-hi);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.credential-dot {
    position: relative;
    width: 7px;
    height: 7px;
    margin-top: 0.65rem;
    background: var(--paper-3);
    transform: rotate(45deg);
    justify-self: center;
}

.credential-info h4 {
    font-size: 1.125rem;
    font-weight: 540;
    margin-bottom: 0.3rem;
}

.credential-info p {
    font-size: 0.875rem;
    color: var(--paper-2);
}

/* About portrait */
.about-visual {
    position: relative;
    padding-top: var(--space-3);
}

.about-image {
    width: 100%;
    border: 1px solid var(--rule);
    background: linear-gradient(168deg, var(--ink-3) 0%, var(--ink-2) 70%);
    padding: clamp(0.875rem, 1.6vw, 1.5rem);
    filter: grayscale(0.28) sepia(0.1) contrast(1.05) brightness(1.02);
}

.achievement-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: -1px;
    border: 1px solid var(--rule);
}

.achievement-card {
    padding: 1.5rem 1.25rem;
    text-align: left;
    background: var(--ink-2);
}

.achievement-card + .achievement-card { border-left: 1px solid var(--rule); }

.achievement-number {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1;
    color: var(--paper-0);
    margin-bottom: 0.4rem;
    font-variant-numeric: tabular-nums;
}

.achievement-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--paper-2);
}

/* ============================================================
   CALCULATOR — official form
   ============================================================ */

.calculator-section {
    position: relative;
    background: var(--ink-1);
}

.calculator-container {
    max-width: 920px;
    margin-inline: auto;
}

.calculator-form {
    position: relative;
    border: 1px solid var(--rule);
    background: var(--ink-2);
    padding: clamp(1.75rem, 4vw, 3.25rem);
}

/* form corner-marks, like a printed boundary */
.calculator-form::before,
.calculator-form::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.calculator-form::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--lacre);
    border-left: 2px solid var(--lacre);
}

.calculator-form::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--lacre);
    border-right: 2px solid var(--lacre);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4) var(--space-5);
}

.form-group { display: flex; flex-direction: column; }

.form-group label {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--paper-2);
    margin-bottom: 0.65rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule-strong);
    border-radius: 0;
    padding: 0.65rem 0.1rem;
    font-family: var(--font-text);
    font-size: 1.0625rem;
    color: var(--paper-0);
    transition: border-color var(--t-fast);
    min-height: 48px;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238E8A7D' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    padding-right: 1.75rem;
    cursor: pointer;
}

.form-group select option {
    background: var(--ink-2);
    color: var(--paper-0);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--paper-3); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--lacre-hi);
}

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
    border-bottom-color: var(--lacre-hi);
}

.help-text {
    font-size: 0.75rem;
    color: var(--paper-3);
    margin-top: 0.45rem;
}

.form-submit-row {
    margin-top: var(--space-4);
    display: flex;
    justify-content: flex-end;
}

/* Result — the printed document slides out of the dark */
.calculator-result { margin-top: var(--space-4); }

.mt-4 { margin-top: var(--space-4); }

.calculator-result,
.result-card {
    background: var(--print-bg);
    color: var(--print-ink);
}

.calculator-result {
    border: 1px solid var(--print-rule);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    padding: clamp(1.75rem, 4vw, 3rem);
    position: relative;
}

/* wax-seal dot on the printed result */
.calculator-result::after {
    content: '';
    position: absolute;
    top: clamp(1.5rem, 3vw, 2.5rem);
    right: clamp(1.5rem, 3vw, 2.5rem);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--lacre-hi), var(--lacre-deep) 75%);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.22);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--print-rule);
}

.result-header i { color: var(--lacre); font-size: 1rem; }

.result-header h3,
.result-title {
    font-size: 1.5rem;
    color: var(--print-ink);
    font-weight: 560;
}

.result-content p {
    font-size: 0.9375rem;
    color: var(--print-muted);
    margin-bottom: 0.4rem;
}

.result-content p strong { color: var(--print-ink); }

.result-subhead {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--print-ink);
    margin: 1.5rem 0 0.75rem;
}

.result-content ul {
    border-top: 1px solid var(--print-rule);
}

.result-content ul li {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--print-rule);
    font-size: 0.9375rem;
    color: var(--print-muted);
    font-variant-numeric: tabular-nums;
}

.result-content ul li strong { color: var(--print-ink); font-weight: 500; }

.result-content .total {
    margin-top: 1.5rem;
    padding: 1.1rem 1.4rem;
    background: var(--print-ink);
    color: var(--print-bg);
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.4vw, 1.625rem);
    font-variant-numeric: tabular-nums;
}

.result-content .total strong { color: inherit; font-weight: 560; }

.result-disclaimer {
    margin-top: 1.25rem;
    font-size: 0.75rem !important;
    color: var(--print-muted) !important;
    font-style: italic;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.result-actions .btn-primary { background: var(--lacre); }
.result-actions .btn-primary::before { background: var(--print-ink); }
.result-actions .btn-primary:hover { color: var(--print-bg); }

.result-actions .btn-secondary {
    color: var(--print-ink);
    border-color: rgba(25, 24, 19, 0.4);
}

.result-actions .btn-secondary::before { background: var(--print-ink); }
.result-actions .btn-secondary:hover { color: var(--print-bg); border-color: var(--print-ink); }

/* result skeleton markup present in static HTML */
.result-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--print-rule);
    font-size: 0.9375rem;
}

.result-item.total {
    border-bottom: none;
    font-weight: 600;
    color: var(--print-ink);
}

.result-label { color: var(--print-muted); }
.result-value { color: var(--print-ink); font-variant-numeric: tabular-nums; }

/* Disclaimer — counsel's note */
.calculator-disclaimer {
    margin-top: var(--space-4);
    border: 1px solid var(--rule);
    border-left: 2px solid var(--lacre);
    padding: 1.75rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1.25rem;
    align-items: start;
}

.disclaimer-icon {
    grid-row: 1;
    color: var(--lacre-hi);
    font-size: 0.875rem;
    margin-top: 0.2rem;
}

.disclaimer-title {
    grid-row: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--paper-0);
    align-self: center;
}

.disclaimer-content { grid-column: 2; }

.disclaimer-text {
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--paper-2);
    margin-bottom: 0.65rem;
}

.disclaimer-text strong { color: var(--paper-1); }

/* error message injected by JS */
#calculatorError {
    background: var(--lacre-ghost) !important;
    border: 1px solid var(--lacre) !important;
    color: var(--paper-0) !important;
    border-radius: 0 !important;
    font-family: var(--font-mono);
    font-size: 0.8125rem !important;
    letter-spacing: 0.04em;
}

/* ============================================================
   TESTIMONIALS — sworn statements
   ============================================================ */

.testimonials {
    position: relative;
    background: var(--ink-0);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}

.testimonials-header { margin-bottom: var(--space-5); }

/* Bleed the carousel out of the container to the right viewport edge so
   cards run off-screen instead of floating in a centered gutter. The
   header stays put — only this track breaks out. */
.testimonials-carousel {
    overflow: visible;
    margin-right: calc(50% - 50vw);
}

.testimonials-track {
    display: flex;
    align-items: stretch;
    gap: clamp(1.25rem, 2.5vw, 2rem);
    overflow-x: auto;
    /* trailing room so the last card isn't flush against the screen edge
       once you scroll to the end */
    padding-right: var(--gutter);
    padding-bottom: var(--space-3);
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
}

.testimonials-track::-webkit-scrollbar { display: none; }
.testimonials-track.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-behavior: auto;
}

.testimonial-card {
    position: relative;
    flex: 0 0 clamp(300px, 34vw, 420px);
    background: var(--ink-2);
    border: 1px solid var(--rule);
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color var(--t-mid), transform var(--t-mid);
}

.testimonial-card:hover {
    border-color: var(--rule-strong);
    transform: translateY(-6px);
}

.testimonial-card::before {
    content: '\201C' / '';
    position: absolute;
    top: 0.65rem;
    left: 1.4rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 4.5rem;
    line-height: 1;
    color: var(--lacre);
    opacity: 0.55;
    pointer-events: none;
}

.testimonial-stars {
    display: flex;
    gap: 0.3rem;
    justify-content: flex-end;
    color: var(--lacre-hi);
    font-size: 0.5625rem;
}

.testimonial-text {
    font-family: var(--font-display);
    font-weight: 420;
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--paper-0);
    flex: 1;
}

.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule-strong);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    color: var(--paper-1);
    background: var(--ink-3);
}

.testimonial-name {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--paper-0);
    line-height: 1.4;
}

.testimonial-case {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--paper-3);
    line-height: 1.6;
}

/* ============================================================
   CONTACT — file your case
   ============================================================ */

.contact {
    position: relative;
    background: var(--ink-1);
}

.contact-container {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}

.contact-title {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-3);
}

.contact-description {
    color: var(--paper-2);
    font-size: var(--fs-small);
    max-width: 38ch;
    margin-bottom: var(--space-4);
}

.contact-methods {
    border-top: 1px solid var(--rule-strong);
}

.contact-method {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.method-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule);
    color: var(--lacre-hi);
    font-size: 0.8125rem;
    margin-top: 0.2rem;
}

.method-info h4 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--paper-2);
    margin-bottom: 0.35rem;
}

.method-info p {
    font-size: 1.0625rem;
    color: var(--paper-0);
    margin-bottom: 0.3rem;
    font-variant-numeric: tabular-nums;
}

.contact-link {
    position: relative;
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--lacre-hi);
    padding-bottom: 2px;
    min-height: 0;
}

a.contact-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--lacre-hi);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.45s var(--ease-out);
}

a.contact-link:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
}

span.contact-link { color: var(--paper-3); }

/* Contact form mirrors the calculator's official-form language */
.contact-form-container { position: relative; }

.contact-form {
    position: relative;
    border: 1px solid var(--rule);
    background: var(--ink-2);
    padding: clamp(1.75rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-top: 2px solid var(--lacre);
    border-right: 2px solid var(--lacre);
    pointer-events: none;
}

.contact-form::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 18px;
    height: 18px;
    border-bottom: 2px solid var(--lacre);
    border-left: 2px solid var(--lacre);
    pointer-events: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3) var(--space-4);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.checkbox-group {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 0.875rem;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex-shrink: 0;
    margin-top: 0.25rem;
    border: 1px solid var(--rule-strong);
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color var(--t-fast), border-color var(--t-fast);
    padding: 0;
}

.checkbox-group input[type="checkbox"]::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--paper-0);
    transform: scale(0);
    transition: transform var(--t-fast);
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--lacre);
    border-color: var(--lacre);
}

.checkbox-group input[type="checkbox"]:checked::before { transform: scale(1); }

.checkbox-group label {
    font-family: var(--font-text);
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--paper-2);
    line-height: 1.6;
    margin: 0;
}

.checkbox-group label a {
    color: var(--lacre-hi);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.checkbox-group label a:hover { color: var(--paper-0); }

.btn-submit { align-self: flex-start; }

.field-error {
    font-family: var(--font-mono);
    font-size: 0.6875rem !important;
    letter-spacing: 0.06em;
    color: var(--lacre-hi) !important;
}

/* ============================================================
   FOOTER — closing seal
   ============================================================ */

.footer {
    position: relative;
    background: var(--ink-0);
    border-top: 1px solid var(--rule);
    padding-top: var(--space-6);
    overflow: hidden;
}

.footer::before {
    content: 'STEINRAISER' / '';
    position: absolute;
    left: 50%;
    bottom: -0.24em;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-weight: 580;
    font-size: clamp(5rem, 14.5vw, 15rem);
    letter-spacing: 0.02em;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(239, 234, 224, 0.05);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    padding-bottom: var(--space-5);
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 550;
    margin-bottom: var(--space-2);
    max-width: 16ch;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--paper-2);
    max-width: 44ch;
}

.footer-subtitle {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    color: var(--paper-2);
    margin-bottom: var(--space-3);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
}

.footer-links li,
.footer-contact li { margin-bottom: 0.65rem; }

.footer-links a {
    position: relative;
    font-size: 0.9375rem;
    color: var(--paper-1);
    transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-links a::before {
    content: '—';
    position: absolute;
    left: -2px;
    opacity: 0;
    color: var(--lacre-hi);
    transition: opacity var(--t-fast);
}

.footer-links a:hover {
    color: var(--paper-0);
    padding-left: 1.5rem;
}

.footer-links a:hover::before { opacity: 1; }

.footer-contact li {
    display: flex;
    align-items: baseline;
    gap: 0.875rem;
    font-size: 0.9375rem;
    color: var(--paper-1);
    font-variant-numeric: tabular-nums;
}

.footer-contact i {
    color: var(--lacre-hi);
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    border-top: 1px solid var(--rule);
    padding-block: 1.5rem;
}

.footer-bottom p {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--paper-3);
}

.footer-social { display: flex; gap: 0.75rem; }

.social-link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule);
    color: var(--paper-1);
    font-size: 0.9375rem;
    transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}

.social-link:hover {
    color: var(--paper-0);
    border-color: var(--lacre);
    background: var(--lacre-ghost);
}

.footer-credit {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-bottom: 1.25rem;
}

.footer-credit a {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-3);
    transition: color var(--t-fast);
}

.footer-credit a:hover { color: var(--paper-1); }

/* ============================================================
   WHATSAPP BUTTON
   ============================================================ */

.whatsapp-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: var(--z-whatsapp);
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1E2B22;
    border: 1px solid rgba(125, 196, 150, 0.3);
    color: #7DC496;
    font-size: 1.375rem;
    transition: transform var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.whatsapp-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(125, 196, 150, 0.4);
    animation: wa-pulse 3s var(--ease-out) infinite;
}

@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    70%, 100% { transform: scale(1.55); opacity: 0; }
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    color: #9ADBB1;
    border-color: rgba(125, 196, 150, 0.6);
}

/* ============================================================
   TOASTS (JS-injected) — printed slips
   ============================================================ */

.toast {
    border-radius: 0 !important;
    font-family: var(--font-text) !important;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* ============================================================
   ANIMATION PRIMITIVES (driven by script.js)
   `html.anim` is set early only when motion is allowed;
   script.js removes it if GSAP fails to load.
   ============================================================ */

/* word-split wrappers created at runtime for the hero title */
.hero-title__main { display: block; }

.hero-w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.hero-w__i {
    display: inline-block;
    will-change: transform;
}

/* pre-hidden states — GSAP animates these in; if it fails to load,
   script.js drops the `anim` class and everything is visible */
html.anim .hero-badge,
html.anim .hero-title,
html.anim .hero-description,
html.anim .hero-stat,
html.anim .hero-actions,
html.anim .cta-descriptions,
html.anim .hero-visual { opacity: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .service-row {
        grid-template-columns: minmax(90px, 1fr) minmax(0, 4fr);
    }

    .service-row__body {
        grid-column: 2;
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .service-cta { justify-self: start; margin-top: var(--space-2); }

    .trust-grid { grid-template-columns: repeat(3, 1fr); }

    .trust-item:nth-child(4) { border-left: none; }

    .trust-item { border-top: 1px solid var(--rule); }
    .trust-item:nth-child(-n+3) { border-top: none; }
}

@media (max-width: 960px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .hero { padding-top: calc(var(--space-6) + 3rem); }

    .hero-visual {
        max-width: 440px;
    }

    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-visual {
        max-width: 460px;
        order: -1;
        padding-top: 0;
    }

    .footer-content { grid-template-columns: 1fr 1fr; }
    .footer-section:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        inset: 0;
        z-index: var(--z-menu);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0;
        padding: 6rem var(--gutter) 3rem;
        background: rgba(13, 13, 11, 0.97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        visibility: hidden;
        opacity: 0;
        transition: opacity var(--t-mid), visibility 0s linear 0.55s;
    }

    .nav-menu.active {
        visibility: visible;
        opacity: 1;
        transition: opacity var(--t-mid);
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--rule);
    }

    .nav-link {
        width: 100%;
        font-family: var(--font-display);
        font-size: clamp(1.875rem, 8vw, 2.75rem);
        font-weight: 480;
        text-transform: none;
        letter-spacing: -0.01em;
        padding: 1.1rem 0;
        color: var(--paper-0);
        transform: translateY(28px);
        opacity: 0;
        transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out), color var(--t-fast);
    }

    .nav-menu.active .nav-link {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-menu.active li:nth-child(1) .nav-link { transition-delay: 0.08s; }
    .nav-menu.active li:nth-child(2) .nav-link { transition-delay: 0.14s; }
    .nav-menu.active li:nth-child(3) .nav-link { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) .nav-link { transition-delay: 0.26s; }
    .nav-menu.active li:nth-child(5) .nav-link { transition-delay: 0.32s; }
    .nav-menu.active li:nth-child(6) .nav-link { transition-delay: 0.38s; }

    .nav-link::before {
        font-family: var(--font-mono);
        font-size: 0.6875rem;
        color: var(--lacre-hi);
        margin-right: 1rem;
    }

    .nav-link::after { display: none; }

    .hero-stat { font-size: clamp(3.75rem, 16vw, 5.5rem); }

    .form-grid,
    .form-row { grid-template-columns: 1fr; }

    .trust-grid { grid-template-columns: 1fr 1fr; }

    .trust-item { border-left: none !important; border-top: 1px solid var(--rule); padding-inline: 0.5rem; }
    .trust-item:nth-child(-n+2) { border-top: none; }

    .service-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .service-num { font-size: 3.5rem; }

    .service-row__body { grid-column: 1; }

    .credential { grid-template-columns: 72px 16px 1fr; gap: 0.875rem; }
    .credential-year { font-size: 1.25rem; }

    .footer-content { grid-template-columns: 1fr; }

    .footer-bottom { justify-content: center; text-align: center; }

    .floating-card.card-2 { left: 0.5rem; bottom: 2rem; }

    .hero-actions .btn { width: 100%; }

    .whatsapp-btn { right: 1rem; bottom: 1rem; }
}

@media (max-width: 560px) {
    .brand-suffix { display: none; }

    .hero-title { line-height: 1.02; }

    .calculator-form,
    .contact-form { padding: 1.5rem 1.25rem; }

    .calculator-result { padding: 1.5rem 1.25rem; }

    .calculator-result::after { width: 32px; height: 32px; }

    .section--generous { padding-block: var(--space-6); }

    .testimonial-card { flex-basis: 86vw; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html.anim .a-fade,
    html.anim .a-line > * { opacity: 1; }

    html.anim .a-clip { clip-path: none; }

    .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   PRINT — the site is a document, after all
   ============================================================ */

@media print {
    body { background: #fff; color: #000; }
    .header, .whatsapp-btn, .nav-toggle, body::after { display: none !important; }
}
