/* ============================================
   H. v.d. Nagel & Zn. — Landing Page
   Styled after nagelblumen.de design system
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-primary: #4a7c59;
    --color-primary-hover: #3d6a4b;
    --color-secondary: #8b6f47;
    --color-secondary-100: #f3ece2;
    --color-tertiary: #1a3a2a;
    --color-tertiary-deep: #0f2419;
    --color-nagel-base: #fcf4e8;
    --color-gold: #c4a265;
    --color-gold-light: #d4b87a;
    --color-cream: #faf8f4;
    --color-white: #ffffff;

    --font-heading: 'Poppins', 'Helvetica Neue', sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;

    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: #1a1a1a;
    background-color: var(--color-tertiary-deep);
    line-height: 1.6;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* --- Page Loader --- */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--color-tertiary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader__mark {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    text-transform: uppercase;
    animation: loaderPulse 1.6s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #0f241970;
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    transition: all 0.5s var(--ease-smooth);
}

.header--scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header__inner {
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
    transition: height 0.7s var(--ease-smooth);
}

.header--scrolled .header__inner {
    height: 3.5rem;
}

.header__logo {
    display: block;
    transition: all 0.7s var(--ease-smooth);
}

.header__logo:hover {
    opacity: 0.8;
    transform: scale(1.03);
}

.header__logo-img {
    height: 3rem;
    width: auto;
    object-fit: contain;
    transition: all 0.7s var(--ease-smooth);
}

.header--scrolled .header__logo-img {
    height: 2.25rem;
}

/* --- Language Switcher ---0f241970 */
.lang-switcher {
    position: relative;
}

.lang-switcher__current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    background: rgb(255 255 255 / 1%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.header--scrolled .lang-switcher__current {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
    color: #374151;
}

.lang-switcher__current:hover {
    border-color: var(--color-gold);
    background: rgba(255, 255, 255, 0.15);
}

.header--scrolled .lang-switcher__current:hover {
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.06);
}

.lang-switcher__chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s var(--ease-smooth);
}

.lang-switcher__current[aria-expanded="true"] .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__flag {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
    display: inline-block;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
}

.lang-switcher__flag svg,
.btn-primary__flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lang-switcher__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 12rem;
    background: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem) scale(0.95);
    transition: all 0.2s var(--ease-smooth);
}

.lang-switcher__dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: background 0.15s ease;
}

.lang-switcher__option:hover {
    background: rgba(74, 124, 89, 0.06);
    color: var(--color-primary);
}

.lang-switcher__option--active {
    background: rgba(74, 124, 89, 0.08);
    color: var(--color-primary);
}

.lang-switcher__label {
    letter-spacing: 0.05em;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg-image {
    position: absolute;
    inset: 0;
    background: url('../images/amaryllis.jpg') center center / cover no-repeat;
    animation: heroZoom 30s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

.hero__bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 36, 25, 0.55);
}

/* Content */
.hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 52rem;
    padding: 6rem 2rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 1s var(--ease-out-expo) 0.4s forwards;
}

/* Heading */
.hero__heading {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    line-height: 1.3;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-wrap: pretty;
}

.hero__heading em {
    font-style: normal;
    color: var(--color-gold-light);
}

/* Subheading */
.hero__subheading {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 36rem;
    margin: 0 auto 3rem;
}

/* CTA */
.hero__cta {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
}

.hero__cta-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.hero__cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Primary button — matches nagelblumen.de style */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.5s var(--ease-smooth);
    cursor: pointer;
    border: none;
    min-width: 14rem;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 124, 89, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary__flag {
    width: 24px;
    height: 17px;
    border-radius: 2px;
    flex-shrink: 0;
    display: inline-block;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
}

.btn-primary__arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-smooth);
}

.btn-primary:hover .btn-primary__arrow {
    transform: translateX(3px);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 2;
    background: var(--color-tertiary-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer__text {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.footer__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-gold);
    opacity: 0.3;
}

/* --- Animations --- */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(24px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header__inner {
        padding: 0 1rem;
        height: 4rem;
    }

    .header--scrolled .header__inner {
        height: 3.25rem;
    }

    .header__logo-img {
        height: 2.25rem;
    }

    .header--scrolled .header__logo-img {
        height: 2rem;
    }

    .hero__content {
        padding: 5rem 1.25rem 2rem;
    }

    .hero__subheading {
        margin-bottom: 2.5rem;
    }

    .hero__cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn-primary {
        width: 100%;
        max-width: 18rem;
    }

    .footer {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        text-align: center;
    }

    .footer__sep {
        display: none;
    }
}

@media (max-width: 400px) {
    .hero__heading {
        font-size: 1.5rem;
    }

    .lang-switcher__label {
        display: none;
    }
}

@media (min-width: 1400px) {
    .hero__content {
        max-width: 60rem;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__bg-image {
        animation: none;
    }
}

/* --- Print --- */
@media print {
    .hero {
        min-height: auto;
        padding: 2rem;
    }

    .hero__bg,
    .header,
    .page-loader {
        display: none;
    }

    .hero__content {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero__content * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        color: #000 !important;
    }
}
