/* ═══════════════════════════════════════════════════════════
   PAGE-PROJECTS.CSS — projects.php
   Hero + two doors · sticky switch · showcase rows (systems with
   real screenshots) · spec cards · strategy cases · client index ·
   method path · CTA
   ═══════════════════════════════════════════════════════════ */

.pj { width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
@media (min-width: 640px)  { .pj { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .pj { padding-inline: 2rem; } }

/* ── Hero + doors ──────────────────────────────────────── */
.pj-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; padding: 1.25rem 0 1.75rem; }
.pj-h1 { font-size: clamp(2.3rem, 6.5vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; display: flex; align-items: baseline; gap: 0.55rem; color: var(--color-gray-900); }
.pj-h1-script { position: relative; display: inline-block; font-family: var(--font-designer); font-weight: 400; font-size: 1.1em; letter-spacing: 0; }
.pj-h1-script > span { position: relative; z-index: 1; }
.pj-h1-script svg { position: absolute; width: 108%; left: -4%; height: 42%; bottom: 6%; overflow: visible; }
.pj-lede { max-width: 38rem; color: var(--color-gray-600); font-weight: 500; line-height: 1.7; font-size: clamp(0.92rem, 1.5vw, 1.05rem); }

.pj-doors { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 760px) { .pj-doors { grid-template-columns: 1fr 1fr; } }
.pj-door {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 1rem;
    padding: 1.4rem 1.4rem; border-radius: 1.75rem; color: #fff; isolation: isolate;
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease;
}
.pj-door::before { content: ''; position: absolute; inset: 0; z-index: -1; }
.pj-door--sys::before { background: radial-gradient(ellipse at 0% 0%, #2563eb 0%, transparent 60%), linear-gradient(135deg, #0f172a, #1e293b); }
.pj-door--mkt::before { background: radial-gradient(ellipse at 0% 0%, #e11d48 0%, transparent 60%), linear-gradient(135deg, #1c1917, #3b0a17); }
.pj-door::after { /* subtle grid texture */
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.12;
    background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 22px 22px; mask-image: linear-gradient(to left, black, transparent 70%); -webkit-mask-image: linear-gradient(to left, black, transparent 70%);
}
.pj-door:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.55); }
.pj-door-icon { flex: 0 0 auto; width: 3.4rem; height: 3.4rem; border-radius: 1.1rem; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); }
.pj-door-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1; }
.pj-door-title { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; }
.pj-door-sub { font-size: 0.8rem; color: rgba(255,255,255,0.7); font-weight: 600; }
.pj-door-go { width: 2.4rem; height: 2.4rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: #fff; color: #111; font-weight: 800; transition: transform 0.3s ease; }
.pj-door:hover .pj-door-go { transform: translateY(3px); }

/* Sticky switch */
.pj-switch {
    position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; transform: translate(-50%, 140%);
    display: flex; gap: 0.25rem; padding: 0.3rem; border-radius: 999px;
    background: rgba(17,24,39,0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px -14px rgba(0,0,0,0.5); transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.pj-switch.is-on { transform: translate(-50%, 0); }
.pj-switch a { padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.75); transition: background 0.25s ease, color 0.25s ease; }
.pj-switch a.is-active { background: #fff; color: #111; }

/* ── Sections ──────────────────────────────────────────── */
.pj-section { scroll-margin-top: 5.5rem; margin-bottom: clamp(4rem, 9vw, 6rem); }
.pj-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.pj-h2 { font-size: clamp(1.7rem, 4.2vw, 2.8rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin-top: 0.35rem; }
.pj-intro { max-width: 44rem; color: var(--color-gray-600); line-height: 1.7; font-size: 0.95rem; margin-top: 0.6rem; }
.pj-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pj-filter .wk-pill { gap: 0.45rem; }
.pj-sub { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-gray-400); margin: 2.5rem 0 1rem; }

/* build-type marks */
.pj-mark { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 999px; }
.pj-mark--hand { background: #10b981; }
.pj-mark--ai { background: transparent; border: 2px solid #f59e0b; }
.pj-mark--mix { background: linear-gradient(90deg, #10b981 50%, #f59e0b 50%); }
.pj-code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 0.45rem; background: var(--color-gray-900); color: var(--color-yellow); letter-spacing: 0.02em; }
.pj-type { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--color-gray-100); color: var(--color-gray-700); white-space: nowrap; }
.pj-type--hand { background: #ecfdf5; color: #065f46; }
.pj-type--ai { background: #fff7ed; color: #9a3412; }

/* ── Showcase rows ─────────────────────────────────────── */
.pj-show {
    display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
    padding: clamp(1.1rem, 2.5vw, 1.75rem); border-radius: 2rem; margin-bottom: 1.25rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, #fff), #fff 60%);
    border: 1px solid color-mix(in srgb, var(--accent) 16%, #eee);
    box-shadow: 0 24px 50px -36px rgba(17,24,39,0.35);
}
.pj-show[hidden] { display: none; }
@media (min-width: 960px) {
    .pj-show { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .pj-show.is-flip .pj-show-media { order: 2; }
}
.pj-show-media { position: relative; display: block; padding-bottom: 1.5rem; }
.pj-browser { display: block; border-radius: 1rem; overflow: hidden; background: #fff; border: 1px solid var(--color-gray-200); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.4); transition: transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.pj-show-media:hover .pj-browser { transform: translateY(-4px) rotate(-0.4deg); }
.pj-browser-bar { display: flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.8rem; background: var(--color-gray-100); border-bottom: 1px solid var(--color-gray-200); }
.pj-browser-bar i { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: #ff5f57; }
.pj-browser-bar i:nth-child(2) { background: #febc2e; } .pj-browser-bar i:nth-child(3) { background: #28c840; }
.pj-browser-bar span { margin-left: 0.5rem; font-size: 0.68rem; font-weight: 600; color: var(--color-gray-500); background: #fff; border-radius: 999px; padding: 0.2rem 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pj-show-float {
    position: absolute; right: -0.5rem; bottom: 0; width: 34%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top;
    border-radius: 1rem; border: 4px solid #fff; box-shadow: 0 20px 40px -18px rgba(0,0,0,0.5);
}
.pj-show.is-flip .pj-show-float { right: auto; left: -0.5rem; }
.pj-show-body { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.pj-show-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pj-show-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.pj-show-summary { font-size: 0.95rem; line-height: 1.7; color: var(--color-gray-600); }
.pj-show-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.pj-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.65rem 1.15rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; border: 1px solid var(--color-gray-200); background: #fff; transition: transform 0.25s ease; }
.pj-btn:hover { transform: translateY(-2px); }
.pj-btn--solid { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* shared bits */
.pj-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.pj-bullets li { position: relative; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.6; color: var(--color-gray-600); }
.pj-bullets li::before { content: ''; position: absolute; left: 0.15rem; top: 0.62em; width: 0.4rem; height: 0.4rem; border-radius: 2px; background: var(--color-gray-400); transform: rotate(45deg); }
.pj-proof { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pj-proof li { display: flex; flex-direction: column; padding: 0.55rem 0.85rem; border-radius: 0.9rem; background: #fff; border: 1px solid var(--color-gray-100); min-width: 5.5rem; }
.pj-proof strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pj-proof span { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-gray-400); }
.pj-stack { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pj-stack li { font-family: ui-monospace, Consolas, monospace; font-size: 0.68rem; font-weight: 600; padding: 0.22rem 0.5rem; border-radius: 0.4rem; background: var(--color-gray-100); color: var(--color-gray-700); }

/* ── Spec cards ────────────────────────────────────────── */
.pj-specs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); margin-top: 1.5rem; }
.pj-spec {
    display: flex; flex-direction: column; border-radius: 1.4rem; overflow: hidden; background: #fff;
    border: 1px solid var(--color-gray-100); box-shadow: var(--shadow-card);
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease;
}
.pj-spec[hidden] { display: none; }
.pj-spec:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(17,24,39,0.4); }
.pj-spec.is-featured { grid-column: 1 / -1; }
.pj-spec-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem; background: #111827; }
.pj-spec-bar .pj-type { margin-left: auto; }
.pj-spec-dots { display: flex; gap: 0.3rem; margin-right: 0.25rem; }
.pj-spec-dots i { width: 0.55rem; height: 0.55rem; border-radius: 999px; background: rgba(255,255,255,0.25); }
.pj-spec-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.1rem 1.15rem; flex: 1; }
.pj-spec.is-featured .pj-spec-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.6rem 1.75rem; }
.pj-spec.is-featured .pj-spec-title, .pj-spec.is-featured .pj-spec-summary { grid-column: 1; }
.pj-spec.is-featured .pj-bullets { grid-column: 1; }
.pj-spec.is-featured .pj-proof { grid-column: 2; grid-row: 1 / span 3; align-self: start; flex-direction: column; }
@media (max-width: 860px) { .pj-spec.is-featured .pj-spec-body { display: flex; } }
.pj-spec-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.pj-spec.is-featured .pj-spec-title { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.pj-spec-summary { font-size: 0.86rem; line-height: 1.65; color: var(--color-gray-600); }
.pj-spec-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.15rem 1rem; border-top: 1px dashed var(--color-gray-200); }
.pj-spec-link { font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.pj-spec.is-more { background: var(--color-gray-50); border-style: dashed; }

/* ── Marketing ─────────────────────────────────────────── */
.pj-cases { margin-bottom: 0.5rem; }
.pj-index { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); }
.pj-client {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.25rem 0.9rem; align-items: start;
    padding: 1rem 1.1rem; border-radius: 1.2rem; background: #fff; border: 1px solid var(--color-gray-100);
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.pj-client:hover { border-color: #fda4af; transform: translateX(3px); }
.pj-client-n { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; font-weight: 700; color: #e11d48; padding-top: 0.2rem; }
.pj-client-name { font-size: 1rem; font-weight: 800; letter-spacing: -0.015em; }
.pj-client-line { font-size: 0.84rem; line-height: 1.6; color: var(--color-gray-600); margin-top: 0.2rem; }
.pj-client-sector { font-size: 0.66rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 999px; background: #fff1f2; color: #9f1239; white-space: nowrap; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.pj-client-sample { grid-column: 2; justify-self: start; font-size: 0.75rem; font-weight: 800; color: #e11d48; }
@media (max-width: 560px) { .pj-client { grid-template-columns: auto minmax(0, 1fr); } .pj-client-sector { grid-column: 2; justify-self: start; } }

.pj-note {
    display: flex; gap: 1.1rem; align-items: center; margin-top: 1.25rem; padding: 1.25rem 1.4rem; border-radius: 1.5rem;
    background: linear-gradient(135deg, #1c1917, #3b0a17); color: rgba(255,255,255,0.85);
}
.pj-note-plus { flex: 0 0 auto; font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: #fda4af; }
.pj-note p { font-size: 0.88rem; line-height: 1.7; }

.pj-steps { list-style: none; display: grid; gap: 0.8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); position: relative; }
@media (min-width: 900px) {
    .pj-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .pj-steps::before { content: ''; position: absolute; left: 4%; right: 4%; top: 1.6rem; height: 2px; background: repeating-linear-gradient(to right, #fda4af 0 8px, transparent 8px 14px); }
}
.pj-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; }
.pj-step-n { width: 3.2rem; height: 3.2rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 800; background: #fff; border: 2px solid #111827; position: relative; z-index: 1; box-shadow: 3px 3px 0 #fda4af; }
.pj-step-title { font-size: 0.92rem; font-weight: 800; margin-top: 0.35rem; }
.pj-step-desc { font-size: 0.78rem; color: var(--color-gray-500); line-height: 1.5; }

/* links into case studies from other pages (kept for compatibility) */
.proj-case { display: none; }

/* ═══ v2: three doors, generated system covers, websites & apps ═══ */
@media (min-width: 1000px) { .pj-doors:has(.pj-door--web) { grid-template-columns: repeat(3, 1fr); } }
.pj-door--web::before { background: radial-gradient(ellipse at 0% 0%, #f59e0b 0%, transparent 60%), linear-gradient(135deg, #1c1917, #3a2a0a); }

/* Generated cover for systems without screenshots */
.pj-gen { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: .9rem; min-height: 11.5rem; padding: .7rem .9rem 1rem; overflow: hidden; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, hsl(calc(var(--h) + 40) 85% 62% / .55), transparent 60%), linear-gradient(135deg, hsl(var(--h) 70% 34%), hsl(calc(var(--h) + 25) 65% 16%)); }
.pj-gen::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.pj-gen-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pj-gen-bar { position: relative; z-index: 1; display: flex; align-items: center; gap: .3rem; }
.pj-gen-bar i { width: .5rem; height: .5rem; border-radius: 50%; background: rgba(255,255,255,.35); }
.pj-gen-bar b { margin-left: .45rem; font: 600 .68rem ui-monospace, 'Cascadia Code', Consolas, monospace; background: rgba(0,0,0,.25); padding: .15rem .6rem; border-radius: 999px; opacity: .9; }
.pj-gen-code { position: relative; z-index: 1; font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -.04em; text-shadow: 0 6px 24px rgba(0,0,0,.25); }
.pj-gen-stats { position: relative; z-index: 1; display: flex; gap: .5rem; flex-wrap: wrap; }
.pj-gen-stats > span { display: flex; flex-direction: column; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: .7rem; padding: .4rem .65rem; font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .95; backdrop-filter: blur(6px); }
.pj-gen-stats b { font-size: 1.05rem; letter-spacing: -.02em; text-transform: none; }
.pj-gen-stack { position: relative; z-index: 1; display: flex; gap: .35rem; flex-wrap: wrap; }
.pj-gen-stack span { font: 700 .66rem ui-monospace, Consolas, monospace; background: rgba(0,0,0,.28); border-radius: .4rem; padding: .22rem .5rem; }
.pj-spec.is-featured .pj-gen { min-height: 9rem; }
.pj-spec:hover .pj-gen-code { transform: translateX(3px); transition: transform .3s; }

/* Websites & apps */
.pj-web { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pj-site { display: flex; flex-direction: column; gap: .8rem; }
.pj-site.is-lead { grid-column: span 2; grid-row: span 2; }
.pj-site-media { position: relative; display: block; padding: 0 1.2rem 1.2rem 0; }
.pj-site-media:hover .pj-browser { transform: translateY(-4px) rotate(-.4deg); }
.pj-site-phone { position: absolute; right: 0; bottom: 0; width: 22%; min-width: 4.5rem; aspect-ratio: 390 / 844; border-radius: 1rem; border: .3rem solid #111318; overflow: hidden; background: #111; box-shadow: 0 18px 36px -14px rgba(0,0,0,.5); transition: transform .4s; }
.pj-site.is-lead .pj-site-phone { width: 17%; }
.pj-site-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pj-site-media:hover .pj-site-phone { transform: translateY(-6px) rotate(2deg); }
.pj-site-body h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.pj-site.is-lead .pj-site-body h3 { font-size: 1.5rem; }
.pj-site-body p { font-size: .88rem; line-height: 1.55; color: var(--color-gray-600); margin-top: .25rem; }
.pj-site-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .55rem; }
.pj-site-links a { font-size: .8rem; font-weight: 800; color: var(--color-gray-900); text-decoration: none; border-bottom: 2px solid var(--color-yellow, #fcdd00); padding-bottom: 1px; }
.pj-site-links a:hover { opacity: .7; }
.pj-apps { display: grid; gap: clamp(1rem, 2vw, 1.75rem); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pj-app { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; }
.pj-app-phone { display: block; width: 100%; max-width: 13rem; aspect-ratio: 390 / 844; border-radius: 2rem; border: .45rem solid #111318; overflow: hidden; background: #111; box-shadow: 0 24px 44px -20px rgba(0,0,0,.45); transition: transform .35s; }
.pj-app-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pj-app-phone:hover { transform: translateY(-6px) rotate(-1.5deg); }
.pj-app h4 { font-size: 1rem; font-weight: 800; margin-top: .3rem; }
.pj-app .pj-site-links { justify-content: center; margin-top: 0; }
@media (max-width: 980px) {
    .pj-web { grid-template-columns: 1fr 1fr; }
    .pj-site.is-lead { grid-column: 1 / -1; grid-row: auto; }
    .pj-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .pj-web { grid-template-columns: 1fr; }
    .pj-apps { grid-template-columns: 1fr 1fr; }
}
/* No repeats: the cover carries the name + numbers, the footer carries the stack */
.pj-gen-stack { display: none; }
.pj-spec:has(.pj-gen) .pj-spec-bar .pj-code { display: none; }
.pj-spec:has(.pj-gen) .pj-spec-bar { justify-content: flex-end; }
.pj-spec:has(.pj-gen-stats) .pj-spec-body .pj-proof { display: none; }
.pj-spec.is-featured:has(.pj-gen-stats) .pj-spec-body { display: flex; }
