/* ───────── Service page section layouts (servicepage/showcase.templ) ─────────
   fixSection (.ss-fix), clientsSection (.ss-clients), reportSection
   (.ss-report) and proofSection (.ss-tiles, .ss-result). Each sits under the
   stacked heading (.sp-stack-head). Tinted feature cards match the phone
   showcase (.sp-showcase in pages/service-page.css). Everything stacks to
   one column under 961px. */

/* Shared: tinted feature card */
.ss-fix-card,
.ss-clients {
    border: 1px solid var(--accent-line);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(180, 124, 253, 0.14), rgba(255, 127, 194, 0.04) 55%, rgba(255, 255, 255, 0.02));
}

/* Shared: a plain list of titled points with hairlines between */
.ss-rows,
.ss-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.ss-rows li,
.ss-steps li {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.ss-rows h3,
.ss-steps h3,
.ss-tile h3,
.ss-proof-more h3,
.ss-result h3,
.ss-fix-card h3,
.ss-clients-lead h3 {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}

.ss-rows h3,
.ss-steps h3 {
    font-size: 1.19rem;
}

.ss-rows p,
.ss-steps p,
.ss-tile p,
.ss-proof-more p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── Fix: points + CTA beside a before/after Google result ── */
.ss-fix {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: start;
}

.ss-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 36px;
}

.ss-cta .btn {
    white-space: nowrap;
}

.ss-cta p {
    margin: 0;
    max-width: 30ch;
    font-size: 0.94rem;
    color: var(--text-secondary);
}

.ss-fix-card {
    padding: 48px;
}

.ss-fix-card > h3 {
    font-size: 1.6rem;
    line-height: 1.2;
}

