/* ==========================================================================
   Micro-UX-Ebene für caprifattoconamore.de
   Wird nach allen anderen Stylesheets geladen. style.css bleibt unverändert;
   wer diese Datei aus dem <head> entfernt, hat den vorherigen Stand.
   Keine neuen Farben: nur Marken- und vorhandene Grautöne.
   ========================================================================== */

:root {
    --ux-gold: #c59d5f;
    --ux-navy: #283C54;
    --ux-cream: #ece7df;
    --ux-text: #6b6b6b;          /* Fließtext auf Weiß: 5,3:1 statt 2,5:1 */
    --ux-ease: cubic-bezier(0.2, 0, 0, 1);
    --ux-fast: 160ms;
    --ux-base: 240ms;
}

/* --------------------------------------------------------------------------
   1. Lesbarkeit & Typografie
   -------------------------------------------------------------------------- */

/* Intro-Text und Rolle der Inhaber: gleiche Graufamilie, WCAG-AA-Kontrast */
#banner6 .heading--desc,
.member-info h6 {
    color: var(--ux-text);
}

/* Ruhigere Zeilenumbrüche: keine Einzelwörter in der letzten Zeile,
   ausgewogene Überschriften, Silbentrennung im Fließtext (lang="de") */
.heading--desc,
.legal-card p,
.legal-card li {
    text-wrap: pretty;
    -webkit-hyphens: auto;
    hyphens: auto;
    /* nur lange Wörter trennen (ab 10 Zeichen, mind. 5 vorne / 4 hinten),
       sonst entstehen Trennungen wie "kön-nen" */
    hyphenate-limit-chars: 10 5 4;
}

.heading--title,
.legal-hero h1,
.legal-card h2,
.legal-card h3 {
    text-wrap: balance;
}

/* --------------------------------------------------------------------------
   2. Feinabstimmung innerhalb bestehender Komponenten
   -------------------------------------------------------------------------- */

/* Adresse, E-Mail, Telefon: Links im Fließtext übernehmen die Zeilenhöhe des
   Absatzes, statt je 49 px – die Adresse liest sich wieder als eine Einheit */
.footer--widget-content p a {
    line-height: inherit;
}

/* Öffnungszeiten: Wochentag und Uhrzeit berühren sich nicht mehr (8 px).
   Flex statt float: bei Platzmangel bricht die Uhrzeit in ihrer Spalte um,
   statt unter den Wochentag zu rutschen */
.footer--reservation ul li {
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: baseline;
    align-items: baseline;
    gap: 8px;
}

.footer--reservation ul li span {
    float: none;
    text-align: right;
}

/* "Tisch reservieren": am Handy war der Text bündig an den Rahmen gepresst
   und wurde abgeschnitten – Breite folgt jetzt dem Text, 24 px Innenabstand */
@media (max-width: 767px) {
    .footer--reservation-wrapper .reservation-btn {
        display: inline-block;
        width: auto;
        min-width: 170px;
        padding: 0 24px;
    }
}

/* Lade-Spinner exakt mittig (vorher ca. 30 px über der Mitte) */
.preloader .spinner {
    margin: 0;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* Größere Trefferfläche für "Im neuen Tab öffnen" (vorher 18 px hoch),
   optisch unverändert */
.menu-pdf-card__header a {
    display: inline-block;
    padding: 12px 0;
    margin: -12px 0;
}

/* --------------------------------------------------------------------------
   3. Einheitliche, GPU-freundliche Übergänge
   Nur Farben, Rahmen, Deckkraft und Transform – kein "transition: all"
   (das animierte u. a. "visibility" am Hero-Button und war nicht composited)
   -------------------------------------------------------------------------- */

a,
.btn,
.menu-item,
.link--styled,
.footer--social-icons a {
    -webkit-tap-highlight-color: transparent;
    transition-property: color, background-color, border-color, opacity, box-shadow, transform;
    transition-duration: var(--ux-base);
    transition-timing-function: var(--ux-ease);
}

/* Spürbares Feedback beim Tippen/Klicken */
.btn:active {
    -webkit-transform: translateY(1px);
    transform: translateY(1px);
    transition-duration: var(--ux-fast);
}

.footer--social-icons a:active,
#scrollTopBtn:active {
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
    transition-duration: var(--ux-fast);
}

