/**
 * Sell Your Watch page — page-unique sections only.
 *
 * Shared editorial primitives live in css/editorial.css (.cjw-ed). This page
 * pushes the system warmer and richer: a Georgia serif for oversized index
 * numerals, dark/light band alternation, hover micro-states, and a press
 * scale on buttons. Only those deltas + the unique sections live here.
 *
 * Scope: .cjw-ed--sw. Tokens come from the --ed-* aliases in editorial.css,
 * with a few page-local overrides below.
 * Loaded only when templates/page-sell-your-watch.php is active.
 */

/* --- Page-local token overrides --------------------------------------- */
.cjw-ed--sw {
    --ed-paper-alt: #fafaf7;                       /* warm paper */
    --ed-pad-y:     clamp(56px, 8vw, 96px);        /* roomier than the shared default */
    --ed-ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* Focus ring (a11y) shared across this page's interactive elements. */
.cjw-ed--sw a:focus-visible,
.cjw-ed--sw .cjw-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Eyebrow: leading tick (editorial signal) ------------------------- */
.cjw-ed--sw .cjw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cjw-ed--sw .cjw-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.cjw-ed--sw .cjw-hero .cjw-eyebrow::before { background: var(--ed-on-dark-soft); }

/* --- Buttons: subtle press lift --------------------------------------- */
.cjw-ed--sw .cjw-btn:hover { transform: translateY(-1px); }
.cjw-ed--sw .cjw-btn:active { transform: translateY(0); }

/* --- Hero (per-page type scale) --------------------------------------- */
.cjw-ed--sw .cjw-hero__title {
    font-size: clamp(36px, 5.8vw, 80px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 16ch;
    margin: 0 0 22px;
}
.cjw-ed--sw .cjw-hero__lead {
    font-family: var(--ed-serif);
    font-size: clamp(22px, 3.4vw, 42px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 26px;
}
.cjw-ed--sw .cjw-hero__lead em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.62);
}
.cjw-ed--sw .cjw-hero__subtitle {
    max-width: 56ch;
}
.cjw-ed--sw .cjw-hero__note {
    margin-top: 24px;
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ed-on-dark-soft);
}

/* The hero/footer CTA cluster (reused in the final CTA band). */
.sw-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* --- Section lede (looser leading) ------------------------------------ */
.cjw-ed--sw .cjw-section__lede {
    margin-top: 16px;
    line-height: 1.7;
}

/* --- 3. Process (numbered steps, serif index, connecting node) -------- */
.sw-process { padding-bottom: clamp(40px, 6vw, 72px); }
.sw-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--ed-rule);
}
.sw-step {
    position: relative;
    padding: 36px 28px 36px 0;
    border-right: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
    transition: background 0.3s var(--ed-ease);
}
.sw-step:nth-child(3n) { border-right: none; padding-right: 0; }
.sw-step:not(:first-child) { padding-left: 28px; }
/* node dot riding the top rule */
.sw-step::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ed-ink);
    transform: scale(0.6);
    opacity: 0.35;
    transition: transform 0.3s var(--ed-ease), opacity 0.3s var(--ed-ease);
}
.sw-step:not(:first-child)::before { left: 28px; }
.sw-step:hover { background: var(--ed-paper-alt); }
.sw-step:hover::before { transform: scale(1); opacity: 1; }
.sw-step__num {
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: 52px;
    line-height: 1;
    color: var(--ed-rule-strong);
    transition: color 0.3s var(--ed-ease);
}
.sw-step:hover .sw-step__num { color: var(--ed-ink); }
.cjw-ed--sw .sw-step h3 {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ed-ink);
    max-width: 24ch;
}
.sw-step p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ed-mute);
}
.sw-step a {
    color: var(--ed-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.sw-step a:hover { text-decoration-thickness: 2px; }

/* --- 4. What we're buying (full-bleed charcoal band) ------------------ */
.sw-buying {
    background: var(--ed-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.sw-buying::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1000px 520px at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(26, 94, 221, 0.08), transparent 70%),
        var(--ed-dark);
    pointer-events: none;
}
.sw-buying::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .10 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.sw-buying__inner {
    max-width: var(--ed-max);
    margin: 0 auto;
    padding: var(--ed-pad-y) var(--ed-pad-x);
}
.sw-brands {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--ed-on-dark-rule);
}
.sw-brand {
    position: relative;
    padding: 26px 36px 26px 0;
    border-bottom: 1px solid var(--ed-on-dark-rule);
    border-right: 1px solid var(--ed-on-dark-rule);
    transition: padding-left 0.3s var(--ed-ease);
}
.sw-brand:nth-child(2n) { border-right: none; padding-left: 36px; }
/* sliding accent keyline on hover */
.sw-brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 26px;
    bottom: 26px;
    width: 2px;
    background: #fff;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s var(--ed-ease);
}
.sw-brand:nth-child(2n)::before { left: 36px; }
.sw-brand:hover::before { transform: scaleY(1); }
.sw-brand:hover { padding-left: 16px; }
.sw-brand:nth-child(2n):hover { padding-left: 52px; }
.cjw-ed--sw .sw-brand__name {
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}
.sw-brand__refs {
    margin-top: 10px;
    font-family: var(--ed-mono);
    font-size: 13px;
    line-height: 1.65;
    color: var(--ed-on-dark-mute);
    letter-spacing: 0.01em;
}
/* "Also considered" cell reads as a quieter footnote */
.sw-brand:last-child .sw-brand__name { color: var(--ed-on-dark-mute); font-weight: 500; }

