/* ============================================
   DEZIGNITE — Featured Client + Case Study
   css/case-study.css
   ============================================ */

:root {
    --cs-bronze:       #b09878;
    --cs-bronze-light: #d4b896;
    --cs-bronze-dark:  #686048;
}

/* ============================================
   1. FEATURED CLIENT TEASER
   (web-development.html — above portfolio)
   ============================================ */
.featured-client {
    padding: 7rem 0 8rem;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

.featured-client::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 600px;
    background: radial-gradient(ellipse at center,
        rgba(176, 152, 120, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.featured-client .container {
    position: relative;
    z-index: 1;
}

.fc-head {
    text-align: center;
    margin-bottom: 3.25rem;
}

.fc-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
    text-decoration: none;
    color: inherit;
    box-shadow: 0 40px 90px rgba(0,0,0,0.55);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1),
                border-color 0.45s ease,
                box-shadow 0.45s ease;
}

.fc-card:hover {
    transform: translateY(-6px);
    border-color: rgba(176, 152, 120, 0.45);
    box-shadow: 0 50px 110px rgba(0,0,0,0.65),
                0 0 0 1px rgba(176,152,120,0.18);
}

/* — Visual side: stacked before/after preview — */
.fc-visual {
    position: relative;
    min-height: 420px;
    background: #060606;
    overflow: hidden;
}

.fc-visual img {
    position: absolute;
    width: 74%;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    object-fit: cover;
    object-position: top;
}

.fc-visual .fc-old {
    top: 12%;
    left: 4%;
    height: 60%;
    filter: grayscale(0.5) brightness(0.7);
    transform: rotate(-4deg);
    z-index: 1;
    transition: transform 0.5s ease;
}

.fc-visual .fc-new {
    bottom: 11%;
    right: 4%;
    height: 66%;
    z-index: 2;
    transition: transform 0.5s ease;
}

.fc-card:hover .fc-old { transform: rotate(-6deg) translateX(-8px); }
.fc-card:hover .fc-new { transform: rotate(2deg) translateX(8px); }

.fc-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(176,152,120,0.35);
    border-radius: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--cs-bronze-light);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fc-badge::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 8px #28c840;
}

/* — Text side — */
.fc-body {
    padding: 3.25rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.15rem;
}

.fc-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cs-bronze);
}

.fc-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.fc-desc {
    color: rgba(255,255,255,0.55);
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0;
}

.fc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.fc-meta span {
    padding: 0.28rem 0.85rem;
    background: rgba(176,152,120,0.07);
    border: 1px solid rgba(176,152,120,0.18);
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(176,152,120,0.8);
}

.fc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--cs-bronze-light);
}

.fc-link svg {
    transition: transform 0.35s ease;
}

.fc-card:hover .fc-link svg {
    transform: translateX(6px);
}

@media (max-width: 900px) {
    .featured-client { padding: 4.5rem 0 5rem; }
    .fc-card { grid-template-columns: 1fr; }
    .fc-visual { min-height: 340px; order: 1; }
    .fc-body { padding: 2.5rem 1.75rem; order: 2; gap: 0.85rem; }
    .fc-body .fc-desc { font-size: 0.95rem; line-height: 1.65; }
}

@media (max-width: 560px) {
    .featured-client { padding: 3.5rem 0 4rem; }
    .fc-head { margin-bottom: 2rem; }
    .fc-visual { min-height: 280px; }
    .fc-visual img { width: 78%; }
    .fc-visual .fc-old { top: 8%; height: 56%; }
    .fc-visual .fc-new { bottom: 8%; height: 60%; }
    .fc-body { padding: 1.75rem 1.25rem; }
    .fc-badge { top: 0.85rem; left: 0.85rem; font-size: 0.62rem; padding: 0.3rem 0.75rem; }
    .fc-title { font-size: clamp(1.5rem, 6vw, 1.95rem); }
    .fc-meta span { font-size: 0.62rem; padding: 0.22rem 0.7rem; }
}

/* ============================================
   2. CASE STUDY PAGE
   (case-study-321speed.html)
   ============================================ */
.csp-hero {
    position: relative;
    padding: 11rem 0 5rem;
    background:
        linear-gradient(180deg, rgba(10,10,10,0.72) 0%, rgba(10,10,10,0.85) 60%, #0a0a0a 100%),
        url('../assets/images/cases/case321hero.jpg') center/cover no-repeat;
    overflow: hidden;
}

.csp-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1100px; height: 620px;
    background: radial-gradient(ellipse at top,
        rgba(176,152,120,0.18) 0%, transparent 68%);
    pointer-events: none;
}

