/* =========================================================
   3D Renders — sliding gallery (template head) + story
   Palette consistent with the corporate direction
   Display type: Josefin Sans (same as the home page)
   ========================================================= */
:root {
    --char: #1f1f1f;
    --tan: #d2b48c;
    --tan-deep: #a8845a;
    --ink: #2b2b2b;
    --muted: #8a8a8a;
    --card: #e7e7e7;
    --card-line: #d6d6d6;
    --display: "Josefin Sans", sans-serif;

    --row-h: 350px;
    --tile-gap: 12px;
}

/* Page grows past one screen; body scrolls */
.container {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
}

.content-container {
    min-height: 100vh;
    height: auto;
    align-items: flex-start;
    background-color: #ececec;
}

/* Sidebar stays fixed in the viewport while the page scrolls */
.cc-sidebar {
    position: fixed;
    top: 10px;
    left: 8px;
    height: calc(100vh - 20px);
    flex-shrink: 0;
    z-index: 10;
}

/* ----- Main column ----- */
/* Offset by sidebar width (70px) + column-gap (10px) since the
   fixed sidebar no longer takes up space in the flex flow */
.renders-main {
    width: calc(100% - 80px);
    margin-left: 80px;
    display: flex;
    flex-direction: column;
    padding-top: 8px;
}

/* ===== Gallery / marquee ===== */
.gallery {
    display: flex;
    flex-direction: column;
    row-gap: var(--tile-gap);
    width: 100%;
}

.marquee {
    height: var(--row-h);
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    height: 100%;
    will-change: transform;
}

.row-a .marquee-track {
    animation: scroll-left 60s linear infinite;
}

.row-b .marquee-track {
    animation: scroll-right 75s linear infinite;
}

/* Pause when the visitor hovers the gallery */
.gallery:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

/* ----- Tiles -----
   Height is fixed by the row; width is left to "auto" so each
   image keeps its own natural aspect ratio — landscape photos
   render wide, portrait photos render narrow. */
.tile {
    display: block;
    height: 100%;
    width: auto;
    max-width: 640px;
    margin-right: var(--tile-gap);
    border-radius: 5px;
    background-color: #d8d8d8;
    object-fit: cover;
    flex-shrink: 0;
    filter: grayscale(0.2);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.tile:hover {
    filter: grayscale(0);
    transform: translateY(-4px);
}

/* ===== Heading ===== */
.render-head {
    padding: 34px 6px 0;
}

.render-title {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-size: 82px;
    line-height: 0.95;
    letter-spacing: -1px;
    color: var(--ink);
}

.render-sub {
    display: inline-block;
    margin-top: 6px;
    font-family: "Roboto Mono", monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--tan-deep);
}

/* ===== Story: the beginning ===== */
.story {
    display: flex;
    gap: 14px;
    align-items: stretch;
    padding: 24px 6px 40px;
}

.story-text {
    flex: 1 1 55%;
    background-color: var(--card);
    border: 1px solid var(--card-line);
    border-radius: 28px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-eyebrow {
    font-family: "Roboto Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--tan-deep);
}

.story-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.1;
    color: var(--ink);
    margin: 14px 0 22px;
}

.story-p {
    font-size: 15px;
    line-height: 1.9;
    color: #5f5f5f;
    max-width: 96%;
}

.story-p + .story-p {
    margin-top: 16px;
}

.story-hl {
    font-weight: 600;
    color: var(--ink);
}

.story-accent {
    color: var(--tan-deep);
    font-weight: 600;
    border-bottom: 1px solid var(--tan);
    padding-bottom: 1px;
}

.story-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    background-color: var(--char);
    color: #f2f0eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 16px 26px;
    border-radius: 12px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.story-cta i {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.story-cta:hover {
    background-color: var(--tan);
    color: var(--char);
    transform: translateY(-2px);
}

.story-cta:hover i {
    transform: translateX(4px);
}

.story-media {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
}

.story-img {
    flex: 1;
    min-height: 360px;
    border-radius: 28px;
    border: 1px solid var(--card-line);
    background-color: #d8d8d8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.story-caption {
    margin-top: 12px;
    text-align: right;
    font-family: "Roboto Mono", monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--muted);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .row-a .marquee-track,
    .row-b .marquee-track {
        animation: none;
    }
}

@media (max-width: 1024px) {
    .story { flex-direction: column; }
}

@media (max-width: 1024px) {
    /* undo the fixed sidebar; root stylesheet turns it into a top nav */
    .cc-sidebar {
        position: static;
        height: auto;
    }

    .renders-main {
        width: 100%;
        margin-left: 0;
        padding-top: 0;
    }

    .marquee { height: 200px; }
    .gallery .tile { max-width: 86vw; }

    .render-head { padding: 24px 4px 0; }
    .render-title { font-size: 44px; letter-spacing: 0; }

    .story { padding: 18px 2px 28px; }
    .story-text { padding: 28px 22px; }
    .story-title { font-size: 27px; }
    .story-p { font-size: 14px; max-width: 100%; }
    .story-cta { padding: 14px 22px; font-size: 14px; }
    .story-img { min-height: 240px; }
}
