/* ════════════════════════════════
   WAYS TO PARTNER
   jotno.ai — partner.css
════════════════════════════════ */

/* Where "Why Jotno" above is a closed board of claims, this one opens: a
   centred head over a bare ruled list, each engagement model folded away
   until it is asked for. No card, no tiles — the rules do the containing.
   Ground and rules are tokenised, so the same list can sit on paper
   (default) or on ink (.pw-ink) — see the block at the foot of the file. */
#ways-to-partner {
    --pw-line: rgba(8, 145, 178, 0.16);
    --pw-line-soft: rgba(8, 145, 178, 0.1);
    --pw-wash: rgba(8, 145, 178, 0.045);
    --pw-num: rgba(8, 145, 178, 0.34);
    --pw-num-hot: var(--primary-dark);
    --pw-name: var(--text);
    --pw-muted: var(--muted);
    --pw-dash: rgba(8, 145, 178, 0.4);

    /* One indent drives the whole section: the numeral column plus its
       gutter, so an opened panel lines up under the name above it. */
    --pw-indent: 4.9rem;
    --pw-pad-x: 1.2rem;

    position: relative;
    padding: var(--sec-y-lg) var(--sec-x) var(--sec-y);
}

/* A single pool behind the head — the list itself stays on bare paper */
#ways-to-partner::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 54% 44% at 50% 6%, rgba(99, 102, 241, 0.06), transparent 70%);
}

/* Narrower than the boards above — a reading measure, not a grid */
.pw-inner {
    max-width: 1080px;
    margin: 0 auto;
}

/* ════ HEAD ════
   The only centred head on the page. It is the signal that this section
   is read rather than scanned. */
.pw-head {
    text-align: center;
    max-width: 44rem;
    margin: 0 auto 3.1rem;
}

/* Rules on both sides here — the sections above hang theirs on the left */
.pw-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(14, 116, 144, 0.78);
    margin-bottom: 1.2rem;
}

.pw-eyebrow-line {
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(8, 145, 178, 0.55));
    flex-shrink: 0;
}

.pw-eyebrow-line:last-child {
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.55), transparent);
}

.pw-title {
    font-family: 'Playfair Display', 'Plus Jakarta Sans', serif;
    font-size: clamp(1.95rem, 3vw, 2.65rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.14;
    color: var(--text);
    margin-bottom: 1.05rem;
}

/* SERIF accent — see the accent map in common.css. This band is an index:
   you read it and move on, so the phrase shifts to the display italic and
   takes no decoration at all. */
.pw-title-accent {
    font-style: italic;
    font-weight: 700;
    color: var(--primary-dark);
}

.pw-lead {
    font-size: 0.95rem;
    line-height: 1.78;
    font-weight: 500;
    color: var(--pw-muted);
    max-width: 40rem;
    margin: 0 auto;
}

/* ════ LIST ════
   Ruled top and bottom, one hairline between rows. Nothing else holds it. */
.pw-list {
    /* Own stacking context, so each row's wash (z-index: -1) stays above the
       section's ground instead of sliding under it on the ink variant */
    position: relative;
    isolation: isolate;
    border-top: 1px solid var(--pw-line);
    border-bottom: 1px solid var(--pw-line);
}

.pw-item {
    position: relative;
    border-bottom: 1px solid var(--pw-line-soft);
}

.pw-item:last-child {
    border-bottom: none;
}

/* A wash that stays for as long as the row is open */
.pw-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--pw-wash), transparent 82%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pw-item:hover::before,
.pw-item[open]::before {
    opacity: 1;
}

/* The board above draws its rule along the foot of the cell being read;
   this one draws along the head of the row that has been opened. */
.pw-item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.pw-item[open]::after {
    transform: scaleX(1);
}

/* ════ ROW ════ */
.pw-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 1.5rem;
    padding: 1.55rem var(--pw-pad-x);
    cursor: pointer;
    list-style: none;
}

/* Kill both native disclosure markers */
.pw-summary::-webkit-details-marker {
    display: none;
}

.pw-summary::marker {
    content: '';
}

.pw-summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -3px;
    border-radius: 6px;
}

/* Fixed width so every name starts on the same vertical, open or shut */
.pw-index {
    width: 2.2rem;
    font-family: 'Playfair Display', 'Plus Jakarta Sans', serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--pw-num);
    transition: color 0.35s ease;
}

.pw-item:hover .pw-index,
.pw-item[open] .pw-index {
    color: var(--pw-num-hot);
}

.pw-heading {
    display: block;
    min-width: 0;
}

.pw-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.012em;
    color: var(--pw-name);
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.pw-item:hover .pw-name {
    transform: translateX(3px);
}

/* The one line that has to earn the click */
.pw-kicker {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--pw-muted);
}

/* ════ TOGGLE ════
   A plus that loses its upright to become a minus. */
.pw-toggle {
    position: relative;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pw-line);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.pw-summary:hover .pw-toggle {
    border-color: var(--primary);
}

