/* Promomo: Übersicht der Aktionen. Farben pro Aktionsart, Kacheln ohne Linien. */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Sans";
    src: url("../fonts/instrument-sans.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --bg: #F1F2F4;
    --tile: #FFFFFF;
    --ink: #15171C;
    --muted: #5F6570;
    --accent: #C8007A;
    --warn: #B4432C;

    --cashback-bg: #BFF0D8;
    --cashback-fg: #0A5A40;
    --gewinnspiel-bg: #FFE27A;
    --gewinnspiel-fg: #614200;
    --sammelaktion-bg: #D9D0FF;
    --sammelaktion-fg: #3A2690;
    --aktion-bg: #E3E6EA;
    --aktion-fg: #33363D;

    --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    --gutter: clamp(16px, 3vw, 44px);
    --gap: clamp(12px, 1.4vw, 22px);
    --radius: clamp(20px, 2vw, 30px);
}

/* Dunkel: per Systemeinstellung, sofern nicht hell gewählt, oder per Umschalter */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0D0F13;
        --tile: #20242C;
        --ink: #F1F2F4;
        --muted: #9AA1AD;
        --accent: #FF5CB8;
        --warn: #FF9A85;

        --cashback-bg: #123D2F;
        --cashback-fg: #8FE8C2;
        --gewinnspiel-bg: #3D3208;
        --gewinnspiel-fg: #FFD95C;
        --sammelaktion-bg: #29214D;
        --sammelaktion-fg: #C7BBFF;
        --aktion-bg: #2B303A;
        --aktion-fg: #C9CDD4;
    }
}

:root[data-theme="dark"] {
    --bg: #0D0F13;
    --tile: #20242C;
    --ink: #F1F2F4;
    --muted: #9AA1AD;
    --accent: #FF5CB8;
    --warn: #FF9A85;

    --cashback-bg: #123D2F;
    --cashback-fg: #8FE8C2;
    --gewinnspiel-bg: #3D3208;
    --gewinnspiel-fg: #FFD95C;
    --sammelaktion-bg: #29214D;
    --sammelaktion-fg: #C7BBFF;
    --aktion-bg: #2B303A;
    --aktion-fg: #C9CDD4;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    padding: 0 var(--gutter);
}

a {
    color: inherit;
}

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

/* Navigation */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px var(--gutter);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.wordmark {
    color: var(--accent);
    font-family: var(--display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
    border-radius: 8px;
}

.nav-right {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.filters {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.theme-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--ink);
}

/* Symbol zeigt, wohin umgeschaltet wird: Mond im hellen, Sonne im dunklen Design */
.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
    :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
}

.filters::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: none;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: 600 15px/1.2 var(--body);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.chip:hover {
    color: var(--ink);
}

.chip[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}

/* Kopf und Gruppen */

.intro {
    margin: clamp(32px, 5vw, 72px) 0 clamp(32px, 4vw, 56px);
    text-align: center;
}

.intro h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(32px, 7vw, 96px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.intro-brand {
    display: block;
    color: var(--accent);
}

.intro-sub {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 1.6vw, 21px);
}

.group + .group {
    margin-top: clamp(48px, 6vw, 96px);
}

.group-title {
    display: flex;
    color: var(--accent);
    align-items: baseline;
    gap: 10px;
    margin: 0 0 18px;
    font-family: var(--display);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.count {
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.cell[hidden],
.group[hidden] {
    display: none;
}

.empty {
    color: var(--muted);
    font-size: 18px;
}

/* Kachel */

.tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--tile);
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

a.tile:hover {
    transform: translateY(-4px);
}

.tile-media {
    position: relative;
    aspect-ratio: 1600 / 950; /* Format der Kachelbilder aus Blaze */
    overflow: hidden;
    background: var(--aktion-bg);
    color: var(--aktion-fg);
}

.tile-media.type-cashback { background: var(--cashback-bg); color: var(--cashback-fg); }
.tile-media.type-gewinnspiel { background: var(--gewinnspiel-bg); color: var(--gewinnspiel-fg); }
.tile-media.type-sammelaktion { background: var(--sammelaktion-bg); color: var(--sammelaktion-fg); }

.tile-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ohne Kachelbild: der Name als angeschnittenes Titelbild */
.cover {
    position: absolute;
    top: 0.18em;
    left: 0.2em;
    width: 150%;
    font-family: var(--display);
    font-size: clamp(56px, 5.6vw, 96px);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.05em;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

a.tile:hover .cover {
    transform: translateX(-0.12em);
}

.tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: clamp(18px, 1.8vw, 26px);
}

.tile-kicker {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.tile-title {
    margin: 0;
    overflow-wrap: break-word;
    hyphens: auto;
    font-family: var(--display);
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.tile-teaser {
    margin: 0;
    color: var(--muted);
}

.tile-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: auto 0 0;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 600;
}

.avail {
    font-variant-numeric: tabular-nums;
}

.cta {
    flex: none;
    color: var(--accent);
}

.cta span {
    display: inline-block;
    transition: transform 0.2s;
}

a.tile:hover .cta span {
    transform: translateX(4px);
}

.is-soldout .avail {
    color: var(--warn);
}

.is-post_end {
    opacity: 0.5;
    transition: opacity 0.25s;
}

.is-post_end:hover {
    opacity: 1;
}

/* Rechtsseiten */

.legal {
    max-width: 68ch;
    padding: clamp(28px, 5vw, 72px) 0;
}

.legal h1 {
    margin: 0 0 24px;
    font-family: var(--display);
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    overflow-wrap: break-word;
    hyphens: auto;
}

.legal h2 {
    margin: 32px 0 6px;
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
}

.legal p {
    margin: 0 0 12px;
}

.legal a {
    color: var(--accent);
}


/* Fuß */

.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
    margin-top: clamp(64px, 8vw, 128px);
    padding: 32px var(--gutter) 40px;
    color: var(--muted);
    font-size: 14px;
}

.foot p {
    margin: 0;
}

.foot nav {
    display: flex;
    gap: 24px;
}

.foot a {
    color: var(--accent);
    text-decoration: none;
    border-radius: 4px;
}

.foot a:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