.csp-hero .container { position: relative; z-index: 1; }

.csp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: color 0.3s ease;
}
.csp-back:hover { color: var(--cs-bronze-light); }

.csp-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cs-bronze);
    margin-bottom: 1.25rem;
}

.csp-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 1.5rem;
}

.csp-lead {
    max-width: 680px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.6);
    margin: 0 0 2.5rem;
}

.csp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* — Stats — */
.csp-stats {
    background: #0a0a0a;
    padding: 1rem 0 6.5rem;
}

.csp-stats-head {
    text-align: center;
    margin-bottom: 2.25rem;
}

.csp-stats-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}

.csp-stats-grid::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent, rgba(176,152,120,0.55), transparent);
    pointer-events: none;
    z-index: 1;
}

.csp-stat {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 2.9rem 2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
    transition: background 0.35s ease;
}
.csp-stat:hover {
    background: linear-gradient(180deg, rgba(176,152,120,0.09), rgba(176,152,120,0.02));
}

.csp-stat-num {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.1rem, 3.4vw, 3rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--cs-bronze-light), var(--cs-bronze));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.csp-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.55;
}

/* — Generic section — */
.csp-section {
    padding: 6rem 0;
    background: #0a0a0a;
    position: relative;
}
.csp-section.alt { background: #060606; }

.csp-section-head {
    max-width: 720px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.csp-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0.9rem 0 1rem;
}

.csp-section-sub {
    color: rgba(255,255,255,0.55);
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0;
}

/* — Before/After comparison — */
.ba-block { margin-bottom: 4.5rem; }
.ba-block:last-child { margin-bottom: 0; }

.ba-block-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ba-block-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--cs-bronze);
}

.ba-block-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.3rem, 2.4vw, 1.85rem);
    font-weight: 700;
    margin: 0;
}

.ba-block-note {
    color: rgba(255,255,255,0.4);
    font-size: 0.95rem;
}

.ba-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 40px 90px rgba(0,0,0,0.6);
    background: #1a1a1a;
}

.ba-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    user-select: none;
}

.ba-dots { display: flex; gap: 7px; flex-shrink: 0; }
.ba-dot  { width: 11px; height: 11px; border-radius: 50%; }
.ba-dot-r { background: #ff5f57; }
.ba-dot-y { background: #febc2e; }
.ba-dot-g { background: #28c840; }

.ba-url {
    flex: 1;
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 7px;
    padding: 5px 14px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(176,152,120,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The slider viewport */
.ba-compare {
    position: relative;
    width: 100%;
    height: clamp(440px, 78vh, 780px);
    overflow: hidden;
    background: #000;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.ba-compare:active { cursor: grabbing; }

/* Each side holds a vertically scrollable track */
.ba-after {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.ba-before {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    width: 50%;
    border-right: 2px solid #fff;
}

/* sizer keeps the "before" image the full viewport width
   even while its container is clipped horizontally */
.ba-before-sizer {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    overflow: hidden;
    /* width set inline by JS = viewport width */
}

.ba-track {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    will-change: transform;
}

.ba-pane {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    -webkit-user-drag: none;
}

.ba-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 14px rgba(0,0,0,0.4);
}

.ba-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px; height: 54px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    cursor: ew-resize;
    touch-action: none;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.2),
                0 10px 28px rgba(0,0,0,0.55);
    transition: transform 0.12s ease;
}
.ba-knob:active { transform: translate(-50%, -50%) scale(0.92); }

.ba-knob svg { display: block; }

/* vertical scroll progress */
.ba-progress {
    position: absolute;
    top: 14px; bottom: 14px; right: 8px;
    width: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    z-index: 7;
    cursor: pointer;
    touch-action: none;
}
.ba-progress-thumb {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    min-height: 28px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--cs-bronze-light), var(--cs-bronze-dark));
}

.ba-tag {
    position: absolute;
    top: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 5px;
    color: #fff;
    z-index: 4;
    pointer-events: none;
}
.ba-tag-before {
    left: 16px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
}
.ba-tag-after {
    right: 16px;
    background: rgba(176,152,120,0.55);
    border: 1px solid rgba(176,152,120,0.4);
}

.ba-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(0,0,0,0.62);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    z-index: 7;
    pointer-events: none;
    transition: opacity 0.45s ease;
    white-space: nowrap;
}
.ba-compare.touched .ba-hint { opacity: 0; }

/* — Narrative blocks — */
.csp-narrative {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 980px;
    margin: 0 auto;
}

.csp-note {
    padding: 2.25rem;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    border-left: 2px solid var(--cs-bronze);
}

.csp-note h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.csp-note p {
    color: rgba(255,255,255,0.55);
    font-size: 0.97rem;
    line-height: 1.7;
    margin: 0;
}

/* — Admin panel feature highlight — */
.csp-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
}

