/* Sidebar layout (enno.net, sustainalists.studio): coloured sidebar, outlined rounded boxes, Roboto headings.
   Each site sets its colours in /assets/<site>/style.css */

@font-face {
    font-family: "Roboto";
    src: url("/assets/fonts/roboto-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Roboto";
    src: url("/assets/fonts/roboto-latin-ext.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --yellow: #fffa00;
    --sidebar-bg: var(--yellow);
    --sidebar-text: #333333;
    --sidebar-link: #777;
    --button-bg: #fdf800;
    --timeline-line: var(--yellow);
    --text: #333333;
    --ink: #121212;
    --muted: #666;
    --line: #333333;
    --card: #f5f5f5;
    --accent: #333333;
    --heading-font: "Roboto", system-ui, sans-serif;
    --sidebar: 220px;
    --radius: 25px;
    --page-bg: #ffffff;
    --box-bg: #ffffff;
    --heading-color: inherit;
    --button-text: #1b1b1b;
    --font-size: 16px;
    --heading-scale: 1;
    --card-hover: #fdf800;
}

body.layout-sidebar { color: var(--text); background: var(--page-bg); font-size: var(--font-size); }
.layout-sidebar a { color: inherit; }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 48px 30px 24px;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.55;
    overflow-y: auto;
    z-index: 10;
}
.sidebar-logo img { width: 80px; height: auto; margin-bottom: 28px; }
.sidebar-name { font-weight: 700; margin: 0 0 24px; }
.sidebar-name strong { font-weight: 700; }
.sidebar-text p { margin: 0 0 14px; }
.sidebar-text a { color: var(--sidebar-link); text-decoration: none; }
.sidebar-text a:hover { text-decoration: underline; }
.sidebar-phone { margin-top: 18px; }
.sidebar-phone a { text-decoration: none; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; text-align: center; }
.sidebar-logos { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.sidebar-logos img { width: 40px; height: 40px; object-fit: contain; }
.sidebar-copy { font-size: 11px; opacity: 0.75; margin: 0; }

/* ---------- Main column ---------- */
.main {
    margin-left: var(--sidebar);
    padding: 40px 24px 80px;
    max-width: calc(var(--sidebar) + 960px);
}
.main > * { max-width: 920px; }

.section { margin-bottom: 72px; }
.section-title {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 500;
    font-size: calc(32px * var(--heading-scale));
    color: var(--heading-color);
    text-align: right;
    margin: 0 0 8px;
}
.box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 40px;
    background: var(--box-bg);
}

/* Intro */
.intro-box { display: grid; padding: 0; overflow: hidden; }
.intro-box.has-image { grid-template-columns: 1.35fr 1fr; }
.intro-text { padding: 36px 40px; }
.intro-text h1 { font-size: calc(41px * var(--heading-scale)); font-weight: 600; margin: 0; color: var(--heading-color); }
.intro-subtitle { font-family: var(--heading-font); color: var(--heading-color); font-size: calc(25px * var(--heading-scale)); font-weight: 600; line-height: 1.25; margin: 6px 0 24px; }
.intro-text .prose { font-family: var(--heading-font); font-size: calc(var(--font-size) + 1px); font-weight: 500; line-height: 1.5; }
.intro-image img { width: 100%; height: 100%; object-fit: cover; }

/* Showreel */
.section-video .video { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.section-video .video iframe { border-radius: 0; }

/* Portfolio – filters as plain words (the active one bold), like the old site */
.filters { display: flex; flex-wrap: wrap; gap: 0 0.8rem; margin: 8px 0 18px; }
.filters button {
    font: inherit;
    font-size: 16px;
    padding: 10px 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.75;
}
.filters button:hover { opacity: 1; }
.filters button.is-active { font-weight: 700; opacity: 1; }

.layout-sidebar .work-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.layout-sidebar .work-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    color: #111827;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.25s;
}
/* Hover: card lifts, turns the highlight colour, a bar slides in at the bottom, photo zooms */
.layout-sidebar .work-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: var(--card-hover);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s;
}
.layout-sidebar .work-card:hover,
.layout-sidebar .work-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.14);
    background-color: var(--card-hover);
}
.layout-sidebar .work-card:hover::after,
.layout-sidebar .work-card:focus-visible::after { transform: scaleX(1); }
.layout-sidebar .work-card[hidden] { display: none; }
.layout-sidebar .work-card-thumb { aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.layout-sidebar .work-card-thumb img {
    width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; aspect-ratio: auto;
    transition: transform 0.35s;
}
.layout-sidebar .work-card:hover .work-card-thumb img { transform: scale(1.08); }
.work-card-meta {
    background: var(--ink);
    color: #f5f5f5;
    font-size: 12.8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 0.9rem;
    line-height: 1.4;
}
.work-card-content { padding: 0.8rem 0.9rem; }
.work-card-title { display: block; font-size: 16.8px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; transition: color 0.2s; }
.work-card-excerpt { margin: 0 0 0.6rem; font-size: 14.4px; line-height: 1.5; color: #4b5563; }
@media (prefers-reduced-motion: reduce) {
    .layout-sidebar .work-card, .layout-sidebar .work-card-thumb img, .layout-sidebar .work-card::after { transition: none; }
}

.load-more-wrap { text-align: center; margin: 30px 0; }
.load-more, .contact-form button {
    font: inherit;
    font-weight: 500;
    border: 0;
    border-radius: 16px;
    padding: 10px 26px;
    cursor: pointer;
}
.load-more { background: #fff; color: #000; border-radius: 4px; padding: 10px 22px; font-size: 14px; opacity: 0.95; }
.load-more:hover { opacity: 1; }
.load-more[hidden] { display: none; }

/* List of productions */
.accordion { padding: 20px 40px; }
.accordion details { border-bottom: 1px solid #e5e5e5; }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
    cursor: pointer;
    font-weight: 700;
    padding: 12px 0;
    list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before { content: "+"; display: inline-block; width: 1.2em; font-weight: 400; }
.accordion details[open] summary::before { content: "–"; }
.accordion .prose { max-width: none; padding-bottom: 12px; font-size: 14px; }
.accordion ul { margin: 0; padding-left: 1.4em; }
.accordion li { margin-bottom: 4px; }

/* Education timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    bottom: 10px;
    width: 4px;
    margin-left: -2px;
    background: var(--timeline-line);
    border-radius: 2px;
}
.timeline li { position: relative; display: flex; align-items: center; margin-bottom: 36px; }
.timeline li:last-child { margin-bottom: 0; }
.timeline-when {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #000;
    color: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    z-index: 1;
}
.timeline-body { width: calc(50% - 44px); }
.timeline li:nth-child(odd) .timeline-body { margin-right: auto; text-align: right; }
.timeline li:nth-child(even) .timeline-body { margin-left: auto; }
.timeline-body h3 { font-size: 19px; font-weight: 500; margin: 0 0 6px; }
.timeline-body p { margin: 0; font-size: 14px; color: #555; }

/* Sustainalists feature */
.feature-box .prose { max-width: none; margin-bottom: 20px; }
.feature-image { width: 100%; border-radius: 12px; }

/* Contact */
.contact-box { padding: 40px 15%; }
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 2px; font-size: 15px; }
.contact-form input, .contact-form textarea {
    font: inherit;
    border: 0;
    border-bottom: 1px solid #999;
    padding: 8px 10px;
    background: transparent;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: #000; }
.contact-form button {
    background: var(--button-bg);
    color: var(--button-text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    margin-top: 8px;
}
.contact-form .hp { position: absolute; left: -9999px; }

/* Work item page */
.layout-sidebar .work-item { max-width: 920px; }
.layout-sidebar .work-item h1 { font-family: var(--heading-font); font-weight: 600; }
.back-link { display: inline-block; margin-bottom: 16px; text-decoration: none; font-size: 14px; }

/* ---------- Tablet & phone ---------- */
@media (max-width: 1100px) {
    .layout-sidebar .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 20px 16px;
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 16px;
    }
    .sidebar-logo img { width: 56px; margin: 0; }
    .sidebar-name { margin: 0; align-self: center; }
    .sidebar-text, .sidebar-phone, .sidebar-bottom { grid-column: 1 / -1; }
    .sidebar-text { margin-top: 12px; }
    .sidebar-bottom { padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
    .sidebar-logos { margin: 0; }

    .main { margin-left: 0; padding: 24px 16px 56px; }
    .section { margin-bottom: 48px; }
    .section-title { font-size: 26px; }
    .box, .intro-text { padding: 24px 20px; }
    .intro-box { padding: 0; }
    .intro-box.has-image { grid-template-columns: 1fr; }
    .intro-image { order: -1; }
    .intro-image img { height: 340px; object-position: center 30%; }
    .intro-text h1 { font-size: 34px; }
    .intro-subtitle { font-size: 21px; }
    .layout-sidebar .work-grid { grid-template-columns: 1fr; }
    .accordion { padding: 12px 20px; }
    .contact-box { padding: 24px 20px; }

    /* Timeline: line on the left, everything on one side */
    .timeline::before { left: 26px; }
    .timeline li { display: block; padding-left: 72px; min-height: 52px; }
    .timeline-when { left: 26px; top: 0; }
    .timeline li .timeline-body { width: auto; margin: 0; text-align: left !important; }
}

/* Team rows (photo + text, alternating sides) */
.team { display: grid; gap: 20px; }
.team-member {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ececec;
    min-height: 320px;
}
.team-member .team-photo { order: 2; }
.team-member:nth-child(even) .team-photo { order: -1; }
.team-photo { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.team-text { padding: 40px; text-align: center; align-self: center; font-size: 14px; color: #555; }
.team-text h3 { font-size: 24px; font-weight: 400; margin: 0 0 10px; color: #222; }
.team-text h3 a { text-decoration: none; }
.team-text p { margin: 0; }
@media (max-width: 800px) {
    .team-member { grid-template-columns: 1fr; }
    .team-member .team-photo { order: -1; }
    .team-text { padding: 24px 20px; }
}

/* Photo gallery (masonry): the server fills the columns; on small screens they pair up */
.masonry { display: grid; grid-template-columns: repeat(var(--columns, 4), 1fr); gap: 10px; align-items: start; }
.masonry-column { display: grid; gap: 10px; }
.masonry a { display: block; }
.masonry img { width: 100%; height: auto; border-radius: 4px; }
.masonry a:hover img { opacity: 0.85; }
@media (max-width: 800px) { .masonry { grid-template-columns: repeat(2, 1fr); } }

/* Contact form status message */
.form-status { padding: 12px 16px; border-radius: 10px; margin: 0 0 20px; }
.form-status.is-ok { background: #e7f6ec; color: #135c2b; }
.form-status.is-error { background: #fdecec; color: #8a1c1c; }

/* ---------- Style options per section (set in the admin panel) ---------- */
.section[data-has-bg] .box { background: var(--section-bg); }
.section[data-has-bg]:not(:has(.box)) { background: var(--section-bg); padding: 24px; border-radius: var(--radius); }
.section[data-has-text], .section[data-has-text] .box,
.section[data-has-text] .section-title, .section[data-has-text] h1,
.section[data-has-text] .intro-subtitle, .section[data-has-text] h3 { color: var(--section-text); }

.section[data-size="small"] .prose, .section[data-size="small"] .timeline-body p { font-size: 0.875em; }
.section[data-size="large"] .prose, .section[data-size="large"] .timeline-body p { font-size: 1.15em; }
.section[data-size="xlarge"] .prose, .section[data-size="xlarge"] .timeline-body p { font-size: 1.35em; }

.section[data-align="left"] .prose { text-align: left; }
.section[data-align="center"] .prose, .section[data-align="center"] .intro-text { text-align: center; }
.section[data-align="right"] .prose, .section[data-align="right"] .intro-text { text-align: right; }

.section[data-title-align="left"] .section-title { text-align: left; }
.section[data-title-align="center"] .section-title { text-align: center; }
.section[data-title-align="right"] .section-title { text-align: right; }

/* Image side: intro (left/right), feature (top/bottom), team (left/right/alternate) */
.section-intro[data-image-side="left"] .intro-box.has-image { grid-template-columns: 1fr 1.35fr; }
.section-intro[data-image-side="left"] .intro-image { order: -1; }
.feature-box { display: flex; flex-direction: column; }
.section-feature[data-image-side="top"] .feature-box > a,
.section-feature[data-image-side="top"] .feature-image { order: -1; margin-bottom: 20px; }
.section-team[data-image-side="left"] .team-member .team-photo { order: -1; }
.section-team[data-image-side="right"] .team-member .team-photo { order: 2; }
