/*
Theme Name: rosa
Author: Helmut
Version: 1.0
Text Domain: rosa
*/


/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */

:root {

    /* Colors */
    --color-red: #ff5c5c;
    --color-pink: #fdecef;
    --color-green: #dfe8aa;
    --color-black: #0b0b0b;
    --color-white: #ffffff;

    /* Typography */
    --font-main: "Noto Sans", Arial, sans-serif;

    --font-size-base: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    --font-size-small: 0.9rem;

    --font-size-h1: clamp(2.8rem, 7vw, 5.8rem);
    --font-size-h2: clamp(2rem, 4vw, 3.5rem);
    --font-size-h3: clamp(1.4rem, 2vw, 2rem);

    --line-base: 1.5;
    --line-tight: 1.05;

    /* Layout */
    --container: 1180px;
    --container-narrow: 760px;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* UI */
    --focus: 3px solid black;
}


/* =========================================================
   2. FONTS (LOKAL)
   ========================================================= */

@font-face {
    font-family: "Noto Sans";
    src: url("assets/fonts/noto-sans-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans";
    src: url("assets/fonts/noto-sans-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans";
    src: url("assets/fonts/noto-sans-800.woff2") format("woff2");
    font-weight: 800;
    font-display: swap;
}


/* =========================================================
   3. BASE
   ========================================================= */

html {
    font-size: 100%;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: var(--line-base);
    color: var(--color-black);
    background: var(--color-white);
}

h1, h2, h3 {
    font-weight: 800;
    line-height: var(--line-tight);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p + p {
    margin-top: 1em;
}

a {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

:focus-visible {
    outline: var(--focus);
    outline-offset: 3px;
}


/* =========================================================
   4. LAYOUT
   ========================================================= */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-lg) 0;
}

.section--red {
    background: var(--color-red);
    color: var(--color-white);
}

.section--green {
    background: var(--color-green);
}

.section--pink {
    background: var(--color-pink);
}


/* =========================================================
   5. HEADER
   ========================================================= */

.site-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
}

.site-logo img {
    width: 220px;
}
.site-logo svg {
    width: clamp(160px, 20vw, 260px);
    height: auto;
}

.site-logo svg * {
    fill: var(--color-red); /* optional */
}
.main-menu {
    display: flex;
    gap: var(--space-md);
    margin-left: auto;
}

.main-menu a {
    font-weight: 700;
}

.donate-button {
    background: var(--color-red);
    color: var(--color-white);
    padding: 10px 14px;
    font-weight: 700;
}

/* =========================================================
   5. HEADER / NAVIGATION
   ========================================================= */

.site-header {
    background: var(--color-white);
    position: relative;
    z-index: 100;
}

.header-inner {
    min-height: 110px;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 110;
}

.site-logo img {
    width: clamp(150px, 22vw, 260px);
    height: auto;
}

.site-nav {
    margin-left: auto;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.main-menu a {
    font-weight: 800;
    text-decoration: none;
}

.main-menu a:hover,
.main-menu a:focus-visible {
    text-decoration: underline;
}

.donate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-red);
    color: var(--color-white);
    padding: 0.8rem 1rem;
    font-weight: 800;
    text-decoration: none;
}

.donate-button:hover,
.donate-button:focus-visible {
    background: var(--color-black);
    color: var(--color-white);
}

.donate-button--mobile {
    display: none;
}

.nav-toggle {
    display: none;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 900px) {

    body.nav-is-open {
        overflow: hidden;
    }

    .header-inner {
        min-height: 82px;
        justify-content: space-between;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 100;
        background: var(--color-pink);
        padding: 110px var(--space-md) var(--space-md);
        margin-left: 0;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-1rem);
        transition:
            opacity 180ms ease,
            visibility 180ms ease,
            transform 180ms ease;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .main-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }

    .main-menu a {
        font-size: clamp(2rem, 9vw, 4rem);
        line-height: 1;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        position: relative;
        z-index: 110;
        font-weight: 800;
        color: var(--color-black);
    }

    .nav-toggle__icon {
        width: 32px;
        height: 22px;
        position: relative;
        display: inline-block;
    }

    .nav-toggle__icon::before,
    .nav-toggle__icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 32px;
        height: 3px;
        background: currentColor;
        transition: transform 180ms ease, top 180ms ease;
    }

    .nav-toggle__icon::before {
        top: 4px;
    }

    .nav-toggle__icon::after {
        top: 15px;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
        top: 10px;
        transform: rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
        top: 10px;
        transform: rotate(-45deg);
    }

    .donate-button--desktop {
        display: none;
    }

    .donate-button--mobile {
        display: inline-flex;
        margin-top: var(--space-md);
    }
}


