/* ===== Demos Portfolio Index ===== */

.demos-hero {
    padding-top: calc(var(--header-h) + 3rem);
    padding-bottom: 2rem;
}

.demos-grid-section {
    padding-top: 2rem;
    padding-bottom: 6rem;
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* ---- Card shell ---- */

.demo-card {
    display: flex;
    flex-direction: column;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.demo-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-strong);
}

.demo-card--cafe:hover { border-color: #c4a574; }
.demo-card--plumber:hover { border-color: #0099cc; }
.demo-card--builder:hover { border-color: #f5c518; }
.demo-card--mechanic:hover { border-color: #ff2d2d; }

/* ---- Preview area ---- */

.demo-card__preview {
    position: relative;
    padding: 1.25rem 1.25rem 0;
    background: linear-gradient(180deg, #12121a 0%, #0a0a10 100%);
    overflow: hidden;
}

.demo-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 10;
    border-radius: 0;
}

.demo-card__overlay span {
    padding: 0.65rem 1.4rem;
    background: var(--cyan);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-radius: 6px;
    transform: translateY(8px);
    transition: transform 0.35s ease;
}

.demo-card:hover .demo-card__overlay {
    opacity: 1;
}

.demo-card:hover .demo-card__overlay span {
    transform: translateY(0);
}

.demo-card:hover .demo-screenshot {
    transform: scale(1.02);
}

/* ---- Browser chrome ---- */

.demo-browser {
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.demo-browser__chrome {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: #2b2b33;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-browser__dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.demo-browser__dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #555;
}

.demo-browser__dots span:nth-child(1) { background: #ff5f57; }
.demo-browser__dots span:nth-child(2) { background: #febc2e; }
.demo-browser__dots span:nth-child(3) { background: #28c840; }

.demo-browser__url {
    flex: 1;
    padding: 0.3rem 0.75rem;
    background: #1a1a22;
    border-radius: 5px;
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Screenshot frame ---- */

.demo-screenshot {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    transition: transform 0.45s ease;
    transform-origin: center top;
}

/* ==============================
   CAFE — Ember & Oak miniature
   ============================== */

.demo-screenshot--cafe {
    background: #faf6f1;
    font-family: Georgia, 'Times New Roman', serif;
}

.ss-cafe__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #2a1f18;
}

.ss-cafe__logo {
    font-size: 7px;
    font-weight: 700;
    color: #faf6f1;
    white-space: nowrap;
}

.ss-cafe__logo em {
    color: #c4a574;
    font-style: italic;
}

.ss-cafe__nav {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, rgba(250,246,241,0.15) 0%, rgba(250,246,241,0.15) 18%, transparent 18%, transparent 28%, rgba(250,246,241,0.15) 28%, rgba(250,246,241,0.15) 46%, transparent 46%);
    margin: 0 4px;
}

.ss-cafe__btn {
    font-size: 4px;
    padding: 2px 5px;
    background: #c4a574;
    color: #2a1f18;
    border-radius: 2px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

.ss-cafe__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 8px;
    background: linear-gradient(135deg, #faf6f1 0%, #f0e8dc 100%);
    min-height: 42%;
}

.ss-cafe__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.ss-cafe__eyebrow {
    font-size: 4px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4a574;
    font-family: Arial, sans-serif;
}

.ss-cafe__title {
    font-size: 9px;
    line-height: 1.15;
    color: #2a1f18;
    font-weight: 700;
}

.ss-cafe__title em {
    color: #6f4e37;
    font-style: italic;
}

.ss-cafe__cta {
    display: inline-block;
    margin-top: 2px;
    font-size: 4px;
    padding: 2px 6px;
    background: #6f4e37;
    color: #faf6f1;
    border-radius: 2px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    width: fit-content;
}

.ss-cafe__cup {
    font-size: 22px;
    line-height: 1;
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(61, 43, 31, 0.2));
}

.ss-cafe__stats {
    display: flex;
    background: #2a1f18;
    padding: 4px 0;
}

.ss-cafe__stats span {
    flex: 1;
    text-align: center;
    font-size: 4px;
    color: #c4a574;
    font-family: Arial, sans-serif;
    letter-spacing: 0.05em;
}

.ss-cafe__menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px 8px;
    background: #faf6f1;
}

.ss-cafe__menu span {
    height: 18px;
    background: #fff;
    border: 1px solid #e8ddd0;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(61, 43, 31, 0.06);
}

/* ==============================
   PLUMBER — FlowFix miniature
   ============================== */

.demo-screenshot--plumber {
    background: #fff;
    font-family: Arial, sans-serif;
}

.ss-plumb__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 119, 182, 0.1);
}

.ss-plumb__logo {
    font-size: 8px;
    font-weight: 800;
    color: #023e8a;
    white-space: nowrap;
}

.ss-plumb__logo span { color: #0077b6; }

.ss-plumb__nav {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #ccc 0%, #ccc 14%, transparent 14%, transparent 24%, #ccc 24%, #ccc 38%, transparent 38%);
    margin: 0 4px;
}

.ss-plumb__call {
    font-size: 4px;
    padding: 2px 5px;
    background: #0077b6;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.ss-plumb__hero {
    position: relative;
    padding: 10px 10px 14px;
    background: linear-gradient(160deg, #0077b6 0%, #023e8a 100%);
    min-height: 48%;
    overflow: hidden;
}

.ss-plumb__badge {
    display: inline-block;
    font-size: 4px;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 600;
}

.ss-plumb__title {
    display: block;
    font-size: 9px;
    line-height: 1.2;
    color: #fff;
    font-weight: 700;
}

.ss-plumb__title strong {
    color: #48cae4;
    font-weight: 800;
}

.ss-plumb__actions {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}

.ss-plumb__btn {
    font-size: 4px;
    padding: 2px 6px;
    background: #48cae4;
    color: #023e8a;
    border-radius: 3px;
    font-weight: 700;
}

.ss-plumb__btn--ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.ss-plumb__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: #fff;
    clip-path: ellipse(70% 100% at 50% 100%);
    opacity: 0.12;
}

.ss-plumb__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px 8px;
    background: #f0f8ff;
}

.ss-plumb__cards span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    background: #fff;
    border-radius: 4px;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 119, 182, 0.1);
}

/* ==============================
   BUILDER — IronBuilt miniature
   ============================== */

.demo-screenshot--builder {
    background: #1a1a1a;
    font-family: 'Arial Narrow', Arial, sans-serif;
}

.ss-build__stripe {
    height: 3px;
    background: repeating-linear-gradient(
        -45deg,
        #f5c518,
        #f5c518 4px,
        #1a1a1a 4px,
        #1a1a1a 8px
    );
}

.ss-build__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #1a1a1a;
    border-bottom: 2px solid #f5c518;
}

.ss-build__logo {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #f5f5f5;
    white-space: nowrap;
}

.ss-build__logo span { color: #f5c518; }

.ss-build__nav {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #555 0%, #555 16%, transparent 16%, transparent 26%, #555 26%, #555 42%, transparent 42%);
    margin: 0 4px;
}

.ss-build__btn {
    font-size: 4px;
    padding: 2px 5px;
    background: #f5c518;
    color: #1a1a1a;
    font-weight: 900;
    letter-spacing: 0.05em;
    clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}

.ss-build__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(245,197,24,0.04) 20px, rgba(245,197,24,0.04) 21px);
    min-height: 44%;
}

