/* =============================================================
   Lén Rui — lenrui.net
   Shared design system. Evolved from the original ukiyo-e / warm
   paper look: bigger type, real navigation, animated cards.
   Plain CSS, no build step. GitHub Pages friendly.
   ============================================================= */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Souvenir";
    src: url("../assets/souvnrl.ttf") format("truetype");
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    /* surfaces (the "negroni" paper palette from the original) */
    --paper-base: #fde2c5;   /* page base, warm    */
    --paper:      #fef3e8;   /* cards / surfaces   */
    --paper-2:    #fbead9;   /* alt surface        */

    /* ink */
    --ink:        #332b22;   /* primary text       */
    --ink-soft:   #6f6150;   /* muted text         */
    --ink-faint:  #a3937f;   /* captions / meta    */

    /* accent — pulled from the purple avatar */
    --accent:        #a884da;
    --accent-strong: #7d5bbe;
    --accent-soft:   #ede3fb;

    /* lines & shadows */
    --line:       rgba(51, 43, 34, 0.14);
    --line-soft:  rgba(51, 43, 34, 0.08);
    --shadow-sm:  0 2px 8px rgba(51, 43, 34, 0.08);
    --shadow-md:  0 10px 30px -12px rgba(51, 43, 34, 0.35);
    --shadow-lg:  0 30px 60px -20px rgba(51, 43, 34, 0.45);

    /* geometry */
    --radius:     18px;
    --radius-sm:  12px;
    --maxw:       1120px;
    --nav-h:      68px;

    --font-display: "Souvenir", "Iowan Old Style", Georgia, serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.65;
    background: var(--paper-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- Background layers ---------- */
/* Blurred snow scene bleeding in from the sides */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: var(--paper-base);
}
.bg-scene::before,
.bg-scene::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 34vw;
    background-image: url("../assets/newbg.png");
    background-size: cover;
    filter: blur(4px);
    opacity: 0.95;
}
.bg-scene::before { left: 0;  background-position: right center; }
.bg-scene::after  { right: 0; background-position: left  center; }

/* Snowfall canvas (drawn by js/main.js) */
#snow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* The central "paper" column that content sits on */
.paper-column {
    position: relative;
    z-index: 0;
    max-width: var(--maxw);
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--paper);
    background-image: url("../assets/main.webp");
    background-repeat: repeat;
    box-shadow: var(--shadow-lg);
}

/* Cherry-blossom corners, decorative */
.corner {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    user-select: none;
    width: clamp(120px, 22vw, 300px);
    opacity: 0.96;
}
.corner.tl { top: 0; left: 0; }
.corner.tr { top: 0; right: 0; }
.corner.bl { bottom: 0; left: 0; }
.corner.br { bottom: 0; right: 0; }
@media (max-width: 640px) {
    .corner.bl, .corner.br { display: none; }
    .corner.tl, .corner.tr { width: 40vw; opacity: 0.85; }
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; padding-inline: clamp(1.25rem, 5vw, 4rem); }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: clamp(1.25rem, 5vw, 3rem);
    background: rgba(254, 243, 232, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-soft);
}
.nav__brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.nav__brand .dot { color: var(--accent-strong); }

.nav__links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.25rem);
}
.nav__links a {
    position: relative;
    font-size: 1.02rem;
    padding-block: 0.3rem;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}
.nav__links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--accent-strong);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav__toggle { display: none; width: 40px; height: 40px; border-radius: 10px; }
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
    content: "";
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    position: relative;
    margin: 0 auto;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after  { position: absolute; top: 7px; }
.nav.open .nav__toggle span { background: transparent; }
.nav.open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__toggle span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
    .nav__toggle { display: block; }
    .nav__links {
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(254, 243, 232, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav.open .nav__links { max-height: 320px; }
    .nav__links a {
        width: 100%;
        text-align: center;
        padding-block: 0.9rem;
        border-top: 1px solid var(--line-soft);
    }
    .nav__links a::after { display: none; }
}

/* ---------- Typography ---------- */
.display {
    font-family: var(--font-display);
    line-height: 0.95;
    letter-spacing: 0.005em;
}
.eyebrow {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--accent-strong);
    letter-spacing: 0.02em;
}
h1.page-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 9vw, 6rem);
    line-height: 0.92;
}
h2.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }
.rule {
    width: 90px; height: 3px; border: 0; border-radius: 3px;
    background: var(--accent-strong);
    margin-block: 1.25rem;
}
.center .rule { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

/* =============================================================
   HOME — hero
   ============================================================= */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 2rem;
    min-height: calc(100vh - var(--nav-h));
    padding-block: clamp(2rem, 6vw, 4rem);
}
.hero__intro .its { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); }
.hero__name {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 15vw, 11rem);
    line-height: 0.85;
    margin-block: 0.1em;
}
.hero__name .accent { color: var(--accent-strong); }
.hero__tag { font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: var(--ink-soft); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

.hero__portrait {
    position: relative;
    justify-self: center;
    width: min(100%, 380px);
    aspect-ratio: 1 / 1;
}
.hero__portrait::before {
    content: "";
    position: absolute;
    inset: -6% -6% 8% -6%;
    background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%);
    filter: blur(8px);
    z-index: -1;
}
.hero__portrait img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 24px 30px rgba(51, 43, 34, 0.35));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; text-align: center; gap: 1rem; }
    .hero__portrait { order: -1; width: min(72%, 300px); }
    .hero__cta { justify-content: center; }
}

