/*
 * ConfiVend — Brand Stylesheet
 * Pixel-perfect reflection of the Figma design.
 * Loaded alongside Tailwind so utility classes compose naturally.
 */

:root {
    /* ===== CORE PALETTE ===== */
    --cv-navy:        #0d2340;   /* primary deep navy */
    --cv-navy-soft:   #14305a;
    --cv-navy-deep:   #081a31;
    --cv-hero-bg:       #0b1d33;   /* hero card navy (Figma) */
    --cv-hero-navy:     #0b1d33;
    --cv-hero-navy-soft: #142a42;
    --cv-hero-glow:     #3a5a78;   /* muted disc behind machine */
    --cv-hero-accent:   #7dd3fc;   /* headline: Automat. / betriebsbereit. / rentabel. */
    --cv-hero-wave-band: #BDE3FF;  /* wave band below navy (Figma) */
    --cv-hero-wave-gray: #3d4d5c;  /* charcoal band between navy field and sky wave */
    --cv-hero-moon: #BDE3FF;       /* solid top-right disc */
    --cv-hero-cta-bg:   #52b4e8;   /* Figma: vibrant medium-blue hero CTA */
    --cv-hero-cta-bg-hover: #3ea0d9;
    --cv-hero-wave-line: #89cff0; /* rim along white wave */
    --cv-cyan:        #82b9d6;
    --cv-cyan-strong: #2d97c7;
    --cv-cyan-bright: #00b4d8;
    --cv-orange:      #ff7a2e;
    --cv-orange-deep: #e85f12;

    --cv-paper:       #ffffff;
    --cv-paper-soft:  #f7f9fb;
    --cv-card-blue:   #d8e6ee;   /* light blue card backgrounds */
    --cv-card-blue-2: #c9dce8;   /* slightly stronger card stroke */
    --cv-text:        #0a1f3a;
    --cv-text-muted:  #5d6b7c;

    --cv-line:        #e3e8ee;
    --cv-line-strong: #c9d3dd;

    /* ===== RADII ===== */
    --cv-radius-md:  12px;
    --cv-radius-lg:  18px;
    --cv-radius-xl:  24px;
    --cv-radius-2xl: 32px;
    --cv-radius-3xl: 40px;

    /* ===== SHADOWS ===== */
    --cv-shadow-sm: 0 1px 2px rgba(13,35,64,.06), 0 1px 3px rgba(13,35,64,.04);
    --cv-shadow-md: 0 8px 24px -10px rgba(13,35,64,.18);
    --cv-shadow-lg: 0 28px 60px -28px rgba(13,35,64,.3);
}

/* Base reset / typography */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--cv-paper);
    color: var(--cv-text);
    font-feature-settings: 'cv11', 'ss01';
}

::selection {
    background: var(--cv-cyan);
    color: var(--cv-navy);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
 * LOGO
 * ============================================================ */
/* Legacy helper — icon-only square used where the full logo is too wide. */
.cv-logo-mark {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: 9px;
    flex-shrink: 0;
    background:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 48' fill='none'><rect width='54' height='48' rx='9' fill='%230d2340'/><line x1='9' y1='11' x2='38' y2='11' stroke='white' stroke-width='3.5' stroke-linecap='round'/><line x1='9' y1='19' x2='38' y2='19' stroke='white' stroke-width='3.5' stroke-linecap='round'/><line x1='9' y1='27' x2='28' y2='27' stroke='white' stroke-width='3.5' stroke-linecap='round'/><circle cx='42' cy='19' r='3' fill='white'/><path d='M16 36 L27 47 L58 7' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / cover;
}

/* ============================================================
 * BUTTONS
 * ============================================================ */
.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1;
    transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
}
.cv-btn-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--cv-cyan-bright);
    color: var(--cv-navy);
    display: inline-grid;
    place-items: center;
    flex: none;
}

/* Light pill on dark */
.cv-btn-light {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}
.cv-btn-light:hover {
    background: rgba(255,255,255,.16);
    transform: translateY(-1px);
}

/* Home hero — white CTA (Figma): navy label, navy disc, white arrow */
.cv-btn-hero-solid {
    background-color: #fff;
    color: #0b1d33; /* hero navy — not pure black (Figma) */
    border: 1px solid rgba(11, 29, 51, .1);
    border-radius: 12px;
    padding: .92rem 1.35rem .92rem 1.45rem;
    font-weight: 700;
    font-size: .95rem;
    box-shadow: 0 1px 4px rgba(11, 29, 51, .07);
}
.cv-btn-hero-solid:hover {
    background-color: #f7fafc;
    border-color: rgba(11, 29, 51, .14);
    color: #0b1d33;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(11, 29, 51, .1);
}
.cv-btn-icon-hero {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background-color: #0b1d33;
    color: #fff;
    display: inline-grid;
    place-items: center;
    flex: none;
}