/* --------------------------------------------------------------------------
   4. Sichtbarer Tastatur-Fokus
   style.css entfernt jeden Fokusrahmen global (*, :focus { outline: none
   !important }). :focus-visible erscheint nur bei Tastaturbedienung,
   Mausklicks bleiben ohne Rahmen.
   -------------------------------------------------------------------------- */

:focus-visible {
    outline: 2px solid var(--ux-navy) !important;
    outline-offset: 3px !important;
}

/* Auf dunklen Flächen: Markengold statt Navy */
#slider :focus-visible,
#menuGrid :focus-visible,
.footer :focus-visible {
    outline-color: var(--ux-gold) !important;
}

@media (max-width: 991px) {
    .navbar-collapse :focus-visible {
        outline-color: var(--ux-gold) !important;
        outline-offset: -2px !important;
    }
}

/* Runder Gold-Button: weißer Ring mit Navy-Saum, auf jedem Hintergrund sichtbar */
#scrollTopBtn:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px var(--ux-navy);
}

/* --------------------------------------------------------------------------
   5. Nach-oben-Button: CSS-Übergang statt jQuery-Fade (läuft auf der GPU)
   -------------------------------------------------------------------------- */

#scrollTopBtn {
    display: block;
    opacity: 0;
    visibility: hidden;
    -webkit-transform: translateY(8px);
    transform: translateY(8px);
    transition: opacity var(--ux-base) var(--ux-ease),
                transform var(--ux-base) var(--ux-ease),
                background-color var(--ux-base) var(--ux-ease),
                visibility 0s linear var(--ux-base);
    will-change: opacity, transform;
}

#scrollTopBtn.is-visible {
    opacity: 1;
    visibility: visible;
    -webkit-transform: none;
    transform: none;
    transition-delay: 0s;
}

/* --------------------------------------------------------------------------
   6. Ladezustände
   -------------------------------------------------------------------------- */

/* Galerie & Team-Foto: Schimmer in Cremeton, bis das Bild da ist,
   dann sanftes Einblenden statt hartem Aufpoppen */
.portfolio-item .portfolio--img {
    overflow: hidden;
}

.portfolio-item .portfolio--img:has(> img.lazy-img:not(.is-loaded))::before {
    content: "";
    position: absolute;
    inset: 5px;
    background-color: var(--ux-cream);
    pointer-events: none;
}

.portfolio-item .portfolio--img:has(> img.lazy-img:not(.is-loaded))::after {
    content: "";
    position: absolute;
    inset: 5px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 65%);
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-animation: ux-shimmer 1.4s var(--ux-ease) infinite;
    animation: ux-shimmer 1.4s var(--ux-ease) infinite;
    pointer-events: none;
}

img.lazy-img {
    opacity: 0;
    transition: opacity 450ms var(--ux-ease);
}

img.lazy-img.is-loaded {
    opacity: 1;
}

.about-placeholder-image img.lazy-img {
    background-color: var(--ux-cream);
}

@-webkit-keyframes ux-shimmer {
    to { -webkit-transform: translateX(100%); transform: translateX(100%); }
}

@keyframes ux-shimmer {
    to { -webkit-transform: translateX(100%); transform: translateX(100%); }
}

/* Speisekarten-PDFs & Video: dezenter Spinner im vorhandenen dunklen
   Container, bis der Inhalt geladen ist */
.menu-pdf-card__viewer {
    position: relative;
}

.menu-pdf-card__viewer::before,
.yt-short-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--ux-gold);
    border-radius: 50%;
    -webkit-animation: ux-spin 0.9s linear infinite;
    animation: ux-spin 0.9s linear infinite;
    pointer-events: none;
}

.menu-pdf-card__viewer.is-loaded::before,
.yt-short-wrap.is-loaded::before {
    content: none;
}

.menu-pdf-card__viewer iframe,
.yt-short-wrap iframe {
    position: relative;
    z-index: 1;
}

@-webkit-keyframes ux-spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes ux-spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   7. Reduzierte Bewegung (Betriebssystem-Einstellung respektieren)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .portfolio-item .portfolio--img::after {
        content: none !important;
    }
}

