/* Rebecca Rädler Naturkosmetik — Sitepackage Styles */

:root {
    --color-bg: #e7e3d1;
    --color-surface-light: var(--color-bg);
    --color-surface-dark: #2b2a1d;
    --color-dark: #2b2a1d;
    --color-text: #2b2a1d;
    --color-text-on-light: #24231a;
    --color-text-on-dark: #e7e3d1;
    --color-text-soft: #6b6a54;
    --color-accent: #5e7c1d;
    --color-accent-on-dark: #b8cc84;
    --color-border: #d6d2ba;
    --font-heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-width: 72rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.25;
    color: inherit;
    margin: 0 0 0.75em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.4rem; }

p {
    margin: 0 0 1em;
}

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

ul {
    padding-left: 1.2em;
}

/* Header */

.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-brand {
    text-decoration: none;
    line-height: 1.1;
}

.site-brand__name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-text);
}

.site-brand__tagline {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

.site-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.site-nav__link {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid transparent;
}

.site-nav__link:hover,
.site-nav__link[aria-current='page'] {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Main content */

.site-main {
    width: 100%;
}

.content-elements {
    padding: 2.5rem 0 4rem;
}

.frame {
    margin: 0 0 3rem;
    padding-left: max(1.5rem, calc((100% - var(--max-width)) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100% - var(--max-width)) / 2 + 1.5rem));
}

.frame:last-child {
    margin-bottom: 0;
}

.frame-type-header h1,
.frame-type-header h2 {
    text-align: center;
    margin-top: 3rem;
}

.frame-type-text,
.frame-type-textmedia {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Alternate light/dark panel backgrounds; position 1 (the hero) is excluded
   further down since it always matches :nth-of-type(odd) too, but the more
   specific hero rule overrides it. */
.frame:nth-of-type(odd) {
    background: var(--color-surface-light);
    color: var(--color-text-on-light);
}

.frame:nth-of-type(even) {
    background: var(--color-surface-dark);
    color: var(--color-text-on-dark);
}

.frame:nth-of-type(even) a {
    color: var(--color-accent-on-dark);
}

.frame-type-textmedia .ce-textpic {
    /* contains floated .ce-gallery so the block doesn't collapse under it */
    display: flow-root;
}

.ce-bodytext ul {
    list-style: disc outside;
    padding-left: 1.2em;
}

.ce-bodytext ul li {
    margin-bottom: 0.35em;
}

.ce-bodytext ul li::marker {
    color: currentColor;
}

.ce-gallery .ce-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ce-gallery .ce-column {
    flex: 1 1 260px;
}

.ce-textpic.ce-intext.ce-right .ce-gallery,
.ce-textpic.ce-intext.ce-left .ce-gallery {
    float: right;
    max-width: 45%;
    margin: 0 0 1rem 1.5rem;
}

.ce-textpic.ce-intext.ce-left .ce-gallery {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

/* Image-only element rendered as a full-bleed section background instead of
   an inline/floated image (frame_class "bg-image", set via the backend) */
.frame-bg-image {
    position: relative;
    min-height: 22rem;
    padding: 0;
    overflow: hidden;
}

.frame-bg-image .ce-gallery,
.frame-bg-image .ce-column,
.frame-bg-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

@media (min-width: 40rem) {
    .frame-bg-image {
        min-height: 28rem;
    }
}

/* The lead/hero element: first content element on a page — image and text
   side by side (image right, text left), stays contained/not full-bleed
   unlike the coloured panels below it */
.content-elements > .frame:first-child.frame-type-textmedia {
    background: transparent;
    color: var(--color-text);
    padding-top: 0;
    padding-bottom: 0;
}

.content-elements > .frame:first-child .ce-textpic {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.content-elements > .frame:first-child .ce-textpic.ce-right {
    flex-direction: row-reverse;
}

.content-elements > .frame:first-child .ce-gallery {
    flex: 0 0 45%;
    max-width: 45%;
}

.content-elements > .frame:first-child .ce-gallery img {
    max-height: 30rem;
    width: 100%;
    object-fit: cover;
}

.content-elements > .frame:first-child .ce-bodytext {
    flex: 1 1 auto;
}

.content-elements > .frame:first-child .ce-bodytext p {
    color: var(--color-text-soft);
    font-size: 1.1rem;
}

/* Footer */

.site-footer {
    background: var(--color-dark);
    color: var(--color-bg);
    margin-top: 4rem;
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.site-footer a {
    color: var(--color-bg);
}

.site-footer__contact {
    margin-bottom: 1rem;
    line-height: 1.9;
}

.site-footer__social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.site-footer__legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.site-footer__copyright {
    margin: 0;
    font-size: 0.8rem;
    color: #a5a28a;
}

@media (max-width: 40rem) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .frame-type-text,
    .frame-type-textmedia {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .ce-textpic.ce-intext.ce-right .ce-gallery,
    .ce-textpic.ce-intext.ce-left .ce-gallery {
        float: none;
        max-width: 100%;
        margin: 0 0 1rem;
    }

    .content-elements > .frame:first-child .ce-textpic,
    .content-elements > .frame:first-child .ce-textpic.ce-right {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .content-elements > .frame:first-child .ce-gallery {
        flex-basis: auto;
        max-width: 100%;
    }
}