/* Dark navy on light */
.cv-btn-dark {
    background: var(--cv-navy);
    color: #fff;
    border-color: var(--cv-navy);
}
.cv-btn-dark:hover {
    background: var(--cv-navy-soft);
    transform: translateY(-1px);
    box-shadow: var(--cv-shadow-md);
}

/* Orange CTA */
.cv-btn-orange {
    background: var(--cv-orange);
    color: #fff;
    border-color: var(--cv-orange);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    padding: 1rem 1.6rem;
}
.cv-btn-orange:hover {
    background: var(--cv-orange-deep);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(255,122,46,.5);
}

/* Cyan CTA */
.cv-btn-cyan {
    background: var(--cv-cyan-bright);
    color: var(--cv-navy);
    border-color: var(--cv-cyan-bright);
    font-weight: 600;
}
.cv-btn-cyan:hover {
    background: #14c5e5;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(0,180,216,.5);
}

/* Ghost/outline */
.cv-btn-ghost {
    background: transparent;
    color: var(--cv-navy);
    border-color: var(--cv-line-strong);
}
.cv-btn-ghost:hover { background: var(--cv-paper-soft); border-color: var(--cv-navy); }

/* ============================================================
 * PILL / EYEBROW
 * ============================================================ */
.cv-pill {
    display: inline-flex;
    align-items: center;
    padding: .42rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--cv-line-strong);
    background: #fff;
    color: var(--cv-navy);
    font-size: .82rem;
    font-weight: 500;
}
.cv-pill-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.3);
}

/* Hero eyebrow — small caps white pill (Figma) */
.cv-pill-hero {
    font-size: .68rem !important;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    padding: .38rem .95rem !important;
    border-color: rgba(255, 255, 255, .55) !important;
}

/* ============================================================
 * HEADINGS
 * ============================================================ */
.cv-h-cyan {
    color: var(--cv-cyan);
}
.cv-h-orange {
    color: var(--cv-orange);
}

/* ============================================================
 * CARDS
 * ============================================================ */
.cv-card {
    background: var(--cv-card-blue);
    border-radius: var(--cv-radius-2xl);
    padding: 1.75rem;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.cv-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cv-shadow-md);
}

.cv-card-product {
    background: var(--cv-card-blue);
    border-radius: var(--cv-radius-2xl);
    padding: 1.5rem;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.cv-card-product:hover {
    transform: translateY(-4px);
    box-shadow: var(--cv-shadow-md);
}

.cv-card-feature {
    background: var(--cv-card-blue);
    border-radius: var(--cv-radius-2xl);
    padding: 1.5rem 1.5rem 1.75rem;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.cv-card-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--cv-shadow-md);
}

/* ============================================================
 * DARK SECTIONS — large rounded blocks
 * ============================================================ */
