@import url('https://fonts.googleapis.com/css2?family=Cabin+Sketch:wght@700&family=Patrick+Hand&display=swap');

/**
    Template 15
    Blackboard with chalk writing
*/

/* Page color while the board loads, so the screen doesn't flash the default cream */
body {
    background: #2b1d12;
}

.template15 {
    --accent: #ffe27a;      /* yellow chalk: prices */
    --chalk: #f2f0e8;       /* white chalk: text */
    --pink: #ff9fb8;        /* pink chalk: underline */
    --blue: #9fd8ff;        /* blue chalk: descriptions */
    /* grainy chalk texture, used as a mask so strokes look dusty and broken */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -2.4 0 0 0 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -1.6 0 0 0 1.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background: #2b1d12;
    color: var(--chalk);
}

.template15 .bb-board {
    position: absolute;
    top: 1.4vmin;
    left: 1.4vmin;
    right: 1.4vmin;
    bottom: calc(1.4vmin + var(--mb-footer, 0px));
    display: flex;
    padding: 3.5vmin 4.5vmin 3vmin;
    border: 1.2vmin solid #5b3a22;
    border-radius: .6vmin;
    background:
        /* eraser smudges */
        radial-gradient(ellipse 38% 22% at 18% 20%, rgba(255, 255, 255, .075), transparent 70%),
        radial-gradient(ellipse 30% 18% at 72% 78%, rgba(255, 255, 255, .06), transparent 70%),
        radial-gradient(ellipse 22% 30% at 88% 22%, rgba(255, 255, 255, .045), transparent 70%),
        linear-gradient(170deg, transparent 40%, rgba(255, 255, 255, .035) 48%, transparent 56%),
        radial-gradient(ellipse at 50% 50%, #1e2120 0%, #141615 70%, #0d0e0e 100%);
    box-shadow: inset 0 0 7vmin rgba(0, 0, 0, .75), 0 0 0 .35vmin #3d2615;
}

/* chalk grain on all writing */
.template15 .mb-heading,
.template15 .mb-list,
.template15 .mb-meta,
.template15 .bb-swash,
.template15 .bb-doodle,
.template15 .bb-frame::after {
    -webkit-mask-image: var(--grain);
    mask-image: var(--grain);
    -webkit-mask-size: 220px 220px;
    mask-size: 220px 220px;
}

.template15 .bb-main {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.template15 .mb-heading {
    margin: 0;
    font-family: 'Cabin Sketch', cursive;
    font-weight: 700;
    font-size: 11vmin;
    line-height: 1.1;
    color: var(--chalk);
    text-shadow: 0 0 .5vmin rgba(255, 255, 255, .45);
}

.template15 .bb-swash {
    display: block;
    width: 55%;
    height: 3vmin;
    margin: 0 0 2.4vmin;
    fill: none;
    stroke: var(--pink);
    stroke-width: 6;
    stroke-linecap: round;
}

.template15 .bb-swash path + path {
    stroke-width: 3.5;
    opacity: .75;
}

.template15 .mb-list {
    -webkit-mask-image: var(--grain-light);
    mask-image: var(--grain-light);
    flex: 1 1 auto;
    font-family: 'Patrick Hand', cursive;
    letter-spacing: .01em;
    text-shadow: 0 0 .12em rgba(255, 255, 255, .35);
    --mb-gap: 5vmin;
}

.template15 .mb-item {
    padding: .14em 0;
}

.template15 .mb-dots {
    border-bottom: .1em dotted rgba(242, 240, 232, .5);
    transform: translateY(-.28em);
}

.template15 .mb-price {
    color: var(--accent);
    text-shadow: 0 0 .15em rgba(255, 226, 122, .45);
}

.template15 .mb-suffix {
    font-size: .62em;
    opacity: .85;
}

.template15 .mb-desc {
    font-size: .62em;
    color: var(--blue);
    opacity: .9;
}

.template15 .mb-ph {
    color: var(--pink);
}

/* Side: chalk-framed video, description, logo */
.template15 .bb-side {
    flex: 0 0 44%;
    min-width: 0;
    min-height: 0;
    margin-left: 4.5vmin;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.template15 .bb-frame {
    position: relative;
    flex: 0 1 auto;
    width: calc(100% - 3vmin);
    aspect-ratio: 16 / 10;
    max-height: 74%;
    min-height: 0;
    margin: 1.5vmin;
    transform: rotate(-1.2deg);
}

.template15 .bb-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .6vmin;
    background: #0d0e0e;
    opacity: .92;
}

/* hand-drawn chalk outline around the video */
.template15 .bb-frame::after {
    content: '';
    position: absolute;
    top: -1.3vmin;
    left: -1.5vmin;
    right: -1.1vmin;
    bottom: -1.4vmin;
    border: .55vmin solid rgba(242, 240, 232, .9);
    border-radius: 1.4vmin 2.6vmin 1vmin 2.2vmin / 2.2vmin 1vmin 2.6vmin 1.2vmin;
    pointer-events: none;
}

.template15 .mb-meta {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: space-between;
    margin-top: 4vmin;
    font-family: 'Patrick Hand', cursive;
    font-size: 4vmin;
    color: var(--accent);
}

.template15 .mb-logo {
    height: 10vmin;
    max-width: 45%;
    object-fit: contain;
    margin-left: auto;
    filter: grayscale(1) invert(1) contrast(1.4);
    opacity: .9;
}

.template15.mb-novideo .bb-frame {
    display: none;
}

.template15.mb-novideo.mb-nometa .bb-side {
    display: none;
}

/* doodles */
.template15 .bb-doodle {
    position: absolute;
    font-family: 'Patrick Hand', cursive;
    line-height: 1;
    pointer-events: none;
}

.template15 .bb-star1 {
    top: 2.2vmin;
    right: 3vmin;
    font-size: 6vmin;
    color: var(--accent);
    transform: rotate(12deg);
}

.template15 .bb-star2 {
    bottom: .6vmin;
    right: 22vmin;
    font-size: 3.5vmin;
    color: var(--pink);
    transform: rotate(-10deg);
}

.template15 .bb-arrow {
    top: 7vmin;
    right: 40%;
    font-size: 5vmin;
    color: var(--blue);
    transform: rotate(18deg);
    opacity: .8;
}

.template15.mb-novideo.mb-nometa .bb-arrow {
    display: none;
}

.template15 .mb-pager {
    right: 4vmin;
    bottom: 1.4vmin;
    color: var(--chalk);
}

/* Portrait: video strip on top */
.template15.mb-portrait .bb-board {
    flex-direction: column;
}

.template15.mb-portrait .bb-side {
    order: -1;
    flex: 0 0 26%;
    flex-direction: row;
    align-items: stretch;
    margin: 1vmin 0 4vmin;
}

.template15.mb-portrait .bb-frame {
    flex: 0 0 56%;
    width: auto;
    aspect-ratio: auto;
    max-height: none;
}

.template15.mb-portrait .mb-meta {
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    margin: 0 0 0 4vmin;
}

.template15.mb-portrait .mb-logo {
    margin: 2vmin auto 0;
}

.template15.mb-portrait .bb-arrow {
    display: none;
}

/* Footer marquee */
.mb-footer-template15 {
    background: #5b3a22;
    color: #fff4dc;
    font-family: 'Patrick Hand', cursive;
}
