/* Writing page — based on "Meher Jaffri – Writing & Achievements" document */
.writing-page {
    --wr-bg: var(--body-bg);
    --wr-card: var(--primary-color-light);
    --wr-ink: #fff;
    --wr-text: #cfcfcf;
    --wr-muted: #9a9a9a;
    --wr-accent: var(--primary-color);
    --wr-border: #2e2e2e;
    background: var(--wr-bg);
    color: var(--wr-ink);
    font-family: "Red Hat Display", system-ui, sans-serif;
    padding: 4.5rem 0 4rem;
}

/* Hero */
.wr-eyebrow {
    font-size: 0.8rem; 
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wr-muted);
    margin-bottom: 0.4rem;
}
.wr-name {
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--wr-ink);
    margin-bottom: 1rem;
}
.wr-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--wr-text);
    max-width: 46rem;
    margin: 0;
}

/* Sections */
.wr-section { margin-top: 3.5rem; }
.wr-heading {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--wr-ink);
    margin-bottom: 1.25rem;
}

/* Shared text */
.wr-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wr-accent);
    margin-bottom: 0.3rem;
}
.wr-title {
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--wr-ink);
    margin-bottom: 0.4rem;
}
.writing-page p.wr-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--wr-text);
    margin: 0;
}

/* Cards */
.wr-card {
    background: var(--wr-card);
    border: 1px solid var(--wr-border);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.1rem;
}
.wr-card--media {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
.wr-poster {
    flex: 0 0 auto;
    width: 170px;
    border: 1px solid var(--wr-border);
    border-radius: 4px;
    overflow: hidden;
}
.wr-card--media:nth-of-type(2) .wr-poster { width: 210px; }
.wr-poster img { display: block; width: 100%; height: auto; }
.wr-body { flex: 1 1 auto; min-width: 0; }

.wr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.1rem;
}
.wr-grid .wr-card { margin-bottom: 0; }

.wr-card--logo { align-items: center; }

/* Logo boxes */
.wr-logo {
    flex: 0 0 auto;
    width: 180px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--wr-border);
    border-radius: 6px;
    padding: 0.6rem 1rem;
}
.wr-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.wr-logo--dark {
    background: #000;
    border-color: #000;
    padding: 0;
    height: 112px;
    overflow: hidden;
}

/* Selections list */
.wr-list {
    margin: 0;
    border-top: 1px solid var(--wr-border);
}
.wr-row {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--wr-border);
}
.wr-row .wr-title { margin-bottom: 0.25rem; }

.writing-page p.wr-note {
    font-size: 0.85rem;
    color: var(--wr-muted);
    margin: 1.25rem 0 0;
}

/* Responsive */
@media (max-width: 991px) {
    .wr-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .writing-page { padding: 3rem 0; }
    .wr-card--media { flex-direction: column; gap: 1rem; }
    .wr-poster,
    .wr-card--media:nth-of-type(2) .wr-poster { width: 160px; }
    .wr-grid { grid-template-columns: 1fr; }
    .wr-row { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
    .wr-logo { width: 160px; height: 78px; }
    .wr-logo--dark { height: 100px; }
}

/* Logos section — same look as the homepage "Clients" section */
.client_logo figure {
    width: 80%;
    height: 48px;
    position: relative;
}
.client_logo figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.client_logo figure:after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 100px;
    background-color: var(--primary-color);
    right: -34px;
    top: 19px;
    z-index: 9;
    position: absolute;
}
.client_logos_wrap .col-lg-2:nth-child(6n) .client_logo figure:after,
.client_logos_wrap .col-lg-2:last-child .client_logo figure:after {
    display: none;
}
/* Turn the coloured logos white so they match the homepage logos */
.client_logo--invert figure img {
    filter: grayscale(1) invert(1) contrast(1.3);
    mix-blend-mode: screen;
}
.client_logo--onblack figure img {
    filter: grayscale(1);
    mix-blend-mode: screen;
}
@media screen and (max-width: 767px) {
    .client_logo figure { margin: 0 auto; }
    .client_logos_wrap .col-6:nth-child(2n) figure::after { display: none; }
    .has-styled-title h2 { font-size: 1.8rem; }
}