.cv-block-dark {
    background: linear-gradient(135deg, var(--cv-navy) 0%, var(--cv-navy-deep) 100%);
    border-radius: var(--cv-radius-3xl);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cv-block-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(45,151,199,.18) 0%, transparent 60%),
        radial-gradient(40% 60% at 0% 100%, rgba(255,122,46,.06) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Home hero — full-width stripe or contained card ── */
.cv-hero-block.cv-block-dark.cv-hero-block--fullwidth {
    border-radius: 0 !important;
}
.cv-hero-block {
    background: linear-gradient(175deg, var(--cv-hero-bg) 0%, #071422 100%) !important;
    isolation: isolate;
}
/* Home hero — Figma: top-right solid moon (clipped), no centre glow */
.cv-hero-block.cv-block-dark::before {
    background:
        radial-gradient(ellipse 38% 44% at 12% 96%, rgba(7, 18, 35, .38) 0%, transparent 56%);
    z-index: 0;
}

/* Moon sits above vignette (::before); behind waves (z-2) & content (z-5) */
.cv-hero-moon-mask {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.cv-hero-moon {
    position: absolute;
    top: -16%;
    right: -28%;
    width: min(92vw, 520px);
    height: min(92vw, 520px);
    border-radius: 50%;
    background: var(--cv-hero-moon, #BDE3FF);
}

@media (min-width: 1024px) {
    .cv-hero-moon {
        top: -20%;
        right: -24%;
        width: min(36vw, 580px);
        height: min(36vw, 580px);
    }
}

@media (max-width: 1023px) {
    .cv-hero-moon {
        top: -8%;
        right: -20%;
        width: min(90vw, 300px);
        height: min(90vw, 300px);
    }
}

.cv-hero-block .cv-hero-title,
.cv-hero-block .hero-sublead,
.cv-hero-block .cv-pill-hero {
    font-family: 'Inter', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

.cv-hero-title {
    letter-spacing: -0.035em;
    font-weight: 800;
}

/* Figma headline accent — Automat. / betriebsbereit. / rentabel. */
.cv-hero-accent {
    color: var(--cv-hero-accent);
}

/* Hero paragraph — white supporting text */
.hero-sublead {
    color: rgba(255, 255, 255, .92);
    font-weight: 400;
}

/* Integrated machine photo — no global drop shadow; subtle feet contact shadow only */
.cv-hero-machine-frame {
    position: relative;
}
.cv-hero-machine-frame img {
    position: relative;
    z-index: 2;
    filter: none;
}
.cv-hero-machine-feet-shadow {
    position: absolute;
    left: 18%;
    right: 14%;
    bottom: 2%;
    height: clamp(14px, 3.5vw, 22px);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(11, 29, 51, .22) 0%,
        rgba(11, 29, 51, .08) 45%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 1;
    transform: translateY(4px);
}
@media (max-width: 1023px) {
    .cv-hero-machine-feet-shadow {
        left: 14%;
        right: 10%;
        height: clamp(12px, 4vw, 18px);
    }
}

/* Bottom wave SVG: painters stack (three fills) — tweak radii via .hero-wave-wrap only */
.hero-wave-wrap {
    border-radius: 0 0 var(--cv-radius-xl) var(--cv-radius-xl);
    overflow: hidden;
}
@media (min-width: 1024px) {
    .hero-wave-wrap {
        border-radius: 0 0 42px 42px;
    }
}
.cv-hero-block--fullwidth .hero-wave-wrap {
    border-radius: 0;
}

/* Solid hero CTA: allow graceful wrap on narrow phones */
.cv-btn.cv-btn-hero-solid {
    white-space: normal;
    line-height: 1.35;
}

/*
 * Hero CTA — override `a { color: inherit }` etc.: white pill, navy label,
 * navy disc + white arrow (same in DE + EN).
 */
.cv-hero-block a.cv-btn.cv-btn-hero-solid {
    background-color: #fff !important;
    color: #0b1d33 !important;
    border-color: rgba(11, 29, 51, .1) !important;
    text-decoration: none;
}
.cv-hero-block a.cv-btn.cv-btn-hero-solid:hover {
    background-color: #f7fafc !important;
    color: #0b1d33 !important;
    border-color: rgba(11, 29, 51, .14) !important;
}
.cv-hero-block .cv-btn-icon-hero {
    background-color: #0b1d33 !important;
    color: #fff !important;
}
.cv-hero-block a.cv-btn.cv-btn-hero-solid span:not(.cv-btn-icon-hero) {
    color: inherit !important;
}

/* Diagonal stripes overlay (used on hero, ctas) */
.cv-stripes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
}
.cv-stripes::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -15%;
    width: 70%;
    height: 130%;
    background: repeating-linear-gradient(
        -65deg,
        rgba(255,255,255,.05) 0 1px,
        transparent 1px 38px,
        rgba(45,151,199,.07) 38px 39px,
        transparent 39px 76px
    );
    transform: skewX(-15deg);
}
.cv-stripes::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, transparent 60%, rgba(45,151,199,.08) 80%, transparent 95%);
}

/* Dotted pattern (shop hero) */
.cv-dots {
    --cv-dot: rgba(255,255,255,.18);
    background-image: radial-gradient(var(--cv-dot) 1.5px, transparent 1.6px);
    background-size: 22px 22px;
}

/* ============================================================
 * INPUTS
 * ============================================================ */
.cv-input {
    width: 100%;
    padding: .9rem 1rem;
    background: #fff;
    border: 1px solid var(--cv-line);
    border-radius: 12px;
    color: var(--cv-text);
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cv-input:focus {
    outline: none;
    border-color: var(--cv-cyan-strong);
    box-shadow: 0 0 0 4px rgba(45,151,199,.12);
}
.cv-input-dark {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.16);
    color: #fff;
}
.cv-input-dark::placeholder { color: rgba(255,255,255,.5); }
.cv-input-dark:focus {
    border-color: var(--cv-cyan);
    box-shadow: 0 0 0 4px rgba(130,185,214,.18);
}

/* ============================================================
 * FAQ
 * ============================================================ */
.cv-faq {
    background: var(--cv-card-blue);
    border-radius: var(--cv-radius-xl);
    padding: 1.5rem 1.75rem;
    transition: background .25s ease;
    color: var(--cv-navy);
}
.cv-faq[open] {
    background: var(--cv-navy);
    color: #fff;
}
/* Force all child text to inherit the open/closed color — prevents Tailwind overrides */
.cv-faq[open] summary *,
.cv-faq[open] > div {
    color: inherit !important;
}
.cv-faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cv-faq summary::-webkit-details-marker { display: none; }
.cv-faq-icon {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cv-faq[open] .cv-faq-icon { transform: rotate(45deg); }

/* ============================================================
 * MARQUEE
 * ============================================================ */
@keyframes cv-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.cv-marquee {
    animation: cv-marquee 38s linear infinite;
}
.cv-marquee:hover { animation-play-state: paused; }

/* ============================================================
 * REVEAL
 * ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--cv-reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
 * STARS
 * ============================================================ */
.cv-stars { display: inline-flex; gap: 4px; color: var(--cv-navy); }
.cv-stars svg { width: 16px; height: 16px; fill: currentColor; }

/* Handwritten accent for "Start here!" */
.cv-handwritten {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--cv-orange);
    line-height: 1;
}

/* Live underline accent (for cyan highlight phrases) */
.cv-underline-accent {
    height: 4px;
    width: 96px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--cv-cyan-strong), var(--cv-cyan), transparent);
    margin-top: 12px;
}