/* =========================================================
   LANGUAGE SWITCH
   ========================================================= */

.language-switch {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 20px;
}

.lang-item {
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.6;
}

.lang-item:hover,
.lang-item:focus-visible {
    opacity: 1;
    text-decoration: underline;
}

.lang-item.is-active {
    opacity: 1;
}

/* optional Divider wie im Design */
.lang-item + .lang-item::before {
    content: "/";
    margin-right: 6px;
    opacity: 0.5;
}

/* =========================================================
   6. HERO
   ========================================================= */

.hero {
    min-height: 500px;
    background: var(--color-pink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}


/* =========================================================
   HERO BLOCK
   ========================================================= */
/* =========================================================
   HERO BLOCK
   ========================================================= */

.rosa-hero {
    position: relative;
    overflow: hidden;
}

/* 
   Fluid Crop:
   Mobile fast quadratisch.
   Desktop/4K breiter.
*/
.rosa-hero__media {
    position: relative;
    width: 100%;
    height: clamp(22rem, 72vw, 48rem);
    max-height: 78vh;
    background: var(--color-pink);
    overflow: hidden;
}

/* je breiter der Screen, desto flacher wird der Hero */
@media (min-width: 700px) {
    .rosa-hero__media {
        height: clamp(28rem, 46vw, 46rem);
    }
}

@media (min-width: 1400px) {
    .rosa-hero__media {
        height: clamp(34rem, 42vw, 58rem);
    }
}

.rosa-hero__video,
.rosa-hero__placeholder {
    width: 100%;
    height: 100%;
}

.rosa-hero__video {
    display: block;
    object-fit: cover;
    object-position: center center;
}

.rosa-hero__placeholder {
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: clamp(1.4rem, 3vw, 3rem);
}

/* Zahnrad liegt über Video */
.rosa-hero__gear {
    position: absolute;
    z-index: 5;
    right: clamp(-8rem, -8vw, -3rem);
    bottom: clamp(-8rem, -8vw, -3rem);
    width: clamp(12rem, 24vw, 36rem);
    height: auto;
    pointer-events: none;
    transform: rotate(var(--gear-rotation, 0deg));
    transform-origin: 50% 50%;
    will-change: transform;
}

/* Textbereich */
.rosa-hero__content {
    position: relative;
    z-index: 2;
    background: var(--color-red);
    color: var(--color-white);
    padding-block: clamp(3rem, 7vw, 8rem);
}

.rosa-hero__text {
    max-width: min(78ch, 100%);
}

.rosa-hero__text h1 {
    max-width: 13ch;
    margin-bottom: clamp(1rem, 2vw, 2rem);
    font-size: clamp(2.2rem, 6vw, 6rem);
    line-height: 0.95;
}

.rosa-hero__subline {
    max-width: 70ch;
    margin-bottom: clamp(1.2rem, 2vw, 2rem);
    font-weight: 800;
    font-size: clamp(1rem, 1.3vw, 1.35rem);
}

.rosa-hero__copy {
    max-width: 78ch;
    font-weight: 700;
    font-size: clamp(0.95rem, 1vw, 1.15rem);
    line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
    .rosa-hero__gear {
        transform: none !important;
    }
}

/* =========================================================
   7. INTRO (ROTER BLOCK)
   ========================================================= */

.intro {
    padding: var(--space-lg) 0;
}

.intro h1 {
    max-width: 700px;
    margin-bottom: var(--space-md);
}

.intro h2 {
    max-width: 700px;
    margin-bottom: var(--space-md);
}

.intro .text {
    max-width: 700px;
    font-weight: 600;
}

.button {
    display: inline-block;
    margin-top: var(--space-md);
    padding: 10px 16px;
    font-weight: 700;
}

.button--light {
    background: var(--color-white);
    color: var(--color-red);
}


/* =========================================================
   8. CARDS / GRID
   ========================================================= */

.grid {
    display: grid;
    gap: var(--space-md);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--color-pink);
    padding: var(--space-md);
}


/* =========================================================
   9. ACCESSIBILITY
   ========================================================= */

.skip-link {
    position: absolute;
    top: 10px;
    left: 10px;
    background: black;
    color: white;
    padding: 10px;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}


/* =========================================================
   10. RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .grid--3 {
        grid-template-columns: 1fr;
    }

    .main-menu {
        display: none;
    }

    .hero {
        min-height: 300px;
    }

    .hero img {
        height: 300px;
    }
    .language-switch {
        margin-top: var(--space-md);
    }

    .lang-item {
        font-size: 1.2rem;
    }
}