@import "modules.css";

/* =========================================
   Global / Reset / Typography
   ========================================= */

/* base font for all elements */
* {
    box-sizing: border-box;
    font-family: var(--main-font);
    margin: 0;
    padding: 0;
}

/* body colours */
body {
    background-color: var(--main-color);
    color: var(--text-color);
}

/* links & list items (kept conservative to preserve original intent) */
a:not([href="#page-top"]) {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: all 200ms ease;
    font-size: var(--font-size-body);
}

a:hover,
a:focus {
    opacity: 1;
    color: var(--text-color);
}

/* non-decorative list reset */
li {
    list-style: none;
    opacity: 0.7;
    transition: all 200ms ease;
}

/* buttons */
button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* paragraphs & headings */
p {
    font-size: var(--font-size-body);
    font-weight: 400;
    text-wrap: pretty;
}

h2 {
    font-size: var(--font-size-heading);
    margin-bottom: 1rem;
    font-weight: 700;
}

h3 {
    font-size: 20px;
    font-weight: 700;
}

/* screen-reader only helper */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================
   Header
   ========================================= */
/*----- Header -----*/

header {
    position: sticky;
    background-color: var(--main-color);
    top: 0;
    z-index: 9999;
}

/* header container padding */
header .container {
    padding: 2rem 1rem 0.5rem 1rem;
}

/* top row alignment */
header .container .col-12 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* header nav placement */
header .container .col-12 nav {
    position: relative;
    margin-left: auto;
}

/* right-align nav list items in header top row */
header .container .col-12 nav ul li {
    white-space: nowrap;
    text-align: right;
}

/* language switcher in header (desktop) */
header .container .col-12 .lang-switcher {
    margin-left: auto;
    margin-right: 2rem;
}

/* language link active state */
header .container .col-12 .lang-switcher a.active {
    opacity: 1;
    font-weight: 700;
}

/* language list inside header */
header .container .col-12 .lang-switcher ul {
    margin: 0;
    padding: 0;
    display: flex;
}

header .container .col-12 .lang-switcher ul li:first-child::after {
    content: "/";
    display: inline-block;
    margin-inline: 0.5rem;
}

/* mobile language switcher hidden by default */
header .container .col-12 .lang-switcher.mobile {
    display: none;
    margin: 0;
}

/* mobile lang switcher link divider */
header .container .col-12 .lang-switcher.mobile a:first-child::after {
    content: "/";
    display: inline-block;
    margin-inline: 0.5rem;
}

/* header images sizing */
header .container img {
    height: 60px;
    display: block;
}

/* navbar toggler focus rule */
header .container .navbar-toggler:focus {
    box-shadow: none;
}

/* navbar toggler image/svg size */
header .container .navbar-toggler img,
header .container .navbar-toggler svg {
    height: 36px;
}

/* Fullscreen header overlay (hidden by default) */
/* Use both modern :has() option and a fallback class (header.menu-open) */
header::before {
    content: "";
    position: fixed;
    inset: 0;
    background-color: var(--secondary-color);
    opacity: 0;
    /* hidden by default */
    pointer-events: none;
    /* does NOT block clicks */
    z-index: -1;
    /* behind header content */
    transition: opacity 0.4s ease;
}

/* Modern: show overlay when nav ul has .open (modern browsers supporting :has) */
@supports selector(:has(*)) {
    header:has(nav ul.open)::before {
        opacity: 1;
    }
}

/* Fallback: if your JS toggles class on header (header.menu-open) use this */
header.menu-open::before {
    opacity: 1;
}

/* =========================================
   Navbar toggler + menu icon lines
   ========================================= */
/*----- Menu / Toggler -----*/

