/* ================================================================== */
/*  Software page                                                     */
/* ================================================================== */

.software-page {
    padding: 72px 0 96px;
}

@media (min-width: 768px) {
    .software-page { padding: 108px 0 120px; }
}

/* Shared inner container width used by every section. padding-inline 24 lives
   on the section (matches about/concrete pages) so titles align across pages
   on every viewport width. */
.sw-hero,
.sw-valueprops,
.sw-position,
.sw-feature,
.sw-integrations,
.sw-final {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---------- 1. Hero — split layout (text + dashboard screenshot) ---------- */

.sw-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    /* longhand vertical padding so the shared sw-* horizontal padding (24) is
       preserved — title aligns with every other section title on the page */
    padding-top: 8px;
    padding-bottom: 24px;
    margin-bottom: 56px;
}
@media (min-width: 920px) {
    .sw-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: 48px;
        padding-top: 16px;
        padding-bottom: 40px;
    }
}
.sw-hero__text { min-width: 0; }
.sw-hero__eyebrow {
    margin: 0 0 12px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--accent-amber);
}
.sw-hero__title {
    margin: 0 0 16px;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    color: var(--text);
    text-wrap: balance;
}
.sw-hero__lead {
    margin: 0 0 16px;
    max-width: 56ch;
    font-size: var(--fs-lead);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
.sw-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 4px 0;
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--brand, #1a4bb5);
}
.sw-hero__chip-icon {
    flex-shrink: 0;
    color: var(--brand, #1a4bb5);
}
.sw-hero__actions {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
}
.sw-hero__actions > .sw-btn {
    width: 100%;
    justify-content: center;
}

/* Match the home hero on mobile: stack the CTAs and stretch them full-width. */
@media (max-width: 520px) {
    .sw-hero__actions { display: flex; width: 100%; flex-direction: column; align-items: stretch; }
    .sw-hero__actions .sw-btn { width: 100%; }
}
/* The new hero image is a tilted monitor PNG with a transparent background,
   so we don't want a card frame, shadow ring, or background color around it
   — let it float on the page. Capped via max-height so it never blows up
   the hero past the viewport. */
.sw-hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}
.sw-hero__visual img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(70vh, 560px);   /* never taller than 70% of viewport, cap at 560px */
    object-fit: contain;
}
@media (max-width: 919px) {
    .sw-hero__visual img {
        max-height: 50vh;            /* even tighter when stacked above the text */
    }
}

/* ---------- Buttons (page-scoped) ---------- */

.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    line-height: 1.2;
    border-radius: var(--radius-base);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-tight);
    border: 1px solid transparent;
    transition:
        background-color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-med) var(--ease-out);
}
.sw-btn--primary {
    background: var(--brand-fill);
    color: #ffffff;
    border-color: var(--brand-fill);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
                0 8px 18px -10px rgba(4, 44, 113, 0.55);
}
.sw-btn--primary:hover {
    background: var(--brand-fill-600);
    border-color: var(--brand-fill-600);
    transform: translateY(-1px);
}
.sw-btn--secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.sw-btn--secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

/* ---------- 2. Three value props ---------- */

.sw-valueprops {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 96px;
}
@media (min-width: 768px) {
    .sw-valueprops {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}
.sw-vp {
    padding: 28px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-base);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 8px 16px -10px rgba(15, 23, 42, 0.06);
}
.sw-vp__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: var(--radius-base);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
    color: var(--brand);
    transition: background-color var(--dur-fast) var(--ease-out);
}
.sw-vp:hover .sw-vp__icon {
    background: var(--icon-hover-bg);
}
.sw-vp__title {
    margin: 0 0 8px;
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--text);
}
.sw-vp__desc {
    margin: 0;
    font-size: var(--fs-body-sm);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}

/* ---------- 3. Positioning copy ---------- */

