CSS
/* ─── 04 Page-Turn Flipbook — editorial book ───────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&display=swap');
.cd-flb {
--cd-flb-bg: #1c1410;
position: relative;
width: 100%;
min-height: 600px;
background: var(--cd-flb-bg);
font-family: 'EB Garamond', Georgia, serif;
overflow: hidden;
perspective: 2400px;
box-sizing: border-box;
}
.cd-flb *,
.cd-flb *::before,
.cd-flb *::after { box-sizing: border-box; margin: 0; padding: 0; }
.cd-flb .card {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 28px 16px;
}
.cd-flb .card::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(180,120,40,0.06) 0%, transparent 70%);
pointer-events: none;
}
.cd-flb .book-scene {
transform-style: preserve-3d;
transform: rotateX(5deg) rotateY(-4deg);
transition: transform 0.6s ease;
position: relative;
z-index: 1;
}
.cd-flb .book-scene:hover { transform: rotateX(4deg) rotateY(-2deg); }
.cd-flb .book {
width: 560px;
height: 360px;
position: relative;
transform-style: preserve-3d;
}
.cd-flb .book::before {
content: '';
position: absolute;
left: 50%;
top: 0; bottom: 0;
width: 12px;
transform: translateX(-50%) translateZ(1px);
background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.4) 100%);
z-index: 20;
pointer-events: none;
}
.cd-flb .page {
position: absolute;
width: 280px;
height: 360px;
top: 0;
left: 280px;
transform-origin: left center;
transform-style: preserve-3d;
transition: transform 1.1s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.cd-flb .page.flipped { transform: rotateY(-180deg); }
.cd-flb .page-front,
.cd-flb .page-back {
position: absolute;
inset: 0;
backface-visibility: hidden;
overflow: hidden;
}
.cd-flb .page-back { transform: rotateY(180deg); }
.cd-flb .left-cover {
position: absolute;
left: 0; top: 0;
width: 280px; height: 360px;
z-index: 0;
border-radius: 4px 0 0 4px;
overflow: hidden;
}
.cd-flb .pg {
width: 100%; height: 100%;
padding: 30px 26px;
display: flex;
flex-direction: column;
position: relative;
}
.cd-flb .pg-warm { color: #2a1f14; }
.cd-flb .pg-cool { color: #2a2432; }
.cd-flb .pg-rose { color: #2a1418; }
.cd-flb .pg-sage { color: #1a2a1e; }
.cd-flb .pg-ink { color: #e8d8c0; }
.cd-flb .pg-num {
font-family: 'EB Garamond', serif;
font-size: 10px;
letter-spacing: 2px;
position: absolute;
bottom: 16px;
}
.cd-flb .pg-num.right { right: 22px; color: #8a6a4a; }
.cd-flb .pg-num.left { left: 22px; color: #7a6898; }
.cd-flb .pg-num.rose { color: #8a4050; }
.cd-flb .pg-num.sage { color: #4a7a50; }
.cd-flb .pg-num.ink { color: rgba(200,180,140,0.4); }
.cd-flb .page-front::after,
.cd-flb .page-back::after {
content: '';
position: absolute;
top: 0; bottom: 0;
width: 40px;
pointer-events: none;
}
.cd-flb .page-front::after { right: 0; background: linear-gradient(to right, transparent, rgba(0,0,0,0.14)); }
.cd-flb .page-back::after { left: 0; background: linear-gradient(to left, transparent, rgba(0,0,0,0.14)); }
.cd-flb .left-cover::after {
content: '';
position: absolute;
right: 0; top: 0; bottom: 0;
width: 30px;
background: linear-gradient(to right, transparent, rgba(0,0,0,0.2));
}
.cd-flb .paper-warm { background: #f5ece0; }
.cd-flb .paper-cool { background: #ede8f0; }
.cd-flb .paper-rose { background: #f5e8e8; }
.cd-flb .paper-sage { background: #e8f0e8; }
.cd-flb .paper-ink { background: #1a1510; }
.cd-flb .spread-label {
font-family: 'EB Garamond', serif;
font-size: 9px;
letter-spacing: 4px;
text-transform: uppercase;
opacity: 0.4;
margin-bottom: 16px;
}
.cd-flb .spread-title {
font-family: 'Playfair Display', serif;
font-weight: 900;
line-height: 1.1;
margin-bottom: 14px;
}
.cd-flb .spread-title.sm { font-size: 26px; }
.cd-flb .spread-title.xs { font-size: 22px; }
.cd-flb .spread-title.rose { color: #5a1828; }
.cd-flb .spread-body {
font-family: 'EB Garamond', serif;
font-size: 13px;
line-height: 1.78;
opacity: 0.75;
}
.cd-flb .spread-body.mt { margin-top: 10px; }
.cd-flb .spread-body.alt { color: #3a2a50; }
.cd-flb .spread-body.rose-body { color: #3a1820; }
.cd-flb .spread-body.sage-body { color: #2a3a26; }
.cd-flb .spread-pullquote {
font-family: 'Playfair Display', serif;
font-style: italic;
font-size: 16px;
line-height: 1.5;
border-left: 2px solid currentColor;
padding-left: 14px;
margin: 16px 0;
opacity: 0.8;
}
.cd-flb .spread-pullquote.warm { border-color: #8a6a4a; color: #4a3424; }
.cd-flb .spread-pullquote.sage { border-color: #3a6a40; color: #2a4a2e; }
.cd-flb .spread-rule {
width: 40px; height: 1px;
background: currentColor;
opacity: 0.3;
margin: 14px 0;
}
.cd-flb .spread-rule.alt { background: #4a3868; }
.cd-flb .spread-rule.rose { background: #8a3040; }
.cd-flb .spread-img {
width: 100%; height: 100px;
border-radius: 4px;
margin: 14px 0;
overflow: hidden;
flex-shrink: 0;
}
.cd-flb .sage-img {
background: linear-gradient(135deg, #2a4a2e, #1a3020);
display: flex;
align-items: center;
justify-content: center;
}
.cd-flb .circle-outer {
width: 64px; height: 64px;
border: 2px solid rgba(120,200,120,0.4);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.cd-flb .circle-inner {
width: 32px; height: 32px;
background: rgba(120,200,120,0.2);
border-radius: 50%;
}
.cd-flb .spread-big-num {
font-family: 'Playfair Display', serif;
font-size: 80px;
font-weight: 900;
line-height: 0.9;
opacity: 0.07;
position: absolute;
right: 16px;
bottom: 30px;
}
/* Cover art */
.cd-flb .cover-art {
width: 100%; height: 100%;
background: linear-gradient(148deg, #1a0f08, #0e0a06);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 26px;
border-radius: 4px 0 0 4px;
position: relative;
overflow: hidden;
}
.cd-flb .cover-art::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(180,120,40,0.12) 0%, transparent 70%);
}
.cd-flb .cover-eyebrow {
font-family: 'EB Garamond', serif;
font-size: 9px;
letter-spacing: 5px;
color: rgba(200,160,80,0.55);
margin-bottom: 26px;
z-index: 1;
}
.cd-flb .cover-rule {
width: 56px;
height: 1px;
background: rgba(200,160,80,0.35);
margin: 0 0 26px;
z-index: 1;
}
.cd-flb .cover-title {
font-family: 'Playfair Display', serif;
font-size: 34px;
font-weight: 900;
color: #f0e4cc;
text-align: center;
line-height: 1.1;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.cd-flb .cover-vol {
font-style: italic;
font-weight: 400;
font-size: 20px;
opacity: 0.7;
margin-top: 6px;
}
.cd-flb .cover-rule:nth-of-type(2),
.cd-flb .cover-title + .cover-rule {
margin: 26px 0;
}
.cd-flb .cover-sub {
font-family: 'EB Garamond', serif;
font-style: italic;
font-size: 11px;
color: rgba(200,160,80,0.55);
letter-spacing: 1px;
z-index: 1;
}
.cd-flb .colophon-label {
font-family: 'EB Garamond', serif;
font-size: 9px;
letter-spacing: 4px;
opacity: 0.35;
margin-bottom: 18px;
}
.cd-flb .colophon-title {
font-family: 'Playfair Display', serif;
font-size: 18px;
font-weight: 700;
opacity: 0.9;
margin-bottom: 8px;
}
.cd-flb .colophon-sub {
font-family: 'Playfair Display', serif;
font-style: italic;
font-size: 12px;
opacity: 0.5;
margin-bottom: 22px;
}
.cd-flb .colophon-body {
font-family: 'EB Garamond', serif;
font-size: 11px;
line-height: 1.8;
opacity: 0.45;
}
.cd-flb .nav {
display: flex;
align-items: center;
gap: 18px;
margin-top: 26px;
position: relative;
z-index: 100;
}
.cd-flb .nav-btn {
display: flex;
align-items: center;
gap: 8px;
font-family: 'EB Garamond', serif;
font-size: 12px;
letter-spacing: 2px;
color: rgba(200,170,120,0.7);
background: none;
border: none;
cursor: pointer;
padding: 9px 18px;
border-radius: 4px;
transition: color 0.2s, background 0.2s;
}
.cd-flb .nav-btn:hover { color: rgba(220,190,140,1); background: rgba(200,170,120,0.08); }
.cd-flb .nav-btn:disabled { opacity: 0.3; cursor: default; }
.cd-flb .page-counter {
font-family: 'EB Garamond', serif;
font-size: 12px;
color: rgba(200,170,120,0.45);
letter-spacing: 2px;
min-width: 80px;
text-align: center;
}
.cd-flb .book-shadow {
position: absolute;
bottom: -18px;
left: 10%;
right: 10%;
height: 28px;
background: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%);
filter: blur(12px);
z-index: -1;
}
@media (max-width: 720px) {
.cd-flb .book { width: 360px; height: 280px; }
.cd-flb .page,
.cd-flb .left-cover { width: 180px; height: 280px; }
.cd-flb .page { left: 180px; }
.cd-flb .pg { padding: 22px 18px; }
.cd-flb .spread-title.sm { font-size: 20px; }
.cd-flb .spread-title.xs { font-size: 18px; }
.cd-flb .cover-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
.cd-flb .book-scene,
.cd-flb .page { transition: none !important; }
}