/* ============================================================
   ARPHATECH — Project Detail Page
   Depends on: base.css + landing.css
   ============================================================ */

.pd {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    padding-block: clamp(1.25rem, 2.5vw, 2rem);
}

/* ---------- Back link ---------- */
.pd__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;
}

.pd__back:hover {
    color: var(--primary);
    gap: 0.6rem;
}

/* ============================================================
   HERO
   ============================================================ */
.pd-hero {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 820px;
}

.pd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pd-hero__category {
    display: inline-block;
    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;
}

.pd-hero__tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pd-hero__title {
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

.pd-hero__tagline {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 60ch;
}

.pd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ---------- Hero image ---------- */
.pd-hero__media {
    width: 100%;
    aspect-ratio: 21 / 9;   /* was 16 / 9 */
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--surface-alt);
    border: 1px solid var(--border-light);
    box-shadow: 0 12px 40px rgba(41, 45, 48, 0.06);
}

.pd-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.pd-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.pd-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pd-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;
}

/* ---------- Description (full width, no cap) ---------- */
.pd-description {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pd-description p {
    font-size: clamp(0.92rem, 1vw, 1rem);
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
    /* No max-width — text spans full container */
}

/* ---------- Tech chips ---------- */
.pd-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    list-style: none;
    padding: 0;
    margin: 0;
}

.pd-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;
}

/* ---------- Facts grid ---------- */
.pd-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.pd-fact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;

    padding: clamp(0.9rem, 1.8vw, 1.15rem);
    background-color: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.pd-fact__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pd-fact__value {
    font-size: clamp(0.9rem, 1vw, 1rem);
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================
   CTA
   ============================================================ */
.pd-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;
}

.pd-cta__content { flex: 1 1 320px; }

.pd-cta__title {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--surface);
}

.pd-cta__sub {
    font-size: 0.88rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    max-width: 52ch;
}

/* ============================================================
   NEXT PROJECT
   ============================================================ */
.pd-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;
}

.pd-next:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(41, 45, 48, 0.08);
}

.pd-next:focus-visible {
    outline: 3px solid var(--primary-soft);
    outline-offset: 2px;
}

.pd-next__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pd-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);
}

.pd-next__title svg {
    flex-shrink: 0;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.pd-next:hover .pd-next__title svg {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 991.98px) {

    .pd-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-cta {
        justify-content: center;
        text-align: center;
    }
    .pd-cta__content { flex: 1 1 100%; }
}

/* ============================================================
   RESPONSIVE — PHONE
   ============================================================ */
@media (max-width: 575.98px) {

    .pd { gap: 1.75rem; }

    .pd-hero__actions {
        flex-direction: column;
        width: 100%;
    }
    .pd-hero__actions .btn-cta {
        width: 100%;
        text-align: center;
    }

    .pd-facts {
        grid-template-columns: 1fr;
    }

    .pd-cta {
        flex-direction: column;
        padding: 1.35rem 1.15rem;
    }
    .pd-cta .btn-cta {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .pd__back,
    .pd-next,
    .pd-next__title svg {
        transition: none !important;
        transform: none !important;
    }
}