/* Home lower section: video + find me */
.home-lower {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding-bottom: clamp(4rem, 10vw, 8rem);
}
.video-frame {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-md);
}
.video-frame .ratio {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 820px) { .home-lower { grid-template-columns: 1fr; } }

/* ---------- Find me list ---------- */
.findme h2 { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; text-transform: lowercase; }
.findme .rule { margin-inline: 0; }
.socials { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.5rem; }
.socials a {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: var(--ink);
    padding: 0.15rem 0;
    width: max-content;
    text-transform: lowercase;
    transition: color 0.2s ease, transform 0.2s ease;
}
.socials a svg { width: 1.2em; height: 1.2em; fill: currentColor; transition: transform 0.2s ease; }
.socials a:hover { transform: translateX(6px); }
.socials a:hover svg { transform: scale(1.15) rotate(-6deg); }
.socials a[data-c="discord"]:hover { color: #738adb; }
.socials a[data-c="twitter"]:hover { color: #1da1f2; }
.socials a[data-c="x"]:hover      { color: #111; }
.socials a[data-c="spotify"]:hover{ color: #1db954; }
.socials a[data-c="telegram"]:hover{ color: #229ed9; }
.socials a[data-c="youtube"]:hover{ color: #ff0000; }
.socials a[data-c="twitch"]:hover { color: #9146ff; }
.socials a[data-c="lenboi"]:hover { color: var(--accent-strong); }

/* =============================================================
   PAGE HEADER (projects / commissions / about)
   ============================================================= */
.page-header {
    position: relative;
    padding-top: clamp(3rem, 8vw, 5.5rem);
    padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
}

/* =============================================================
   CARD GRID (projects & commissions)
   ============================================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-soft), var(--paper-2));
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
/* placeholder shimmer when no image */
.card__media--empty {
    display: grid;
    place-items: center;
    color: var(--accent-strong);
    font-family: var(--font-display);
    font-size: 2.4rem;
}
.card__media--empty::after {
    content: "☙";
    opacity: 0.55;
}
.card__body { padding: 1.15rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card__title { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.05; }
.card__desc { font-size: 0.98rem; color: var(--ink-soft); flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.tag {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    border: 1px solid rgba(125, 91, 190, 0.18);
}
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.card__meta { font-size: 0.82rem; color: var(--ink-faint); }
.card__link {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s ease;
}
.card__link:hover { gap: 0.7rem; }
/* whole-card link overlay (optional) */
.card__stretch { position: absolute; inset: 0; z-index: 1; }

/* An editable-placeholder ribbon (remove once real content is in) */
.card--placeholder .card__body::before {
    content: "placeholder — edit me";
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* =============================================================
   ABOUT
   ============================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(2rem, 6vw, 4rem);
    align-items: start;
}
.about-portrait {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.about-portrait img {
    width: min(100%, 320px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background: var(--accent-soft);
}
.about-portrait .name { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.about-block + .about-block { margin-top: 2.5rem; }
.about-block h3 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.about-block h3::before {
    content: "";
    width: 22px; height: 3px; border-radius: 3px;
    background: var(--accent-strong);
}
.about-block p { color: var(--ink-soft); max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.8rem; }
.chip {
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    font-size: 0.95rem;
}
@media (max-width: 820px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-portrait { position: static; }
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--line);
    padding-block: 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.footer__socials { display: flex; gap: 1.1rem; }
.footer__socials a {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.footer__socials a svg { width: 20px; height: 20px; fill: currentColor; }
.footer__socials a:hover { transform: translateY(-3px); color: var(--paper); background: var(--accent-strong); border-color: var(--accent-strong); }
.footer__note { font-size: 0.85rem; color: var(--ink-faint); }
.footer__brand { font-family: var(--font-display); font-size: 1.5rem; }

/* =============================================================
   SCROLL REVEAL
   ============================================================= */
/* Visible by default so the site works without JS. Only hidden once the
   inline <head> script marks the document with .js (progressive enhancement). */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-delay="3"] { transition-delay: 0.24s; }
.js .reveal[data-delay="4"] { transition-delay: 0.32s; }
.js .reveal[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero__portrait img { animation: none; }
}

/* =============================================================
   FLOPPY DISK BADGE  (/fdb) — product page
   Desktop: sticky info (left) + auto-scrolling examples (right).
   Mobile: stacks; examples become a normal 2-up grid, no scroll.
   ============================================================= */
.fdb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

/* ---- LEFT: pricing / shipping / ordering (sticky) ---- */
.fdb__info { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.fdb__title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    line-height: 0.92;
    margin-block: 0.15rem 0.6rem;
}
.fdb__lead { color: var(--ink-soft); max-width: 48ch; }

.fdb-block { margin-top: 2rem; }
.fdb-block > h3 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    display: inline-flex; align-items: center; gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.fdb-block > h3::before {
    content: ""; width: 20px; height: 3px; border-radius: 3px;
    background: var(--accent-strong);
}

/* price rows */
.price-list { display: flex; flex-direction: column; gap: 0.6rem; }
.price-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.price-row:hover { border-color: var(--accent); transform: translateX(3px); }
.pr-name { font-weight: 600; }
.pr-note { display: block; font-size: 0.85rem; color: var(--ink-faint); font-weight: 400; }
.pr-cost { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent-strong); white-space: nowrap; }

/* add-ons */
.fdb-addons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* colour stock availability */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
}
.stock-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}
.stock-item:hover { border-color: var(--accent); }
.swatch {
    width: 26px; height: 26px; flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(51, 43, 34, 0.25);
    box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.18);
}
.stock-item__name { font-size: 0.92rem; font-weight: 600; line-height: 1.15; }
.stock-item__status {
    display: block;
    font-size: 0.72rem; font-weight: 400; letter-spacing: 0.03em;
}
.stock-item[data-stock="in"]  .stock-item__status { color: #3f9d5a; }
.stock-item[data-stock="low"] .stock-item__status { color: #c98a2b; }
.stock-item[data-stock="out"] { opacity: 0.55; }
.stock-item[data-stock="out"] .stock-item__status { color: var(--ink-faint); }
.stock-item[data-stock="out"] .stock-item__name { text-decoration: line-through; text-decoration-thickness: 1px; }
.stock-item[data-stock="out"] .swatch { filter: grayscale(0.55); }

.stock-legend {
    display: flex; flex-wrap: wrap; gap: 0.9rem;
    margin-top: 0.75rem;
    font-size: 0.78rem; color: var(--ink-soft);
}
.stock-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.stock-legend i {
    width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.stock-legend .li-in  { background: #3f9d5a; }
.stock-legend .li-low { background: #c98a2b; }
.stock-legend .li-out { background: var(--ink-faint); }

/* shipping table */
.ship-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ship-table th, .ship-table td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line-soft); }
.ship-table th { color: var(--ink); font-weight: 600; }
.ship-table td:last-child, .ship-table th:last-child { text-align: right; white-space: nowrap; }
.ship-table tr:last-child td { border-bottom: 0; }

.fdb-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 0.7rem; }
.fdb-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* ---- RIGHT: auto-scrolling examples ---- */
.fdb__gallery {
    position: relative;
    height: calc(100vh - var(--nav-h) - 3rem);
    min-height: 460px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
}
.fdb__track {
    display: flex;
    flex-direction: column;
    animation: fdb-scroll 45s linear infinite;
    will-change: transform;
}
.fdb__gallery:hover .fdb__track { animation-play-state: paused; }
/* -50% is an exact loop because the second set of shots is an identical
   copy and every shot carries the same margin-bottom (uniform period). */
@keyframes fdb-scroll {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

.fdb-shot {
    position: relative;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, var(--accent-soft), var(--paper-2));
    aspect-ratio: 4 / 3;
}
.fdb-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fdb-shot--empty { display: grid; place-items: center; color: var(--accent-strong); }
.fdb-shot--empty svg { width: 40%; height: 40%; opacity: 0.5; }
.fdb-shot__cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    color: var(--paper);
    background: linear-gradient(to top, rgba(51, 43, 34, 0.78), transparent);
}

@media (max-width: 900px) {
    .fdb { grid-template-columns: 1fr; }
    .fdb__info { position: static; }
    .fdb__gallery {
        height: auto; min-height: 0; overflow: visible;
        -webkit-mask-image: none; mask-image: none;
    }
    .fdb__track {
        animation: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .fdb-shot { margin-bottom: 0; }
    .fdb__dup { display: none; }   /* hide the duplicate marquee set on mobile */
}
@media (max-width: 480px) {
    .fdb__track { grid-template-columns: 1fr; }
}