/* ============================================================
 * NAV LINKS
 * ============================================================ */
.cv-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: .5rem .25rem;
    color: var(--cv-text);
    font-weight: 500;
    font-size: .95rem;
    transition: color .2s ease;
}
.cv-nav-link:hover { color: var(--cv-cyan-strong); }
.cv-nav-link.is-active { color: var(--cv-navy); }
.cv-nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--cv-cyan-strong);
    transform: translateX(-50%);
}

/* ============================================================
 * SECTION SPACING
 * ============================================================ */
.cv-section { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) { .cv-section { padding-top: 6rem; padding-bottom: 6rem; } }

/* ============================================================
 * UTILITY
 * ============================================================ */
.cv-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--cv-line-strong), transparent);
}

@media (max-width: 768px) {
    .cv-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ============================================================
 * MOBILE RESPONSIVENESS FIXES
 * ============================================================ */

/* Allow button text to wrap on very small screens */
@media (max-width: 480px) {
    .cv-btn {
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    /* Slightly smaller padding on mobile */
    .cv-btn {
        padding: .7rem 1.15rem;
        font-size: .875rem;
    }
}

/* Prevent any element from overflowing its container horizontally */
.container {
    overflow-x: clip;
}

/* Cards should never overflow their grid cell */
.cv-card, .cv-card-product, .cv-card-feature {
    min-width: 0;
}

/* Input + button row in footer & contact: stack on mobile */
.cv-subscribe-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.cv-subscribe-row .cv-input {
    flex: 1 1 140px;
    min-width: 0;
}

/* Footer contact dl: wrap long values */
.cv-footer-dl dd {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Mobile filter sidebar drawer */
.cv-filter-drawer {
    display: none;
}
@media (max-width: 1023px) {
    .cv-filter-drawer {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 60;
        background: rgba(10,31,58,.55);
        backdrop-filter: blur(4px);
    }
    .cv-filter-drawer-panel {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(80vw, 320px);
        background: #fff;
        overflow-y: auto;
        padding: 1.5rem 1.25rem;
        box-shadow: 4px 0 32px rgba(10,31,58,.18);
    }
}

/* Testimonials: enable native touch scroll on mobile */
@media (max-width: 768px) {
    .cv-testimonials-track-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .cv-testimonials-track-wrap::-webkit-scrollbar { display: none; }
    .cv-testimonials-track-wrap .cv-testimonials-card {
        scroll-snap-align: start;
    }
}

/* Flex-banner machine row: constrain on small screens */
@media (max-width: 640px) {
    .cv-machine-row {
        overflow: hidden;
    }
}

@media print {
    .no-print { display: none !important; }
}
