/* Fonts (SIL Open Font License, see /assets/fonts/LICENSE.txt) */
@font-face {
    font-family: 'Overpass';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/overpass.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/poppins-800.woff2') format('woff2');
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/roboto.woff2') format('woff2');
}

:root {
    --bg: #e5e5e5;
    --surface: #ffffff;
    --text: #6f6f6f;
    --heading: #7a7a7a;
    --accent: #3fa7d3;
    --accent-dark: #2b8fbb;
    --link: #2f94c0;
    --footer-bg: #373737;
    --footer-text: #8a8a8b;
    --radius: 25px;
    --gutter: clamp(16px, 4vw, 40px);
    --content: 1180px;
    --font-body: 'Overpass', system-ui, sans-serif;
    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-ui: 'Roboto', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.8 var(--font-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 700; }

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--heading);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

p { margin: 0 0 1.2em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.card {
    background: var(--surface);
    border-radius: var(--radius);
}

/* Buttons */

.button {
    display: inline-block;
    padding: 0.55em 1.1em;
    border-radius: 3px;
    background: linear-gradient(var(--accent), var(--accent-dark));
    color: #fff;
    font: 500 15px/1.4 var(--font-ui);
}
.button:hover { text-decoration: none; background: var(--accent-dark); }

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
    width: min(100%, 300px);
    padding: 0.7em 1em;
    border: 2px solid var(--accent);
    color: var(--accent-dark);
    font: 500 14px/1.4 var(--font-ui);
}
.button-outline:hover { text-decoration: none; background: var(--accent); color: #fff; }

.icon { display: inline-flex; width: 1.1em; height: 1.1em; flex: none; }
.icon svg { width: 100%; height: 100%; fill: currentColor; }

/* Header */

.site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 24px var(--gutter);
}

.site-logo img { width: clamp(130px, 18vw, 200px); }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 24px;
    font: 400 15px/1.4 var(--font-ui);
}
.site-nav a:not(.button) { color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"] { color: #fff; text-decoration: none; }
.site-nav .button-support { padding: 0.45em 1em; }

/* Footer */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    font: 400 14px/1.4 var(--font-ui);
    padding: 18px var(--gutter);
}
.site-footer p { margin: 0; }
.site-footer a { color: #e5e5e5; }

/* Hero */

.hero {
    position: relative;
    background: #111 center / cover no-repeat;
    color: #fff;
}

.hero-home {
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 70%), url('../img/hero-stage.webp');
    min-height: 640px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding: 150px var(--gutter) 0;
    overflow: hidden;
}

.hero-text {
    max-width: 600px;
    align-self: center;
    padding-bottom: 120px;
}
.hero-text h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1.12;
    letter-spacing: -0.05em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.hero-text p {
    max-width: 360px;
    font: 500 20px/1.5 var(--font-ui);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
}

.hero-banner { min-height: 350px; }
.hero-truss { background-image: url('../img/bg-truss.webp'); }

/* Monitor with cycling screenshots */

.monitor {
    position: relative;
    flex: none;
    width: min(558px, 100%);
    aspect-ratio: 630 / 401;
    margin-bottom: -2px;
    animation: rise 1s 0.3s ease-out backwards;
}
.monitor-frame { position: relative; width: 100%; }
.monitor-screens {
    position: absolute;
    inset: 6% 4.3% 3.5% 4.1%;
    overflow: hidden;
    background: #000;
}
.monitor-screens img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: screen-cycle 15s infinite backwards;
}
.monitor-screens img:nth-child(2) { animation-delay: 3s; }
.monitor-screens img:nth-child(3) { animation-delay: 6s; }
.monitor-screens img:nth-child(4) { animation-delay: 9s; }
.monitor-screens img:nth-child(5) { animation-delay: 12s; }

@keyframes screen-cycle {
    0% { transform: translateX(100%); }
    4%, 20% { transform: translateX(0); }
    24%, 100% { transform: translateX(-100%); }
}

@keyframes rise {
    from { transform: translateY(100%); }
}

/* Home: features card */

.intro {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 50px auto 0;
    padding: 0 var(--gutter);
}

.features {
    list-style: none;
    margin: 0;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    text-align: center;
}
.features img { width: 64px; margin: 10px auto 18px; }
.features h2 { font-size: 15px; margin-bottom: 0.4em; }
.features p { font-size: 13px; line-height: 1.7; color: #9a9a9a; margin: 0; }

/* Home: showcase rows */

.showcase {
    max-width: var(--content);
    margin: 0 auto;
    padding: 50px var(--gutter) 30px;
}

.showcase-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
}
.showcase-row-flip .showcase-text { order: 2; }
.showcase-text { padding: 0 6%; }
.showcase-text h2 { font-size: 26px; }

.zoom { display: block; cursor: zoom-in; }
.zoom img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }

/* Get started */

.plans {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: -105px auto 0;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.plan {
    display: flex;
    flex-direction: column;
    border-radius: 0;
    background: #eee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
.plan-title {
    margin: 0;
    padding: 18px 20px 42px;
    background: linear-gradient(#5f6a78 0 60px, #6d7989 60px);
    color: #fff;
    text-align: center;
    font: 500 18px/24px var(--font-ui);
}
.plan-features {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 20px 25px;
    font: 400 14px/1.5 var(--font-ui);
    color: #555;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}
.plan-features li:last-child { border-bottom: 0; }
.plan-features .icon { color: #666; }
.plan-action {
    padding: 25px;
    text-align: center;
    background: linear-gradient(#f0f0f0, #e2e2e2);
}

.editions {
    max-width: var(--content);
    margin: 0 auto;
    padding: 60px var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.edition { display: flex; flex-direction: column; }
.edition h2 { font-size: 30px; }
.edition-actions {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.text-link { font-size: 15px; }

/* Contact and 404 */

.contact {
    background: #111 url('../img/bg-crowd.webp') center / cover no-repeat;
    padding: 110px var(--gutter) 90px;
}
.contact-inner {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 25px;
}
.contact-card { border-radius: 0; padding: 40px; }
.contact-card h1 { font-size: 30px; }
.contact-photo { border-radius: 15px; }

.notfound .contact-inner { grid-template-columns: 1fr; max-width: 480px; }
.notfound { min-height: 600px; }

/* Lightbox */

.lightbox {
    max-width: 95vw;
    max-height: 95vh;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #000;
    cursor: zoom-out;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox img { max-width: 95vw; max-height: 95vh; width: auto; }

/* Scroll reveal; only hidden when JS is running and motion is welcome */

@media (prefers-reduced-motion: no-preference) {
    .js .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .js .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .monitor { animation: none; }
    .monitor-screens img { animation: none; }
    .monitor-screens img:not(:first-child) { display: none; }
}

/* Small screens */

@media (max-width: 780px) {
    .hero-home {
        flex-direction: column;
        align-items: center;
        min-height: 0;
        padding-top: 170px;
    }
    .hero-text { padding-bottom: 0; }
    .hero-home { background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2)), url('../img/hero-stage.webp'); }
    .features { grid-template-columns: 1fr; }
    .showcase-row { grid-template-columns: 1fr; gap: 20px; }
    .showcase-row .showcase-text { order: 0; padding: 0; }
    .plans { grid-template-columns: 1fr; margin-top: -150px; }
    .hero-banner { min-height: 300px; }
    .editions { grid-template-columns: 1fr; gap: 60px; }
    .contact { padding-top: 170px; }
    .contact-inner { grid-template-columns: 1fr; max-width: 420px; }
}
