/* ===========================================================
   Ortsgeist — Branding-Overrides + Animationen v2
   Almsalbei + Bernstein, Inter + Fraunces, sanfte Animationen.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Farb-Palette */
    --color1: #4A6B5D;
    --color2: #2F4A3D;
    --color3: #D9A65C;
    --color4: #8C8472;

    --white: #FAF7F1;
    --white-opacity: rgba(250, 247, 241, 0.95);

    --black: #2A2823;
    --gray1: #2A2823;
    --gray2: #5C594F;
    --gray3: #8C8780;
    --gray4: #C9C4B8;
    --gray5: #EDE8DD;

    --font-family-normal: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-family-bold: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-weight-normal: 400;
    --font-weight-bold: 600;
    --font-variation-settings: normal;
    --font-variation-settings-bold: normal;

    --body-bg-color: var(--white);
    --header-bg-color: var(--white);
    --header-bg-overlay: var(--white-opacity);

    --border-radius: 4px;
    --logo-height: calc(var(--base-size, 16px) * 3.2);

    --easing: cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* ===== Typografie ===== */
h1, h2, h3,
.hero-text h1, .hero-text h2, .hero-text h3,
.heroimage h1, .heroimage h2,
.frame-type-header h1, .frame-type-header h2 {
    font-family: 'Fraunces', Georgia, "Iowan Old Style", serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--gray1);
}
.heroimage h1 { letter-spacing: -0.02em; }

body {
    font-family: var(--font-family-normal);
    color: var(--gray1);
    background: var(--white);
}
a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* ===== Logo-Wellen pulsieren beim Hover ===== */
.header-logo a img,
.header-logo img {
    transition: transform 350ms var(--easing);
}
.header-logo a:hover img,
.header-logo:hover img {
    animation: wavesPulse 1.6s ease-in-out infinite;
}
@keyframes wavesPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* ===== Hero — Text Fade-In beim Pageload ===== */
.heroimage h1,
.heroimage .bodytext,
.heroimage .frame-inner > * {
    animation: fadeUp 800ms var(--easing) both;
}
.heroimage .bodytext,
.heroimage p { animation-delay: 180ms; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Hero-Bild — sanftes Atmen / Nebel-Drift ===== */
.heroimage img,
.heroimage .image img,
.frame-type-heroimage img {
    transition: transform 800ms var(--easing);
}
/* das Hero-Bild bekommt eine ganz leichte ken-burns-artige Bewegung */
.heroimage,
.frame-type-heroimage {
    overflow: hidden;
}
.heroimage .image img,
.frame-type-heroimage .image img {
    animation: heroDrift 24s ease-in-out infinite alternate;
}
@keyframes heroDrift {
    0%   { transform: scale(1.02) translate(0, 0); }
    100% { transform: scale(1.05) translate(-1%, -0.5%); }
}

/* ===== Cards / Feature-Sektionen — Lift on Hover ===== */
.frame-type-textmedia,
.cols_2 > div > .frame,
.cols_2 .frame-type-textmedia {
    transition: transform 300ms var(--easing), box-shadow 300ms ease;
    will-change: transform;
}
.cols_2 .frame-type-textmedia:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(74, 107, 93, 0.12);
}