/* Öffnungszeiten: eine Zeitspanne bricht nie in sich um,
   bei Platzmangel nur zwischen Mittags- und Abendzeit */
.footer--reservation .time-range {
    white-space: nowrap;
}

/* Desktop-Navigation: Fokusrahmen eng um den Text statt um die
   100 px hohe Header-Zeile */
@media (min-width: 992px) {
    .navbar-nav .menu-item:focus-visible {
        outline-offset: -32px !important;
    }
}

/* Credit-Link im Footer: Gold wie die übrigen Footer-Links, auf beiden Seiten gleich
   (impress.html setzt Links im Copyright sonst auf die Textfarbe) */
.footer--copyright a.credit-link {
    color: var(--ux-gold);
    text-decoration: none;
}

@media (hover: hover) {
    .footer--copyright a.credit-link:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

/* --------------------------------------------------------------------------
   Goldschimmer, der dem Mauszeiger über den Galeriefotos folgt.
   Nur mit echter Maus (nicht am Handy/Touch), nicht bei "Bewegung reduzieren".
   Position kommt als --glow-x/--glow-y aus einem kleinen Skript in index.html.
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .portfolio-item .portfolio--img:has(> img.is-loaded)::after {
        content: "";
        position: absolute;
        inset: 5px;
        pointer-events: none;
        background: radial-gradient(circle 200px at var(--glow-x, 50%) var(--glow-y, 50%),
                    rgba(197, 157, 95, 0.38) 0%,
                    rgba(197, 157, 95, 0.11) 45%,
                    rgba(197, 157, 95, 0) 72%);
        mix-blend-mode: screen;
        opacity: 0;
        transition: opacity 450ms var(--ux-ease);
    }

    .portfolio-item .portfolio--img:has(> img.is-loaded):hover::after {
        opacity: 1;
    }
}

/* Team-Sektion: Platz für die Öffnungszeiten-Karte, die von unten
   in den Abschnitt hineinragt */
@media (min-width: 768px) {
    #team1 .team-gallery {
        margin-bottom: 70px;
    }
}

/* --------------------------------------------------------------------------
   Momente & Essen: Mosaik mit zwei großen Bildern.
   Abstände kommen aus dem 5-px-Innenabstand von .portfolio--img (wie in der
   Galerie), daher gap 0 – so sind große Kacheln exakt 2 x 2 kleine.
   Aktuell 14 Fotos = 12 kleine + 2 große = 20 Felder (4 x 5 bzw. 2 x 10).
   -------------------------------------------------------------------------- */
.momente {
    padding: 100px 0 90px;
}

.momente-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 0 -5px;
}

@media (min-width: 768px) {
    .momente-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.momente-item {
    aspect-ratio: 2 / 3;
    min-width: 0;
}

.momente-item--feature {
    grid-column: span 2;
    grid-row: span 2;
}

.momente-item .portfolio--img {
    height: 100%;
}

.momente-item .portfolio--img img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

@media (max-width: 767px) {
    .momente {
        padding: 70px 0 60px;
    }
}

/* Team: bei unvollständiger letzter Reihe mittig statt linksbündig */
#team1 .team-gallery .row-no-padding {
    display: -webkit-box;
    display: flex;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    justify-content: center;
}

/* ==========================================================================
   VEREDELUNG (10.11.2026)
   Feinere Typografie, ruhigere Flächen, weiche Bewegung. Keine neuen Farben,
   keine neuen Schriften, kein geändertes Layout. Dieser Block lässt sich
   als Ganzes entfernen.
   ========================================================================== */

::selection {
    background: var(--ux-gold);
    color: #fff;
}

/* --- Navigation & Buttons: leichter, weiter gesperrt ---------------------- */
.navbar-nav .menu-item {
    font-weight: 600;
    letter-spacing: 0.12em;
}

.btn {
    font-weight: 600;
    letter-spacing: 0.18em;
}

.btn--bordered {
    border-width: 1px;
}

.link--styled,
.menu-pdf-card__header a {
    font-weight: 600;
    letter-spacing: 0.14em;
}

/* --- Hero: Schrift hebt sich weich vom Foto ab ---------------------------- */
.slide--headline {
    letter-spacing: 0.02em;
    text-shadow: 0 2px 36px rgba(0, 0, 0, 0.35);
}

