/* ===========================================================================
   Yalla Box — mobile-app case study (overview only)
   Scoped under .yb-page. Premium dark stage so the light phone screens pop.
   =========================================================================== */
:root {
    --yb-red: #ed1f2a;
    --yb-red-dark: #c8161f;
    --yb-green: #1faa59;
    --yb-bg: #0a0a0e;
    --yb-bg-2: #101019;
    --yb-card: #15151f;
    --yb-border: #23232f;
    --yb-ink: #f5f5f7;
    --yb-muted: #9a9aab;
}

.yb-page { background: var(--yb-bg); color: var(--yb-ink); overflow-x: hidden; }
.yb-page * { font-family: 'Inter', sans-serif; }
.yb-serif { font-family: 'Playfair Display', serif !important; }
.yb-red { color: var(--yb-red) !important; }
.yb-muted { color: var(--yb-muted) !important; }

/* ---------- shared section scaffolding ---------- */
.yb-section { padding: 110px 0; position: relative; }
.yb-section-sm { padding: 70px 0; position: relative; }
.yb-section-alt { background: var(--yb-bg-2); }

.yb-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--yb-red);
    font-weight: 600;
}
.yb-label-num {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    letter-spacing: 0;
    color: var(--yb-muted);
}
.yb-title {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    line-height: 1.12;
    color: var(--yb-ink);
    margin: 0;
}
.yb-divider { width: 64px; height: 3px; border-radius: 3px; background: var(--yb-red); margin: 22px 0; }
.yb-divider-center { margin-left: auto; margin-right: auto; }
.yb-text { color: var(--yb-muted); font-size: 1.02rem; line-height: 1.85; font-weight: 300; }
.yb-text-lead { color: #d7d7e0; font-size: 1.18rem; line-height: 1.8; font-weight: 300; }

/* ---------- HERO ---------- */
.yb-hero {
    position: relative;
    padding: 150px 0 90px;
    background:
        radial-gradient(ellipse at 78% 18%, rgba(237,31,42,0.16) 0%, transparent 55%),
        radial-gradient(ellipse at 12% 80%, rgba(237,31,42,0.07) 0%, transparent 50%),
        var(--yb-bg);
    overflow: hidden;
}
.yb-hero-eyebrow {
    font-size: 0.74rem; letter-spacing: 0.4em; text-transform: uppercase;
    color: var(--yb-red); font-weight: 600;
}
.yb-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 5.4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin: 18px 0 6px;
    color: white;
}
.yb-hero-title span { color: var(--yb-red); }
.yb-hero-kicker {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--yb-muted);
}
.yb-hero-sub { color: var(--yb-muted); font-size: 1.1rem; line-height: 1.8; font-weight: 300; max-width: 520px; margin-top: 22px; }

.yb-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 32px; margin-top: 38px; max-width: 520px; }
.yb-meta-label { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--yb-muted); margin-bottom: 6px; }
.yb-meta-value { font-size: 0.98rem; color: var(--yb-ink); font-weight: 500; }

.yb-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.yb-badge {
    font-size: 0.72rem; letter-spacing: 0.06em; font-weight: 500;
    color: #e7c6c8; padding: 7px 15px; border-radius: 100px;
    background: rgba(237,31,42,0.10); border: 1px solid rgba(237,31,42,0.28);
}

/* ---------- PHONE DEVICE FRAME ---------- */
.yb-phones {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: flex-start; gap: clamp(18px, 3vw, 42px);
}
.yb-phone-item { text-align: center; flex: 0 1 auto; }
.yb-phone {
    width: 100%;
    aspect-ratio: 1320 / 2868;
    background: #0c0c10;
    border: 1px solid #2c2c3a;
    border-radius: 38px;
    padding: 9px;
    position: relative;
    box-shadow: 0 30px 70px -28px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.02) inset;
    transition: transform 0.5s cubic-bezier(.2,.7,.2,1), box-shadow 0.5s ease;
}
.yb-phone::before {
    content: '';
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
    width: 34%; height: 9px; border-radius: 100px; background: #0c0c10;
    z-index: 3;
}
.yb-phone img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    border-radius: 30px; display: block;
}
.yb-phone:hover { transform: translateY(-10px); box-shadow: 0 42px 90px -30px rgba(237,31,42,0.45); }

.yb-phone-single { max-width: 330px; margin-inline: auto; }
.yb-phone-w { width: clamp(195px, 27vw, 272px); }

.yb-phone-cap { margin-top: 18px; }
.yb-phone-cap-eyebrow { font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--yb-red); font-weight: 600; }
.yb-phone-cap-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--yb-ink); margin-top: 5px; }