.sw-buying__note {
    margin-top: 36px;
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 24px 28px;
    border: 1px solid var(--ed-on-dark-rule);
    background: rgba(255, 255, 255, 0.03);
}
.sw-buying__note-label {
    flex: none;
    font-family: var(--ed-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ed-on-dark-soft);
    padding-top: 2px;
}
.sw-buying__note p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ed-on-dark-mute);
}
.sw-buying__note strong { color: #fff; font-weight: 600; }

/* --- 5. Why sellers choose us (indexed, hover fill) ------------------- */
.sw-reasons__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--ed-rule);
}
.sw-reason {
    position: relative;
    padding: 32px 28px 36px 0;
    border-right: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
    transition: background 0.3s var(--ed-ease);
}
.sw-reason:nth-child(3n) { border-right: none; padding-right: 0; }
.sw-reason:not(:nth-child(3n+1)) { padding-left: 28px; }
.sw-reason:hover { background: var(--ed-paper-alt); }
.sw-reason__num {
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ed-mute-soft);
    transition: color 0.3s var(--ed-ease);
}
.sw-reason:hover .sw-reason__num { color: var(--ed-ink); }
.cjw-ed--sw .sw-reason h3 {
    margin-top: 12px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ed-ink);
}
.sw-reason p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ed-mute);
    max-width: 30ch;
}

/* --- 6. Final CTA (dark band + serif ornament + assurance chips) ------ */
.sw-cta {
    background: var(--ed-ink);
    color: #fff;
    padding: var(--ed-pad-y) var(--ed-pad-x);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.sw-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(960px 520px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 60%);
    pointer-events: none;
}
/* oversized ghosted serif ornament — "offer" motif */
.sw-cta::after {
    content: "1hr";
    position: absolute;
    right: 4%;
    bottom: -0.18em;
    z-index: -1;
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: clamp(140px, 24vw, 360px);
    line-height: 1;
    color: var(--ed-on-dark-ghost);
    pointer-events: none;
    letter-spacing: -0.02em;
}
.sw-cta__inner {
    position: relative;
    max-width: var(--ed-max);
    margin: 0 auto;
}
.cjw-ed--sw .sw-cta__title {
    font-size: clamp(28px, 3.8vw, 48px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fff;
    max-width: 20ch;
    margin: 0 0 36px;
}

/* Final CTA band is dark — invert primary, light ghost (matches the hero). */
.sw-cta .cjw-btn--primary {
    background: #fff;
    color: var(--ed-ink);
    border-color: #fff;
}
.sw-cta .cjw-btn--primary:hover,
.sw-cta .cjw-btn--primary:focus-visible {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.sw-cta .cjw-btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}
.sw-cta .cjw-btn--ghost:hover,
.sw-cta .cjw-btn--ghost:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sw-cta__assure {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}
.sw-cta__assure li {
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ed-on-dark-mute);
    padding: 8px 16px;
    border: 1px solid var(--ed-on-dark-rule);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sw-cta__assure li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cjw-color-wa);
}
.sw-cta__links {
    margin-top: 28px;
    font-size: 15px;
    color: var(--ed-on-dark-mute);
}
.sw-cta__links a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sw-cta__links a:hover { text-decoration-thickness: 2px; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
    .sw-reasons__grid { grid-template-columns: repeat(2, 1fr); }
    .sw-reason:nth-child(3n) { border-right: 1px solid var(--ed-rule); }
    .sw-reason:nth-child(2n) { border-right: none; }
    .sw-reason:not(:nth-child(3n+1)) { padding-left: 0; }
    .sw-reason:nth-child(2n) { padding-left: 28px; }
    .sw-reason:nth-child(2n+1) { padding-right: 28px; padding-left: 0; }
}

@media (max-width: 720px) {
    .cjw-ed--sw .cjw-hero__title { font-size: clamp(34px, 9.5vw, 48px); max-width: none; }
    .sw-ctas .cjw-btn { width: 100%; justify-content: center; }

    .sw-steps { grid-template-columns: 1fr; }
    .sw-step,
    .sw-step:nth-child(3n) {
        border-right: none;
        padding: 28px 0;
    }
    .sw-step:not(:first-child) { padding-left: 0; }
    .sw-step:not(:first-child)::before { left: 0; }

    .sw-brands { grid-template-columns: 1fr; }
    .sw-brand,
    .sw-brand:nth-child(2n) {
        border-right: none;
        padding: 24px 0;
    }
    .sw-brand:hover,
    .sw-brand:nth-child(2n):hover { padding-left: 16px; }
    .sw-brand:nth-child(2n)::before { left: 0; }

    .sw-buying__note { flex-direction: column; gap: 10px; padding: 20px; }

    .sw-reasons__grid { grid-template-columns: 1fr; }
    .sw-reason,
    .sw-reason:nth-child(2n),
    .sw-reason:nth-child(3n),
    .sw-reason:nth-child(2n+1) {
        border-right: none;
        padding: 24px 0;
        padding-left: 0;
        padding-right: 0;
    }

    .sw-cta::after { font-size: clamp(110px, 34vw, 200px); right: 2%; }
}