.ss-fix-card > p {
    margin: 0;
    max-width: 52ch;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ss-ba {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.ss-ba-label {
    margin: 4px 0 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ss-ba-label-after {
    color: var(--accent-purple);
}

.ss-ba-arrow {
    display: flex;
    justify-content: center;
    color: var(--accent-purple);
}

/* A Google result. It imitates Google's light theme, so fixed colours. */
.ss-gres {
    padding: 16px 20px;
    border-radius: 14px;
    background: #fff;
    color: #202124;
    font-family: Roboto, Arial, sans-serif;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.ss-gres-before {
    opacity: 0.72;
}

.ss-gres-site {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ss-gres-fav {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border: 1px solid #e3e3e3;
    border-radius: 50%;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 12px;
    font-weight: 700;
}

.ss-gres-name {
    display: block;
    font-size: 14px;
    line-height: 1.2;
}

.ss-gres-url {
    display: block;
    font-size: 12px;
    color: #4d5156;
    overflow-wrap: anywhere;
}

.ss-gres-title {
    display: block;
    margin-top: 6px;
    font-size: 19px;
    line-height: 1.3;
    color: #1a0dab;
}

.ss-gres-before .ss-gres-title {
    color: #5f6368;
}

.ss-gres-snippet {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4d5156;
}

/* ── Clients: two tilted client sites with notes ── */
.ss-clients {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: center;
    padding: 48px;
    overflow: hidden;
}

.ss-clients-lead h3 {
    margin-bottom: 16px;
    font-size: clamp(1.8rem, 2.6vw, 2.1rem);
    line-height: 1.15;
    text-wrap: balance;
}

.ss-clients-lead > p {
    margin: 0;
    max-width: 40ch;
    font-size: 1.06rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.ss-clients-lead .ss-areas {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.94rem;
    line-height: 1.7;
}

.ss-areas strong {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.ss-clients-stage {
    position: relative;
    height: 560px;
}

.ss-clients-stage::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 480px;
    height: 480px;
    max-width: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 124, 253, 0.3), rgba(255, 127, 194, 0.1) 45%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.ss-browser {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: #1b1328;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.ss-browser-bar {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: #231a33;
}

.ss-browser-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.ss-browser img {
    display: block;
    width: 100%;
    height: auto;
}

.ss-browser-1 {
    position: absolute;
    z-index: 2;
    top: 40px;
    right: 30px;
    width: min(470px, 78%);
    transform: perspective(1800px) rotateY(-18deg) rotateX(6deg) rotate(3deg);
}

.ss-browser-2 {
    position: absolute;
    z-index: 1;
    top: 250px;
    left: 40px;
    width: min(380px, 62%);
    transform: perspective(1800px) rotateY(16deg) rotateX(6deg) rotate(-4deg);
}

.ss-client-notes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-client-note {
    position: absolute;
    z-index: 3;
    width: 230px;
    padding: 14px 16px;
    border: 1px solid var(--accent-line);
    border-radius: 16px;
    background: rgba(21, 10, 42, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.ss-client-note strong {
    display: block;
    margin-bottom: 3px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--text-primary);
}

.ss-client-note span {
    display: block;
}

.ss-client-note a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: -6px 0 -12px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--text-primary);
    text-decoration: none;
}

.ss-client-note a:hover {
    color: var(--accent-purple);
}

.ss-client-note-1 { top: 20px; right: 0; }
.ss-client-note-2 { bottom: 10px; left: 0; }

/* ── Report: numbered steps beside an example report ── */
.ss-report {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: center;
}

.ss-steps {
    counter-reset: ss-step;
}

.ss-steps li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 16px;
}

.ss-steps li::before {
    counter-increment: ss-step;
    content: counter(ss-step);
    grid-row: span 2;
    padding-top: 2px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--accent-purple);
}

/* A printed-report look: light card, so fixed colours */
.ss-report-card {
    padding: 30px 32px;
    border-radius: 20px;
    background: #fbfaff;
    color: #1d1530;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
    transform: perspective(1800px) rotateY(-8deg) rotate(1.5deg);
}

.ss-report-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7e2f2;
}

.ss-report-head strong {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.ss-report-head span {
    flex: none;
    font-size: 0.82rem;
    color: #6b6480;
}

.ss-report-block {
    margin-top: 18px;
}

.ss-report-block h4 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c3fd8;
}

.ss-report-block ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.ss-report-block li {
    list-style: disc;
}

.ss-ranks {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px 18px;
    margin: 0;
    font-size: 0.9rem;
}

.ss-ranks dt,
.ss-ranks dd {
    margin: 0;
}

.ss-ranks .ss-up {
    color: #188038;
    font-weight: 600;
}

.ss-ranks .ss-up::before {
    content: "▲ ";
}

/* ── Proof: picture tiles, a headline result, plain cards ── */
.ss-tiles {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.ss-tile h3 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.ss-tile-visual {
    height: 220px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #120826;
}

.ss-tile-visual picture,
.ss-tile-visual img {
    display: block;
    width: 100%;
    height: 100%;
}

.ss-tile-visual img {
    object-fit: cover;
}

.ss-tile-visual-founders {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ss-face {
    height: 220px;
}

.ss-face img {
    object-position: center 30%;
}

.ss-rating {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 100%;
    color: var(--text-primary);
    text-decoration: none;
}

.ss-rating-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 4.5rem;
    line-height: 1;
}

.ss-rating-stars {
    color: #fbbc04;
    font-size: 1.6rem;
    letter-spacing: 2px;
}

.ss-rating-on {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

/* The tile links to our Google reviews: show it on hover */
.ss-tile-visual-rating {
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ss-tile-visual-rating:hover {
    border-color: var(--accent-line);
    background-color: #1a0d33;
}

.ss-rating:hover .ss-rating-on {
    color: var(--accent-purple);
}

@media (prefers-reduced-motion: reduce) {
    .ss-rating-on,
    .ss-tile-visual-rating {
        transition: none;
    }
}

.sp-stack > .ss-tiles + .ss-result,
.sp-stack > .ss-result + .ss-proof-more,
.sp-stack > .ss-tiles + .ss-proof-more {
    margin-top: 20px;
}

.ss-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 36px;
    align-items: center;
    padding: 30px 36px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.ss-result-num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 5.2rem;
    line-height: 1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ss-result h3 {
    font-size: 1.375rem;
}

.ss-result p {
    margin: 0;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ss-result a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.94rem;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.ss-result a:hover {
    color: var(--accent-purple);
}

.ss-proof-more {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-proof-more li {
    padding: 22px 26px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.ss-proof-more h3 {
    font-size: 1.125rem;
}

/* Focus: the site's purple ring (as on .hero and the flip card) */
.ss-cta .btn:focus-visible,
.ss-client-note a:focus-visible,
.ss-rating:focus-visible,
.ss-result a:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 3px;
    border-radius: 6px;
}

.ss-cta .btn:focus-visible {
    border-radius: 999px;
}

/* ── Small screens ── */
@media (max-width: 1100px) {
    .ss-clients,
    .ss-fix,
    .ss-report {
        grid-template-columns: minmax(0, 1fr);
    }

    .ss-report-card {
        transform: none;
    }
}

@media (max-width: 960px) {
    .ss-fix-card,
    .ss-clients {
        padding: 28px 20px;
        border-radius: 22px;
    }

    /* Client sites flat, side by side, notes underneath */
    .ss-clients-stage {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        height: auto;
    }

    .ss-clients-stage::before {
        width: 320px;
        height: 320px;
    }

    .ss-browser-1,
    .ss-browser-2 {
        position: relative;
        inset: auto;
        width: auto;
        transform: none;
    }

    .ss-client-notes {
        grid-column: 1 / -1;
        display: grid;
        gap: 12px;
    }

    .ss-client-note {
        position: relative;
        inset: auto;
        width: auto;
    }

    .ss-proof-more {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Tablet: the three tiles stay in a row with shorter pictures */
    .ss-tile {
        padding: 18px;
    }

    .ss-tile-visual,
    .ss-face {
        height: 150px;
    }

    .ss-rating-num {
        font-size: 3rem;
    }

    .ss-result {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 24px;
    }

    .ss-result-num {
        font-size: 3.6rem;
    }
}

/* Phones: one tile per row, pictures kept short so the section isn't a
   long scroll; the rating needs less room than a photo */
@media (max-width: 600px) {
    .ss-tiles {
        grid-template-columns: minmax(0, 1fr);
    }

    .ss-tile-visual,
    .ss-face {
        height: 180px;
    }

    .ss-tile-visual-rating {
        height: 120px;
    }

    .ss-rating {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 12px;
    }
}