/* ---------- FEATURE CARDS ---------- */
.yb-feature {
    height: 100%;
    background: var(--yb-card);
    border: 1px solid var(--yb-border);
    border-radius: 18px;
    padding: 30px 26px;
    transition: border-color 0.35s ease, transform 0.35s ease;
}
.yb-feature:hover { border-color: rgba(237,31,42,0.45); transform: translateY(-4px); }
.yb-feature-icon {
    width: 50px; height: 50px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(237,31,42,0.12); margin-bottom: 20px;
}
.yb-feature-icon svg { width: 24px; height: 24px; stroke: var(--yb-red); fill: none; }
.yb-feature-title { font-family: 'Playfair Display', serif; font-size: 1.22rem; color: var(--yb-ink); margin-bottom: 10px; }
.yb-feature-text { color: var(--yb-muted); font-size: 0.94rem; line-height: 1.7; font-weight: 300; margin: 0; }

.yb-pillar-list { list-style: none; padding: 0; margin: 0; }
.yb-pillar-list li {
    position: relative; padding-left: 30px; margin-bottom: 16px;
    color: #c9c9d4; font-size: 0.98rem; line-height: 1.6; font-weight: 300;
}
.yb-pillar-list li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 8px; height: 8px; border-radius: 2px; background: var(--yb-red);
}

/* ---------- LIFECYCLE PIPELINE ---------- */
.yb-flow { display: flex; flex-wrap: wrap; gap: 16px; counter-reset: yb-step; }
.yb-flow-step {
    flex: 1 1 180px;
    background: var(--yb-card);
    border: 1px solid var(--yb-border);
    border-radius: 16px;
    padding: 26px 22px;
    position: relative;
}
.yb-flow-step .dot {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(237,31,42,0.12); margin-bottom: 16px;
}
.yb-flow-step .dot svg { width: 19px; height: 19px; stroke: var(--yb-red); fill: none; }
.yb-flow-step .dot.is-done { background: var(--yb-green); }
.yb-flow-step .dot.is-done svg { stroke: #fff; }
.yb-flow-num { font-family: 'Playfair Display', serif; font-size: 0.8rem; color: var(--yb-muted); }
.yb-flow-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--yb-ink); margin: 4px 0 8px; }
.yb-flow-text { color: var(--yb-muted); font-size: 0.88rem; line-height: 1.6; font-weight: 300; margin: 0; }

/* ---------- STATS ---------- */
.yb-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
    border-top: 1px solid var(--yb-border); border-bottom: 1px solid var(--yb-border);
    padding: 44px 0;
}
.yb-stat { text-align: center; }
.yb-stat-num { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem); color: var(--yb-red); line-height: 1; }
.yb-stat-label { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yb-muted); margin-top: 12px; }

/* ---------- QUOTE ---------- */
.yb-quote { background: var(--yb-bg-2); padding: 100px 0; text-align: center; }
.yb-quote-mark { font-family: 'Playfair Display', serif; font-size: 5rem; line-height: 0.5; color: var(--yb-red); }
.yb-quote-text { font-family: 'Playfair Display', serif; font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 400; line-height: 1.5; color: var(--yb-ink); max-width: 880px; margin: 30px auto; }
.yb-quote-author { color: var(--yb-muted); font-size: 0.9rem; letter-spacing: 0.08em; }

/* ---------- CTA ---------- */
.yb-cta { padding: 120px 0; text-align: center; background:
        radial-gradient(ellipse at 50% 0%, rgba(237,31,42,0.14) 0%, transparent 60%), var(--yb-bg); }
.yb-cta-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 3rem); color: var(--yb-ink); margin-bottom: 22px; }
.yb-cta-text { color: var(--yb-muted); font-size: 1.05rem; line-height: 1.8; font-weight: 300; max-width: 640px; }
.yb-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 38px; border-radius: 100px; font-weight: 600; font-size: 0.98rem;
    text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; margin: 8px;
}
.yb-btn svg { width: 1em; height: 1em; }
.yb-btn-primary { background: var(--yb-red); color: #fff; box-shadow: 0 14px 34px -12px rgba(237,31,42,0.7); }
.yb-btn-primary:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 20px 40px -12px rgba(237,31,42,0.8); }
.yb-btn-outline { background: transparent; color: var(--yb-ink); border: 1px solid var(--yb-border); }
.yb-btn-outline:hover { border-color: var(--yb-red); color: var(--yb-ink); transform: translateY(-3px); }

/* ---------- FOOTER CREDIT ---------- */
.yb-footer-credit { text-align: center; padding: 40px 0; border-top: 1px solid var(--yb-border); }
.yb-footer-credit p { color: var(--yb-muted); font-size: 0.86rem; margin: 0; }

/* ---------- FADE-UP ---------- */
.yb-fade { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.yb-fade.visible { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .yb-section { padding: 80px 0; }
    .yb-hero { padding: 120px 0 60px; }
    .yb-stats { grid-template-columns: repeat(2, 1fr); gap: 30px 18px; }
    .yb-phone-w { width: clamp(170px, 40vw, 240px); }
}
@media (max-width: 575px) {
    .yb-meta { grid-template-columns: 1fr 1fr; }
    .yb-phone-w { width: 76%; }
    .yb-phones { gap: 26px; }
}
