@import url('https://fonts.googleapis.com/css2?family=Share:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    /* --- Base Colors --- */
    --primary-bg: #f9f6f2;
    /* soft off-white */
    --hero-bg: #1f3a93;

    --card-bg: #f9f9f9;
    /* clean card background */
    --hero-color: #fbeedd;
    /* light orange */
    --border-color: #d1cfc8;
    /* subtle warm border */
    --text-color: #3b3a36;
    /* dark gray text */
    --heading-color: #1a1a18;
    /* deep gray/black for headings */
    --primary-color: #f6cf33;
    --primary-light: #f0ebe6;
    /* very light background variant */
    --primary-inverted: #ffffff;
    /* inverted for dark text on buttons */
    --bg-dark: rgb(9 7 9 / 80%);
    /* --- Accent Colors --- */
    --accent-color: #2e6ef7;
    /* vibrant blue */
    --positive-accent: #23815c;
    /* greenish positive */

    /* --- Buttons --- */
    --button-primary-bg: #f0ebe6;
    --button-primary-hover-bg: #e0dad1;

    /* --- Misc --- */
    --border-radius: 8px;

    /* --- Ribbon Colors --- */
    --ribbon-1: #2e6ef7;
    --ribbon-2: #9b6df7;
    --ribbon-3: #f7d84c;
    --ribbon-4: #f26363;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.illustration {
    width: 100%;
    display: block;
}

.share-regular {
    font-family: "Share", sans-serif;
    font-weight: 400;
    font-style: normal;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--primary-bg);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: transparent;
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: var(--bg-dark);
    backdrop-filter: blur(10px);
}

header div.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-bg);
    text-decoration: none;
    position: relative;
}

.logo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg,
            var(--ribbon-1),
            var(--ribbon-2),
            var(--ribbon-3),
            var(--ribbon-4));
    border-radius: 4px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 1.4em;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-light);
    font-weight: 600;
    font-size: x-large;
    position: relative;
    transition: color 0.3s ease;
    line-height: 2px;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

nav ul li:nth-child(4n + 1) a::after {
    background: var(--ribbon-1);
}

nav ul li:nth-child(4n + 2) a::after {
    background: var(--ribbon-2);
}

nav ul li:nth-child(4n + 3) a::after {
    background: var(--ribbon-3);
}

nav ul li:nth-child(4n + 4) a::after {
    background: var(--ribbon-4);
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    opacity: 1;
}

.hero {
    background: var(--hero-bg);
    color: var(--hero-color);
    padding: 180px 0 120px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    max-width: 900px;
}

.hero h1 span {
    position: relative;
    display: inline-block;
    z-index: 1;
    text-shadow: var(--hero-bg) 0px 0px 10px;
}

span.small-logo {
    position: relative;
    display: inline-block;
    z-index: 1;
}

span.small-logo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.25em;
    width: 100%;
    height: 3px;
    border-radius: 4px;
    opacity: 1;
    background: linear-gradient(90deg,
            var(--ribbon-1) 0%,
            var(--ribbon-1) 25%,
            var(--ribbon-2) 25%,
            var(--ribbon-2) 50%,
            var(--ribbon-3) 50%,
            var(--ribbon-3) 75%,
            var(--ribbon-4) 75%,
            var(--ribbon-4) 100%);
    z-index: -1;
}

.hero p {
    font-size: 1.6rem;
    max-width: 750px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
    border: 1px solid var(--border-color);
}

.button-primary {
    background: var(--button-primary-bg);
    color: var(--text-color);
}

.button-primary:hover {
    background: var(--button-primary-hover-bg);
}

.button-secondary {
    background: var(--bg-dark);
    color: var(--hero-color);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.button-secondary:hover {
    background: var(--primary-light);
    color: var(--hero-bg);
}

section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 1rem 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    color: var(--text-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.our-pledge-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.our-pledge-list li {
    padding: 0.5rem 0 0.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.our-pledge-list li:before {
    content: "✓";
    color: var(--positive-accent);
    font-size: 2rem;
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.our-pledge-list li strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.our-pledge-list li p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.our-pledge-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.flex-list {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.big-link {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.big-link a {
    font-size: 2rem;
    text-decoration: none;
}

.big-link a:hover {
    text-decoration: underline;
}

.big-link span {
    font-size: 1.25rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 4rem;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.25rem;
    border-bottom: solid #1a1a18;
    flex-grow: 0;
}

.profile-title {
    flex-grow: 0;

    font-weight: 600;
}

.profile-bio {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    flex-grow: 1;
}

.profile-links {
    flex-grow: 0;
}

.final-cta {
    background: var(--hero-bg);
    text-align: center;
    border-bottom: none;
}

.final-cta>.container>.section-title {
    color: var(--primary-bg);
}

.final-cta>.container>.section-subtitle {
    color: var(--primary-bg);
}

footer {
    background: var(--primary-bg);
    color: #8b949e;
    text-align: center;
    padding: 3rem 0;
}

/* --- NEW "HOW IT WORKS" SECTION STYLES --- */

.how-it-works-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.video-container {
    width: 100%;
}

#video-preview-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

#video-preview-wrapper:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

#video-preview {
    display: block;
    width: 100%;
    height: auto;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(13, 17, 23, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    transition: all 0.3s ease;
    opacity: 0.8;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
    /* So it doesn't interfere with the click on the wrapper */
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    color: var(--primary-inverted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 5px;
}

.step-number div {
    padding: 3px 0 0 1px;
}

.step-content h3 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-size: 1.4em;
    font-weight: 700;
}

.step-content p {
    color: var(--text-color);
    line-height: 1.6;
}

.mestrio-link {
    color: var(--hero-bg);
    text-decoration: none;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 820px) {
    .how-it-works-layout {
        grid-template-columns: 1fr;
        /* Stack columns on smaller screens */
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    nav {
        display: none;
    }
}

footer p {
    font-size: 1.5rem;
}

section.notes {
    font-size: small;
    padding-left: 2em;
    padding: 1em;
}

/* Alternative download link below main button */
.alt-download-link {
    display: block;
    font-size: 1em;
    color: #e0eaff;
    margin-top: 0.5em;
    text-align: center;
    font-weight: 500;
    text-decoration: none;
}

.alt-download-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.other-downloads {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
    justify-content: center;
}