/* toggler generic style (global) */
.navbar-toggler {
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* svg lines in the menu toggle */
.menu-toggle .line {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* transform origins for the hamburger lines */
.menu-toggle .top {
    transform-origin: 3px 6px;
    /* pivot from left */
}

.menu-toggle .bottom {
    transform-origin: 7px 18px;
}

/* menu-open state transforms */
.menu-open .top {
    transform: rotate(45deg) translate(1px, -2px);
}

.menu-open .middle {
    opacity: 0;
}

.menu-open .bottom {
    transform: rotate(-45deg) translate(3px, -1px);
}

/* nav list (mobile menu) - collapsed by default */
header nav ul {
    position: absolute;
    top: 8px;
    right: 6px;
    padding-inline: 0;
    gap: 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s;
}

/* when menu is open, allow larger max height */
header nav ul.open {
    opacity: 1;
    max-height: 500px;
}

/* =========================================
   Main / Content sections
   ========================================= */
/*----- Main / Content -----*/

main .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 85svh;
}

/* flex for content column */
main .content,
main .content .row,
main .content .col-12 {
    display: flex;
    flex-direction: column;
}

main .content .row {
    justify-content: center;
}


/* text content area */
main .content .text-content {
    z-index: 10;
    max-width: 70ch;
    margin-block: 3rem;
}

/* list style inside text-content */
main .content .text-content li {
    list-style-type: disc;
    opacity: 1;
    margin-bottom: 0.2rem;
}

/* inline link styling */
main .content .text-content a.inline-link {
    display: block;
    margin-left: 1rem;
    max-width: fit-content;
}

main .content .text-content a.inline-link:first-child {
    margin-top: 1rem;
}

/* hide pseudo-element after for these inline links (keeps original intent) */
main .content .text-content a.inline-link::after {
    display: none !important;
}

/* add external-link icon for links that are not .mail */
main .content .text-content a:not(.mail)::after {
    content: url("../assets/logos/open-in-new.svg");
    display: inline-block;
    height: var(--font-size-body);
    width: var(--font-size-body);
    position: relative;
    top: 5px;
    left: 5px;
}

/* divider pseudo-element for content sections that don't have .no-line */
main .content:not(.no-line)::after {
    content: "";
    position: absolute;
    /* Control spacing here */
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: white;
    opacity: 0.2;
}

/* ----------------------------------------- */
/* Shared rules: videos and background images */
/* ----------------------------------------- */
main .content video,
main .content .background-image {
    display: block;
    object-fit: cover;
    object-position: center;
    opacity: 0.2;
    width: 100%;
    transition: opacity 0.4s ease;
}

/* Reset animation style */
main .content video.reset-video {
    opacity: 0;
    transition: opacity 1.2s ease;
}

/* ----------------------------------------- */
/* Background image overrides (elsewhere)     */
/* ----------------------------------------- */
main .content .background-image {
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
}

/* ----------------------------------------- */
/* Animation container: consistent height     */
/* ----------------------------------------- */
.animation-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: -17.5%;
}

.animation-container::after {
    scale: 1.0;
    content: "";
    position: absolute;
    inset: 0;
    /* global 92%+ browsers support */
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 50%, var(--main-color) 92.5%, var(--main-color) 100%);
}

/* Force videos to fill the container height */
.animation-container video {
    width: 100%;
    height: 100%;
}

/* =========================================
   Contact & Footer
   ========================================= */
/*----- Contact -----*/

#contact {
    background-color: var(--secondary-color);
    padding-block: 3rem;
}

#contact .text-content .mail {
    margin-bottom: 2rem;
}

#contact .text-content .mail p {
    margin-bottom: 0.1rem;
}

#contact .text-content .mail a {
    opacity: 1;
    text-decoration: underline;
    display: block;
}

/*----- Footer -----*/

footer {
    padding-block: 2rem;
    background-color: var(--tertiary-color);
}

footer nav ul {
    padding-inline: 0;
    gap: 1rem;
    height: 36px;
    margin-left: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

footer nav ul img {
    height: 18px;
}

footer nav ul li a img.changeventureslogo {
    height: 25px;
    margin-top: 5px;
}

/* ----- Utility / Components ----- */

/* article scroll margin (anchors) */
article {
    scroll-margin-top: 116px;
}

/* =========================================
   Responsive media queries (merged & cleaned)
   ========================================= */
/*----- Responsive: up to 992px -----*/
@media (max-width: 992px) {
    :root {
        --font-size-body: 14px;
        --font-size-heading: 18px;
    }

    main .content {
        min-height: 90svh;
    }

    /* header images slightly smaller */
    header .container img {
        height: 36px;
    }

}

/*----- Responsive: up to 600px -----*/
@media (max-width: 600px) {

    /* header smaller icon sizes */
    header .container .navbar-toggler img,
    header .container .navbar-toggler svg,
    header .container img {
        height: 24px;
    }

    /* show the mobile language switcher and hide the desktop one */
    header .container .col-12 .lang-switcher.mobile {
        margin-top: 1rem;
        display: block !important;
    }

    header .container .col-12 .lang-switcher {
        display: none !important;
    }

    /* smaller scroll margin for anchors */
    article {
        scroll-margin-top: 92px;
    }

    .animation-container {
        margin-bottom: -25%;
    }
}

/* =========================================
   Transitions & small helpers
   ========================================= */

/* image outlines to reduce anti-alias halo (kept from your file) */
.mirror-frame img,
.mirror-frame picture img,
.mirror-frame video {
    outline: 1px solid rgba(0, 0, 0, 0.1);
    transition: opacity 1.2s ease, transform 1.2s ease;
}