.sw-position {
    text-align: start;
    margin-bottom: 96px;
}
.sw-position__title {
    margin: 0 0 20px;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    text-wrap: balance;
    background-image: var(--title-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.sw-position__body {
    margin: 0 0 14px;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
    text-align: start;
}

/* ---------- 4-6. Feature deep-dives ---------- */

.sw-feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 96px;
    /* When jumped to via #shm360-live etc., land 80px below the navbar */
    scroll-margin-top: 80px;
}
@media (min-width: 860px) {
    .sw-feature {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }
    .sw-feature--reverse .sw-feature__media { order: 2; }
    .sw-feature--reverse .sw-feature__body  { order: 1; }
}

.sw-feature__media {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-base);
    overflow: hidden;
    /* Softer, less aggressive shadow — same shape, lower intensity. */
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 6px 14px -6px rgba(15, 23, 42, 0.10),
        0 18px 32px -20px rgba(15, 23, 42, 0.20),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sw-feature__placeholder {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    color: var(--text-on-dark);
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Real screenshot variant — used when the slot has a <picture>/<img> instead
   of the gradient placeholder. Box takes the image's natural aspect (no crop). */
.sw-feature__media--photo {
    background: #0b1220;
    aspect-ratio: auto;          /* override the 16:10 from the gradient variant */
    height: auto;
    display: block;              /* drop the flex centering — image fills directly */
}
.sw-feature__media--photo img {
    display: block;
    width: 100%;
    height: auto;                /* respect natural aspect → no crop */
}

/* Distinct gradients per Soft so they read as different products */
.sw-feature__media--soft1 {
    background:
        radial-gradient(circle at 20% 20%, rgba(90, 127, 209, 0.55), transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(167, 243, 208, 0.30), transparent 55%),
        linear-gradient(135deg, #042c71 0%, #1a4bb5 100%);
}

.sw-feature__eyebrow {
    margin: 0 0 8px;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--accent-amber);
}
.sw-feature__title {
    margin: 0 0 12px;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    text-wrap: balance;
    background-image: var(--title-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.sw-feature__desc {
    margin: 0 0 16px;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
.sw-feature__bullets {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}
.sw-feature__bullets li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--fs-body-sm);
    line-height: var(--lh-loose);
    color: var(--text);
}
.sw-feature__bullets li::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 0.25em;          /* small nudge so the icon aligns with the cap height of the first line */
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23042c71' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 8.5 6.5 11.5 12.5 5'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}
/* ---------- 7. Integrations ---------- */

.sw-integrations {
    text-align: start;
    margin-bottom: 96px;
}
.sw-integrations__title {
    margin: 0 0 16px;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    background-image: var(--title-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.sw-integrations__body {
    margin: 0 0 28px;
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-muted);
}
.sw-integrations__contact {
    margin: 0;
    font-size: var(--fs-body-sm);
    color: var(--text-muted);
}
.sw-integrations__contact a {
    color: var(--brand);
    font-weight: var(--fw-medium);
}
.sw-integrations__contact a:hover { text-decoration: underline; }

/* ---------- 8. Final CTA banner ---------- */

.sw-final {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    text-align: start;
    padding-top: 64px;
    padding-bottom: 64px;
    /* horizontal padding 24 inherited from the shared sw-* rule above so the
       gradient card's content aligns with every other section title */
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.10), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(167, 243, 208, 0.12), transparent 55%),
        linear-gradient(135deg, var(--brand-fill) 0%, #0b1220 100%);
    color: #ffffff;
}
.sw-final::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url("../../assets/images/graphics/cta-flow-bg.svg") center / cover no-repeat;
    opacity: 0.55;
    animation: cta-flow-drift 12s ease-in-out infinite alternate;
    -webkit-mask-image: linear-gradient(20deg, #000 0%, transparent 45%);
            mask-image: linear-gradient(20deg, #000 0%, transparent 45%);
}
@keyframes cta-flow-drift {
    from { transform: translateX(-3%) scale(1); }
    to   { transform: translateX(3%) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
    .sw-final::before { animation: none; }
}
.sw-final__title {
    margin: 0 0 12px;
    /* capped at 34px (vs the usual --fs-h1 40px) so the longest translation
       (RU) still fits on one line at the container's max width — see the
       nowrap rule below */
    font-size: clamp(28px, 3.4vw, 34px);
    font-weight: var(--fw-semibold);
    color: #ffffff;
}
.sw-final__lead {
    margin: 0 0 24px;
    font-size: var(--fs-lead);
    color: var(--text-on-dark);
}
/* Single-line title/lead only where every language's copy is measured to
   fit the container without clipping (.sw-final has overflow: hidden for
   the background mask, so anything wider would be silently cut off).
   Below this width, wrap normally instead of risking overflow. */
@media (min-width: 1280px) {
    .sw-final__title,
    .sw-final__lead { white-space: nowrap; }
}
.sw-final__actions {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
    justify-content: flex-start;
}
.sw-final__actions > .sw-btn {
    width: 100%;
}
.sw-final__lead { max-width: 60ch; }
/* Primary flips to white-on-brand on the dark banner for max contrast;
   secondary becomes a translucent-white outlined ghost. */
.sw-final .sw-btn--primary {
    background: #ffffff;
    color: var(--brand-fill);
    border-color: #ffffff;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.45);
}
.sw-final .sw-btn--primary:hover {
    background: var(--bg-soft);
    border-color: var(--bg-soft);
    color: var(--brand);
}
.sw-final .sw-btn--secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}
.sw-final .sw-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 600px) {
    .sw-final__actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    .sw-final__actions > * {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Mobile tweaks ---------- */

@media (max-width: 640px) {
    .software-page { padding: 40px 16px 64px; }
    .sw-hero { margin-bottom: 56px; }
    .sw-valueprops, .sw-position, .sw-feature, .sw-integrations { margin-bottom: 64px; }
    .sw-final { padding: 48px 20px; }
}