.csp-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(176,152,120,0.1);
    border: 1px solid rgba(176,152,120,0.3);
    border-radius: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--cs-bronze-light);
    margin-bottom: 1.5rem;
}

.csp-feature h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.25rem;
}

.csp-feature p {
    color: rgba(255,255,255,0.58);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0 0 1.75rem;
}

.csp-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.csp-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.98rem;
    line-height: 1.5;
}

.csp-feature-list svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.csp-feature-visual {
    min-width: 0;
}

.csp-feature-visual img {
    display: block;
    width: 100%;
    height: auto;
}

/* — Admin panel screenshot gallery — */
.csp-admin-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1180px;
    margin: 4rem auto 0;
}

.csp-admin-shot {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.csp-admin-shot .ba-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.csp-admin-cap {
    margin: 0;
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* — Reservation flow steps — */
.csp-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1080px;
    margin: 0 auto;
    counter-reset: flow;
}

.csp-flow-step {
    position: relative;
    padding: 2.25rem 1.75rem;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
    transition: border-color 0.35s ease, transform 0.35s ease;
}
.csp-flow-step:hover {
    border-color: rgba(176,152,120,0.35);
    transform: translateY(-4px);
}

.csp-flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.75rem;
    width: 0.75rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(176,152,120,0.6), transparent);
}

.csp-flow-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cs-bronze);
    margin-bottom: 1.1rem;
}

.csp-flow-step h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 0.7rem;
    line-height: 1.3;
}

.csp-flow-step p {
    color: rgba(255,255,255,0.55);
    font-size: 0.93rem;
    line-height: 1.65;
    margin: 0;
}

/* — Tech stack — */
.csp-tech {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 760px;
    margin: 0 auto;
}

.csp-tech span {
    padding: 0.45rem 1.1rem;
    background: rgba(176,152,120,0.06);
    border: 1px solid rgba(176,152,120,0.18);
    border-radius: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(176,152,120,0.8);
    transition: background 0.25s ease, border-color 0.25s ease;
}
.csp-tech span:hover {
    background: rgba(176,152,120,0.13);
    border-color: rgba(176,152,120,0.4);
}

/* — CTA — */
.csp-cta {
    padding: 7rem 0;
    background: #0a0a0a;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.csp-cta::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 900px; height: 500px;
    background: radial-gradient(ellipse at center,
        rgba(176,152,120,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.csp-cta .container { position: relative; z-index: 1; }
.csp-cta h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.25rem;
}
.csp-cta p {
    max-width: 540px;
    margin: 0 auto 2.5rem;
    color: rgba(255,255,255,0.55);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* — Responsive — */
@media (max-width: 900px) {
    .csp-hero { padding: 8.5rem 0 4rem; }
    .csp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .csp-stat:nth-child(2n) { border-right: none; }
    .csp-stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.07); }
    .csp-section { padding: 4rem 0; }
    .csp-narrative { grid-template-columns: 1fr; }
    .csp-feature { grid-template-columns: 1fr; gap: 2.25rem; }
    .csp-admin-gallery { grid-template-columns: 1fr; gap: 2.25rem; margin-top: 2.5rem; }
    .csp-flow { grid-template-columns: repeat(2, 1fr); }
    .csp-flow-step:not(:last-child)::after { display: none; }
    .ba-compare { height: clamp(340px, 60vh, 520px); }
}

@media (max-width: 560px) {
    .csp-stats-grid { grid-template-columns: 1fr; }
    .csp-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .csp-stat:last-child { border-bottom: none; }
    .csp-hero-actions .btn { width: 100%; justify-content: center; }
    .csp-flow { grid-template-columns: 1fr; }
}