.ss-build__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ss-build__tag {
    font-size: 3.5px;
    padding: 1px 4px;
    background: #f5c518;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: 0.1em;
    width: fit-content;
}

.ss-build__title {
    font-size: 9px;
    line-height: 1.05;
    color: #f5f5f5;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.ss-build__title strong { color: #f5c518; }

.ss-build__cta {
    display: inline-block;
    margin-top: 2px;
    font-size: 4px;
    padding: 2px 6px;
    background: #f5c518;
    color: #1a1a1a;
    font-weight: 900;
    letter-spacing: 0.05em;
    width: fit-content;
}

.ss-build__icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(245, 197, 24, 0.3));
}

.ss-build__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px 8px;
    background: #1a1a1a;
}

.ss-build__grid span {
    font-size: 4px;
    color: #aaa;
    padding: 4px;
    background: #2a2a2a;
    border-left: 2px solid #f5c518;
}

.ss-build__grid i {
    display: block;
    font-style: normal;
    font-size: 7px;
    color: rgba(245, 197, 24, 0.25);
    font-weight: 900;
    line-height: 1;
}

/* ==============================
   MECHANIC — Torque Garage miniature
   ============================== */

.demo-screenshot--mechanic {
    background: #0a0a0a;
    font-family: Arial, sans-serif;
}

.ss-torque__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #1a1a1a;
    border-bottom: 2px solid #ff2d2d;
}

.ss-torque__logo {
    font-size: 6px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #f0f0f0;
    white-space: nowrap;
}

.ss-torque__logo span { color: #ff2d2d; }

.ss-torque__nav {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #444 0%, #444 14%, transparent 14%, transparent 24%, #444 24%, #444 38%, transparent 38%);
    margin: 0 4px;
}

.ss-torque__btn {
    font-size: 4px;
    padding: 2px 5px;
    background: #ff2d2d;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: 0 0 6px rgba(255, 45, 45, 0.5);
}

.ss-torque__hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 46%;
    overflow: hidden;
}

.ss-torque__lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 16px,
        rgba(255, 45, 45, 0.04) 16px,
        rgba(255, 45, 45, 0.04) 17px
    );
}

.ss-torque__copy {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 1;
}

.ss-torque__eyebrow {
    font-size: 4px;
    color: #ff2d2d;
    letter-spacing: 0.1em;
}

.ss-torque__title {
    font-size: 8px;
    line-height: 1.1;
    color: #f0f0f0;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.ss-torque__title strong {
    color: #ff2d2d;
    text-shadow: 0 0 8px rgba(255, 45, 45, 0.6);
}

.ss-torque__cta {
    display: inline-block;
    margin-top: 2px;
    font-size: 4px;
    padding: 2px 6px;
    background: #ff2d2d;
    color: #fff;
    font-weight: 700;
    width: fit-content;
    box-shadow: 0 0 8px rgba(255, 45, 45, 0.4);
}

.ss-torque__car {
    position: relative;
    z-index: 1;
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(255, 45, 45, 0.35));
}

.ss-torque__strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #ff2d2d;
    padding: 3px 0;
}

.ss-torque__strip span {
    text-align: center;
    font-size: 4px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
}

/* ---- Card body ---- */

.demo-card__body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.demo-card__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.demo-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.demo-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ---- CTA ---- */

.demos-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
}

.demos-cta p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .demos-grid {
        grid-template-columns: 1fr;
    }

    .demo-card__preview {
        padding: 1rem 1rem 0;
    }
}