/* ===== CTA-Section ===== */
.cta-section {
    margin: 3rem auto 4rem;
    padding: 3.5rem 1.5rem;
    background: linear-gradient(135deg, var(--gray5) 0%, #F4EFE6 100%);
    border-radius: 8px;
    text-align: center;
    max-width: 920px;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(217, 166, 92, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    margin: 0 0 1rem;
    font-weight: 500;
    color: var(--gray1);
    line-height: 1.15;
}
.cta-section p {
    font-size: 1.08rem;
    color: var(--gray2);
    margin: 0 auto 2rem;
    max-width: 560px;
    line-height: 1.6;
}
.cta-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.cta-section a.btn-cta,
.cta-buttons a.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: 4px;
    font-family: var(--font-family-bold);
    font-weight: 500;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 250ms var(--easing);
    will-change: transform;
    border: 0;
    cursor: pointer;
}
.cta-section a.btn-cta:hover,
.cta-buttons a.btn-cta:hover {
    text-decoration: none;
}

/* Primary — Bernstein, Hover wird dunkel mit Pergament-Text */
.cta-section a.btn-cta-primary,
.cta-buttons a.btn-cta-primary {
    background: var(--color3);
    color: var(--gray1);
}
.cta-section a.btn-cta-primary:hover,
.cta-buttons a.btn-cta-primary:hover {
    background: var(--gray1);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 166, 92, 0.32);
}

/* Secondary — Almsalbei, Hover dunkel mit Pergament-Text */
.cta-section a.btn-cta-secondary,
.cta-buttons a.btn-cta-secondary {
    background: var(--color1);
    color: var(--white);
}
.cta-section a.btn-cta-secondary:hover,
.cta-buttons a.btn-cta-secondary:hover {
    background: var(--color2);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 107, 93, 0.32);
}

/* Pfeil-Slide auf beiden Hover-States */
.cta-section .btn-cta .arrow,
.cta-buttons .btn-cta .arrow {
    display: inline-block;
    transition: transform 200ms ease;
}
.cta-section .btn-cta:hover .arrow,
.cta-buttons .btn-cta:hover .arrow {
    transform: translateX(5px);
}

/* ===== Reveal-Animation (via IntersectionObserver getriggert) ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 700ms var(--easing), transform 700ms var(--easing);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== Footer-Bereich ===== */
.footer-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--white);
    margin: 0 0 0.9rem;
    letter-spacing: -0.005em;
}
.content-footer p,
.content-footer1 p,
.content-footer .footer-address,
.content-footer .footer-contact {
    color: rgba(250, 247, 241, 0.82);
    line-height: 1.6;
    font-size: 0.95rem;
}
.footer-address {
    font-style: normal;
    margin: 0 0 0.8rem;
    line-height: 1.55;
}
.footer-address strong {
    color: var(--white);
    font-weight: 500;
}
.footer-contact {
    margin: 0;
}
.footer-contact a {
    color: var(--color3);
    text-decoration: none;
    transition: color 200ms ease;
    border-bottom: 1px dotted rgba(217, 166, 92, 0.4);
    padding-bottom: 1px;
}
.footer-contact a:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin: 0 0 0.5rem;
}
.footer-links a {
    color: rgba(250, 247, 241, 0.82);
    text-decoration: none;
    display: inline-block;
    transition: all 200ms var(--easing);
    position: relative;
    padding-left: 0;
}
.footer-links a:hover {
    color: var(--color3);
    padding-left: 6px;
}
.footer-links a::before {
    content: "→";
    position: absolute;
    left: -16px;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 200ms var(--easing);
    color: var(--color3);
}
.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Reduce-Motion respektieren ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ===== Sonne pulsiert (Wellenringe um die Bernstein-Sonne im Hero) =====
   Overlay sitzt auf figure.image (nur das Bild, ohne Hero-Text-Box).
   Bild wird vom jwsitepackage auf ~5:1 cropped (z.B. 1200x235).
   Sonne im Original-SVG bei (73.75%, 30%); im cropped Bild bei (~73.75%, ~12%). */
.frame-type-heroimage figure.image,
.heroimage figure.image {
    position: relative;
}
.frame-type-heroimage figure.image::after,
.heroimage figure.image::after {
    content: "";
    position: absolute;
    top: 12%;
    left: 73.75%;
    width: 14%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background-image: url("/fileadmin/ortsgeist/hero-pulse.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
}
@media (max-width: 600px) {
    .frame-type-heroimage figure.image::after,
    .heroimage figure.image::after {
        display: none;
    }
}
