/* ============================================================
   ARPHATECH — Service Detail Page
   Depends on: base.css + landing.css
   ============================================================ */

.sd {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    padding-block: clamp(1.25rem, 2.5vw, 2rem);
}

/* ---------- Back link ---------- */
.sd__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;

    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);

    transition: color 0.2s ease, gap 0.2s ease;
}

.sd__back:hover {
    color: var(--primary);
    gap: 0.6rem;
}

/* ============================================================
   HERO + IMAGE (side by side, image right)
   ============================================================ */
.sd-hero-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.sd-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.sd-hero__category {
    display: inline-block;
    align-self: flex-start;

    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    color: var(--primary);
    background-color: var(--primary-soft);
    border-radius: 6px;
}

.sd-hero__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

.sd-hero__tagline {
    font-size: clamp(0.95rem, 1.05vw, 1.05rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 52ch;
}

.sd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ---------- Hero image ---------- */
.sd-hero__media {
    align-self: stretch;
    min-height: 240px;

    border-radius: 14px;
    overflow: hidden;
    background-color: var(--surface-alt);
    border: 1px solid var(--border-light);
}

.sd-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================================
   SECTIONS (general)
   ============================================================ */
.sd-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sd-section__title {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin: 0;
}

.sd-section__body {
    font-size: clamp(0.92rem, 1vw, 1rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* ---------- Overview two-column text ---------- */
.sd-overview {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sd-overview .sd-section__body {
    max-width: none;
}

/* ---------- Section with soft border (tech + deliverable) ---------- */
.sd-section--bordered {
    padding: clamp(1.1rem, 2vw, 1.5rem);
    background-color: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

/* ============================================================
   TECH + DELIVERABLES
   ============================================================ */
.sd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    align-items: stretch;
}

/* ---------- Tech chips ---------- */
.sd-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;

    list-style: none;
    padding: 0;
    margin: 0;
}

.sd-stack li {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);

    background-color: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

/* ---------- Deliverables ---------- */
.sd-deliverables {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;

    list-style: none;
    padding: 0;
    margin: 0;
}

.sd-deliverables li {
    position: relative;
    padding-left: 1.15rem;

    font-size: clamp(0.88rem, 0.95vw, 0.95rem);
    line-height: 1.55;
    color: var(--text-secondary);
}

.sd-deliverables li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;

    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
}

/* ============================================================
   CTA
   ============================================================ */
.sd-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;

    padding: clamp(1.15rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2.25rem);

    background-color: var(--primary);
    color: var(--surface);
    border-radius: 16px;
}

.sd-cta__content { flex: 1 1 320px; }

.sd-cta__title {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--surface);
}

.sd-cta__sub {
    font-size: 0.88rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    max-width: 52ch;
}

/* ============================================================
   NEXT SERVICE
   ============================================================ */
.sd-next {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;

    padding: clamp(1rem, 2vw, 1.5rem);
    background-color: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: 14px;

    text-decoration: none;
    color: inherit;

    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sd-next:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(41, 45, 48, 0.08);
}

.sd-next:focus-visible {
    outline: 3px solid var(--primary-soft);
    outline-offset: 2px;
}

.sd-next__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.sd-next__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

.sd-next__title svg {
    flex-shrink: 0;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.sd-next:hover .sd-next__title svg {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 991.98px) {

    .sd-hero-wrap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .sd-hero { align-items: center; }
    .sd-hero__category { align-self: center; }
    .sd-hero__tagline { margin-inline: auto; }
    .sd-hero__actions { justify-content: center; }

    .sd-hero__media {
        max-width: 480px;
        margin-inline: auto;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .sd-overview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .sd-two-col {
        grid-template-columns: 1fr;
    }

    .sd-cta {
        justify-content: center;
        text-align: center;
    }
    .sd-cta__content { flex: 1 1 100%; }
}

/* ============================================================
   RESPONSIVE — PHONE
   ============================================================ */
@media (max-width: 575.98px) {

    .sd { gap: 1.75rem; }

    .sd-hero__actions { flex-direction: column; width: 100%; }
    .sd-hero__actions .btn-cta {
        width: 100%;
        text-align: center;
    }

    .sd-hero__media { max-width: 100%; }

    .sd-cta {
        flex-direction: column;
        padding: 1.35rem 1.15rem;
    }
    .sd-cta .btn-cta {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .sd__back,
    .sd-next,
    .sd-next__title svg {
        transition: none !important;
        transform: none !important;
    }
}