.slide--subheadline {
    letter-spacing: 0.06em;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

/* --- Überschriften & Fließtext -------------------------------------------- */
.heading--subtitle {
    margin-bottom: 8px;
}

/* Sperrung erst ab Tablet: am Handy würden Überschriften sonst früher umbrechen */
@media (min-width: 768px) {
    .heading--title {
        letter-spacing: 0.03em;
    }

    .heading--subtitle {
        letter-spacing: 0.04em;
    }
}

.heading .heading--desc {
    font-size: 16px;
    line-height: 1.75;
}

/* --- Inhaber-Karten: weicher, tiefer Schatten statt hartem Rand ----------- */
.team-shadow .member {
    border-radius: 0;
    box-shadow: 0 24px 60px -28px rgba(40, 60, 84, 0.38), 0 0 0 1px rgba(40, 60, 84, 0.06);
}

.member .member-info h5 {
    letter-spacing: 0.05em;
    color: var(--ux-navy);
}

.member .member-info h6 {
    color: var(--ux-text);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

/* --- Speisekarte: Foto-Hintergrund, feine Goldlinie ----------------------- */
#menuGrid {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: #1b1a1a;
    background-position: center;
    background-size: cover;
}

#menuGrid.bg-overlay-dark:before {
    background-color: rgba(22, 24, 30, 0.8);
}

.menu-pdf-card {
    border-color: rgba(197, 157, 95, 0.55);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}

.menu-pdf-card__header h3 {
    font-weight: 400;
    letter-spacing: 0.06em;
}

/* --- Footer ---------------------------------------------------------------- */
.footer--widget-content h3,
.footer--reservation h3 {
    letter-spacing: 0.08em;
}

.footer--widget-content p a {
    font-weight: 600;
    letter-spacing: 0.06em;
}

.footer--copyright span {
    letter-spacing: 0.04em;
}

/* --- Sanftes Einblenden beim Scrollen (Klasse setzt ein Skript in index.html;
       ohne JavaScript oder bei "Bewegung reduzieren" bleibt alles sichtbar) -- */
.reveal {
    opacity: 0;
    -webkit-transform: translateY(22px);
    transform: translateY(22px);
    transition: opacity 900ms var(--ux-ease), transform 900ms var(--ux-ease);
}

.reveal.is-in {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
}

/* ==========================================================================
   CAPRI-FLIESE als wiederkehrendes Motiv (10.11.2026)
   Motiv der Zementfliesen aus Boden, Fassade und Logo, als SVG in
   assets/images/fliese/ (zusammen unter 3 KB).
   ========================================================================== */

/* Ornament unter allen Überschriften (ersetzt das "» «"-Zeichen) */
.divider--shape-4 {
    height: 24px;
    background: url(../images/fliese/ornament.svg) center / 160px 24px no-repeat;
}

/* Zeichen unter "Öffnungszeiten" */
.divider--shape-11 {
    height: 18px;
    background: url(../images/fliese/fliese.svg) center / 18px 18px no-repeat;
}

/* Fries über dem Footer – wie das Fliesenband an der Fassade */
.fliesen-fries {
    height: 36px;
    background: url(../images/fliese/fries.svg) left center / 36px 36px repeat-x;
    border-top: 1px solid var(--ux-gold);
    border-bottom: 1px solid var(--ux-gold);
}

/* Unterschrift unter dem Begrüßungstext, Schreibschrift wie im Logo */
.signatur {
    font-family: "Great Vibes", cursive;
    font-size: 40px;
    line-height: 1.1;
    color: var(--ux-navy);
    margin: 22px 0 0;
}

@media (max-width: 767px) {
    .signatur {
        font-size: 34px;
    }
}

/* Ladebildschirm: die Fliese dreht sich langsam statt der drei Punkte */
.preloader .spinner {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px; /* zentriert über margin, transform gehört der Drehung */
    -webkit-transform: none;
    transform: none;
    background: url(../images/fliese/fliese.svg) center / contain no-repeat;
    -webkit-animation: ux-spin 2.4s linear infinite;
    animation: ux-spin 2.4s linear infinite;
}

.preloader .spinner > div {
    display: none;
}