.pw-toggle::before,
.pw-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--pw-num-hot);
    transform: translate(-50%, -50%);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.3s ease, background 0.4s ease;
}

.pw-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.pw-item[open] .pw-toggle {
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    border-color: transparent;
}

.pw-item[open] .pw-toggle::before {
    background: #ffffff;
}

/* The upright rotates flat under the bar it is joining, then goes */
.pw-item[open] .pw-toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
}

/* ════ PANEL ════
   Indented to the name above it, so the fold reads as belonging to
   the row rather than to the list. */
.pw-panel {
    overflow: hidden;
}

.pw-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.6rem 2.8rem;
    padding: 0 var(--pw-pad-x) 1.95rem var(--pw-indent);
}

/* <details> gives no height to animate, so the contents arrive on open */
.pw-item[open] .pw-panel-inner {
    animation: pwReveal 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes pwReveal {
    from {
        opacity: 0;
        transform: translateY(-9px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pw-desc {
    font-size: 0.93rem;
    line-height: 1.8;
    font-weight: 500;
    color: var(--pw-muted);
}

.pw-metas {
    display: grid;
    align-content: start;
    gap: 1.15rem;
}

.pw-meta-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pw-num-hot);
    margin-bottom: 0.6rem;
}

/* Dashes instead of pills — the list stays quiet next to the description */
.pw-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem;
    list-style: none;
}

.pw-terms li {
    position: relative;
    padding-left: 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--pw-name);
}

.pw-terms li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 1px;
    background: var(--pw-dash);
}

/* ════ FOOT ════ */
.pw-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem 0.75rem;
    margin-top: 2.2rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--pw-muted);
}

.pw-foot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--pw-num-hot);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--pw-line);
    transition: border-color 0.35s ease, gap 0.35s ease;
}

.pw-foot-link:hover {
    border-color: var(--primary);
    gap: 0.75rem;
}

.pw-foot-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ════ INK VARIANT ════
   Add class="pw-ink" to the section to drop the same list onto a dark
   band instead of the page's paper. Nothing else changes. */
#ways-to-partner.pw-ink {
    --pw-line: rgba(255, 255, 255, 0.14);
    --pw-line-soft: rgba(255, 255, 255, 0.09);
    --pw-wash: rgba(34, 211, 238, 0.08);
    --pw-num: rgba(34, 211, 238, 0.42);
    --pw-num-hot: var(--cyan);
    --pw-name: rgba(255, 255, 255, 0.92);
    --pw-muted: rgba(255, 255, 255, 0.62);
    --pw-dash: rgba(34, 211, 238, 0.5);

    background:
        radial-gradient(ellipse 52% 64% at 84% 6%, rgba(34, 211, 238, 0.15), transparent 66%),
        radial-gradient(ellipse 46% 60% at 2% 92%, rgba(99, 102, 241, 0.085), transparent 70%),
        linear-gradient(158deg, #06333d 0%, #042a33 56%, #03212a 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -1px 0 rgba(255, 255, 255, 0.07);
}

#ways-to-partner.pw-ink::before {
    background: none;
}

.pw-ink .pw-eyebrow {
    color: var(--cyan);
}

.pw-ink .pw-eyebrow-line {
    background: linear-gradient(90deg, transparent, var(--cyan));
}

.pw-ink .pw-eyebrow-line:last-child {
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.55), transparent);
}

.pw-ink .pw-title {
    color: #ffffff;
}

/* The brush stroke muddies on ink — the colour alone carries the accent */
.pw-ink .pw-title-accent {
    color: var(--cyan);
    background-image: none;
}

.pw-ink .pw-item[open] .pw-toggle::before {
    background: #03212a;
}

/* ─── STAGGERED REVEAL ───
   The list carries the shared .fade-in hook; the rows arrive top down,
   the way the list is read. */
.pw-list.fade-in .pw-item {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.pw-list.fade-in.visible .pw-item {
    opacity: 1;
    transform: translateY(0);
}

.pw-list.fade-in.visible .pw-item:nth-child(1) {
    transition-delay: 0.06s;
}

.pw-list.fade-in.visible .pw-item:nth-child(2) {
    transition-delay: 0.14s;
}

.pw-list.fade-in.visible .pw-item:nth-child(3) {
    transition-delay: 0.22s;
}

.pw-list.fade-in.visible .pw-item:nth-child(4) {
    transition-delay: 0.3s;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {

    .pw-name,
    .pw-index,
    .pw-toggle,
    .pw-toggle::before,
    .pw-toggle::after,
    .pw-item::before,
    .pw-item::after,
    .pw-foot-link,
    .pw-list.fade-in .pw-item {
        transition: none;
    }

    .pw-item[open] .pw-panel-inner {
        animation: none;
    }

    .pw-list.fade-in .pw-item {
        opacity: 1;
        transform: none;
    }
}
